:root {
    --brand-50: #f4fbff;
    --brand-100: #e4f5ff;
    --brand-200: #cdeeff;
    --brand-300: #9edcff;
    --brand-400: #67c7ff;
    --brand-500: #32aff7;
    --brand-600: #168fd6;
    --brand-700: #0f6fb0;
    --brand-800: #135786;
    --brand-900: #17324d;

    --accent-sun: #ffc857;
    --accent-coral: #ff6b6b;
    --accent-mint: #19c28e;

    --bg-main: #f7fbff;
    --bg-soft: #eef7fd;
    --surface: #ffffff;
    --border: #d8e8f4;

    --text-strong: #17324d;
    --text-body: #35556f;
    --text-muted: #6e879d;

    --success: #19c28e;
    --warning: #ffb648;
    --danger: #e25563;

    --shadow-sm: 0 8px 24px rgba(18, 56, 89, 0.08);
    --shadow-md: 0 18px 45px rgba(18, 56, 89, 0.12);
    --shadow-lg: 0 25px 60px rgba(18, 56, 89, 0.16);

    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-2xl: 30px;
}

* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    background:
        radial-gradient(circle at top right, rgba(103, 199, 255, 0.12), transparent 30%),
        linear-gradient(180deg, #fbfdff 0%, var(--bg-main) 100%);
    color: var(--text-body);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

a {
    text-decoration: none;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 232, 244, 0.85);
    box-shadow: var(--shadow-sm);
}

.header-mobile {
    min-height: 72px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 44px 48px 48px;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.brand-mobile {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--brand-900);
}

.brand-mobile img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 14px;
    flex-shrink: 0;
}

.brand-mobile span {
    min-width: 0;
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--brand-900);
    letter-spacing: 0.2px;
}

.nav-icon-btn {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--brand-900);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s ease;
    box-shadow: 0 8px 16px rgba(18, 56, 89, 0.06);
}

.nav-icon-btn:hover {
    transform: translateY(-1px);
    border-color: var(--brand-300);
    color: var(--brand-700);
}

.nav-icon-btn i {
    font-size: 1.3rem;
    line-height: 1;
}

.menu-left {
    border-color: var(--accent-sun);
    color: #b37b00;
}

.cart-btn {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent-sun);
    color: var(--brand-900);
    font-size: 0.72rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 200, 87, 0.45);
}

.header-desktop {
    min-height: 82px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

.desktop-left,
.desktop-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.desktop-right {
    justify-content: flex-end;
}

.brand-desktop {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--brand-900);
}

.brand-desktop img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 16px;
}

.brand-desktop span {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--brand-900);
}

.desktop-link {
    color: var(--text-body);
    font-weight: 700;
    transition: 0.25s ease;
}

.desktop-link:hover {
    color: var(--brand-700);
}

.desktop-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--brand-900);
    background: var(--surface);
    font-weight: 700;
}

.desktop-cart {
    width: 52px;
    height: 52px;
    border-radius: 18px;
}

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    padding: 10px;
}

.dropdown-item {
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
}

.dropdown-item:hover,
.dropdown-item.active-category,
.list-group-item.active-category {
    background: var(--brand-50);
    color: var(--brand-700) !important;
}

.offcanvas {
    border: none;
}

.offcanvas-header {
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--border);
}

.offcanvas-title {
    font-weight: 900;
    color: var(--brand-900);
}

.offcanvas-body {
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.mobile-menu-list .list-group-item {
    border: 1px solid var(--border);
    border-radius: 16px !important;
    margin-bottom: 12px;
    padding: 14px 16px;
    font-weight: 700;
    color: var(--text-strong);
    background: #fff;
}

.mobile-menu-list .list-group-item:hover {
    background: var(--brand-50);
    color: var(--brand-700);
}

.hero-shell {
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--surface);
    border: 1px solid rgba(216, 232, 244, 0.7);
    box-shadow: var(--shadow-lg);
}

