/* ============================================================
   Franzú — Estilos
   ============================================================ */
:root {
  --bg: #fdfaf6;               /* crema muy claro (fondo del logo) */
  --bg-2: #f6efe6;             /* crema cálido */
  --card: #ffffff;
  --ink: #2c2c2c;              /* NEGRO de marca */
  --muted: #7d7267;
  --gold: #d8317f;             /* ROSA de marca (color de acción) */
  --gold-dark: #b0245f;
  --sand: #b58f66;             /* DORADO de marca (acento secundario) */
  --sand-dark: #96733f;
  --line: #ece1d4;
  --black: #2c2c2c;            /* footer oscuro (negro de marca) */
  --ok: #2f8f5b;
  --danger: #c0392b;
  --shadow: 0 10px 34px rgba(60, 45, 30, 0.12);
  --radius: 14px;
  --serif: "Playfair Display", "Georgia", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .2px; margin: 0; }

.container { width: min(1180px, 92vw); margin-inline: auto; }

/* -------------------------- Header -------------------------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(253, 250, 246, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo-img { height: 62px; width: auto; display: block; }
.brand .sub {
  font-size: .68rem; color: var(--muted); letter-spacing: 2px; text-transform: uppercase;
  border-left: 1px solid var(--line); padding-left: 10px;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { font-size: .9rem; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); }
.cart-btn {
  position: relative; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: 999px; padding: 9px 16px 9px 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; font-size: .9rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.cart-btn:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.cart-count {
  background: var(--gold); color: #fff; border-radius: 999px;
  min-width: 20px; height: 20px; padding: 0 6px; font-size: .72rem;
  display: inline-grid; place-items: center; font-weight: 700;
}

/* --------------------------- Hero --------------------------- */
.hero {
  background: radial-gradient(120% 130% at 85% 0%, #fbeef4 0%, var(--bg-2) 45%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 60px 0 56px;
}
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); line-height: 1.1; color: var(--ink); }
.hero .eyebrow { color: var(--gold); letter-spacing: 3px; text-transform: uppercase; font-size: .78rem; font-weight: 700; margin-bottom: 14px; }
.hero p { color: var(--muted); font-size: 1.05rem; margin: 18px 0 26px; max-width: 46ch; }
.hero-art {
  aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #fff, #f7e9f0);
  border: 1px solid var(--line);
  box-shadow: var(--shadow); display: grid; place-items: center;
}
.hero-art svg { width: 56%; height: 56%; }
.hero-art .heel-fill { fill: var(--gold); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: none; border-radius: 999px; padding: 13px 24px; font-size: .95rem;
  font-weight: 600; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1eb257; }
.btn-webpay { background: #e2231a; color: #fff; }
.btn-webpay:hover { background: #c11d15; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

/* ------------------------- Secciones ------------------------ */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.8rem; }
.section-head p { color: var(--muted); margin: 4px 0 0; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 8px 15px; font-size: .85rem; cursor: pointer; color: var(--muted);
  transition: all .15s;
}
.chip.active, .chip:hover { border-color: var(--gold); color: var(--ink); }

/* ------------------------ Grid productos -------------------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .16s, box-shadow .16s; cursor: pointer;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 1; background: var(--bg-2); overflow: hidden; position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px; background: var(--ink); color: #fff;
  font-size: .68rem; letter-spacing: 1px; text-transform: uppercase; padding: 5px 10px;
  border-radius: 999px;
}
.badge.soldout { background: var(--danger); }
.badge.low { background: var(--gold); }
.badge.of-badge { left: auto; right: 10px; background: var(--gold); font-weight: 700; }
.price-old { text-decoration: line-through; color: var(--muted); font-weight: 500; font-size: .82em; margin-right: 5px; }
.of-tag { display: inline-block; background: var(--gold); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .3px; vertical-align: middle; }
.ci-of { color: var(--gold-dark); font-weight: 700; }
/* Controles de oferta en el panel */
.of-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.of-input { width: 60px; border: 1px solid var(--gold); border-radius: 8px; padding: 7px 8px; font-size: .92rem; font-family: inherit; color: var(--ink); }
.of-clear { color: var(--danger); border-color: var(--danger); }
.card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-family: var(--serif); font-size: 1.15rem; }
.card .color { font-size: .8rem; color: var(--muted); }
.card .sizes { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.card .price { font-weight: 700; font-size: 1.1rem; }

/* --------------------------- Modal -------------------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20, 16, 10, .5); z-index: 60;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { display: flex; }
.modal {
  background: var(--card); border-radius: var(--radius); max-width: 860px; width: 100%;
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow);
}
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; }
.modal-gallery { display: flex; flex-direction: column; }
.modal-img { background: var(--bg-2); aspect-ratio: 1; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumbs { display: flex; gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.modal-thumbs img {
  width: 58px; height: 58px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; background: var(--bg-2); transition: border-color .12s;
}
.modal-thumbs img:hover { border-color: var(--line); }
.modal-thumbs img.active { border-color: var(--gold); }
.modal-info { padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; }
.modal-info h3 { font-size: 1.7rem; }
.modal-info .price { font-size: 1.5rem; font-weight: 700; color: var(--gold-dark); }
.modal-info .desc { color: var(--muted); }
.size-label { font-size: .85rem; font-weight: 600; margin-top: 6px; }
.size-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.size {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px; min-width: 54px;
  text-align: center; cursor: pointer; background: var(--card); transition: all .12s;
}
.size small { display: block; font-size: .66rem; color: var(--muted); }
.size:hover:not(.disabled) { border-color: var(--gold); }
.size.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.size.selected small { color: #cbb; }
.size.disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.close-x {
  position: sticky; top: 10px; z-index: 5;
  display: block; margin: 10px 10px -46px auto;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line); border-radius: 999px; width: 36px; height: 36px;
  cursor: pointer; font-size: 1.1rem;
}

/* --------------------------- Drawer ------------------------- */
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100vw);
  background: var(--card); z-index: 70; box-shadow: -10px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { font-size: 1.25rem; }
