/* ============ Mirror Mirror — estilos de tienda (extiende mirror.css) ============ */
.container{max-width:1240px;margin:0 auto;padding:0 28px}
.page{padding:38px 0 70px}
.breadcrumb{font-size:13px;color:var(--muted);margin:18px 0 6px}
.breadcrumb a{color:var(--mauve)}
.page-title{font-family:Georgia,serif;font-size:clamp(28px,4vw,44px);color:#342b33;letter-spacing:-.03em;margin:6px 0 8px}
.page-lead{color:var(--muted);max-width:640px;margin-bottom:14px}

/* Alerts */
.alert{border-radius:14px;padding:13px 18px;margin:14px 0;font-size:14px;font-weight:600}
.alert-success{background:#e7f8ee;color:#1c7a45;border:1px solid #bde9cf}
.alert-error{background:#fdeaf1;color:#a4295c;border:1px solid #f6c9db}
.alert-info{background:#fff4e6;color:#9a5b12;border:1px solid #f6dcb4}

/* Layout catálogo */
/* minmax(0,1fr) evita el min-width:auto de CSS Grid, que hacía que la columna
   de productos no pudiera encogerse y desbordara en móvil. */
.shop-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:30px;align-items:start}
.shop-layout > *{min-width:0}
.filters{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;position:sticky;top:130px}
.filters h4{text-transform:uppercase;letter-spacing:.12em;font-size:12px;color:#3b3039;margin:0 0 12px}
.filters .filter-group{margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid #f5e6ee}
.filters a{display:block;color:#6a5f69;padding:6px 0;font-size:14px}
.filters a.active,.filters a:hover{color:var(--pink);font-weight:700}
.filters input,.filters select{width:100%;padding:9px 11px;border:1px solid var(--line);border-radius:10px;margin-bottom:8px;font-size:14px}

.shop-toolbar{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px;flex-wrap:wrap}
.shop-toolbar .count{color:var(--muted);font-size:14px}
.shop-toolbar select{padding:9px 12px;border:1px solid var(--line);border-radius:10px;font-size:14px;background:#fff}

.grid-products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}

/* Tarjeta producto (reutiliza .product-card de mirror.css con extras) */
.product-card{display:flex;flex-direction:column;height:100%}
.product-card .product-image{position:relative;flex:0 0 auto}
.badges{position:absolute;left:12px;top:12px;display:flex;flex-direction:column;gap:6px;z-index:3}
.badge{font-size:11px;font-weight:800;padding:4px 9px;border-radius:999px;color:#fff;letter-spacing:.02em}
.badge-sale{background:var(--pink)}
.badge-new{background:#7f2e61}
.badge-liq{background:#e0812a}
.badge-gift{background:#4b9d6e}
.badge-stock{background:#8a7885}
.product-card .prices{display:flex;align-items:baseline;gap:8px;min-height:26px;margin-bottom:12px}
.product-card .old{color:#b1a4ad;text-decoration:line-through;font-size:13px}
.product-card .now{font-size:17px;color:#19161a;font-weight:800}
.product-card .btn-add{margin-top:auto;width:100%;justify-content:center;height:44px;min-height:44px;font-size:13px}
.product-card a.name{color:#2e2930}

/* Paginación */
.pagination{display:flex;gap:6px;justify-content:center;margin-top:34px;flex-wrap:wrap;list-style:none;padding:0}
.pagination a,.pagination span{display:grid;place-items:center;min-width:40px;height:40px;padding:0 10px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--mauve);font-weight:700;font-size:14px}
.pagination .active span{background:var(--mauve);color:#fff;border-color:var(--mauve)}
.pagination [aria-disabled=true] span{opacity:.4}

/* Ficha producto */
.product-detail{display:grid;grid-template-columns:1fr 1fr;gap:44px;margin-top:14px}
.product-gallery{background:#fff;border:1px solid var(--line);border-radius:22px;padding:26px;display:grid;place-items:center;min-height:420px}
.product-gallery img{max-height:440px;width:auto;object-fit:contain}
.product-info h1{font-family:Georgia,serif;font-size:34px;letter-spacing:-.02em;color:#2c282b;margin:6px 0 10px}
.product-info .brand-tag{color:var(--pink);font-weight:800;text-transform:uppercase;letter-spacing:.08em;font-size:13px}
.product-price{display:flex;align-items:baseline;gap:12px;margin:18px 0}
.product-price .now{font-size:32px;font-weight:800;color:#19161a}
.product-price .old{font-size:19px;color:#b1a4ad;text-decoration:line-through}
.availability-notice{background:#fff4e6;border:1px solid #f6dcb4;color:#8a5312;border-radius:14px;padding:14px 16px;margin:16px 0;font-size:14px}
.availability-notice strong{display:block;margin-bottom:3px}
.qty-row{display:flex;align-items:center;gap:14px;margin:22px 0}
.qty-input{display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.qty-input button{width:42px;height:46px;border:0;background:#fff;font-size:20px;cursor:pointer;color:var(--mauve)}
.qty-input input{width:52px;height:46px;border:0;text-align:center;font-size:16px;font-weight:700}
.product-desc{margin-top:34px;line-height:1.7;color:#5f5661}
.product-desc h3{font-family:Georgia,serif;color:#342b33}

/* Barra superior ficha: volver + breadcrumb */
.pd-topbar{display:flex;align-items:center;gap:16px;margin:6px 0 10px;flex-wrap:wrap}
.btn-back{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:9px 16px;font-weight:700;font-size:14px;color:var(--mauve);transition:.15s}
.btn-back:hover{border-color:var(--pink);color:var(--pink);transform:translateX(-2px)}
.pd-topbar .breadcrumb{margin:0}
.pd-topbar .breadcrumb span{color:var(--muted)}

/* Descripción corta */
.pd-short{color:#5f5661;line-height:1.7;font-size:16px;margin:2px 0 6px}
.pd-short p{margin:0 0 8px}

/* Fila de confianza en la ficha */
.pd-trust{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0 6px}
.pd-trust div{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 12px;font-size:13px;font-weight:700;color:#4b414a}
.pd-trust span{font-size:16px}

/* Meta SKU / categoría / marca */
.pd-meta{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:6px;font-size:14px;color:#6a5f69}
.pd-meta b{color:#3b3039}
.pd-meta a{color:var(--mauve);font-weight:700}
.pd-meta a:hover{color:var(--pink)}

/* Descripción a ancho completo, con buena tipografía */
.pd-description{max-width:920px;margin:38px auto 0;background:#fff;border:1px solid var(--line);border-radius:22px;padding:34px 40px;box-shadow:0 14px 40px rgba(129,50,99,.06)}
.pd-description h2{font-family:Georgia,serif;font-size:28px;color:#342b33;letter-spacing:-.02em;margin:0 0 6px}
.pd-description h2::after{content:"";display:block;width:60px;height:3px;background:var(--pink);border-radius:99px;margin:14px 0 22px}
.pd-description-body{color:#5f5661;line-height:1.8;font-size:16px}
.pd-description-body p{margin:0 0 14px}
.pd-description-body ul,.pd-description-body ol{margin:0 0 16px;padding-left:4px;list-style:none}
.pd-description-body li{position:relative;padding-left:28px;margin-bottom:10px}
.pd-description-body ul li::before{content:"✓";position:absolute;left:0;top:0;color:var(--pink);font-weight:900}
.pd-description-body ol{counter-reset:pdli}
.pd-description-body ol li{counter-increment:pdli}
.pd-description-body ol li::before{content:counter(pdli);position:absolute;left:0;top:-1px;width:20px;height:20px;background:var(--pink);color:#fff;border-radius:50%;font-size:12px;font-weight:800;display:grid;place-items:center}
.pd-description-body strong{color:#3b3039}
.variant-list{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.variant-chip{border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-size:13px;background:#fff}
.variant-select{margin:18px 0 6px}
.variant-select label{display:block;text-transform:uppercase;letter-spacing:.08em;font-size:12px;font-weight:800;color:#4b414a;margin-bottom:8px}
.variant-select select{width:100%;max-width:340px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;font-size:15px;background:#fff;cursor:pointer}
.variant-select select:focus{outline:2px solid #f3c6dc;border-color:var(--pink)}
.btn[disabled]{opacity:.5;cursor:not-allowed;transform:none}

/* Cart / Checkout */
.cart-layout,.checkout-layout{display:grid;grid-template-columns:1fr 360px;gap:30px;align-items:start}
.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:24px}
.card h3{font-family:Georgia,serif;color:#342b33;margin-top:0}
.cart-item{display:grid;grid-template-columns:80px 1fr auto;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid #f5e6ee}
.cart-item img{width:80px;height:80px;object-fit:contain;background:#fff9fb;border-radius:12px}
.cart-item .ci-name{font-weight:700;color:#2e2930}
.cart-item .ci-price{color:var(--muted);font-size:14px}
.summary-row{display:flex;justify-content:space-between;padding:9px 0;color:#5f5661}
.summary-row.total{border-top:1px solid var(--line);margin-top:8px;padding-top:16px;font-size:20px;font-weight:800;color:#19161a}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:4px}
.form-field.full{grid-column:1/-1}
.form-field label{font-size:13px;font-weight:700;color:#4b414a}
.form-field input,.form-field select,.form-field textarea{padding:12px 14px;border:1px solid var(--line);border-radius:12px;font-size:15px;font-family:inherit}
.form-field input:focus,.form-field textarea:focus,.form-field select:focus{outline:2px solid #f3c6dc;border-color:var(--pink)}
.field-error{color:#c0356f;font-size:12px}
.btn-block{width:100%;justify-content:center}
.btn-full-lg{width:100%;justify-content:center;min-height:56px;font-size:16px}

/* Auth */
.auth-wrap{max-width:440px;margin:40px auto}
.auth-wrap .card{padding:32px}

/* Estados / vacío */
.empty-state{text-align:center;padding:70px 20px;color:var(--muted)}
.empty-state h3{font-family:Georgia,serif;font-size:26px;color:#342b33}

/* Extra secciones home */
.section-alt{background:#fff8fb}
.mini-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.trust-band{background:linear-gradient(90deg,var(--mauve-dark),#8d356c);color:#fff;text-align:center;padding:16px;font-family:Georgia,serif;font-size:clamp(16px,2.2vw,22px);letter-spacing:.01em}

.category-chips{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:6px}
.category-chips a{background:#fff;border:1px solid var(--line);border-radius:999px;padding:10px 18px;font-weight:700;font-size:14px;color:#4b414a}
.category-chips a:hover{border-color:var(--pink);color:var(--pink)}
.footer-credit a{color:#fff;text-decoration:underline;font-weight:700}
.footer-credit a:hover{color:#ffd7ea}

/* ====== Marca de agua elegante sobre imágenes de producto ====== */
.product-image,.product-gallery{position:relative}
.product-image::after,.product-gallery::after{
    content:"Mirror Mirror";
    position:absolute;inset:0;
    display:flex;align-items:center;justify-content:center;
    font-family:Georgia,'Times New Roman',serif;
    color:#813263;
    opacity:.10;
    transform:rotate(-16deg);
    letter-spacing:.05em;
    pointer-events:none;
    text-align:center;
    z-index:1;
    animation:mmWm 6s ease-in-out infinite;
}
.product-image::after{font-size:15px}
.product-gallery::after{font-size:clamp(24px,4vw,40px)}
@keyframes mmWm{0%,100%{opacity:.06}50%{opacity:.15}}

/* ====== Fade-in suave de todos los productos ====== */
@keyframes mmFadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
.product-card{animation:mmFadeUp .6s cubic-bezier(.22,.61,.36,1) backwards}
.product-card:nth-child(1){animation-delay:.04s}
.product-card:nth-child(2){animation-delay:.10s}
.product-card:nth-child(3){animation-delay:.16s}
.product-card:nth-child(4){animation-delay:.22s}
.product-card:nth-child(5){animation-delay:.28s}
.product-card:nth-child(6){animation-delay:.34s}
.product-card:nth-child(7){animation-delay:.40s}
.product-card:nth-child(8){animation-delay:.46s}
.product-card:nth-child(n+9){animation-delay:.5s}

@media (prefers-reduced-motion: reduce){
    .product-card{animation:none}
    .product-image::after,.product-gallery::after{animation:none;opacity:.09}
}

@media (max-width:980px){
    .shop-layout{grid-template-columns:1fr}
    .filters{position:static}
    .grid-products,.mini-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
    .product-detail{grid-template-columns:1fr;gap:26px}
    .cart-layout,.checkout-layout{grid-template-columns:1fr}
    .form-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
    .container{padding:0 16px}
    .grid-products,.mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .cart-item{grid-template-columns:64px 1fr;grid-template-areas:'img name' 'img actions'}
}
