:root {
    --purple: #1a0a2a;
    --purple-dark: #0f0518;
    --gold: #F4C352;
    --gold-dark: #a68a4b;
    --cream: #f4e9d5;

    /* New Custom Header Variables */
    --royal-purple: #13031e;
    --royal-gold: #d4af5c;
    --royal-gold-hover: #ffffff;
    --content-width: 1200px;
    --header-height: 65px;
}

/* Base Styles */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--purple);
    color: white;
}

.bg-purple {
    background-color: var(--purple) !important;
}

.bg-purple-dark {
    background-color: var(--purple-dark) !important;
}

.bg-gold {
    background-color: var(--gold) !important;
}

.bg-cream {
    background-color: var(--cream) !important;
}

.text-gold {
    color: var(--gold) !important;
}

.text-purple {
    color: var(--purple) !important;
}

.font-cinzel {
    font-family: 'Cinzel', serif;
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

.fw-black {
    font-weight: 900;
}

.tracking-wide {
    letter-spacing: 12px;
}

.italic {
    font-style: italic;
}

.extra-small {
    font-size: 0.65rem;
}

.border-gold {
    border-color: var(--gold) !important;
}

.border-gold-transparent {
    border-top: 1px solid rgba(197, 165, 92, 0.3) !important;
}

/* =========================================
   CUSTOM HEADER MENU
   ========================================= */
.rh-custom-header-wrapper,
.rh-custom-header-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.rh-custom-header-wrapper {
    background-color: var(--purple);
    width: 100%;
    position: relative;
    z-index: 1000;
    font-family: "Montserrat", Arial, sans-serif;
}

/* Contenedor principal centrado */
.rh-inner-container {
    max-width: var(--content-width);
    margin: 0 auto;
    height: var(--header-height);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

/* =========================================
   ELEMENTOS DEL MENÚ (ENLACES PC)
   ========================================= */
.rh-mobile-nav-wrapper {
    flex: 1;
    display: flex;
}

.rh-nav-list {
    list-style: none;
    display: flex;
    width: 100%;
}

/* Empujar los enlaces a los extremos para dejar hueco a la caja del logo */
.rh-nav-left {
    justify-content: flex-end;
    padding-right: 150px;
    /* Espacio simétrico antes del logo */
}

.rh-nav-right {
    justify-content: flex-start;
    padding-left: 150px;
    /* Espacio simétrico después del logo */
}

.rh-nav-link {
    text-decoration: none;
    color: var(--gold);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    display: block;
    white-space: nowrap;
    padding: 0 25px;
    /* Spacing between links */
}

.rh-nav-link:hover {
    color: var(--gold-dark);
}

/* =========================================
   LOGO CENTRAL (CAJA SOBRESALIENTE PC)
   ========================================= */
.rh-logo-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1010;

    /* Estilos exactos para replicar la imagen de PC */
    background-color: var(--purple);
    padding: 10px 25px 25px 25px;
    /* Sombra difuminada */
    display: flex;
    justify-content: center;
}

.rh-logo-img {
    display: block;
    width: auto;
    height: 180px;
    /* Tamaño del logo en la caja */
    max-width: none;
}

/* =========================================
   MÓVIL TOGGLE (CSS PURO HACK) - SIN CAMBIOS
   ========================================= */
#rh-mobile-toggle {
    display: none;
}

.rh-mobile-btn {
    display: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    position: absolute;
    right: 20px;
    top: 25px;
    /* Ajuste por si el contenedor cambia */
    transform: translateY(-50%);
    z-index: 1020;
}

.rh-mobile-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--gold);
    transition: 0.3s;
    border-radius: 2px;
}

/* =========================================
   MEDIA QUERIES (TABLET Y MÓVIL)
   ========================================= */
