:root {
  --lavender: #8e79d3;
  --lavender-100: #d9d2f6;
  --olive: #6b7a3a;
  --cream: #fff7eb;
  --ink: #2b2a3a;
  --muted: #9e948b;
  --surface: #fff;
  --border: color-mix(in srgb, var(--lavender) 22%, transparent);
  --shadow: 0 12px 34px rgba(43, 42, 58, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, var(--cream), var(--lavender-100)),
    radial-gradient(1000px 480px at 8% -8%, color-mix(in srgb, var(--lavender) 12%, transparent), transparent 60%);
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; color: var(--lavender); letter-spacing: 0.2px; overflow-wrap: anywhere; }
p, li { overflow-wrap: anywhere; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  z-index: 80;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-error { color: #8b2e2e; font-size: 0.92rem; margin-top: 8px; }
.legal-note { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }
input, select, textarea { font-size: 16px; }

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header {
  position: relative;
  background: linear-gradient(180deg, #2b2a3a, #232230);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  background: #ffcc33;
  color: #1a1408;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  padding: 12px 16px;
  text-align: center;
  border-bottom: 3px solid #b42318;
}
.preview-banner p {
  margin: 0;
  max-width: 52rem;
  color: #1a1408;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.preview-banner-label {
  display: inline-block;
  background: #b42318;
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
.nav {
  position: relative;
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  margin-right: auto;
  min-width: 0;
}
.brand img { width: 58px; height: 52px; object-fit: contain; flex-shrink: 0; }
.brand strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1; }
.brand small { display: block; color: #d9d2f6; font-size: 0.72rem; }
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a,
.cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.92rem;
  min-height: 44px;
}
.nav-links a.is-active,
.nav-links a:hover,
.cart-link:hover { background: rgba(255, 255, 255, 0.18); }
.cart-badge {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f2c94c;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
}
.cart-badge[hidden] { display: none; }
.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  font-size: 1.3rem;
  cursor: pointer;
}

.hero, .panel, .product-card, .info-card, .checkout-card, .gateway, .step-card, .portrait-card, .contact-tile, .legal-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  margin: 28px auto;
  overflow: hidden;
}
.hero-copy { padding: 36px 32px; }
.kicker {
  display: inline-block;
  color: var(--olive);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.15; margin-bottom: 12px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; min-height: 360px; }
.hero-actions, .product-actions, .toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-actions.is-center { justify-content: center; }

.btn, .btn-ghost, .btn-olive {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.btn { background: var(--lavender); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-olive { background: var(--olive); color: #fff; }
.btn-block { width: 100%; margin-top: 16px; }
.mt-lg { margin-top: 20px; }

.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 8px auto 28px;
}
.trust div, .info-card, .stat {
  background: color-mix(in srgb, white 82%, var(--lavender-100));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.section { margin: 18px auto 42px; }
.section h2 { margin-bottom: 8px; }
.grid-3, .grid-4, .products-grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.products-grid { grid-template-columns: repeat(3, 1fr); }
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-media { display: block; background: #f4efe6; }
.product-media img { width: 100%; height: 220px; object-fit: cover; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 1.15rem; }
.product-body h3 a { text-decoration: none; }
.product-body p { color: #5b5668; font-size: 0.95rem; flex: 1; }
.product-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.product-meta strong { color: var(--olive); font-size: 1.05rem; }
.category-card { position: relative; overflow: hidden; min-height: 180px; border-radius: var(--radius); display: block; }
.category-card img { width: 100%; height: 180px; object-fit: cover; filter: brightness(0.72); }
.category-card span {
  position: absolute;
  inset: auto 16px 16px;
  color: #fff;
}
.category-card strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.split img { width: 100%; border-radius: var(--radius); max-height: 360px; object-fit: cover; }
.page-head { padding: 28px 0 8px; }
.panel-pad { padding: 24px; margin-bottom: 28px; }
.empty-panel { padding: 28px; }

.page-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px auto 28px;
  box-shadow: var(--shadow);
  min-height: 280px;
}
.page-hero img {
  width: 100%;
  min-height: 280px;
  max-height: 420px;
  object-fit: cover;
  filter: brightness(0.52) saturate(1.08);
}
.page-hero-copy {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 24px 32px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(43, 42, 58, 0.9));
}
.page-hero-copy h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.8rem); line-height: 1.15; }
.page-hero-copy .kicker { color: #f2c94c; }
.page-hero-copy p { color: #efeaf8; max-width: 38rem; margin-top: 8px; }

.story-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  margin-bottom: 28px;
  align-items: stretch;
}
.story-copy {
  padding: 28px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.story-copy p { color: #4a4658; }
.quote {
  border-left: 4px solid var(--lavender);
  padding: 4px 0 4px 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  color: var(--ink);
}
.portrait-card { overflow: hidden; padding: 0; }
.portrait-card img { width: 100%; height: 320px; object-fit: cover; }
.portrait-body { padding: 18px 20px 22px; }
.portrait-body h2 { font-size: 1.25rem; margin-bottom: 6px; }

.material-card {
  position: relative;
  overflow: hidden;
  padding: 22px 18px 18px;
}
.material-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--lavender), var(--olive));
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  margin: 8px 0 32px;
}
.step-card {
  padding: 22px 18px 20px;
  position: relative;
  overflow: hidden;
}
.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--lavender), var(--olive));
}
.step-num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  color: var(--lavender);
  opacity: 0.4;
  display: block;
  line-height: 1;
  margin-bottom: 10px;
}
.step-card h2 { font-size: 1.15rem; margin-bottom: 8px; color: var(--ink); }
.safety-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.safety-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
  padding: 18px;
  border-left: 5px solid #b42318;
  background: #fff8f6;
}
.safety-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #b42318;
  color: #fff;
  font-weight: 800;
}

