/**
* 2007-2025 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2025 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/
.djv.product-variants-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.djv .color-selection p,
.djv .size-selection p {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Estilos para la selección de colores */
.djv .color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.djv .color-item {
  position: relative;
}

.djv .color-radio {
  display: none;
}

.djv .color-label {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    border: 2px solid #ccc;
    transition: transform 0.2s;
    margin: 0;
}

.djv .color-radio:checked + .color-label {
  border: 2px solid #000;
  transform: scale(1.1);
}

.djv .color-radio:checked + .color-label .checkmark {
  display: block;
}

.djv .checkmark {
  display: none;
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: white;
  color: green;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Estilos para la selección de tallas */
.djv .size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
}

.djv .size-box {
  text-align: center;
}

.djv .size-label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
}

.djv .quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.djv .qty-btn {
  width: 30px;
  height: 30px;
  background-color: #f0f0f0;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
}

.djv .qty-btn:hover {
  background-color: #ddd;
}

.djv .qty-input {
  width: 40px;
  text-align: center;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Contenedor del input de cantidad */
.djv_qty_wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 50px;
    background: #f8f8f8;
    padding: 5px;
}

/* Botones de incremento y decremento */
.djv_qty_minus, .djv_qty_plus {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease-in-out;
}

.djv_qty_minus:hover, .djv_qty_plus:hover {
    color: #000;
}

/* Input de cantidad */
.djv_qty_input {
    width: 30px;
    height: 30px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    pointer-events: none; /* Evita que el usuario edite directamente */
}

/* Evitar botones de incremento/decremento en los navegadores */
.djv_qty_input::-webkit-outer-spin-button,
.djv_qty_input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.djv_qty_input[type=number] {
    -moz-appearance: textfield;
}

/* Grid para organizar las tallas */
.size-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    justify-content: center;
}

/* Cada caja de talla */
.size-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Etiqueta de la talla */
.size-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}
.tooltip-color-preview {
    position: absolute;
    z-index: 999;
    text-align: center;
    font-family: sans-serif;
    font-size: 12px;
    width: 100px;
}

