/* =========================================================
   Maca Modista - Tienda
   Blanco y lila. Motivo: la costura (línea punteada).
   ========================================================= */
:root {
  --mm-white: #ffffff;
  --mm-mist: #faf7fe;
  --mm-50: #f3ecfc;
  --mm-100: #e8dcf8;
  --mm-200: #d7c3f2;
  --mm-300: #c6a9ee;
  --mm-500: #9b72db;
  --mm-700: #6b45ae;
  --mm-800: #553590;
  --mm-900: #2e1f4a;
  --mm-muted: #6e6484;
  --mm-daisy: #f4c542;
  --mm-radius: 18px;

  --bs-primary: #6b45ae;
  --bs-primary-rgb: 107, 69, 174;
  --bs-body-font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: #2e1f4a;
  --bs-body-bg: #ffffff;
  --bs-link-color: #6b45ae;
  --bs-link-hover-color: #553590;
  --bs-border-color: #e8dcf8;
  --bs-secondary-color: #6e6484;
}

html { scroll-behavior: smooth; }
body { font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display-font { font-family: 'Young Serif', Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -0.01em; line-height: 1.15; color: var(--mm-900); }
h1 { font-size: clamp(2rem, 4.6vw + .5rem, 3.4rem); }
h2 { font-size: clamp(1.55rem, 2.4vw + .6rem, 2.2rem); }
h3 { font-size: 1.2rem; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--mm-500); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 8px; top: 8px; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: 8px; }
.text-muted, .text-secondary { color: var(--mm-muted) !important; }

/* ---------- Botones ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .65rem 1.4rem; }
.btn-primary {
  --bs-btn-bg: var(--mm-700); --bs-btn-border-color: var(--mm-700); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--mm-800); --bs-btn-hover-border-color: var(--mm-800); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--mm-800); --bs-btn-active-border-color: var(--mm-800);
  --bs-btn-disabled-bg: var(--mm-300); --bs-btn-disabled-border-color: var(--mm-300);
  --bs-btn-focus-shadow-rgb: 155, 114, 219;
}
.btn-outline-primary {
  --bs-btn-color: var(--mm-700); --bs-btn-border-color: var(--mm-300);
  --bs-btn-hover-bg: var(--mm-50); --bs-btn-hover-color: var(--mm-800); --bs-btn-hover-border-color: var(--mm-500);
  --bs-btn-active-bg: var(--mm-100); --bs-btn-active-color: var(--mm-800); --bs-btn-active-border-color: var(--mm-500);
}
.btn-lg { padding: .85rem 1.8rem; font-size: 1.05rem; }
.form-control, .form-select { border-radius: 12px; border-color: var(--mm-200); padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--mm-500); box-shadow: 0 0 0 .25rem rgba(155, 114, 219, .25); }
.form-label { font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--mm-700); border-color: var(--mm-700); }
.alert { border-radius: 14px; }

/* ---------- Costura (motivo de marca) ---------- */
.stitch { border: 2px dashed var(--mm-300); border-radius: var(--mm-radius); }
.hem { border: 0; border-top: 2px dashed var(--mm-300); margin: 0; opacity: 1; }

/* ---------- Cabecera ---------- */
.topbar { background: var(--mm-700); color: #fff; font-size: .85rem; padding: .45rem 1rem; }
.site-header { background: #fff; border-bottom: 2px dashed var(--mm-200); position: sticky; top: 0; z-index: 1030; }
.site-header .navbar { padding: .6rem 0; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--mm-900); }
.brand-mark { display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: 'Young Serif', Georgia, serif; font-size: 1.35rem; color: var(--mm-900); }
.brand-sub { font-size: .72rem; color: var(--mm-muted); letter-spacing: .01em; }
.site-header .nav-link { color: var(--mm-900); font-weight: 500; padding: .5rem .9rem; border-radius: 999px; }
.site-header .nav-link:hover, .site-header .nav-link.active { background: var(--mm-50); color: var(--mm-800); }
.navbar-toggler { border: 0; font-size: 1.7rem; padding: .1rem .5rem; color: var(--mm-700); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(155, 114, 219, .35); }
.btn-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mm-50); color: var(--mm-700); font-size: 1.25rem; text-decoration: none; }
.btn-cart:hover { background: var(--mm-100); color: var(--mm-800); }
.cart-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--mm-700); color: #fff; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

