/* Tienda PhoneShop — DaisyUI winter + layout propio */
:root {
    --bg: #e9edf3;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --border: #c5ced9;
    --border-input: #b8c4d4;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #eff6ff;
    --wa: #25d366;
    --radius: 14px;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 14px 40px rgba(37, 99, 235, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: inherit; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
    flex-shrink: 0;
}
.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    background: #000;
    border-radius: 10px;
    padding: 10px 20px;
    line-height: 0;
}
.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.brand-logo-img {
    --logo-ratio: 1024 / 438;
    height: 68px;
    width: auto;
    max-width: min(calc(68px * var(--logo-ratio)), 58vw);
    aspect-ratio: var(--logo-ratio);
    object-fit: contain;
    display: block;
}
@media (max-width: 640px) {
    .brand-logo-wrap { padding: 8px 14px; border-radius: 8px; }
    .brand-logo-img { height: 52px; max-width: min(calc(52px * var(--logo-ratio)), 70vw); }
    .footer-logo-img { height: 60px; max-width: min(calc(60px * var(--logo-ratio)), 260px); }
}
.shop-info-sidebar .info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: var(--muted);
}
.shop-info-sidebar .info-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}
.shop-info-sidebar .info-list li:last-child { border-bottom: none; }
.shop-info-sidebar .info-list strong { color: var(--text); font-size: 13px; }
.shop-info-sidebar .info-list i { color: var(--brand); margin-right: 6px; width: 16px; }
.carrier-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}
.header-mid {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    justify-content: center;
}
.header-search {
    flex: 0 1 280px;
    width: 100%;
    max-width: 280px;
    min-width: 140px;
    display: flex;
}
.header-search input {
    flex: 1;
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    background: var(--surface);
}
.header-contact {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    flex-shrink: 0;
    line-height: 1.2;
}
.header-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}
.header-contact-phone:hover { color: var(--brand); }
.header-contact-phone i {
    color: var(--brand);
    font-size: 17px;
    flex-shrink: 0;
}
.header-contact-wa {
    background: var(--wa);
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 15px;
    gap: 8px;
}
.header-contact-wa i {
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}
.header-contact-wa:hover {
    filter: brightness(1.06);
    color: #fff;
}
.header-search input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.header-search button {
    border: none;
    background: var(--brand);
    color: #fff;
    padding: 0 18px;
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    font-size: 15px;
}
.header-search button:hover { background: var(--brand-dark); }
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}
.btn-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    color: var(--muted);
    background: var(--surface);
    transition: all 0.15s;
    line-height: 1;
}
.btn-header i { font-size: 18px; }
.btn-header-account {
    padding: 12px 14px;
    min-width: 48px;
    min-height: 48px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.btn-header:hover { border-color: var(--brand); color: var(--brand); }
.btn-header-wa {
    background: var(--wa);
    border-color: var(--wa);
    color: #fff;
}
.btn-header-wa:hover { filter: brightness(1.05); color: #fff; }

/* Layout */
.shop-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

.shop-sidebar {
    position: sticky;
    top: 88px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}
.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 10px;
}
.nav-pills { display: flex; flex-direction: column; gap: 4px; }
.nav-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: all 0.15s;
}
.nav-pill:hover { background: var(--brand-soft); color: var(--brand); }
.nav-pill.active {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
}
.nav-pill .pill-count {
    margin-left: auto;
    font-size: 11px;
    background: rgba(0,0,0,.08);
    padding: 2px 8px;
    border-radius: 999px;
}
.nav-pill.active .pill-count { background: rgba(255,255,255,.25); }

.cat-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.cat-mini {
    text-decoration: none;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    transition: all 0.15s;
    line-height: 1.3;
}
.cat-mini:hover, .cat-mini.active {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand);
}
.cat-mini .ico { display: block; font-size: 22px; margin-bottom: 4px; }

.shop-main { min-width: 0; }

.hero-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #7c3aed 100%);
    border-radius: 18px;
    padding: 28px 32px;
    color: #fff;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.hero-banner::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
}
.hero-banner h1 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    margin-bottom: 6px;
    position: relative;
}
.hero-banner p {
    color: rgba(255,255,255,.85);
    font-size: 14px;
    position: relative;
}
.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.results-bar h2 {
    font-size: 1.15rem;
    font-weight: 700;
}
.results-meta { font-size: 13px; color: var(--muted); }