.tooltip-color-preview img {
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto 1px auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

.tooltip-title {
    position: relative;
    background: #151B8D;
    color: #fff;
    font-weight: bold;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    margin-top: 0px;
}
.color-attribute-container {
        display: flex;
        align-items: stretch;
		width:80%;     
    }

 

    .color-price {
        font-size: 14px;
        line-height: 100%;
        color: #000;
    }

    .text-stock, .text-no-stock {
        font-size: 14px;
        line-height: 20px;
        color: #50824D;
    }

    .text-no-stock {
        color: #F00903
    }

    .stock-number {
        color: #000;
    }

    .bottom-content {
        display: flex;
        align-items: center;
        margin-bottom: 10px !important;
    }

    .djv-product-variants {
        font-family: Montserrat, Tahoma, sans-serif, Arial;
    }

    .all-colors span {
        font-style: Italic;
        font-size: 14px;
        line-height: 20px;
        color: #000;
        cursor: pointer;
    }

    .djv.product-variants-container p,
    .attribute-selection p,
    .input-selection p {
        font-weight: 600;
        font-size: 14px;
        line-height: 20px;
        background-color: transparent;
        color: var(--black);
        text-transform: lowercase;

    }
    .attribute-selection > p{
        margin-bottom: 15px;
    }

    .color-text {
        margin-bottom: 32px;
        display: flex;
        justify-content: space-between;
        padding-right: 20px;
    }
    .color-text p{
        margin-bottom: 0;
    }

    .djv.product-variants-container p {
        margin-bottom: 15px;
    }

    .djv.product-variants-container :first-letter,
    .attribute-selection p:first-letter,
    .input-selection p:first-letter {
        text-transform: uppercase;
    }

    .attribute-radio:checked + .attribute-label-color,
    .attribute-radio:checked + .attribute-label {
        background-color: #C0291B;
        color: white;
        border-color: #C0291B !important;
    }

    .attribute-options {
        margin: 0 0 45px 0;
        max-width: 333px;
        width: 100%;
        padding: 12.5px 10px 12.5px 10px;
        border-radius: 8px;
        -webkit-appearance: none;
        -moz-appearance: none;
        -o-appearance: none;
        appearance: none;
        background-image: url("/themes/sanflex-child/assets/img/arrow_down.svg");
        background-size: 10px;
        background-repeat: no-repeat;
        background-position: calc(100% - 22px) center;
        border: 1px solid #66667E;
    }


    .attribute-item {
        position: relative;
    }

    .attribute-radio {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .attribute-label-color {
        border-radius: 7px;
        cursor: pointer;
        margin: 0;
        width: 100%;
        height: 100%;
		border:1px solid #ccc8c8 !important;
    }

    .attribute-label-color:hover {
        background-color: #000 !important;
    }

    .attribute-label {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        padding: 5px 10px;
        cursor: pointer;
        transition: all 0.2s ease;
        border-radius: 8px;
        border: 1px solid #66667E !important;
        font-weight: 400;
        font-size: 14px;
        line-height: 20px;
        color: #66667E;
        text-transform: lowercase;
    }


    .attribute-radio:focus + .attribute-label {
        box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.3);
    }


    #product .popup-overlay {
        display: none;
        padding: 0 24px;
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        background: #0000004D;
        z-index: 999;
        align-items: center;
        justify-content: center;
    }

    #product .popup-overlay.open {
        display: flex;
    }

    #product .popup-colors {
        display: block;
        background-color: #fff;
        z-index: 999;
        max-width: 1197px;
        width: 100%;
        border-radius: 32px;
        padding: 39px 46px 44px 43px;
    }

    .djv-product-variants .input-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
        max-height: 465px;
        overflow: auto;
        gap: 20px 12px;
        margin-bottom: 16px;
        padding-right: 15px;
    }
    .djv-product-variants .input-grid .input-box {
        flex: 0 1 48%;
        padding: 8px 10px 0px 10px;
        border: solid 1px #DDD;
        border-radius: 5px;
    }


    .color-name, .color-name-hover {
        font-weight: 600;
        font-size: 14px;
        line-height: 100%;
        color: #000;
        text-transform: lowercase;
    }

    .color-name:first-letter, .color-name-hover:first-letter {
        text-transform: uppercase;
    }

    .input-box {
        transition: all 0.2s ease;
        gap: 16px;
    }
    .djv-product-variants .top-content{
        gap: 15px;
    }
    .top-content {
        display: flex;
        justify-content: space-between;
        align-items: stretch;
        margin-bottom: 9px;
        gap: 5px;
    }

    .input-box:hover {
        border-color: #ddd;
    }

    .input-label {
        margin-right: auto;
        font-weight: 500;
    }

    .djv_qty_wrapper {
        display: flex;
        border: none !important;
        background: #f1f1f1 !important;
        color: #000000 !important;
        border-radius: 8px;
        padding: 0 8px;
        height: 32px;
    }

    .djv_qty_minus, .djv_qty_plus {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 16px;
        color: #1E1E1E;
        cursor: pointer;
        transition: background-color 0.2s;
        font-weight: 400;
        width: auto;
        line-height: 20px;
    }

    .djv_qty_minus:hover, .djv_qty_plus:hover {
        background-color: #f5f5f5;
    }

    .djv_qty_input {
        width: 4rem;
        text-align: center;
        border: none;
        background: transparent;
        font-size: 14px;
        font-weight: 400;
        color: #000000;
        -moz-appearance: textfield;
        appearance: textfield;
        pointer-events: auto !important;
        line-height: 20px;
    }

    @media (max-width: 440px) {
        .djv_qty_input {
            width: 3rem;
        }
    }

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

    /* Etiquetas de color */
    .input-box .attribute-label {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        position: relative;
        overflow: hidden;
        margin-bottom: 0px !important;
    }

    .input-box .attribute-label::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    }

    /* Opciones adicionales */
    .additional-options {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        list-style-type: none;
        padding: 0;
        margin: 0 0 1.5rem 0;
    }

    .additional-item {
        position: relative;
    }

    .additional-radio {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .additional-radio + label {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 1rem;
        border-radius: 2rem;
        border: 1px solid #ddd;
        background-color: #fff;
        color: #333;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .additional-radio:checked + label {
        background-color: #1a237e !important;
        color: white !important;
        border-color: #1a237e !important;
    }

    /* Para inputs de color en la cuadrícula */
    .input-box[data-attribute] {
        position: relative;
        border-radius: 2rem;
        transition: transform 0.2s;
    }

    .attribute-label-color {
        position: relative;
        cursor: pointer;
    }
	.custom-container-c{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items: center;
    gap:15px;
    width: 100%;
    }
	.custom-container-c .text-stock{
	    text-align:center;
	}
	.custom-container-c .djv_qty_wrapper{
	    width:100%;
		max-width:160px;
	}
	.custom-container-c .djv_qty_wrapper input{
	    flex-grow:1;
	    width:100%;
	}


    /* .attribute-label-color::after {
        content: attr(title);
        position: absolute;
        background-color: #1a237e;
        color: white;
        padding: 5px 8px;
        border-radius: 5px;
        white-space: nowrap;
        font-size: 12px;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s;
        bottom: 120%;
        left: 50%;
        transform: translateX(-50%);
    }

    .attribute-label-color:hover::after {
        visibility: visible;
        opacity: 1;
    } */

    /*MEDIA QUERIES*/
    @media (min-width: 992px) and (max-width: 1200px)  {
        #product .popup-colors .input-grid .input-box{
            flex: 0 1 28%;
        }
        #product .djv-product-variants .input-grid{
            padding-right: 0;
        }
       
        #product .djv-product-variants .input-grid{
            gap: 20px;
        }
    }
    @media (max-width: 992px){
        #product .attribute-options {
            margin-bottom: 32px;
        }
        #product .color-text{
            margin-bottom: 33px;
        }
        #product .djv-product-variants .input-grid{
            margin-bottom: 30px;
        }
        #product .popup-colors .input-grid .input-box{
            flex: 0 1 45%;
        }
        #product .popup-colors .input-grid{
            gap: 26px 40px;
        }
        #product .popup-colors{
            padding: 24px 26px 32px 24px;
        }
        #product .popup-colors .title-container{
            margin-bottom: 43px;
        }
        #product .popup-colors .title-container span{
            font-size: 18px;
            line-height: 20px;
        }
        #product .popup-colors .input-grid{
            max-height: 534px;
        }
        #product .popup-colors .select-color-btn a{
            max-width: 100%;
        }

    }
    @media (max-width: 627px){
        #product .popup-colors .input-grid .input-box{
            flex: 0 1 100%;
        }
    }
    @media (max-width: 515px){
        #product .djv-product-variants .input-grid .input-box{
            flex: 0 1 100%;
        }

        #product .djv-product-variants .djv_qty_wrapper{
            height: 40px;
        }
        #product .djv-product-variants .top-content{
            margin-bottom: 16px;
        }
        .djv-product-variants .djv-product-variants .input-grid{
            gap: 26px 41px;
        }
    }
    /*END MEDIA QUERIES*/