.hero-slide-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center 50%;
    display: block;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background-color: rgba(255, 255, 255, 0.75);
}

.section-heading {
    color: var(--brand-900);
    font-weight: 900;
    letter-spacing: 0.2px;
}

.catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.catalog-note {
    color: var(--text-muted);
    font-weight: 600;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    transition: 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-media {
    position: relative;
    background: var(--bg-soft);
}

.main-product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: var(--bg-soft);
    cursor: pointer;
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.product-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.2px;
    box-shadow: 0 6px 16px rgba(18, 56, 89, 0.08);
}

.badge-new { background: #dff5ff; color: #0c6ea6; }
.badge-popular { background: #fff4cc; color: #946400; }
.badge-best { background: #ffe2e2; color: #b93838; }
.badge-sale { background: #e7fff4; color: #067f5a; }
.badge-reco { background: #ebe8ff; color: #5b45c7; }
.badge-out { background: #eceff3; color: #5a6978; }

.product-body {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-category {
    font-size: 0.77rem;
    font-weight: 800;
    color: var(--brand-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.product-title {
    color: var(--text-strong);
    font-weight: 900;
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.35;
    margin: 0;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 2px;
}

.price-main {
    color: var(--brand-900);
    font-size: 1.22rem;
    font-weight: 900;
}

.price-old {
    color: #97a8b8;
    text-decoration: line-through;
    font-weight: 700;
    font-size: 0.84rem;
}

.stock-note {
    font-size: 0.79rem;
    font-weight: 700;
    margin: 0;
}

.stock-ok { color: var(--success); }
.stock-low { color: #b86b00; }
.stock-out { color: var(--danger); }

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.btn-add,
.btn-view {
    height: 42px;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9rem;
    transition: 0.25s ease;
}

.btn-add {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    box-shadow: 0 12px 24px rgba(22, 143, 214, 0.22);
}

.btn-add:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.btn-add:disabled {
    background: #d3dde7;
    color: #6f8192;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-view {
    background: #fff;
    color: var(--brand-700);
    border: 1px solid var(--brand-200);
}

.btn-view:hover {
    background: var(--brand-50);
}

.btn-more {
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 800;
    border: 1px solid var(--brand-300);
    color: var(--brand-700);
    background: #fff;
}

.btn-more:hover {
    background: var(--brand-50);
    color: var(--brand-800);
}

.modal-content {
    border: none;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-body .carousel-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 22px;
}

.modal-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-page-wrap {
    padding-top: 24px;
    padding-bottom: 24px;
}

.info-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 18px;
}

.cart-offcanvas {
    width: 430px !important;
    max-width: 100%;
    background: #f8f8f8;
}

.cart-header {
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

.cart-title {
    font-size: 1rem;
    font-weight: 900;
    color: #333;
}

.cart-body {
    padding: 0;
}

.cart-items {
    padding: 0 14px;
}

.cart-item {
    display: grid;
    grid-template-columns: 86px 1fr 30px;
    gap: 12px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e3e3e3;
}

.cart-item-img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: 900;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.cart-item-price {
    font-size: 1rem;
    color: #444;
    margin: 0 0 10px 0;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #cfcfcf;
    background: #f4f4f4;
    color: #222;
    border-radius: 0;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qty-value {
    min-width: 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
}

.cart-trash {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a94ab;
    background: transparent;
    border: none;
    font-size: 1.2rem;
}

.cart-footer {
    border-top: 1px solid #d8d8d8;
    background: #f8f8f8;
    padding: 14px;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2rem;
    color: #222;
    margin-bottom: 14px;
}

.cart-total-row strong {
    font-size: 1.3rem;
}

.cart-actions {
    display: grid;
    gap: 10px;
}

.cart-action {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.cart-action-muted { background: #757d86; }
.cart-action-transfer { background: #1f9b5f; }
.cart-action-card { background: #6467f2; }
.cart-action-klarna { background: #111827; }

.cart-empty {
    padding: 26px 12px;
    text-align: center;
    color: #7a7a7a;
}

.cart-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    color: #9eb3c6;
}

.access-options {
    display: grid;
    gap: 10px;
}

.access-provider {
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 800;
    color: var(--text-strong);
}

.access-provider:hover {
    background: var(--brand-50);
}

.access-provider-email {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    border: none;
}

.swal2-input.custom-input {
    width: 100% !important;
    margin: 0 !important;
}

footer {
    margin-top: 56px;
    background: linear-gradient(180deg, #16324e 0%, #11273d 100%);
    color: #e9f4ff;
    padding-top: 32px;
}

footer h5 {
    color: var(--accent-sun);
    font-weight: 900;
    margin-bottom: 16px;
}

footer a {
    color: #d9ebff;
}

footer a:hover {
    color: var(--accent-sun);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 18px;
    padding: 18px 0 24px;
}

@media (max-width: 991.98px) {
    .hero-slide-img {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 575.98px) {
    .header-mobile {
        grid-template-columns: 44px minmax(0, 1fr) 40px 44px 44px;
        gap: 8px;
        min-height: 68px;
    }

    .brand-mobile img {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .nav-icon-btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .hero-shell {
        border-radius: 22px;
    }

    .product-body {
        padding: 10px 10px 12px;
    }

    .product-title {
        font-size: 0.95rem;
    }

    .product-desc {
        font-size: 0.8rem;
    }

    .btn-add,
    .btn-view {
        font-size: 0.82rem;
        height: 40px;
    }

    .modal-actions-row {
        grid-template-columns: 1fr;
    }

    .info-card {
        padding: 18px;
    }

    .cart-item {
        grid-template-columns: 74px 1fr 26px;
        gap: 10px;
    }

    .cart-item-img {
        width: 74px;
        height: 74px;
    }

    .qty-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 374px) {
    .brand-mobile span {
        font-size: 0.95rem;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STRATO ROOT ENHANCEMENTS 2026-05-17
   Compartir productos, enlaces directos y protección visual.
   ========================================================= */

.product-image-link,
.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--brand-700);
}

.product-share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-800);
    box-shadow: 0 10px 22px rgba(18, 56, 89, 0.16);
    transition: transform .22s ease, background .22s ease, color .22s ease;
}

.product-share-btn:hover,
.product-share-btn:focus {
    transform: translateY(-1px) scale(1.04);
    background: var(--accent-sun);
    color: var(--brand-900);
}

.share-product-wide {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    border: 1px solid var(--brand-200);
    border-radius: 14px;
    background: #fff;
    color: var(--brand-700);
    font-weight: 900;
    transition: .22s ease;
}

.share-product-wide:hover,
.share-product-wide:focus {
    background: var(--brand-50);
    transform: translateY(-1px);
}

/* Modal de compartir */
.swal2-popup:has(.share-preview-box) {
    border-radius: 22px !important;
    padding: 24px !important;
}

.swal2-popup:has(.share-preview-box) .swal2-title {
    color: var(--text-body) !important;
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    margin: 0 0 14px !important;
}

.swal2-popup:has(.share-preview-box) .swal2-html-container {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.swal2-popup:has(.share-preview-box) .swal2-close {
    color: #a7b3bd !important;
    font-size: 2rem !important;
    transition: .2s ease !important;
}

.swal2-popup:has(.share-preview-box) .swal2-close:hover {
    color: var(--brand-900) !important;
    transform: scale(1.05) !important;
}

.share-preview-box {
    display: grid;
    gap: 8px;
    text-align: left;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}

.share-preview-box img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 16px;
    background: var(--bg-soft);
}

.share-preview-box h4 {
    margin: 0;
    color: var(--brand-900);
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 900;
}

.share-preview-box p {
    margin: 0;
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.4;
}

.share-preview-box strong {
    color: var(--brand-900);
    font-size: 1.15rem;
    line-height: 1;
}

.share-actions-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.share-option {
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 900;
    text-decoration: none;
    color: #fff;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.share-option:hover,
.share-option:focus {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 10px 22px rgba(18, 56, 89, 0.12);
}

.share-option.whatsapp { background: #1fa855; }
.share-option.facebook { background: #1877f2; }
.share-option.copy {
    grid-column: 1 / -1;
    background: var(--brand-900);
}

.share-small-note,
.access-note {
    margin: 10px 0 0;
    font-size: .82rem;
    color: var(--text-muted);
    text-align: center;
}

.checkout-summary {
    text-align: left;
}

.product-highlight-pulse .product-card {
    outline: 3px solid rgba(255, 200, 87, .86);
    box-shadow: 0 0 0 8px rgba(255, 200, 87, .22), var(--shadow-md);
}

/* Mantener 2 columnas en artículos y botones pequeños */
@media (max-width: 374px) {
    .product-actions {
        grid-template-columns: 1fr 1fr;
    }

    .btn-add,
    .btn-view {
        font-size: 0.72rem;
        padding-inline: 4px;
    }
}

/* =========================================================
   SHARE MODAL - RESPONSIVE MÓVIL REAL
   Corrige el modal para que no se vea como versión PC.
   ========================================================= */

@media (max-width: 575.98px) {
    .swal2-container {
        padding: 8px !important;
        align-items: center !important;
    }

    .swal2-popup:has(.share-preview-box) {
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        padding: 16px 12px 18px !important;
        border-radius: 18px !important;
    }

    .swal2-popup:has(.share-preview-box) .swal2-title {
        font-size: 1.32rem !important;
        line-height: 1.15 !important;
        margin: 0 28px 12px !important;
    }

    .swal2-popup:has(.share-preview-box) .swal2-close {
        top: 8px !important;
        right: 10px !important;
        font-size: 1.85rem !important;
    }

    .share-preview-box {
        width: 100% !important;
        padding: 10px !important;
        gap: 7px !important;
        border-radius: 16px !important;
    }

    .share-preview-box img {
        width: 100% !important;
        height: auto !important;
        max-height: 190px !important;
        object-fit: contain !important;
        object-position: center !important;
        border-radius: 14px !important;
    }

    .share-preview-box h4 {
        font-size: .98rem !important;
        line-height: 1.18 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .share-preview-box p {
        font-size: .82rem !important;
        line-height: 1.34 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .share-preview-box strong {
        font-size: 1rem !important;
    }

    .share-actions-box {
        grid-template-columns: 1fr !important;
        gap: 9px !important;
        margin-top: 10px !important;
    }

    .share-option,
    .share-option.copy {
        grid-column: auto !important;
        width: 100% !important;
        min-height: 45px !important;
        border-radius: 13px !important;
        font-size: .96rem !important;
    }

    .share-small-note,
    .access-note {
        margin-top: 10px !important;
        font-size: .76rem !important;
        line-height: 1.35 !important;
        padding: 0 4px !important;
    }
}

@media (max-width: 389.98px) {
    .swal2-popup:has(.share-preview-box) {
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
        padding: 14px 10px 16px !important;
    }

    .swal2-popup:has(.share-preview-box) .swal2-title {
        font-size: 1.2rem !important;
    }

    .share-preview-box img {
        max-height: 170px !important;
    }

    .share-preview-box h4 {
        font-size: .92rem !important;
    }

    .share-preview-box p {
        font-size: .78rem !important;
    }

    .share-option,
    .share-option.copy {
        min-height: 43px !important;
        font-size: .9rem !important;
    }
}

/* Fallback para navegadores sin :has().
   Se aplica solo en móvil y mantiene todos los SweetAlert dentro de pantalla. */
@supports not selector(:has(*)) {
    @media (max-width: 575.98px) {
        .swal2-popup {
            width: calc(100vw - 16px) !important;
            max-width: calc(100vw - 16px) !important;
        }

        .share-actions-box {
            grid-template-columns: 1fr !important;
        }

        .share-option.copy {
            grid-column: auto !important;
        }
    }
}