@media (max-width: 992px) {
    .rh-custom-header-wrapper {
        height: auto;
        padding-bottom: 20px;
    }

    .rh-inner-container {
        height: auto;
        flex-direction: column;
        padding: 20px 15px 5px 15px;
        align-items: center;
    }

    /* Restaurar botón móvil al centro vertical de la franja superior */
    .rh-mobile-btn {
        display: flex;
        top: 40px;
    }

    /* --- LOGO MÓVIL GRANDE --- */
    .rh-logo-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        padding: 0 0 20px 0;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        text-align: center;
        width: 100%;
        order: 1;
    }

    .rh-logo-img {
        height: auto;
        width: 100%;
        max-width: 220px;
        margin: 0 auto;
    }

    /* --- MENÚ HAMBURGUESA --- */
    .rh-mobile-nav-wrapper {
        width: 100%;
        order: 2;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        background-color: rgba(0, 0, 0, 0.15);
        border-radius: 5px;
    }

    .rh-nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0;
        width: 100%;
        text-align: center;
    }

    .rh-nav-left,
    .rh-nav-right {
        padding: 0;
    }

    .rh-nav-link {
        padding: 15px 0;
        border-bottom: 1px solid rgba(212, 175, 92, 0.1);
        font-size: 16px;
    }

    #rh-mobile-toggle:checked~.rh-inner-container .rh-mobile-nav-wrapper {
        max-height: 500px;
        margin-top: 15px;
    }

    #rh-mobile-toggle:checked~.rh-inner-container .rh-mobile-btn span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    #rh-mobile-toggle:checked~.rh-inner-container .rh-mobile-btn span:nth-child(2) {
        opacity: 0;
    }

    #rh-mobile-toggle:checked~.rh-inner-container .rh-mobile-btn span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

/* Hero Section */
.hero {
    background-color: #170925;
    display: flex;
    align-items: center;
    padding: 0;
    margin-top: 160px;
}

.hero-video {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background-color: #000;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Slightly darker for better readability */
    z-index: 2;
}

/* Video Section */
.video-section {
    background-color: var(--purple-dark);
    position: relative;
    overflow: hidden;
}

.video-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 10, 42, 0.9) 0%, rgba(15, 5, 24, 0.95) 100%);
    z-index: 1;
}

.video-section .container {
    position: relative;
    z-index: 2;
}

.video-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect removed as requested */

.video-container video {
    display: block;
    width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: cover;
    background-color: var(--purple-dark);
}

/* Custom media controls styling removed as requested */