.drawer-body { flex: 1; overflow: auto; padding: 12px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 20px; }
.cart-item { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 62px; height: 62px; object-fit: cover; border-radius: 10px; background: var(--bg-2); }
.cart-item .ci-name { font-weight: 600; font-size: .95rem; }
.cart-item .ci-meta { font-size: .8rem; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { border: none; background: var(--bg-2); width: 26px; height: 28px; cursor: pointer; font-size: 1rem; }
.qty span { min-width: 26px; text-align: center; font-size: .9rem; }
.ci-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .78rem; text-decoration: underline; margin-top: 4px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .95rem; }
.summary-row.total { font-size: 1.25rem; font-weight: 700; margin: 10px 0 16px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* ----------------------- Checkout / pago -------------------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: .95rem;
  font-family: inherit; background: var(--card); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.bank-box { background: var(--bg-2); border: 1px dashed var(--gold); border-radius: 12px; padding: 16px 18px; margin: 14px 0; }
.bank-box h4 { margin: 0 0 8px; font-family: var(--serif); }
.bank-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .9rem; border-bottom: 1px solid rgba(0,0,0,.05); }
.bank-row:last-child { border-bottom: none; }
.bank-row b { font-weight: 600; }
.copy-btn { background: none; border: 1px solid var(--line); border-radius: 7px; font-size: .72rem; padding: 2px 8px; cursor: pointer; }
.note { font-size: .82rem; color: var(--muted); }

