/* =========================================
   DETALLE DE PRODUCTO - ESTILO WEEDGREEN (Premium) - Unificado y corregido
   ========================================= */

/* Contenedor principal: Solo usa .product para evitar conflictos con otros sistemas */
/* 1. Ajustamos el grid para que no sea tan masivo */

html,
body {
    background-color: #ffffff !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

nav[aria-label="breadcrumb"] {
    margin-top: 100px;
    padding-left: 20px;
    /* Alineación opcional */
}

.product {
    display: grid !important;
    grid-template-columns: 0.9fr 1.1fr !important;
    /* Invertimos: imagen un poco más pequeña, info con aire */
    gap: 40px !important;
    padding: 20px;
    max-width: 1200px !important;
    /* Bajamos de 1400 a 1200 para que no se "gigante" */
    margin: 0 auto;
    align-items: start;
}

/* 2. El contenedor de la imagen principal */
.main-image-container-zoom {
    position: relative;
    width: 100%;
    padding-bottom: 125%;
    /* Mantiene el ratio 4:5 */
    overflow: hidden;
    /* background: #f4f4f4; */
    cursor: crosshair;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 3. LA IMAGEN: El cambio de 'cover' a 'contain' es el que arregla el zoom */
.product__main-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Centra la imagen perfectamente */
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    /* No permitimos que se estire a la fuerza */
    height: auto !important;
    object-fit: contain !important;
    /* Muestra el producto COMPLETO */
    transition: transform 0.2s ease-out, opacity 0.3s;
}

/* Miniaturas: Lista horizontal con scroll si es necesario */

.product__thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product__thumbnail-list {
    margin-top: 15px;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
    /* Oculta scroll en Firefox */
}

.product__thumbnail-list::-webkit-scrollbar {
    display: none;
    /* Oculta scroll en Chrome/Safari */
}

.product__thumbnail-list-inner {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.product__thumbnail-item {
    flex: 0 0 80px !important;
    /* Un poco más ancha */
    width: 80px !important;
    height: 100px !important;
    /* Mantenemos proporción vertical */
    padding: 5px;
    /* IMPORTANTE: Crea un margen interno para que la foto respire */
    border: 1px solid #eee;
    background: #ffffff;
    /* Fondo blanco puro para los bordes sobrantes */
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.product__thumbnail-item:hover {
    border-color: #000;
}

.product__thumbnail img,
.product__thumbnail-item img {
    /* Anulamos el estiramiento de Bootstrap */
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;

    /* Forzamos el ajuste contenido */
    object-fit: contain !important;

    /* Centrado absoluto */
    display: block;
    margin: auto;

    /* Evitamos que el navegador intente 'rellenar' */
    flex-shrink: 0;
}

/* Info column (derecha): Empieza con product-title */
.product__info {
    display: flex;
    flex-direction: column;
}

/* Product meta: Marca, título, precio */
.product-meta {
    margin-bottom: 20px;
}

.product-brand {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

.product-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 10px;
    color: #1a1a1a;
    line-height: 1.2;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1c1c1c;
    margin-bottom: 20px;
}

/* Selectores de variantes (tallas): En fila horizontal */
.variant-selector {
    margin-bottom: 30px;
}

.variant-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: block;
}

.block-swatch-list {
    display: flex !important;
    flex-direction: row !important;
    /* AHORA SÍ: En fila horizontal */
    gap: 12px;
    flex-wrap: wrap;
}


/* Botones de compra */
.purchase-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.button-weed {
    width: 100%;
    padding: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    border: 1px solid #000;
    cursor: pointer;
    transition: 0.3s;
}

.button--primary {
    background: #000;
    color: #fff;
}

.button--secondary {
    background: #fff;
    color: #000;
}

.button--secondary:hover {
    background: #000;
    color: #fff;
}

/* Acordeones (tabs) */
.product-tabs {
    margin-top: 30px;
}

.product-tab {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.product-tab__title {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.product-tab__content {
    padding-top: 15px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* Utilidad para elementos ocultos */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* AJUSTE PARA QUE EL TEXTO NO SE PEGUE A LA IMAGEN EN MÓVIL */
@media (max-width: 991px) {
    .product {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
}



/* 1. Eliminar flechas predeterminadas (Spinners) en todos los navegadores */
/* Para Chrome, Safari, Edge y Opera */

.input-stock-variante::-webkit-outer-spin-button,
.input-stock-variante::-webkit-inner-spin-button,
.input-stock::-webkit-outer-spin-button,
.input-stock::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Para Firefox y Estándar Moderno */
.quantity-selector__input {
    appearance: none;
    /* Estándar actual que elimina la advertencia de VS Code */
    -moz-appearance: textfield;
    /* Compatibilidad para versiones antiguas de Firefox */
    width: 45px;
    text-align: center;
    border: none;
    font-weight: bold;
    background: transparent;
    outline: none;
    /* Evita el borde azul al hacer clic */
}

/* 2. Estilo del contenedor (Estética Weedgreen) */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e1e1e1;
    margin-top: 10px;
    background-color: #fff;
}

/* 3. Estilo de los botones + y - */
.quantity-selector__button {
    padding: 12px 15px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: background-color 0.2s ease;
}

.quantity-selector__button:hover {
    background-color: #f9f9f9;
}

/* 4. Ajuste específico por ID (Opcional si usas la clase, pero aquí lo unificamos) */
#Quantity {
    /* Hereda los estilos de .quantity-selector__input */
    width: 40px;
}


/* 5. Comentarios de compradores*/

/* Forzar estilos Bootstrap a los inputs generados por Django dentro de las reseñas */
.shein-reviews-container input[type="text"],
.shein-reviews-container input[type="number"],
.shein-reviews-container textarea,
.shein-reviews-container select {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.shein-reviews-container input[type="file"] {
    background-color: #fff;
    border: 1px solid #ced4da;
    padding: 6px;
    border-radius: 4px;
    width: 100%;
}


/* =========================================
   STICKY BAR STYLES (Estilo Weedgreen)
   ========================================= */
.sticky-product-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    /* Altura de la barra */
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1040;
    /* Por encima del navbar normal pero debajo de modales */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

/* Estado oculto (fuera de la pantalla hacia arriba) */
.sticky-hidden {
    transform: translateY(-120%);
}

/* Estado visible (en su sitio) */
.sticky-visible {
    transform: translateY(0);
}

/* Imagen pequeña */
.sticky-img-wrapper {
    width: 50px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #eee;
}

.sticky-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sticky-img-placeholder {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

/* SELECTORES DE COLOR Y TALLA */
.color-option-wrapper {
    cursor: pointer;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 2px;
    width: 48px;
    height: 64px;
    transition: all 0.2s ease;
    opacity: 0.6;
    /* Un poco opaco si no está seleccionado */
}

.color-option-wrapper:hover {
    opacity: 1;
    border-color: #999;
}

.color-option-wrapper.active {
    border-color: #000;
    border-width: 2px;
    opacity: 1;
}

.color-option-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-swatch {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

.block-swatch__item {
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.block-swatch__radio:checked+.block-swatch__item {
    border-color: #000;
    background-color: #000;
    color: #fff;
}

/* Estilo para tallas sin stock (opcional) */
.block-swatch__item.out-of-stock {
    text-decoration: line-through;
    color: #ccc;
    pointer-events: none;
    /* No clickeable */
}

/* BOTÓN AGOTADO (Estilo Shopify adaptado) */
.btn-agotado {
    background-color: #f4f4f4 !important;
    color: #757575 !important;
    border: 1px solid #d9d9d9 !important;
    cursor: not-allowed !important;
    width: 100%;
    padding: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
}



/* =========================================
   BLINDAJE DEL FOOTER (Protección contra CSS de terceros)
   ========================================= */
/* Forzamos al footer a usar Flexbox, ignorando cualquier regla global corrupta */
footer .row,
.kumara-footer .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -1.5rem;
    /* Ajuste estándar de Bootstrap */
    margin-left: -1.5rem;
}

/* Restauramos el comportamiento de las columnas dentro del footer */
footer .col-lg-4,
footer .col-lg-3,
footer .col-lg-2,
footer .col-md-6,
footer .col-12 {
    position: relative !important;
    width: auto !important;
    /* Deja que Bootstrap controle el ancho con sus clases */
    flex: 0 0 auto !important;
    /* Evita que se estiren o colapsen */
}

/* Asegura que las clases de ancho de Bootstrap (col-lg-4, etc.) se respeten */
@media (min-width: 992px) {
    footer .col-lg-4 {
        width: 33.33333333% !important;
    }

    footer .col-lg-3 {
        width: 25% !important;
    }

    footer .col-lg-2 {
        width: 16.66666667% !important;
    }
}

/* BASE.HTML */

* {
    outline: none !important;
    -webkit-tap-highlight-color: transparent
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden
}

body {
    background-color: #fff
}

main {
    width: 100%;
    margin-top: 70px;
    padding-top: 0;
    box-sizing: border-box
}

/* Ajustado para navbar sticky */

.kumara-slideshow {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: black;
    z-index: 1
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%
}

.mySlides {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.img-mobile {
    display: none
}

@media(max-width:768px) {
    .kumara-slideshow {
        height: 35vh
    }

    .img-desktop {
        display: none
    }

    .img-mobile {
        display: block
    }
}

.slideshow-content-wrapper {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: 100%
}

.banner-title {
    color: #ffffff !important;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8)
}

.kumara-button {
    background-color: white;
    color: black;
    padding: 15px 45px;
    text-decoration: none;
    font-family: serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    border: 1px solid white;
    transition: all 0.4s ease;
    text-transform: uppercase
}

.kumara-button:hover {
    background-color: #2d5a27;
    color: #ffffff;
    border-color: #2d5a27
}

.progress-nav-global {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none
}

.progress-container-flex {
    display: flex;
    gap: 15px;
    padding: 0;
    margin: 0
}

.progress-bar-wrapper {
    width: 70px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    flex-shrink: 0
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #fff
}

.kumara-fade {
    animation-name: kumaraFade;
    animation-duration: 1.5s;
}

@keyframes kumaraFade {
    from {
        opacity: 0.5
    }

    to {
        opacity: 1
    }
}

.product-grid-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px
}

.grid-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 2px;
    text-transform: uppercase
}

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

.product-card {
    position: relative;
    transition: transform 0.3s ease;
    background: #fff
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f9f9f9
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.05)
}

.product-info {
    padding: 15px 0;
    text-align: left
}

.product-category {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px
}

.product-name {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    margin: 5px 0;
    color: #000;
    text-decoration: none;
    display: block
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 5px
}

.quick-add {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 12px 0;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase
}

.product-card:hover .quick-add {
    transform: translateY(0)
}

@media(max-width:600px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px
    }

    .grid-title {
        font-size: 1.5rem
    }
}