/* ---------- Hero ---------- */
.hero { background: var(--mm-50); padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hero h1 { max-width: 15ch; margin-bottom: 1.1rem; }
.hero-lead { font-size: 1.15rem; color: var(--mm-muted); max-width: 46ch; margin-bottom: 1.75rem; }
.hero-art { background: #fff; padding: clamp(1rem, 3vw, 2rem); text-align: center; }
.hero-art svg { width: 100%; height: auto; max-height: 470px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.75rem; padding: 0; list-style: none; color: var(--mm-900); font-weight: 500; font-size: .95rem; }
.hero-facts i { color: var(--mm-700); margin-right: .35rem; }

/* ---------- Secciones ---------- */
.block { padding: clamp(2.75rem, 6vw, 4.75rem) 0; }
.block-tint { background: var(--mm-mist); }
.block-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.block-head p { margin: .35rem 0 0; color: var(--mm-muted); max-width: 55ch; }

.cat-tile { display: block; height: 100%; padding: 1.25rem 1.25rem 1.4rem; background: #fff; border: 2px dashed var(--mm-200); border-radius: var(--mm-radius); text-decoration: none; color: var(--mm-900); transition: background .2s, border-color .2s; }
.cat-tile:hover { background: var(--mm-50); border-color: var(--mm-500); color: var(--mm-900); }
.cat-tile h3 { margin: 0 0 .35rem; }
.cat-tile p { margin: 0; color: var(--mm-muted); font-size: .92rem; }

.steps { counter-reset: paso; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); padding: 0; margin: 0; list-style: none; }
.steps li { position: relative; padding: 1.2rem 1.2rem 1.2rem 4rem; background: #fff; border-radius: var(--mm-radius); border: 2px dashed var(--mm-200); }
.steps li::before { counter-increment: paso; content: counter(paso); position: absolute; left: 1.1rem; top: 1.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--mm-700); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps strong { display: block; font-family: 'Young Serif', Georgia, serif; font-weight: 400; font-size: 1.05rem; margin-bottom: .2rem; }
.steps span { color: var(--mm-muted); font-size: .93rem; }

.cta-band { background: var(--mm-700); color: #fff; border-radius: 26px; padding: clamp(1.75rem, 5vw, 3.25rem); display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 3px dashed rgba(255, 255, 255, .55); outline: 8px solid var(--mm-700); outline-offset: -8px; }
.cta-band h2 { color: #fff; margin: 0 0 .4rem; max-width: 20ch; }
.cta-band p { margin: 0; color: #eadffb; max-width: 48ch; }
.cta-band .btn { background: #fff; color: var(--mm-800); border-color: #fff; }
.cta-band .btn:hover { background: var(--mm-100); }

/* ---------- Productos ---------- */
.prod-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .prod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.prod-card { background: #fff; border-radius: var(--mm-radius); overflow: hidden; border: 1px solid var(--mm-100); height: 100%; display: flex; flex-direction: column; }
.prod-card:hover { border-color: var(--mm-300); }
.prod-img { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--mm-50); overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-card.is-out .prod-img img { opacity: .55; }
.tag { position: absolute; left: .7rem; top: .7rem; background: #fff; color: var(--mm-800); border-radius: 999px; font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border: 1px solid var(--mm-200); }
.tag-sale { background: var(--mm-daisy); border-color: var(--mm-daisy); color: #4a3800; }
.tag-out { background: var(--mm-900); border-color: var(--mm-900); color: #fff; }
.prod-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.prod-school { font-size: .8rem; color: var(--mm-muted); }
.prod-name { font-size: 1.02rem; margin: 0; font-family: 'Figtree', sans-serif; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.prod-name a { color: var(--mm-900); text-decoration: none; }
.prod-name a:hover { color: var(--mm-700); text-decoration: underline; }
.prod-price { margin-top: auto; padding-top: .35rem; }
.prod-price .now { font-weight: 700; font-size: 1.1rem; color: var(--mm-800); }
.prod-price .before { color: var(--mm-muted); font-size: .88rem; margin-left: .4rem; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { display: inline-block; padding: .4rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--mm-200); color: var(--mm-900); text-decoration: none; font-size: .92rem; font-weight: 500; }
.chip:hover { background: var(--mm-50); }
.chip.on { background: var(--mm-700); border-color: var(--mm-700); color: #fff; }

.page-title { padding: clamp(1.75rem, 4vw, 3rem) 0 1.25rem; background: var(--mm-50); border-bottom: 2px dashed var(--mm-200); }
.page-title h1 { font-size: clamp(1.8rem, 3vw + .5rem, 2.6rem); margin: 0; }
.page-title p { margin: .4rem 0 0; color: var(--mm-muted); }
.breadcrumb { --bs-breadcrumb-divider-color: var(--mm-300); font-size: .88rem; margin-bottom: .6rem; }
.breadcrumb a { color: var(--mm-muted); }

/* ---------- Ficha de producto ---------- */
.pdp-img { border-radius: var(--mm-radius); overflow: hidden; background: var(--mm-50); aspect-ratio: 1 / 1; border: 2px dashed var(--mm-200); padding: .6rem; }
.pdp-img img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--mm-radius) - 6px); }
.pdp-price { font-size: 1.9rem; font-weight: 700; color: var(--mm-800); }
.size-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.size-opt input { position: absolute; opacity: 0; pointer-events: none; }
.size-opt label { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: .5rem .9rem; border: 1.5px solid var(--mm-200); border-radius: 12px; cursor: pointer; font-weight: 600; background: #fff; }
.size-opt input:checked + label { background: var(--mm-700); border-color: var(--mm-700); color: #fff; }
.size-opt input:focus-visible + label { outline: 3px solid var(--mm-500); outline-offset: 2px; }
.size-opt input:disabled + label { color: #b6aac8; text-decoration: line-through; cursor: not-allowed; background: var(--mm-mist); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--mm-200); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 42px; border: 0; background: transparent; font-size: 1.2rem; color: var(--mm-700); border-radius: 999px; }
.qty button:hover { background: var(--mm-50); }
.qty input { width: 48px; text-align: center; border: 0; background: transparent; font-weight: 600; padding: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.perks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .55rem; font-size: .93rem; color: var(--mm-muted); }
.perks i { color: var(--mm-700); margin-right: .5rem; }

/* ---------- Carrito y checkout ---------- */
.cart-line { display: grid; grid-template-columns: 84px 1fr; gap: .9rem 1rem; padding: 1rem 0; border-bottom: 2px dashed var(--mm-100); align-items: start; }
.cart-line:first-child { padding-top: 0; }
.cart-line img { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; background: var(--mm-50); }
.cart-line .cl-name { font-weight: 600; color: var(--mm-900); text-decoration: none; }
.cart-line .cl-meta { color: var(--mm-muted); font-size: .88rem; }
.cart-line .cl-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.summary { background: #fff; padding: 1.4rem; border-radius: var(--mm-radius); border: 2px dashed var(--mm-300); }
.summary h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.summary .row-s { display: flex; justify-content: space-between; padding: .3rem 0; }
.summary .row-total { border-top: 2px dashed var(--mm-200); margin-top: .6rem; padding-top: .8rem; font-weight: 700; font-size: 1.2rem; color: var(--mm-800); }
.sticky-side { position: sticky; top: 100px; }
.opt-card { display: block; position: relative; border: 1.5px solid var(--mm-200); border-radius: 14px; padding: .9rem 1rem .9rem 2.9rem; cursor: pointer; background: #fff; height: 100%; }
.opt-card input { position: absolute; left: 1rem; top: 1.1rem; }
.opt-card:has(input:checked) { border-color: var(--mm-700); background: var(--mm-50); box-shadow: 0 0 0 1px var(--mm-700); }
.opt-card strong { display: block; }
.opt-card small { color: var(--mm-muted); }
.panel-card { background: #fff; border: 1px solid var(--mm-100); border-radius: var(--mm-radius); padding: clamp(1.1rem, 3vw, 1.75rem); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--mm-muted); }
.empty svg { width: 90px; height: 90px; margin-bottom: 1rem; opacity: .9; }

/* ---------- Estado del pedido ---------- */
.status-banner { border-radius: var(--mm-radius); padding: 1.4rem 1.5rem; display: flex; gap: 1rem; align-items: flex-start; }
.status-banner i { font-size: 1.8rem; line-height: 1; }
.status-ok { background: #ecf8ee; border: 2px dashed #8fcf9b; }
.status-ok i { color: #2f8f46; }
.status-bad { background: #fdeeee; border: 2px dashed #e7a3a3; }
.status-bad i { color: #c0392b; }
.status-wait { background: var(--mm-50); border: 2px dashed var(--mm-300); }
.status-wait i { color: var(--mm-700); }
.kv { display: grid; grid-template-columns: 9.5rem 1fr; gap: .35rem 1rem; font-size: .95rem; }
.kv dt { color: var(--mm-muted); font-weight: 500; }
.kv dd { margin: 0; }
@media (max-width: 575px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: .6rem; } }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 460px; margin: 0 auto; }

/* ---------- Pie ---------- */
.site-footer { background: var(--mm-mist); border-top: 2px dashed var(--mm-300); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-lead { font-family: 'Young Serif', Georgia, serif; font-size: 1.15rem; max-width: 34ch; line-height: 1.35; color: var(--mm-900); }
.footer-title { font-family: 'Figtree', sans-serif; font-size: .95rem; font-weight: 700; margin-bottom: .75rem; }
.footer-links li { margin-bottom: .45rem; font-size: .94rem; color: var(--mm-muted); }
.footer-links a { color: var(--mm-900); text-decoration: none; }
.footer-links a:hover { color: var(--mm-700); text-decoration: underline; }
.footer-links i { color: var(--mm-700); margin-right: .35rem; }
.footer-bottom { margin-top: 2.25rem; padding-top: 1.1rem; border-top: 2px dashed var(--mm-200); display: flex; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; font-size: .85rem; color: var(--mm-muted); }
.footer-bottom a { color: var(--mm-700); }

@media print {
  .topbar, .site-header, .site-footer, .no-print { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
