/* Estilos para el selector de tallas */
.tgd-size-selector {
    margin-bottom: 20px;
}

.tgd-size-selector h4 {
    margin-bottom: 10px;
    font-weight: 700; /* Cambiado a negrita (700) */
    font-size: 16px; /* Aumentado tamaño de fuente para los títulos */
    margin-top: 25px; /* Mayor margen superior para separar secciones */
}

.tgd-size-selector h5 {
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

/* Restaurar el grosor del botón "Add to cart" */
.single_add_to_cart_button.button.alt {
    padding: 12px 25px !important;
    font-weight: 700 !important;
    height: auto !important;
    line-height: 1.5 !important;
    font-size: 16px !important;
    min-width: 160px !important;
    text-transform: uppercase !important;
}

/* Estilo específico para hover */
.single_add_to_cart_button.button.alt:hover {
    opacity: 0.9 !important;
}

/* Asegurar que el botón deshabilitado también mantiene su estilo */
.single_add_to_cart_button.button.alt:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* Estilos para las opciones de color */
.tgd-color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* TOTAL QUANTITY CONTAINER */
.total-quantity-container {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.total-quantity-label {
    font-family: "VaudDisplay", Sans-serif;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #2A00F9;
    margin-right: 15px;
    text-transform: uppercase;
}

.total-quantity-input {
    border: 2px solid #2A00F9;
    padding: 8px 12px;
    font-size: 16px;
    width: 100px;
    text-align: center;
}

.total-quantity-input:focus {
    outline: none;
    border-color: #2A00F9;
    box-shadow: 0 0 0 2px rgba(42, 0, 249, 0.2);
}

.total-quantity-input::-webkit-inner-spin-button,
.total-quantity-input::-webkit-outer-spin-button {
    opacity: 1;
    background: #2A00F9;
    color: white;
    padding: 4px;
    cursor: pointer;
}

/* Estilos responsivos para Total Quantity */
@media (max-width: 768px) {
    .total-quantity-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .total-quantity-label {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .total-quantity-input {
        width: 100%;
    }
}

.tgd-color-option {
    position: relative;
    display: inline-block;
    cursor: pointer;
    text-align: center;
}

.tgd-color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.tgd-color-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
    color: #333;
}

.tgd-color-option input:checked + .tgd-color-label {
    background-color: #2A00F9;
    color: white;
    border-color: #2A00F9;
}

.tgd-color-option:hover .tgd-color-label {
    border-color: #999;
    background-color: #f2f2f2;
}

/* Estilos para las tallas */
.tgd-size-color-combinations {
    margin-bottom: 15px;
}

.tgd-color-title {
    margin: 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Modificado para mostrar 5 tallas por fila */
.tgd-size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    width: 100%;
}

.tgd-size-option {
    position: relative;
    display: inline-block;
    cursor: pointer;
    text-align: center;
    width: calc(20% - 10px) !important; /* Forzamos 5 elementos por fila */
    max-width: calc(20% - 10px) !important;
    flex: 0 0 calc(20% - 10px) !important;
    box-sizing: border-box;
    margin: 0;
}

/* Asegurar que en dispositivos móviles se vean menos tallas por fila */
@media (max-width: 767px) {
    .tgd-size-option {
        width: calc(33.33% - 8px) !important; /* 3 tallas por fila en móvil */
        max-width: calc(33.33% - 8px) !important;
        flex: 0 0 calc(33.33% - 8px) !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .tgd-size-option {
        width: calc(25% - 9px) !important; /* 4 tallas por fila en tablets */
        max-width: calc(25% - 9px) !important;
        flex: 0 0 calc(25% - 9px) !important;
    }
}

/* Cambiamos de radio a checkbox para permitir selección múltiple */
.tgd-size-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.tgd-size-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: all 0.2s ease;
    color: #2A00F9;
    width: 100%;
    box-sizing: border-box;
}

.tgd-size-option input:checked + .tgd-size-label {
    background-color: #2A00F9;
    color: white;
    border-color: #2A00F9;
}

.tgd-size-option:hover .tgd-size-label {
    border-color: #999;
    background-color: #f2f2f2;
}

.tgd-size-option input:checked:hover + .tgd-size-label {
    background-color: #2400d8;
}

/* Estilos específicos para One Size */
.tgd-size-option.selected .tgd-size-label {
    background-color: #2A00F9;
    color: white;
    border-color: #2A00F9;
    cursor: default;
}

.tgd-size-option.selected {
    opacity: 1;
}

/* Estilo para el texto informativo de One Size */
.one-size-info {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Estilos para hacer que el botón "One Size" sea más ancho */
.tgd-size-option input[value="One Size"] + .tgd-size-label {
    min-width: 80px;
    padding: 0 15px;
}

/* Estilos para los campos de cantidad de cada talla */
.tgd-size-qty-container {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

/* Estilo para los inputs de tipo number (con flechitas) */
.tgd-size-qty {
    width: 60px;
    height: 35px;
    padding: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Estilos para las flechitas del input number */
.tgd-size-qty::-webkit-outer-spin-button,
.tgd-size-qty::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
    height: 25px;
    position: relative;
    margin-left: 2px;
}

.tgd-size-qty:focus {
    border-color: #2A00F9;
    outline: none;
}

.tgd-size-qty:disabled {
    background-color: #f2f2f2;
    cursor: not-allowed;
}

/* Estilos para el título de la sección de cantidades */
.tgd-size-selector .qty-heading {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Estilo para mensajes de validación */
.tgd-qty-validation-message {
    color: #e2401c;
    font-size: 13px;
    margin-top: 10px;
    padding: 8px;
    background-color: #f8d7da;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    display: none;
}

.tgd-qty-validation-message.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Estilo para el contador total */
.tgd-qty-counter {
    margin-top: 10px;
    font-weight: bold;
}

/* Estilo para la opciones cuando están activas/inactivas */
.tgd-size-option .tgd-size-qty-container {
    opacity: 0.5;
}

.tgd-size-option.has-qty .tgd-size-qty-container,
.tgd-size-option input:checked ~ .tgd-size-qty-container {
    opacity: 1;
}

/* Color seleccionado actualmente */
.tgd-color-selected {
    display: inline-block;
    font-weight: normal;
    font-size: 14px;
    color: #2A00F9;
    margin-left: 10px;
}

/* Estilo especial para el resumen de cantidades por color */
.tgd-color-qty-summary {
    font-weight: normal; /* No negrita para el resumen de cantidades */
}