.contact-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.contact-tile {
  padding: 18px;
  text-decoration: none;
  display: grid;
  gap: 6px;
  min-height: 108px;
}
.contact-tile span { color: var(--olive); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-tile strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; color: var(--lavender); }

.legal-page .legal-block { padding: 22px 22px 8px; margin-bottom: 14px; }
.legal-page h2 { font-size: 1.2rem; margin-bottom: 8px; }
.legal-page p { margin-bottom: 14px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px; }
.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  min-height: 44px;
}
.chip.is-active { background: var(--lavender); color: #fff; border-color: transparent; }

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 24px auto 48px;
  padding: 18px;
}
.detail img { width: 100%; border-radius: 14px; max-height: 480px; object-fit: cover; }
.qty { display: flex; align-items: center; gap: 8px; margin: 16px 0; }
.qty input, input, select, textarea {
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  background: #fff;
}
.qty input { width: 72px; text-align: center; }
.qty .btn-ghost { min-width: 44px; padding: 0 12px; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }

.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.cart-table th, .cart-table td { padding: 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.cart-table img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.cart-product { display: flex; gap: 12px; align-items: center; }
.summary, .checkout-layout { display: grid; gap: 18px; margin: 20px auto 48px; }
.checkout-layout { grid-template-columns: 1.2fr 0.8fr; }
.checkout-card, .summary { padding: 22px; }
.pay-methods { display: grid; gap: 10px; }
.pay-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 44px;
}

.gateway {
  width: min(520px, calc(100% - 24px));
  margin: 48px auto;
  padding: 28px;
}
.gateway-brand { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.gateway h1 { font-size: 1.5rem; }
.card-preview {
  background: linear-gradient(135deg, #3d3558, #8e79d3);
  color: #fff;
  border-radius: 16px;
  padding: 22px;
  margin: 12px 0 18px;
  min-height: 150px;
}
.card-pan {
  margin-top: 28px;
  letter-spacing: 2px;
  font-size: 1.15rem;
}
.secure { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

.thanks { text-align: center; padding: 64px 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: #f6f3ee; }
.admin-side { background: #2b2a3a; color: #fff; padding: 24px 16px; }
.admin-side a, .admin-side button {
  display: block;
  width: 100%;
  text-align: left;
  color: #fff;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 6px;
  min-height: 44px;
}
.admin-side a.is-active, .admin-side button.is-active { background: rgba(255,255,255,0.14); }
.admin-main { padding: 28px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 24px; }
.stat strong { display: block; font-size: 1.4rem; color: var(--ink); }
table.data { width: 100%; background: #fff; border-collapse: collapse; border-radius: 12px; overflow: hidden; }
table.data th, table.data td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }
.login-box { width: min(420px, calc(100% - 24px)); margin: 12vh auto; padding: 28px; }
.field-price { width: 90px; }
.field-stock { width: 80px; }
.order-panel { padding: 18px; margin-top: 18px; }

#toast-root { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; }
.toast {
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
}
.toast.show { opacity: 1; transform: none; }

.site-footer {
  background: #2b2a3a;
  color: #efeaf8;
  margin-top: 48px;
  padding: 36px 0 calc(18px + env(safe-area-inset-bottom));
}
.site-footer .footer-grid,
.site-footer .footer-bottom {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 24px;
}
.site-footer h2, .site-footer h3 { color: #fff; margin-bottom: 8px; }
.site-footer a { color: #d9d2f6; text-decoration: none; display: inline-block; margin: 4px 8px 4px 0; min-height: 44px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.88rem;
}
.mescon-badge img { height: 28px; width: auto; }

@media (max-width: 900px) {
  .hero, .detail, .split, .checkout-layout, .admin-shell, .grid-3, .grid-4, .products-grid, .trust, .stats, .form-grid, .footer-grid, .story-grid, .step-grid, .safety-grid, .contact-tiles {
    grid-template-columns: 1fr;
  }
  .preview-banner {
    flex-direction: column;
    font-size: 0.92rem;
    padding: 10px 12px;
  }
  .hero-media { order: -1; }
  .hero-media img, .page-hero img, .portrait-card img { min-height: 220px; max-height: 280px; }
  .hero-copy, .story-copy { padding: 22px 18px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #2b2a3a;
    padding: 12px;
    border-radius: 12px;
    flex-direction: column;
    z-index: 50;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .cart-link { width: 100%; justify-content: flex-start; }
  .cart-link { flex: 0 0 auto; width: auto; }
  .page-head { padding: 18px 0 4px; }
  .page-head h1 { font-size: 1.7rem; }
  .admin-main { padding: 18px 14px 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 700px) {
  .wrap { width: min(1120px, calc(100% - 20px)); }
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
    display: block;
    width: 100%;
  }
  .cart-table tr {
    padding: 12px 12px 8px;
    border-bottom: 1px solid var(--border);
  }
  .cart-table td { border: 0; padding: 6px 0; }
  table.data, table.data thead, table.data tbody, table.data tr, table.data th, table.data td {
    display: block;
    width: 100%;
  }
  table.data th { display: none; }
  table.data td { padding: 8px 12px; }
  .field-price, .field-stock { width: 100%; }
  .thanks { padding: 36px 16px; }
  .gateway { margin: 24px auto; padding: 20px; }
}

@media (max-width: 480px) {
  .brand strong { font-size: 1.2rem; }
  .brand small { display: none; }
  .hero-actions, .product-actions { flex-direction: column; }
  .hero-actions .btn, .hero-actions .btn-ghost, .product-actions .btn, .product-actions .btn-ghost {
    width: 100%;
  }
  .page-hero-copy { padding: 20px 16px 22px; }
}