/* Video fallback styles */
.video-fallback {
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Ensure video container has proper dimensions */
.video-container {
    background-color: var(--purple-dark);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.video-container video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Mobile-specific video optimizations */
@media (max-width: 768px) {
    
    .hero {
        margin-top: 0px;
    }

    .hero-video {
        /* Ensure video covers properly on mobile */
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    

    
    /* Improve touch controls on mobile */
    .video-controls {
        padding: 8px;
    }
    
    .video-control-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .play-button svg {
        width: 60px;
        height: 60px;
    }
}

/* iOS-specific optimizations */
@supports (-webkit-touch-callout: none) {
    .hero-video,
    .video-container video {
        /* iOS sometimes has issues with object-fit: cover */
        object-fit: cover;
        -webkit-object-fit: cover;
    }
    
    /* Prevent iOS from showing fullscreen controls */
    video {
        -webkit-playsinline: true;
        playsinline: true;
    }
}

/* Android-specific optimizations */
@supports not (-webkit-touch-callout: none) {
    .hero-video,
    .video-container video {
        /* Ensure proper video rendering on Android */
        object-fit: cover;
    }
}
}

/* Video loading state improvements */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--purple-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: 10px;
}

/* Hide video controls initially to reduce visual clutter during load */
/* Initial controls state handled by browser defaults */

/* Loading animation */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.video-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(244, 195, 82, 0.3);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s infinite ease-in-out;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure video is on top when loaded */
.video-container video.loaded {
    z-index: 5;
    position: relative;
}

/* Video overlay removed to prevent obscuring controls */

.play-button {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.video-container:hover .play-button {
    transform: scale(1);
}

/* Gold Outline Button */
.btn-outline-gold {
    color: var(--gold);
    border: 2px solid var(--gold);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    color: var(--purple);
    background: var(--gold);
    border-color: var(--gold);
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 7rem);
    text-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 3;
}

/* About Section Overlap */
.about-overlap {
    margin-top: 0px;
    position: relative;
    z-index: 10;
}

.cow-box {
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.cow-img {
    width: 100%;
    display: block;
}

/* Tagline */
.tagline-section {
    padding: 60px 0 0px 0;
    background-color: var(--purple);
}

.tagline-text {
    font-family: 'Montserrat', serif;
    font-style: italic;
    color: var(--gold);
    font-size: 2rem;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Products Carousel */
.products-section {
    position: relative;
    overflow: hidden;
}

.product-card {
    border: none;
    border-radius: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.product-card .card-img-top {
    height: 300px;
    object-fit: cover;
    border-bottom: 3px solid var(--gold);
}

.product-card h4 {
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.product-card p {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Slick Customization */
.product-carousel .slick-track {
    display: flex !important;
}

.product-carousel .slick-slide {
    height: auto !important;
    display: flex !important;
}

.product-carousel .slick-slide>div {
    display: flex;
    flex: 1;
}

.product-carousel .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-carousel .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-carousel .slick-prev,
.product-carousel .slick-next {
    width: 50px;
    height: 50px;
    background: var(--purple-dark);
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
    border: 1px solid var(--gold);
}

.product-carousel .slick-prev:hover,
.product-carousel .slick-next:hover {
    background: var(--gold);
}

.product-carousel .slick-prev {
    left: -25px;
}

.product-carousel .slick-next {
    right: -25px;
}

.product-carousel .slick-prev:before,
.product-carousel .slick-next:before {
    font-family: 'slick';
    font-size: 24px;
    color: var(--gold);
    opacity: 1;
}

.product-carousel .slick-prev:hover:before,
.product-carousel .slick-next:hover:before {
    color: var(--purple);
}

.product-carousel .slick-dots {
    bottom: -40px;
}

.product-carousel .slick-dots li button:before {
    color: var(--gold);
    font-size: 12px;
    opacity: 0.5;
}

.product-carousel .slick-dots li.slick-active button:before {
    color: var(--gold);
    opacity: 1;
}

/* The Royal Selection */
.royal-selection-section {
    background: linear-gradient(to bottom, var(--cream) 70%, var(--gold) 70%);
}

.scroll-container {
    overflow-x: auto;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Distribution Banner */
.distribution-section {
    min-height: 400px;
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.banner-overlay {
    background: rgba(26, 10, 42, 0.85);
}

/* Footer */
.footer-section {
    height: 400px;
    overflow: hidden;
}

.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.contact-info p {
    color: white;
}

.copyright-info {
    opacity: 0.8;
}

/* Responsive Overrides */
@media (max-width: 991px) {

    .about-overlap {
        margin-top: 120px !important;
    }

    .distribution-section * {
        text-align: center;
    }

    .tagline-section {
        padding-bottom: 0;
    }

    #navbarLeft,
    #navbarRight {
        display: none !important;
    }

    .tracking-wide {
        letter-spacing: 4px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    /* Video Section Responsive */
    .video-section .display-4 {
        font-size: 2.5rem;
    }

    .video-container video {
        max-height: 600px;
    }

    .video-section .col-lg-6.ps-lg-5 {
        padding-left: 0 !important;
        text-align: center;
    }

    .btn-outline-gold {
        padding: 12px 30px;
    }
}

/* Small devices (phones, 576px and up) */
@media (max-width: 576px) {
    .video-section .display-4 {
        font-size: 2rem;
    }

    .video-container video {
        max-height: 550p;
    }

    .play-button svg {
        width: 60px;
        height: 60px;
    }

    /* Responsive para título y botón */
    .video-section .display-4 {
        margin-bottom: 20px !important;
        font-size: 2.5rem;
    }

    .video-section .btn-outline-gold {
        width: 100% !important;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 768px) {
    .video-section .display-4 {
        font-size: 2.2rem;
    }

    .video-section .btn-outline-gold {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100% !important;
        max-width: 350px;
    }

    .video-section .col-lg-6.ps-lg-5 {
        padding-left: 0 !important;
        text-align: center;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .video-section .btn-outline-gold {
        width: auto !important;
        max-width: none;
    }
}

/* Video Controls Enhancement */
.video-container {
    position: relative;
}

.video-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.video-control-btn {
    background: rgba(26, 10, 42, 0.8);
    border: 1px solid var(--gold);
    color: var(--gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-control-btn:hover {
    background: var(--gold);
    color: var(--purple);
}

/* Video Loading State */
.video-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--purple-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.video-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(244, 195, 82, 0.3);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}