/* Mejoras compartidas de accesibilidad, rendimiento y experiencia móvil. */

:root {
    color-scheme: dark;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #ed1c24 !important;
    outline-offset: 3px !important;
}

.header-cart {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    justify-content: center;
    border: 0;
    background: transparent;
    color: inherit;
}

.footer a {
    color: inherit;
}

.checkout-consent a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea,
.checkout-btn,
.close-cart,
.quantity-btn,
.remove-item {
    min-height: 44px;
}

.product-detail-price-btn,
.catalog-card-price-link,
.catalog-card-secondary,
.payment-result-link {
    min-height: 44px !important;
}

.product-img,
.catalog-card-image,
.detail-main-image,
.detail-thumb-image,
.categoria-img,
.banner-product-img {
    aspect-ratio: 1 / 1;
}

.hero {
    isolation: isolate;
    background: #000000 url('../images/Background-poster.webp') center / cover no-repeat;
}

.hero-background-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
}

.hero::before {
    z-index: -1;
}

.detail-config-btn,
.detail-color-btn,
.detail-thumb-card,
.detail-terms-summary {
    min-height: 44px !important;
}

.detail-shipping-note {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.86rem;
    line-height: 1.5;
}

@supports (content-visibility: auto) {
    main > section:not(.hero),
    .footer {
        content-visibility: auto;
        contain-intrinsic-size: 1px 900px;
    }
}

/* Página de información legal, con los mismos colores y tipografía del sitio. */
.legal-main {
    padding: 150px 0 72px;
    background: linear-gradient(135deg, #080808 0%, #151515 100%);
}

.legal-shell {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
}

.legal-intro,
.legal-section {
    padding: clamp(22px, 4vw, 40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.035);
}

.legal-intro {
    margin-bottom: 22px;
}

.legal-section {
    margin-top: 18px;
    scroll-margin-top: 130px;
}

.legal-intro h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1;
}

.legal-section h2 {
    margin-bottom: 18px;
    color: #ffffff;
    font-size: clamp(1.45rem, 4vw, 2.2rem);
}

.legal-section h3 {
    margin: 22px 0 8px;
    color: #ffffff;
    font-size: 1.05rem;
}

.legal-intro p,
.legal-section p,
.legal-section li {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.7;
}

.legal-section ul {
    margin: 10px 0 0 22px;
}

.legal-section a {
    color: #ffffff;
    text-decoration-color: #ed1c24;
    text-underline-offset: 3px;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.legal-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid #ed1c24;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
}

.legal-updated {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 0.88rem !important;
}

@media (max-width: 768px) {
    .header-cart {
        right: 10px !important;
        top: 4px !important;
    }

    .nav-categories {
        padding-bottom: 9px !important;
        scrollbar-width: thin !important;
        scrollbar-color: #ed1c24 rgba(255, 255, 255, 0.1) !important;
    }

    .nav-categories::-webkit-scrollbar {
        display: block !important;
        height: 4px !important;
    }

    .nav-categories::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-categories::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: #ed1c24;
    }

    .category-link {
        min-height: 44px !important;
        padding: 8px 14px !important;
        font-size: 12px !important;
    }

    .hero-subtitle,
    .banner-desc {
        font-size: 14px !important;
    }

    .product-detail-price-btn {
        min-height: 44px !important;
    }

    .legal-main {
        padding-top: 124px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-background-video {
        display: none;
    }
}