/* Category showcase (accesorios) */
.cat-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}
.cat-card:hover, .cat-card.active {
    border-color: var(--brand);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.cat-card .ico { font-size: 32px; display: block; margin-bottom: 8px; }
.cat-card .name { font-size: 13px; font-weight: 700; color: var(--text); }
.cat-card .cnt { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Products */
.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.section-head i { color: var(--brand); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.product-img {
    aspect-ratio: 4 / 3;
    max-height: 210px;
    background: linear-gradient(160deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6px;
    overflow: hidden;
}
.product-img-fallback {
    display: none;
    font-size: 48px;
    line-height: 1;
    user-select: none;
}
.product-img.show-fallback .product-img-fallback {
    display: block;
}
.product-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}
.product-img img.is-broken {
    display: none !important;
}
.badge-pill {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-acc { left: 10px; background: #e0e7ff; color: #3730a3; }
.badge-cond { right: 10px; }
.cond-nuevo { background: #dcfce7; color: #15803d; }
.cond-usado { background: #fef9c3; color: #a16207; }
.cond-reacondicionado { background: #dbeafe; color: #1d4ed8; }

.product-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.product-cat {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.product-title {
    font-size: 15px;
    font-weight: 700;
    margin: 4px 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.spec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.spec-tag {
    font-size: 11px;
    background: #f1f5f9;
    color: var(--muted);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}
.product-desc {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    margin-top: auto;
    margin-bottom: 8px;
}
.btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--wa);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s;
}
.btn-wa:hover { filter: brightness(1.06); color: #fff; }
.btn-call { background: var(--brand); }

.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}
.empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 14px; max-width: 400px; margin: 0 auto; }

.site-footer {
    margin-top: 48px;
    padding: 32px 20px;
    background: var(--text);
    color: #94a3b8;
    text-align: center;
    font-size: 13px;
}
.site-footer strong { color: #fff; display: block; margin-bottom: 6px; }

/* Mobile: sidebar → horizontal chips */
.sidebar-toggle { display: none; }

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
        padding-top: 16px;
    }
    .shop-sidebar {
        position: static;
        overflow-x: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar-card {
        flex: 0 0 auto;
        min-width: 200px;
        padding: 12px;
    }
    .nav-pills { flex-direction: row; flex-wrap: nowrap; }
    .nav-pill { white-space: nowrap; }
    .cat-grid-mini { grid-template-columns: repeat(3, 72px); }
    .cat-mini { padding: 8px 6px; font-size: 10px; }
    .hero-banner { padding: 22px 20px; }
    .header-mid { order: 3; flex: 1 1 100%; justify-content: stretch; flex-wrap: wrap; }
    .header-search { flex: 1 1 auto; max-width: none; }
    .header-contact { width: 100%; justify-content: flex-start; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-title { font-size: 13px; }
    .product-price { font-size: 1.1rem; }
    .btn-wa { font-size: 12px; padding: 10px; }
    .cat-showcase { grid-template-columns: repeat(3, 1fr); }
}

/* ——— E-commerce: carrito, PDP, checkout ——— */
.btn-header-cart { position: relative; background: var(--brand-soft); color: var(--brand); border: 1px solid #bfdbfe; padding: 12px 20px; }
.btn-header-cart.active { background: var(--brand); color: #fff; }
.cart-badge {
    position: absolute; top: -7px; right: -7px;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 99px; background: #ef4444; color: #fff;
    font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.cart-label { display: none; }
@media (min-width: 640px) { .cart-label { display: inline; } }

.page-narrow { max-width: 960px; margin: 0 auto; padding: 24px 20px 48px; }
.page-title { font-size: 1.5rem; margin-bottom: 20px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--brand); text-decoration: none; }

.product-img-link, .product-title-link { text-decoration: none; color: inherit; }
.product-actions-row { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.btn-buy {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border: none; border-radius: 10px;
    background: var(--brand); color: #fff; font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-buy:hover { background: var(--brand-dark); color: #fff; }
.btn-buy-sm { padding: 10px 14px; font-size: 13px; }
.btn-buy-block { width: 100%; }
.btn-buy-secondary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 16px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600;
    text-decoration: none; margin-top: 8px;
}
.btn-link-detail { font-size: 13px; color: var(--brand); font-weight: 600; text-decoration: none; }

.pdp-layout {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 26px 30px;
    margin-bottom: 32px;
    align-items: start;
}
.pdp-gallery-wrap {
    display: flex; flex-direction: column; gap: 10px;
    max-width: 300px; width: 100%;
}
.pdp-gallery {
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    width: 100%;
    height: 400px;
    max-height: 400px;
    padding: 4px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pdp-gallery img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}
.pdp-thumbs {
    display: flex; flex-wrap: wrap; gap: 7px;
    max-height: 150px; overflow-y: auto; padding: 0;
}
.pdp-thumb {
    width: 60px; height: 60px; padding: 4px; border: 1px solid #e2e8f0;
    border-radius: 8px; background: #f8fafc; cursor: pointer; overflow: hidden;
    flex: 0 0 60px; transition: border-color .15s;
    display: flex; align-items: center; justify-content: center;
    box-sizing: border-box;
}
.pdp-thumb:hover { border-color: #93c5fd; }
.pdp-thumb.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.pdp-thumb img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; object-position: center center; display: block;
}
.pdp-placeholder { font-size: 4rem; }
.pdp-info h1 { font-size: 1.6rem; margin: 8px 0 12px; }
/* Spec boxes en ficha producto (Opción B — tamaño natural) */
.pdp-info .spec-tags--pdp {
    gap: 8px;
    margin: 2px 0 14px;
}
.pdp-info .spec-tag--box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 68px;
    padding: 7px 11px;
    background: var(--surface);
    border: 1.5px solid #93c5fd;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}
.pdp-info .spec-tag--box i {
    font-size: 14px;
    color: var(--brand);
}
.pdp-price { font-size: 1.75rem; margin: 12px 0; }
.pdp-meta { font-size: 12px; color: var(--muted); }
.pdp-desc { font-size: 14px; color: var(--muted); margin: 16px 0; line-height: 1.6; }
.pdp-stock { font-size: 14px; color: var(--muted); margin: 12px 0; }
.pdp-stock i { color: var(--brand); margin-right: 6px; }
.pdp-cond-badge { position: static !important; display: inline-block; margin: 10px 0 4px; }
.pdp-buy { margin-top: 20px; }
.qty-input { width: 72px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin: 8px 12px 12px 0; }
.units-section h2 { font-size: 1.1rem; margin-bottom: 8px; }
.units-list { display: flex; flex-direction: column; gap: 10px; }
.unit-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}

.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.cart-line {
    display: grid; grid-template-columns: 72px 1fr auto; gap: 14px;
    padding: 16px; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.cart-line-img {
    width: 72px; height: 72px; border-radius: 10px; background: var(--bg);
    display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 1.5rem;
}
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-title { font-weight: 600; text-decoration: none; color: var(--text); }
.cart-qty-form { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.qty-btn { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer; }
.cart-line-body { min-width: 0; }
.cart-line-actions {
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
    gap: 8px; flex-shrink: 0; min-width: max-content;
}
.cart-line-actions form { margin: 0; }
.cart-line-actions strong { white-space: nowrap; }
.link-danger { background: none; border: none; color: #ef4444; cursor: pointer; padding: 8px; border-radius: 8px; line-height: 1; }

.cart-summary, .checkout-form .checkout-block {
    background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.cart-summary h3 { margin-bottom: 14px; font-size: 1rem; }
.summary-row { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.summary-line { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; color: var(--muted); }
.summary-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.checkout-form .checkout-block { margin-bottom: 16px; }
.checkout-form h2 { font-size: 1rem; margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text); }
.form-grid label.full { grid-column: 1 / -1; }
.checkout-form input,
.checkout-form select,
.checkout-form textarea,
.form-grid input,
.form-grid textarea,
.form-grid select,
.auth-card input {
    padding: 10px 12px;
    border: 1.5px solid var(--border-input);
    border-radius: 8px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color .15s, box-shadow .15s;
}
.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus,
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus,
.auth-card input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.checkout-form input:disabled,
.form-grid input:disabled {
    background: #f1f5f9;
    color: var(--muted);
    border-color: var(--border);
    cursor: not-allowed;
}
.radio-cards { display: flex; flex-direction: column; gap: 8px; }
.radio-card { display: flex; gap: 10px; padding: 12px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface); }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radio-card-body { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.alert-checkout { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }

.confirm-box {
    text-align: center; background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 40px 28px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.confirm-icon { font-size: 3rem; color: #22c55e; margin-bottom: 12px; }
.confirm-lead { color: var(--muted); margin-bottom: 24px; }
.confirm-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; text-align: left; margin-bottom: 24px; }
.confirm-meta span { display: block; font-size: 12px; color: var(--muted); }
.confirm-lines { text-align: left; margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--border); }
.confirm-actions { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto; }

.footer-grid { max-width: 960px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; text-align: left; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: #94a3b8; text-decoration: none; }
.footer-copy { margin-top: 16px; opacity: .7; }

.tienda-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
    background: var(--text); color: #fff; padding: 14px 20px; border-radius: 12px;
    font-size: 15px; font-weight: 600; line-height: 1.35; text-align: center;
    z-index: 10050; opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none;
    max-width: min(420px, calc(100vw - 32px));
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
    box-sizing: border-box;
}
.tienda-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.tienda-toast-err { background: #b91c1c; }
@media (max-width: 768px) {
    .tienda-toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); font-size: 14px; padding: 13px 16px; }
}
.tm-btn.is-in-cart,
button.is-in-cart {
    opacity: 0.72;
    cursor: default;
    background: #334155;
    color: #fff;
}

@media (max-width: 768px) {
    .pdp-layout, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .pdp-gallery-wrap { max-width: 280px; margin: 0 auto; }
    .pdp-gallery { height: 360px; max-height: 360px; }
}

.checkout-login-hint { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.checkout-login-hint a { color: var(--brand); font-weight: 600; }
.crear-cuenta-check { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 13px; cursor: pointer; }

.auth-card {
    background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 24px; max-width: 420px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.auth-card label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--text); }
.auth-links { margin-top: 16px; font-size: 13px; text-align: center; }
.auth-links a { color: var(--brand); font-weight: 600; }

.account-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.account-head .page-title { margin: 0; flex: 1; }
.orders-list { display: flex; flex-direction: column; gap: 8px; }
.order-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 10px;
    text-decoration: none; color: inherit; background: var(--surface);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.order-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.order-date { display: block; font-size: 12px; color: var(--muted); }
.order-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.pago-pagado { color: #16a34a; font-weight: 600; }
.pago-pendiente { color: #d97706; }

.pay-instructions {
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 16px 18px;
}
.pay-instructions h3 { font-size: 1rem; margin-bottom: 10px; color: #92400e; }
.pay-list { margin: 0; padding-left: 18px; font-size: 14px; color: #78350f; }
.pay-list li { margin-bottom: 6px; }

/* Hero CTA + trust */
.hero-inner { position: relative; z-index: 1; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-hero {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px;
    border-radius: 10px; background: #fff; color: var(--brand); font-weight: 700;
    font-size: 14px; text-decoration: none; border: 1px solid rgba(255,255,255,.5);
}
.btn-hero:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-hero-alt { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-hero-wa { background: var(--wa); color: #fff; border-color: transparent; }
.btn-hero-wa:hover { filter: brightness(1.05); color: #fff; }
.trust-bar {
    display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px 16px; margin-bottom: 18px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    font-size: 12px; font-weight: 600; color: var(--muted);
}
.trust-bar span { display: inline-flex; align-items: center; gap: 6px; }
.trust-bar i { color: var(--brand); }

/* Checkout steps */
.checkout-steps {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 4px 8px; margin-bottom: 24px; padding: 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 12px;
}
.checkout-step {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
    color: var(--muted); text-decoration: none;
}
.checkout-step.done { color: var(--brand); }
.checkout-step.active { color: var(--text); }
.checkout-step .step-num {
    width: 26px; height: 26px; border-radius: 50%; background: var(--bg);
    border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.checkout-step.active .step-num, .checkout-step.done .step-num {
    background: var(--brand); color: #fff; border-color: var(--brand);
}
.step-sep { width: 24px; height: 2px; background: var(--border); border-radius: 1px; }

/* Account area */
.account-layout {
    display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}
.account-main {
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
}
.account-nav { display: flex; flex-direction: column; gap: 4px; }
.account-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted);
}
.account-nav-item:hover { background: var(--brand-soft); color: var(--brand); }
.account-nav-item.active { background: var(--brand); color: #fff; }
.account-nav-muted { margin-top: 8px; font-size: 13px; }
.account-sidebar {
    background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: 12px; position: sticky; top: 88px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.account-layout-hub .account-main { max-width: 720px; }
.account-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 28px;
}
.account-card {
    position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 8px; padding: 22px 14px; background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.account-card:hover {
    border-color: var(--brand); box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.account-card-icon {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--text);
}
.account-card-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; line-height: 1.3; }
.account-card-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.account-card-badge {
    position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.account-recent h2 { font-size: 1rem; margin-bottom: 12px; }
.order-row-static { cursor: default; }
.order-row-static:hover { border-color: var(--border); }
.link-inline { font-size: 13px; font-weight: 600; color: var(--brand); text-decoration: none; }
.link-inline:hover { text-decoration: underline; }
.order-returns {
    margin: 18px 0; padding: 14px 16px; background: #fff7ed; border-radius: 10px;
    border: 1px solid #fed7aa;
}
.order-returns h3 { font-size: 14px; margin-bottom: 10px; }
.return-line { font-size: 13px; margin: 6px 0; color: var(--text); }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--brand); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Order detail */
.order-detail-box { padding: 28px 24px; }
.order-detail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.order-detail-head h1 { font-size: 1.25rem; margin: 0; }
.shipping-track, .order-invoice {
    margin: 18px 0; padding: 14px 16px; background: var(--bg); border-radius: 10px;
    border: 1px solid var(--border);
}
.shipping-track h3, .order-invoice h3 { font-size: 14px; margin-bottom: 8px; }
.order-paid-ok { color: #16a34a; font-weight: 600; margin: 16px 0; font-size: 14px; }
.pay-block-bizum { background: #e0f2fe !important; border-color: #7dd3fc !important; }
.pay-block-card { background: #eef2ff !important; border-color: #c7d2fe !important; }

/* CMS + footer */
.cms-page .cms-body { font-size: 15px; line-height: 1.7; color: var(--muted); }
.cms-page .cms-body p { margin-bottom: 12px; }
.cms-page .cms-body h2 { color: var(--text); font-size: 1.05rem; margin: 22px 0 10px; }
.cms-page .cms-body ul, .cms-page .cms-body ol { margin: 0 0 14px 1.2rem; }
.cms-page .cms-body li { margin-bottom: 6px; }
.cms-page .cms-body a { color: var(--brand); font-weight: 600; }
.legal-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.65;
}
.tienda-map-wrap { margin: 16px 0; }
.cms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 12px 0 16px;
}
.cms-table th, .cms-table td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
}
.cms-table th { background: var(--bg); font-weight: 700; color: var(--text); }
.footer-grid-wide { max-width: 1100px; padding: 28px 20px 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; min-width: 140px; }
.footer-col-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 4px; }
.footer-col a { color: #cbd5e1; text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-brand p { font-size: 13px; color: #94a3b8; margin-top: 6px; }
.footer-brand-logo {
    display: inline-block;
    line-height: 0;
    margin-bottom: 10px;
}
.footer-logo-img {
    --logo-ratio: 1024 / 438;
    height: 78px;
    width: auto;
    max-width: min(calc(78px * var(--logo-ratio)), 320px);
    aspect-ratio: var(--logo-ratio);
    object-fit: contain;
    display: block;
}
.footer-payments {
    max-width: 1100px;
    margin: 22px auto 0;
    padding: 18px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 22px;
}
.footer-payments-label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}
.footer-payments-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-width: 46px;
    padding: 0 10px;
    background: #fff;
    border-radius: 5px;
    font-size: 1.65rem;
    line-height: 1;
}
.footer-pay-visa { color: #1a1f71; }
.footer-pay-mc { color: #eb001b; font-size: 1.75rem; }
.footer-pay-paypal { color: #003087; }
.footer-pay-bizum {
    background: #05c3dd;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0 14px;
    border-radius: 999px;
}
.footer-pay-text { line-height: 1; }
.text-muted { color: var(--muted); font-size: 14px; }
.btn-sm { padding: 8px 12px; font-size: 12px; }

@media (max-width: 768px) {
    .account-layout { grid-template-columns: 1fr; }
    .account-grid { grid-template-columns: repeat(2, 1fr); }
    .account-sidebar { position: static; }
    .account-nav { flex-direction: row; flex-wrap: wrap; }
    .checkout-steps .step-label { display: none; }
    .step-sep { width: 12px; }
}

/* Modal cookies (RGPD / LSSI) */
body.cookie-modal-open { overflow: hidden; }
.cookie-modal[hidden] { display: none !important; }
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}
.cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.cookie-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    padding: 24px 22px 20px;
    max-height: calc(100vh - 32px);
    overflow: auto;
}
.cookie-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text);
}
.cookie-modal-text {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 12px;
}
.cookie-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0 16px;
}
.cookie-action {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.cookie-action-primary {
    background: #1f2937;
    color: #fff;
}
.cookie-action-primary:hover { background: #111827; }
.cookie-action-outline {
    background: #fff;
    color: #1f2937;
    border-color: #cbd5e1;
}
.cookie-action-outline:hover { border-color: #94a3b8; background: #f8fafc; }
.cookie-modal-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    font-size: 13px;
}
.cookie-modal-legal a {
    color: #334155;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-modal-legal a:hover { color: var(--brand); }
.cookie-modal-legal span { color: #cbd5e1; }
.cookie-prefs {
    list-style: none;
    margin: 8px 0 4px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cookie-pref {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}
.cookie-pref-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cookie-pref-info strong { font-size: 14px; color: var(--text); }
.cookie-pref-info span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.cookie-pref-badge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}
.cookie-toggle {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    cursor: pointer;
}
.cookie-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle-ui {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s;
}
.cookie-toggle-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform 0.2s;
}
.cookie-toggle input:checked + .cookie-toggle-ui { background: var(--brand); }
.cookie-toggle input:checked + .cookie-toggle-ui::after { transform: translateX(20px); }
.footer-cookie-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #94a3b8;
    text-decoration: underline;
    cursor: pointer;
}
.footer-cookie-link:hover { color: #fff; }
@media (min-width: 640px) {
    .cookie-modal { align-items: center; }
}

/* WhatsApp flotante */
.wa-float-btn {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9000;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}
.wa-float-btn i { font-size: 30px; }
.wa-float-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
    color: #fff;
}
@media (max-width: 640px) {
    .wa-float-btn {
        right: 16px;
        bottom: 88px;
        width: 54px;
        height: 54px;
    }
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr);
    gap: 20px;
    align-items: start;
}
.contact-info p {
    margin: 0 0 10px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.contact-info p i { color: var(--brand); margin-top: 3px; width: 18px; text-align: center; flex-shrink: 0; }
.contact-info a { color: var(--text); text-decoration: none; }
.contact-info a:hover { color: var(--brand); }
@media (max-width: 720px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* Sin flechas ▲▼ en inputs number */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --- Cumplimiento legal: casillas de consentimiento, desistimiento, baja de cuenta --- */
.legal-check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.legal-check input[type="checkbox"] { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 auto; }
.legal-resp { margin: 10px 0 14px; line-height: 1.4; }
.checkout-legal { margin-top: 14px; }
mark.legal-pendiente { background: #fef08a; color: #713f12; padding: 0 4px; border-radius: 4px; }
.cms-body h2 { margin-top: 1.4em; }
.cms-body h3 { margin-top: 1.1em; font-size: 1.05rem; }
.cms-body .cms-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.cms-body .cms-table th, .cms-body .cms-table td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; vertical-align: top; }
.cms-body .cms-table th { background: #f1f5f9; }
.legal-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 4px 16px; margin-bottom: 16px; }
.desist-box { border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px; padding: 14px 16px; margin-top: 18px; }
.desist-box h3 { margin: 0 0 6px; }
.desist-lines { display: grid; gap: 8px; margin: 12px 0; }
.desist-lines label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.account-danger { border: 1px solid #fecaca; background: #fff7f7; border-radius: 12px; padding: 4px 16px 14px; margin-top: 24px; }
.account-danger summary { cursor: pointer; font-weight: 700; color: #b91c1c; padding: 12px 0 6px; }
.btn-danger-outline { background: #fff; color: #b91c1c; border: 1px solid #b91c1c; border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.btn-danger-outline:hover { background: #b91c1c; color: #fff; }

/* Fly-to-cart: product image clone travels to the header cart icon. */
.tm-fly-to-cart {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(32, 36, 43, 0.28);
    background: #fff;
    overflow: hidden;
    transform: translate(0, 0) scale(1);
    opacity: 1;
    transition: transform 1s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tm-fly-to-cart img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.tm-cart-bump {
    animation: tm-cart-bump 0.45s ease;
}
@keyframes tm-cart-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.18); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .tm-fly-to-cart { display: none !important; }
    .tm-cart-bump { animation: none; }
}