/* --------------------------- Info --------------------------- */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info-card .ic { font-size: 1.6rem; }
.info-card h3 { font-size: 1.1rem; margin: 8px 0 6px; }
.info-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* -------------------------- Footer -------------------------- */
.footer { background: var(--black); color: #d9cdd4; padding: 42px 0 30px; margin-top: 40px; }
.footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer .logo-img { height: 70px; width: auto; }
.footer a { color: #d9cdd4; }
.footer a:hover { color: var(--gold); }
.footer .cols { display: flex; gap: 46px; flex-wrap: wrap; }
.footer h5 { color: #fff; margin: 0 0 10px; font-size: .9rem; letter-spacing: 1px; text-transform: uppercase; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.copyright { text-align: center; color: #8b7d85; font-size: .8rem; margin-top: 26px; }
.copyright a { color: #8b7d85; }
.copyright a:hover { color: var(--gold); }

/* -------------------------- Toast --------------------------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: .9rem; z-index: 90; opacity: 0; transition: all .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------ Responsive ------------------------ */
@media (max-width: 820px) {
  .hero { padding: 30px 0 38px; }
  .hero .container { grid-template-columns: 1fr; gap: 20px; }
  .hero h1 { font-size: clamp(1.9rem, 7vw, 2.7rem); }
  .hero p { font-size: 1rem; margin: 14px 0 20px; }
  .hero-art { order: 2; width: 100%; max-width: 300px; margin: 2px auto 0; aspect-ratio: 16 / 10; }
  .modal-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .nav .nav-link { display: none; }
  .nav { gap: 12px; }
  .section { padding: 42px 0; }
  .section-head h2 { font-size: 1.55rem; }
  .row-2 { grid-template-columns: 1fr; }
}

/* --- Teléfonos --- */
@media (max-width: 560px) {
  .header-inner { padding: 8px 0; }
  .brand .logo-img { height: 48px; }
  .hero-art { display: none; }              /* prioriza título + CTA arriba */
  .hero { padding: 26px 0 34px; }

  /* Catálogo en 2 columnas */
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card .body { padding: 10px 11px 13px; gap: 3px; }
  .card .name { font-size: 1rem; line-height: 1.2; }
  .card .color { font-size: .74rem; }
  .card .sizes { font-size: .68rem; }
  .card .price { font-size: 1rem; }
  .card .foot .btn { display: none; }         /* toda la tarjeta es tocable */
  .card .foot { padding-top: 6px; }
  .badge { font-size: .6rem; padding: 4px 8px; }

  /* Evita el zoom de iOS al enfocar inputs (necesita >=16px) */
  .field input, .field textarea, .field select { font-size: 16px; }

  /* Ficha de producto: imagen más contenida */
  .modal-img { aspect-ratio: 4 / 3; }
  .modal-info { padding: 20px 20px 24px; }
  .modal-info h3 { font-size: 1.4rem; }

  .section-head { flex-direction: column; align-items: start; }
  .footer .container { flex-direction: column; gap: 18px; }
  .footer .cols { gap: 30px; }
}

/* Toque más limpio en móvil */
@media (hover: none) {
  .card, .btn, .cart-btn, .chip, .size, .mthumb { -webkit-tap-highlight-color: transparent; }
}

/* ---------------------- Admin específico -------------------- */
.admin-wrap { width: min(1100px, 94vw); margin: 30px auto; }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
/* Tarjetas de producto (panel) — responsive */
.prod-list { display: flex; flex-direction: column; gap: 14px; }
.prod-card {
  display: grid; grid-template-columns: auto 1fr; gap: 16px;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--card);
}
.pc-photos { display: flex; flex-direction: column; gap: 6px; }
.pc-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pc-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 10px; }
.pc-f { display: flex; flex-direction: column; gap: 4px; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pc-f input, .pc-f textarea {
  font-weight: 400; text-transform: none; letter-spacing: normal; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: .92rem; font-family: inherit; width: 100%;
}
.pc-f input:focus, .pc-f textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.pc-f textarea { resize: vertical; min-height: 46px; }
.pc-tallas { display: flex; flex-direction: column; gap: 6px; }
.pc-lbl { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-foot-actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 640px) {
  .admin-wrap { width: 94vw; }
  .prod-card { grid-template-columns: 1fr; gap: 12px; }
  .pc-grid { grid-template-columns: 1fr 1fr; }
  .pc-grid .pc-nombre { grid-column: 1 / -1; }
  .pc-foot-actions { margin-left: 0; }
  .admin-card { padding: 16px; }
}

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.admin-table th { font-size: .76rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.photo-slots { display: flex; gap: 6px; }
.pslot {
  position: relative; width: 50px; height: 50px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2); flex: 0 0 auto;
}
.pslot img { width: 100%; height: 100%; object-fit: cover; }
.pslot button {
  position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%;
  border: none; background: var(--danger); color: #fff; cursor: pointer; font-size: .62rem; line-height: 1;
}
.pslot.empty {
  display: grid; place-items: center; cursor: pointer; color: var(--gold);
  font-size: 1.4rem; border-style: dashed; border-color: var(--gold);
}
.pslot.empty:hover { background: #fdeef5; }
.talla-inputs { display: flex; flex-wrap: wrap; gap: 6px; }
.talla-inputs .ti { display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.talla-inputs .ti label { font-size: .72rem; color: var(--muted); }
.talla-inputs .ti input { width: 40px; border: none; text-align: center; font-size: .85rem; }
.talla-inputs .ti button { border: none; background: none; color: var(--danger); cursor: pointer; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gate { max-width: 380px; margin: 12vh auto; text-align: center; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.pill.on { background: #e6f4ec; color: var(--ok); }
.pill.off { background: #fdeceb; color: var(--danger); }
.mini { font-size: .8rem; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
