:root {
  --primary: #2459ed;
  --ink: #18243b;
  --muted: #728096;
  --line: #e3e8f0;
  --paper: #f4f6fa;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 17px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.3;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.danger,
.error {
  color: #c8364d;
}
.hint,
small {
  color: var(--muted);
  font-size: 12px;
}
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce2eb;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  border-radius: 8px;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a3baff;
  outline-offset: 1px;
}
input[type="color"] {
  height: 42px;
  padding: 5px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
.check-label {
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
}
h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}
h1 {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1.1px;
  margin: 14px 0;
}
h2 {
  letter-spacing: -0.7px;
}
p {
  line-height: 1.75;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 750;
  color: var(--primary);
}
.brand {
  font-size: 25px;
  letter-spacing: -1.1px;
  font-weight: 850;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 650;
  margin-top: 6px;
  color: #9ba6bb;
}
.auth {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, #dce6ff, transparent 45%), #f3f6fc;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(440px, 100%);
  background: #fff;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 80px #203a6212;
}
.auth-card h1 {
  font-size: 30px;
}
.auth-card > button {
  width: 100%;
  margin: 10px 0 22px;
}
.auth-card > small {
  display: block;
  text-align: center;
}
.admin {
  background: var(--paper);
}
.admin-layout {
  display: grid;
  grid-template-columns: 235px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #101c32;
  color: #fff;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sidebar .brand {
  padding: 0 10px 32px;
}
.sidebar > button {
  justify-content: flex-start;
  white-space: nowrap;
  font-size: 13px;
  padding: 13px 15px;
}
.nav-item {
  background: transparent;
  color: #b0bdd3;
}
.nav-active {
  background: #284dba;
  color: #fff;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-bottom .ghost {
  background: #1b2a44;
  border-color: #334360;
  color: #d0d9e9;
}
.sidebar-bottom small {
  font-size: 10px;
  color: #7f90ad;
  text-align: center;
}
.workspace {
  min-width: 0;
  padding: 45px 44px;
}
.view-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.view-heading p {
  color: var(--muted);
  max-width: 650px;
  font-size: 14px;
}
.view-heading button {
  flex-shrink: 0;
}
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.page-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 19px;
}
.page-art {
  height: 165px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(135deg, #eaf1ff, #ebe8fa);
  border-radius: 11px;
  padding: 25px;
  margin-bottom: 20px;
}
.mini-title {
  font-weight: 850;
  font-size: 24px;
  max-width: 200px;
  line-height: 1.2;
}
.mini-line {
  height: 5px;
  width: 65px;
  background: #aebfee;
  border-radius: 4px;
  margin: 14px 0;
}
.mini-line.short {
  width: 110px;
  height: 4px;
  background: #c8d3ee;
}
.page-card h2 {
  font-size: 22px;
  margin: 12px 0 0;
}
.page-card p {
  font-size: 12px;
  color: var(--muted);
}
.badge {
  display: inline-block;
  border-radius: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 8px;
  background: #edf0f5;
  color: #677389;
}
.badge.green {
  color: #178460;
  background: #e6f6ee;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar label {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}
.toolbar button,
.toolbar a {
  font-size: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
.form-grid > button {
  align-self: end;
  margin-bottom: 16px;
}
.settings-form {
  max-width: 1000px;
  background: #fff;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.settings-form > button {
  margin: 20px 10px 0 0;
}
.menu-editor {
  background: #f7f9fc;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.menu-editor > .ghost {
  margin-top: 10px;
}
.sub-row {
  margin: 12px 0 12px 24px;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 25px;
}
.media-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 12px;
  gap: 10px;
  overflow: hidden;
  text-align: left;
  font-size: 12px;
}
.media-card img,
.media-card video {
  width: 100%;
  height: 145px;
  object-fit: contain;
  background: #f0f3fa;
  border-radius: 6px;
}
.media-card strong,
.media-card span {
  overflow-wrap: anywhere;
  max-width: 100%;
}
.media-card input {
  font-size: 11px;
}
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 15px;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
}
td select {
  min-width: 135px;
}
td button {
  padding: 7px 10px;
}
.modal {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 30px 100px #0b183755;
  width: min(850px, 95vw);
  max-height: 90vh;
  padding: 30px;
}
.modal::backdrop {
  background: #0c1d4980;
  backdrop-filter: blur(4px);
}
.modal .view-heading {
  margin-bottom: 22px;
}
.modal h2 {
  margin: 0;
}
.modal .media-grid {
  max-height: 50vh;
  overflow: auto;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  background: #13233d;
  color: #fff;
  border-radius: 12px;
  padding: 14px 24px;
  box-shadow: 0 15px 40px #0003;
  max-width: 90vw;
  transition: 0.2s;
  font-size: 14px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.editor-workspace {
  padding: 0;
}
.editor-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}
.editor-top strong {
  font-size: 13px;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.editor-top button {
  font-size: 11px;
  padding: 9px 10px;
}
.editor-top button:last-child {
  margin-left: auto;
}
.editor-layout {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 260px;
  min-height: calc(100vh - 68px);
}
.block-library,
.inspector {
  background: #fff;
  padding: 19px 15px;
  max-height: calc(100vh - 70px);
  overflow: auto;
  position: sticky;
  top: 70px;
}
.block-library {
  border-right: 1px solid var(--line);
}
.block-library h3,
.inspector h3 {
  font-size: 14px;
  margin: 4px 0 15px;
}
.block-library p {
  font-size: 11px;
  line-height: 1.6;
}
.block-choice {
  background: #f7f9fc;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 12px;
  font-size: 11px;
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 8px;
}
.block-library > .ghost {
  font-size: 11px;
  width: 100%;
  margin: 5px 0;
}
.canvas-stage {
  overflow: auto;
  padding: 28px 20px;
  background: #e9edf4;
  min-width: 0;
}
.canvas {
  background: #fff;
  max-width: 1200px;
  min-height: 600px;
  margin: 0 auto;
  box-shadow: 0 8px 35px #16326012;
  transition: max-width 0.2s;
}
.canvas.phone {
  max-width: 390px;
}
.editor-block {
  position: relative;
  border: 2px solid transparent;
  cursor: pointer;
}
.editor-block.selected {
  border-color: var(--primary);
}
.block-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #e9efff;
  color: #2459ed;
  padding: 4px;
  font-size: 9px;
  min-height: 29px;
  flex-wrap: wrap;
}
.block-tools span {
  margin-right: auto;
}
.block-tools button {
  padding: 3px 6px;
  font-size: 9px;
  border-radius: 4px;
}
.editor-block:not(.selected) .block-tools {
  opacity: 0.35;
}
.editor-block:hover .block-tools {
  opacity: 1;
}
.inspector {
  border-left: 1px solid var(--line);
}
.inspector label {
  font-size: 11px;
  gap: 5px;
  margin-bottom: 12px;
}
.inspector input,
.inspector select,
.inspector textarea {
  padding: 8px;
  font-size: 12px;
}
.inspector button {
  font-size: 10px;
  padding: 7px;
}
.inspector details {
  background: #f5f7fb;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.inspector summary {
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  margin-bottom: 12px;
}
.inspector h4 {
  font-size: 12px;
  margin: 20px 0 16px;
}
.child-row {
  display: flex;
  gap: 3px;
  margin-bottom: 5px;
}
.child-row button:first-child {
  flex: 1;
  justify-content: flex-start;
  overflow: hidden;
}
.site-header {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 1280px;
  margin: auto;
  padding: 22px 35px;
  min-height: 88px;
  border-bottom: 1px solid #eef1f6;
  background: #fff;
  position: relative;
  z-index: 5;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.8px;
  flex-shrink: 0;
}
.site-brand img {
  max-width: 130px;
  max-height: 56px;
  object-fit: contain;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.site-nav > a {
  color: var(--ink);
}
.site-nav .cart-link {
  color: var(--primary);
  background: #edf2ff;
  padding: 10px 15px;
  border-radius: 8px;
}
.hamburger {
  display: none;
  background: #f0f4ff;
  color: var(--primary);
  padding: 8px 13px;
  font-size: 22px;
  margin-left: auto;
}
.menu-hamburger {
  flex-wrap: wrap;
}
.menu-hamburger .hamburger {
  display: block;
}
.menu-hamburger .site-nav {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  align-items: stretch;
}
.menu-hamburger .site-nav.open {
  display: flex;
}
.submenu {
  position: relative;
}
.submenu summary {
  cursor: pointer;
}
.submenu-list {
  position: absolute;
  top: 30px;
  left: 0;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 15px 40px #1232;
  z-index: 9;
}
.menu-hamburger .submenu-list {
  position: static;
  box-shadow: none;
  margin-top: 12px;
}
.public-main {
  min-height: 65vh;
}
.block {
  overflow-wrap: anywhere;
  max-width: 100%;
}
.block h2 {
  margin: 0 0 22px;
  line-height: 1.13;
  font-weight: 820;
  letter-spacing: -1.4px;
}
.block p {
  font-size: 17px;
  margin: 0 auto 24px;
  max-width: 850px;
}
.block .eyebrow {
  display: block;
  margin-bottom: 24px;
}
.block-hero {
  min-height: 370px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: inherit;
}
.block-hero h2 {
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
}
.block-hero .button {
  align-self: center;
  margin-top: 12px;
}
.block-hero[style*="text-align: left"] .button {
  align-self: flex-start;
}
.block img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
.block iframe,
.block video {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  border-radius: 12px;
  background: #101c32;
  display: block;
}
.columns {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: 24px;
}
.columns .block h2 {
  font-size: clamp(22px, 2.5vw, 36px);
  letter-spacing: -0.8px;
}
.columns .block p {
  font-size: 15px;
}
.multiline {
  white-space: pre-line;
}
.empty-media,
.product-placeholder {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 12px;
  background: linear-gradient(135deg, #edf3ff, #eeeafa);
  color: #6f8ecf;
  font-size: 60px;
}
.block details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.block summary {
  font-weight: 750;
  cursor: pointer;
}
.block details p {
  margin-top: 20px;
  margin-bottom: 0;
}
.gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}
.product {
  text-align: left;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 10px;
}
.product h3 {
  font-size: 20px;
  margin: 4px 0 0;
  letter-spacing: -0.4px;
}
.product p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  white-space: pre-line;
}
.product strong {
  font-size: 21px;
}
.product button {
  margin-top: auto;
}
.product small {
  font-size: 11px;
}
.shop-wrap {
  max-width: 1150px;
  margin: auto;
  padding: 60px 30px;
}
.shop-wrap > .toolbar {
  margin: 25px 0;
}
.shop-wrap > .toolbar input {
  flex: 2;
  min-width: 160px;
}
.shop-wrap > .toolbar select {
  flex: 1;
  min-width: 160px;
}
.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.cart-row input {
  width: 85px;
}
.cart-row > div {
  flex: 1;
}
.cart-row p {
  font-size: 13px;
  margin: 8px 0;
}
.checkout {
  max-width: 650px;
  padding: 30px;
  border-radius: 16px;
  background: var(--paper);
  margin-top: 35px;
}
.site-footer {
  border-top: 1px solid var(--line);
  background: #f6f8fc;
  text-align: center;
  padding: 45px 25px;
  color: #66748c;
}
.site-footer strong {
  color: var(--ink);
  font-size: 22px;
}
.site-footer p {
  font-size: 13px;
  margin-top: 18px;
}
.anim-fade {
  animation: tb-fade 0.8s ease both;
}
.anim-rise {
  animation: tb-rise 0.8s ease both;
}
.anim-zoom {
  animation: tb-zoom 0.8s ease both;
}
@keyframes tb-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes tb-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes tb-zoom {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.canvas.phone .columns {
  grid-template-columns: 1fr;
}
.canvas.phone .mobile-hidden {
  display: none;
}
.canvas.phone .block {
  padding: 22px !important;
}
.canvas.phone .block h2 {
  font-size: 32px;
}
.canvas.phone .block-hero {
  min-height: 300px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 1250px) {
  .admin-layout {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 25px 12px;
  }
  .brand {
    font-size: 22px;
  }
  .workspace {
    padding: 32px 25px;
  }
  .editor-workspace {
    padding: 0;
  }
  .editor-layout {
    grid-template-columns: 140px minmax(250px, 1fr) 225px;
  }
  .block-library,
  .inspector {
    padding: 15px 10px;
  }
  .canvas-stage {
    padding: 20px 10px;
  }
  .editor-top strong {
    display: none;
  }
  .view-heading h1 {
    font-size: 30px;
  }
}
@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 15px;
    gap: 5px;
  }
  .sidebar .brand {
    padding: 5px 14px 5px 0;
  }
  .sidebar .brand small {
    display: none;
  }
  .sidebar-bottom {
    margin-top: 0;
    flex-direction: row;
    gap: 5px;
  }
  .sidebar-bottom small {
    display: none;
  }
  .sidebar-bottom .button,
  .sidebar-bottom button {
    font-size: 11px;
    padding: 8px;
  }
  .sidebar > button {
    font-size: 11px;
    padding: 9px;
  }
  .editor-layout {
    grid-template-columns: 125px minmax(230px, 1fr) 220px;
  }
  .view-heading {
    flex-wrap: wrap;
  }
  .site-header {
    gap: 20px;
  }
  .site-nav {
    gap: 14px;
  }
}
@media (max-width: 700px) {
  h1 {
    font-size: 30px;
  }
  .workspace {
    padding: 28px 17px;
  }
  .editor-workspace {
    padding: 0;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .block-library {
    position: static;
    max-height: none;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }
  .block-library h3,
  .block-library p,
  .block-library h4,
  .block-library hr,
  .block-library > .ghost {
    display: none;
  }
  .block-choice {
    width: auto;
    margin: 0;
    font-size: 10px;
    padding: 7px;
  }
  .canvas-stage {
    padding: 20px 10px;
  }
  .canvas {
    min-height: 300px;
  }
  .inspector {
    position: static;
    max-height: none;
    border-top: 1px solid var(--line);
    padding: 20px;
  }
  .editor-top {
    position: relative;
  }
  .editor-top #dirty-state {
    font-size: 10px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .settings-form {
    padding: 20px;
  }
  .page-grid {
    grid-template-columns: 1fr;
  }
  .site-header {
    padding: 18px 22px;
    flex-wrap: wrap;
  }
  .site-brand {
    font-size: 20px;
  }
  .site-header .hamburger {
    display: block;
  }
  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav.open {
    display: flex;
  }
  .submenu-list {
    position: static;
    box-shadow: none;
    margin-top: 12px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .block {
    padding: 25px !important;
  }
  .block h2 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .block-hero {
    min-height: 370px;
    padding: 45px 25px !important;
  }
  .block p {
    font-size: 16px;
  }
  .mobile-hidden {
    display: none;
  }
  .shop-wrap {
    padding: 40px 20px;
  }
  .checkout {
    padding: 20px;
  }
  .auth-card {
    padding: 28px;
  }
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cart-row {
    gap: 10px;
  }
  .cart-row input {
    width: 60px;
  }
  .cart-row button {
    padding: 8px;
  }
  .gallery img {
    height: 220px;
  }
  .site-footer {
    padding: 35px 20px;
  }
  .modal {
    padding: 20px;
  }
  .sub-row {
    margin-left: 12px;
  }
}