/* Estilos del popup - Renderizado al final del body */
    .djv-popup-overlay {
        display: none;
        padding: 0 24px;
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        background: #0000004D;
        z-index: 9999;
        align-items: center;
        justify-content: center;
    }

    .djv-popup-overlay.open {
        display: flex;
    }

    .djv-popup-overlay .popup-colors {
        display: block;
        background-color: #fff;
        z-index: 10000;
        max-width: 1197px;
        width: 100%;
        border-radius: 32px;
        padding: 39px 46px 44px 43px;
    }

    .djv-popup-overlay .popup-colors .select-color-btn {
        display: flex;
        justify-content: flex-end;
        gap: 16px;
    }

    .djv-popup-overlay .popup-colors .select-color-btn a {
        display: inline-block;
        max-width: 218px;
        padding: 10px 20px;
        font-weight: 600;
        font-size: 16px;
        line-height: 20px;
        text-align: center;
        width: 100%;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
    }

    /* Botón "Añadir al carrito" */
    .djv-popup-overlay .popup-colors .select-color-btn .btn-add-cart {
        background-color: #C0291B;
        color: #fff !important;
        border: 2px solid #C0291B;
    }

    .djv-popup-overlay .popup-colors .select-color-btn .btn-add-cart:hover {
        background-color: #a02316;
        border-color: #a02316;
    }

    .djv-popup-overlay .popup-colors .select-color-btn .btn-add-cart.disabled {
        opacity: 0.6;
        cursor: not-allowed;
        pointer-events: none;
    }

    /* Botón "Cancelar" */
    .djv-popup-overlay .popup-colors .select-color-btn .btn-cancel {
        background-color: transparent;
        color: #66667E !important;
        border: 2px solid #66667E;
    }

    .djv-popup-overlay .popup-colors .select-color-btn .btn-cancel:hover {
        background-color: #f5f5f5;
        border-color: #66667E;
    }

    .djv-popup-overlay .popup-colors .select-color-btn .select-color-btn a {
        max-width: 100%;
    }

    .djv-popup-overlay .popup-colors .input-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
        gap: 20px 20px;
        margin-bottom: 40px;
        flex-wrap: wrap;
        max-height: 586px;
        overflow: auto;
        padding-right: 20px;
    }

    .djv-popup-overlay .popup-colors .input-grid .input-box {
        flex: 0 1 23%;
        padding: 8px 10px 0px 10px;
        border: solid 1px #DDD;
        border-radius: 5px;
    }

    .djv-popup-overlay .popup-colors .title-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        margin-bottom: 49px;
    }

    .djv-popup-overlay .popup-colors .title-container img {
        cursor: pointer;
    }

    .djv-popup-overlay .popup-colors .title-container span {
        font-weight: 700;
        font-size: 24px;
        line-height: 110%;
        color: #66667E;
    }

    /* Media Queries para el popup */
    @media (min-width: 992px) and (max-width: 1200px) {
        .djv-popup-overlay .popup-colors .input-grid .input-box {
            flex: 0 1 28%;
        }
    }

    @media (max-width: 992px) {
        .djv-popup-overlay .popup-colors .input-grid .input-box {
            flex: 0 1 45%;
        }
        .djv-popup-overlay .popup-colors .input-grid {
            gap: 26px 40px;
            max-height: 534px;
        }
        .djv-popup-overlay .popup-colors {
            padding: 24px 26px 32px 24px;
        }
        .djv-popup-overlay .popup-colors .title-container {
            margin-bottom: 43px;
        }
        .djv-popup-overlay .popup-colors .title-container span {
            font-size: 18px;
            line-height: 20px;
        }
        .djv-popup-overlay .popup-colors .select-color-btn a {
            max-width: 100%;
        }
    }

    @media (max-width: 627px) {
        .djv-popup-overlay .popup-colors .input-grid .input-box {
            flex: 0 1 100%;
        }
    }

