  :root {
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);

    --plum: #3B1530;
    --plum-deep: #2A0F22;
    --cream: #F7F0E6;
    --cream-alt: #FFFCF6;
    --ink: #241419;
    --berry: #A63A50;
    --berry-deep: #8A2E42;
    --gold: #C9A24B;
    --gold-soft: #E4CD98;
    --whatsapp: #25D366;
    --whatsapp-deep: #1DA851;
    --line: rgba(36,20,25,0.14);
    --shadow: 0 18px 40px rgba(42,15,34,0.14);
    --radius-s: 4px;
    --radius-m: 10px;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --cream: #1B1014;
      --cream-alt: #241419;
      --ink: #F3E9DD;
      --line: rgba(243,233,221,0.14);
      --shadow: 0 18px 40px rgba(0,0,0,0.5);
    }
  }
  :root[data-theme="dark"] {
    --cream: #1B1014;
    --cream-alt: #241419;
    --ink: #F3E9DD;
    --line: rgba(243,233,221,0.14);
    --shadow: 0 18px 40px rgba(0,0,0,0.5);
  }

  * { box-sizing: border-box; }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; overflow-x: hidden; }
  body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; }
  button { font-family: inherit; cursor: pointer; }
  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
  @media (max-width: 480px) { .wrap { padding: 0 16px; } }
  ::selection { background: var(--gold); color: var(--plum-deep); }
  :focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  }

  /* ---------- Header ---------- */
  header.site {
    position: sticky; top: 0; z-index: 40;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--plum);
    color: var(--cream-alt);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .header-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; max-width: 1180px; margin: 0 auto; gap: 12px;
  }
  .brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; min-width: 0; }
  .brand-mark {
    font-family: var(--font-display); font-weight: 680; font-size: clamp(1.05rem, 4.4vw, 1.5rem);
    color: var(--cream-alt); letter-spacing: 0.01em; white-space: nowrap;
  }
  .brand-sub { font-size: 0.68rem; color: var(--gold-soft); letter-spacing: 0.08em; }
  .header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  nav.site-nav { display: flex; align-items: center; gap: 22px; }
  nav.site-nav a {
    text-decoration: none; color: var(--cream-alt); font-size: 0.92rem; font-weight: 500;
    padding-bottom: 2px; border-bottom: 1px solid transparent;
  }
  nav.site-nav a:hover { border-bottom-color: var(--gold); }
  .header-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--whatsapp); color: #fff; border: none;
    padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 0.85rem;
    text-decoration: none; white-space: nowrap;
  }
  .header-cta:hover { background: var(--whatsapp-deep); }
  .icon-btn {
    background: transparent; border: 1px solid rgba(255,255,255,0.25); color: var(--cream-alt);
    width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .icon-btn:hover { border-color: var(--gold); color: var(--gold); }
  .mobile-toggle { display: none; }

  @media (max-width: 700px) {
    .header-row { padding: 12px 16px; }
    nav.site-nav {
      display: none; position: absolute; top: 100%; left: 0; right: 0;
      flex-direction: column; align-items: flex-start; gap: 2px;
      background: var(--plum); border-bottom: 1px solid rgba(255,255,255,0.1);
      padding: 8px 16px 14px; box-shadow: var(--shadow);
    }
    nav.site-nav.open { display: flex; }
    nav.site-nav a { width: 100%; padding: 10px 4px; }
    .header-cta .cta-label { display: none; }
    .header-cta { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
    .mobile-toggle { display: inline-flex; }
  }

  /* ---------- Hero ---------- */
  .hero {
    background: linear-gradient(180deg, var(--plum) 0%, var(--plum-deep) 100%);
    color: var(--cream-alt);
    padding: 64px 0 90px;
    position: relative;
    overflow: hidden;
  }
  .hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
  @media (max-width: 860px) {
    .hero { padding: 44px 0 60px; }
    .hero .wrap { grid-template-columns: 1fr; gap: 34px; }
    .hero h1 { max-width: none; font-size: clamp(1.9rem, 7vw, 2.6rem); }
    .swatchboard { height: 220px; order: 2; }
  }
  .hero-eyebrow { color: var(--gold-soft); font-size: 0.82rem; margin: 0 0 14px; }
  .hero h1 {
    font-family: var(--font-display); font-weight: 560; font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.04; margin: 0 0 20px; max-width: 13ch;
  }
  .hero h1 em { font-style: italic; font-weight: 500; color: var(--gold); }
  .hero p.lede { max-width: 46ch; color: rgba(247,240,230,0.85); font-size: 1.05rem; margin: 0 0 30px; }
  .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
  .btn {
    display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 13px 24px;
    font-weight: 600; font-size: 0.92rem; text-decoration: none; border: 1px solid transparent;
  }
  .btn-primary { background: var(--gold); color: var(--plum-deep); }
  .btn-primary:hover { background: var(--gold-soft); }
  .btn-ghost { background: transparent; border-color: rgba(247,240,230,0.4); color: var(--cream-alt); }
  .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

  .swatchboard { position: relative; height: 320px; }
  .swatch {
    position: absolute; border-radius: var(--radius-m); box-shadow: var(--shadow);
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
    gap: 6px; padding: 14px; text-align: left; border: none; cursor: pointer;
    background-size: cover; background-position: center; transition: transform 0.18s ease;
  }
  .swatch:hover { transform: translateY(-3px) rotate(0deg) !important; }
  .swatch-title {
    font-family: var(--font-display); font-style: italic; font-size: 1.02rem; font-weight: 500;
    color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.45); line-height: 1.2;
  }
  .swatch-tag {
    background: rgba(0,0,0,0.32); color: rgba(255,255,255,0.92); padding: 3px 9px;
    border-radius: 4px; font-size: 0.72rem; font-family: var(--font-body); letter-spacing: 0.02em;
  }
  .s1 { width: 62%; height: 78%; top: 0; left: 4%; transform: rotate(-3deg); }
  .s2 { width: 46%; height: 56%; bottom: 0; right: 0; transform: rotate(4deg); }
  .s3 { width: 34%; height: 40%; top: 8%; right: 6%; transform: rotate(-6deg); background: linear-gradient(135deg,#E4CD98,#A63A50); }

  /* ---------- Section shells ---------- */
  section { padding: 70px 0; }
  @media (max-width: 700px) { section { padding: 44px 0; } }
  @media (max-width: 700px) { .section-head h2 { font-size: 1.6rem; } }
  .section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
  .section-head h2 { font-family: var(--font-display); font-weight: 560; font-size: 2rem; margin: 0; }
  .section-head p { margin: 6px 0 0; color: color-mix(in srgb, var(--ink) 65%, transparent); max-width: 48ch; }

  /* ---------- Filters ---------- */
  .filter-rail { display: flex; gap: 14px; align-items: center; margin-bottom: 30px; }
  .tag-scroll { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; min-width: 0; }
  .tag-btn {
    background: transparent; border: none; border-bottom: 2px dashed var(--line);
    padding: 6px 2px; font-size: 0.92rem; color: var(--ink); font-weight: 500; flex-shrink: 0;
  }
  .tag-btn.active { border-bottom-color: var(--berry); color: var(--berry); }
  .search-box { margin-left: auto; position: relative; flex-shrink: 0; }
  .search-box input {
    border: 1px solid var(--line); background: var(--cream-alt); color: var(--ink);
    border-radius: 999px; padding: 9px 16px 9px 34px; font-size: 0.9rem; width: 220px; max-width: 46vw;
  }
  .search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); opacity: 0.5; }

  @media (max-width: 640px) {
    .filter-rail { flex-direction: column; align-items: stretch; gap: 12px; }
    .tag-scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .tag-scroll::-webkit-scrollbar { display: none; }
    .search-box { margin-left: 0; width: 100%; order: -1; }
    .search-box input { width: 100%; max-width: none; }
  }

  /* ---------- Product grid ---------- */
  .grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px;
  }
  @media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 520px) { .grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
  .card {
    background: var(--cream-alt); border: 1px solid var(--line); border-radius: var(--radius-m);
    overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; min-width: 0;
  }
  .card.featured { grid-column: span 2; }
  @media (max-width: 520px) { .card.featured { grid-column: span 1; } }
  .card-media {
    aspect-ratio: 4/5; background: linear-gradient(135deg, var(--gold-soft), var(--berry));
    position: relative; overflow: hidden;
  }
  .card.featured .card-media { aspect-ratio: 16/10; }
  @media (max-width: 520px) { .card.featured .card-media { aspect-ratio: 4/5; } }
  .card-media img { width: 100%; height: 100%; object-fit: cover; }
  .badge {
    position: absolute; top: 10px; left: 10px; background: var(--plum); color: var(--cream-alt);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 999px;
  }
  .badge.sold { background: var(--ink); }
  .card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
  .card-cat { font-size: 0.72rem; color: var(--berry); font-weight: 600; }
  .card-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 560; margin: 0; overflow-wrap: break-word; }
  .card-price { font-weight: 700; margin-top: auto; }
  .card-actions { display: flex; gap: 8px; margin-top: 10px; }
  .card-actions button, .card-actions a {
    flex: 1; text-align: center; border-radius: 999px; padding: 10px 10px; font-size: 0.82rem; font-weight: 600;
    border: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none;
    min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
  }
  .card-actions .wa { background: var(--whatsapp); color: #fff; border-color: var(--whatsapp); }
  .card-actions .wa:hover { background: var(--whatsapp-deep); }
  .card-actions .view:hover { border-color: var(--berry); color: var(--berry); }
  .empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius-m); }
  .empty-state h3 { font-family: var(--font-display); }

  /* ---------- Modal ---------- */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(20,8,15,0.6); display: none;
    align-items: center; justify-content: center; z-index: 100; padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
  }
  .modal-overlay.open { display: flex; }
  .modal {
    background: var(--cream-alt); border-radius: var(--radius-m); max-width: 880px; width: 100%;
    max-height: 88vh; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  }
  @media (max-width: 700px) { .modal { grid-template-columns: 1fr; } }
  .modal-close {
    position: sticky; top: 10px; margin-left: auto; margin-right: 10px; background: rgba(0,0,0,0.5);
    color: #fff; border: none; width: 32px; height: 32px; border-radius: 50%; z-index: 3;
  }
  .modal-media { background: var(--plum); position: relative; }
  .modal-main-img { aspect-ratio: 4/5; background: linear-gradient(135deg, var(--gold-soft), var(--berry)); }
  .modal-main-img img { width: 100%; height: 100%; object-fit: cover; }
  .modal-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
  .modal-thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; opacity: 0.6; border: 2px solid transparent; }
  .modal-thumbs img.active { opacity: 1; border-color: var(--gold); }
  .modal-info { padding: 26px; }
  .modal-info .card-cat { display: block; margin-bottom: 6px; }
  .modal-info h3 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 8px; }
  .modal-price { font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
  .modal-desc { color: color-mix(in srgb, var(--ink) 75%, transparent); margin-bottom: 16px; white-space: pre-line; }
  .modal-sizes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
  .modal-sizes span { border: 1px solid var(--line); border-radius: 6px; padding: 5px 11px; font-size: 0.82rem; }
  .modal-info .btn { width: 100%; justify-content: center; margin-bottom: 10px; }

  /* ---------- Contact / footer ---------- */
  .contact-band { background: var(--plum); color: var(--cream-alt); }
  .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
  @media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
  .contact-item { display: flex; gap: 14px; margin-bottom: 20px; }
  .contact-item .ico {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }
  .contact-item h4 { margin: 0 0 3px; font-size: 0.95rem; }
  .contact-item p, .contact-item a { margin: 0; color: rgba(247,240,230,0.8); text-decoration: none; font-size: 0.92rem; }
  .contact-item a:hover { color: var(--gold); }
  .social-row { display: flex; gap: 10px; margin-top: 20px; }
  .social-row a {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center; text-decoration: none;
  }
  .social-row a:hover { border-color: var(--gold); color: var(--gold); }
  .map-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-m); padding: 22px; }
  .map-card h4 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 10px; }
  footer.site-footer {
    background: var(--plum-deep); color: rgba(247,240,230,0.6); text-align: center;
    padding: 22px 24px calc(22px + env(safe-area-inset-bottom, 0px)); font-size: 0.82rem;
  }
  footer.site-footer button { background: none; border: none; color: inherit; text-decoration: underline; font-size: inherit; }

  /* ---------- Floating WhatsApp ---------- */
  .fab-wa {
    position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
    background: var(--whatsapp); color: #fff; width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); text-decoration: none;
  }
  .fab-wa.pulse { animation: pulseOnce 1.6s ease-out 1; }
  @keyframes pulseOnce { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.55);} 100% { box-shadow: 0 0 0 22px rgba(37,211,102,0);} }

  /* ---------- Toast ---------- */
  #toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 120%);
    background: var(--ink); color: var(--cream); padding: 12px 20px; border-radius: 999px;
    font-size: 0.88rem; z-index: 200; transition: transform 0.25s ease; box-shadow: var(--shadow);
  }
  #toast.show { transform: translate(-50%, 0); }

  /* ---------- Admin ---------- */
  #adminOverlay { position: fixed; inset: 0; background: var(--cream); z-index: 300; display: none; overflow-y: auto; }
  #adminOverlay.open { display: block; }
  .admin-bar {
    background: var(--ink); color: var(--cream); padding: 14px 24px; display: flex; align-items: center;
    justify-content: space-between; position: sticky; top: 0; z-index: 5;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }
  .admin-bar .title { font-family: var(--font-display); font-size: 1.1rem; }
  .admin-bar button { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: inherit; padding: 8px 14px; border-radius: 6px; }
  .admin-body { max-width: 1000px; margin: 0 auto; padding: 30px 24px 80px; }
  .admin-tabs { display: flex; gap: 4px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
  .admin-tabs button {
    background: none; border: none; padding: 10px 16px; font-weight: 600; color: color-mix(in srgb, var(--ink) 55%, transparent);
    border-bottom: 2px solid transparent; font-size: 0.9rem;
  }
  .admin-tabs button.active { color: var(--berry); border-color: var(--berry); }
  .admin-panel { display: none; }
  .admin-panel.active { display: block; }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  @media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
  .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
  .field.full { grid-column: 1 / -1; }
  .field label { font-size: 0.82rem; font-weight: 600; }
  .field small { color: color-mix(in srgb, var(--ink) 55%, transparent); font-weight: 400; }
  .field input, .field select, .field textarea {
    border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: inherit; background: var(--cream-alt); color: var(--ink);
  }
  .field textarea { resize: vertical; min-height: 90px; }
  .checkline { display: flex; align-items: center; gap: 8px; }
  .img-upload-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
  .img-thumb { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
  .img-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .img-thumb button { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.6); color: #fff; border: none; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; line-height: 1; }
  .upload-tile {
    width: 84px; height: 84px; border: 1px dashed var(--line); border-radius: 8px; display: flex;
    align-items: center; justify-content: center; font-size: 1.4rem; color: color-mix(in srgb, var(--ink) 45%, transparent); position: relative;
  }
  .upload-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  .admin-list { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
  .admin-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--cream-alt); }
  .admin-row:last-child { border-bottom: none; }
  .admin-row img { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; background: var(--line); }
  .admin-row .meta { flex: 1; min-width: 0; }
  .admin-row .meta strong { display: block; font-size: 0.92rem; }
  .admin-row .meta span { font-size: 0.78rem; color: color-mix(in srgb, var(--ink) 55%, transparent); }
  .row-actions { display: flex; gap: 6px; }
  .row-actions button { border: 1px solid var(--line); background: transparent; border-radius: 6px; padding: 6px 10px; font-size: 0.78rem; }
  .row-actions button.danger:hover { border-color: var(--berry); color: var(--berry); }
  .settings-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
  .hint-box { background: rgba(201,162,75,0.14); border: 1px solid rgba(201,162,75,0.4); border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; margin-bottom: 20px; }
  #loginGate { max-width: 340px; margin: 90px auto; text-align: center; }
  #loginGate .field { text-align: left; }

  .btn-block { display: inline-flex; align-items: center; gap: 8px; background: var(--berry); color: #fff; border: none; border-radius: 8px; padding: 11px 18px; font-weight: 600; }
  .btn-block:hover { background: var(--berry-deep); }
  .btn-outline { background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 11px 18px; font-weight: 600; color: var(--ink); }