/* NUEVO: Estilos para el indicador de talla seleccionada en el modal */
.djv-popup-overlay .popup-colors .title-container {
    position: relative;
}

.selected-size-label {
    position: absolute;
    top: 50%;
    right: 80px;
    transform: translateY(-50%);
    padding: 8px 16px;
    font-size: 18px !important;
}

.selected-size-label strong {
    font-weight: bold;
    font-size: 16px;
    margin-left: 4px;
    color: black;
    text-decoration: underline;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .selected-size-label {
        position: static;
        transform: none;
        display: block !important;
        margin: 10px 0;
        text-align: center;
        font-size: 12px;
    }
    
    .selected-size-label strong {
        font-size: 13px;
    }
}
/* NUEVO: Estilos del popup de confirmación al cambiar de talla */
.djv-confirm-change-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.confirm-change-popup {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
    font-family: Montserrat, sans-serif;
}

.confirm-message {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    color: #666;
    font-family: Montserrat, sans-serif;
}

.confirm-message strong {
    color: #C0291B;
    font-weight: 600;
}

.confirm-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

.btn-confirm-add,
.btn-confirm-cancel {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Montserrat, sans-serif;
    border: none;
}

.btn-confirm-add {
    background: #C0291B;
    color: white;
    border: 2px solid #C0291B;
}

.btn-confirm-add:hover {
    background: #a02316;
    border-color: #a02316;
}

.btn-confirm-cancel {
    background: transparent;
    color: #66667E;
    border: 2px solid #66667E;
}

.btn-confirm-cancel:hover {
    background: #f5f5f5;
    border-color: #66667E;
}

/* Responsive */
@media (max-width: 576px) {
    .confirm-change-popup {
        padding: 24px;
    }
    
    .confirm-title {
        font-size: 18px;
    }
    
    .confirm-message {
        font-size: 14px;
    }
    
    .confirm-buttons {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .btn-confirm-add,
    .btn-confirm-cancel {
        width: 100%;
    }
}
/* NUEVO: Estilos para EAN13 - Solo visible para grupo 52 */
.color-ean13, .color-reference {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-top: 4px;
    line-height: 1.3;
}

/* Asegurar que el contenedor bottom-content tenga espacio para el EAN13 */
.djv-product-variants .input-box .bottom-content,
.popup-colors .input-box .bottom-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: fit-content;
    align-items: flex-start;
}

/* Variante para el modal popup */
.popup-colors .color-ean13, .popup-colors .color-reference {
    font-size: 10px;
    color: #777;
}

/* ========================================
   CAMBIOS PARA FICHA TÉCNICA
   Copiar estos estilos a producción
   ======================================== */

/* NUEVO: Contenedor de attachments (Ver carta de colores + Ficha técnica) */
.product-attachments-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 24px;
}

/* Estilos para el icono de Ficha técnica */
.product-ficha-icon {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain;
    display: inline-block !important;
    vertical-align: middle;
    margin: 0 !important;
    flex-shrink: 0;
}

/* Ajustar alineación de Ficha técnica para que quede a la par de Ver carta de colores */
.product-attachment-display {
    display: inline-flex;
    align-items: center;
}

/* Ajustar tamaño del botón Ficha técnica para que sea igual a Ver carta de colores */
.product-attachment-display .btn-attachment-scroll {
    margin-bottom: 0 !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}
