/* Modal de configuración de producto - Diseño mejorado */
#productConfigModal .modal-dialog {
    max-width: 800px !important;
    margin: 15px auto !important;
    max-height: calc(100vh - 30px) !important;
    display: flex !important;
    flex-direction: column !important;
}

#productConfigModal .modal-content {
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    height: 100% !important;
    max-height: calc(100vh - 30px) !important;
    display: flex !important;
    flex-direction: column !important;
}

#productConfigModal .modal-header {
    color: white !important;
    border: none !important;
    padding: 0px 5px !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

#productConfigModal .modal-header::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') !important;
    pointer-events: none !important;
}

#productConfigModal .modal-title {
    font-weight: 600 !important;
    font-size: 15px !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

#productConfigModal .close {
    color: white !important;
    opacity: 0.8 !important;
    font-size: 18px !important;
    text-shadow: none !important;
    position: relative !important;
    z-index: 1 !important;
    transition: all 0.3s ease !important;
}

#productConfigModal .close:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

#productConfigModal .modal-body {
    padding: 18px !important;
    background-color: #fafafa !important;
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#productConfigModal .product-config-content {
    padding: 0 !important;
}

#productConfigModal .product-config-image {
    position: relative !important;
    background: white !important;
    border-radius: 12px !important;
    padding: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 10px !important;
}

#productConfigModal .product-config-image img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    display: block !important;
    margin: 0 auto !important;
    max-height: 300px !important;
    object-fit: contain !important;
}

#productConfigModal .product-config-info {
    padding-left: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    padding: 10px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    height: fit-content !important;
    margin-top: 0 !important;
}

#productConfigModal .product-title {
    font-size: 25px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin-bottom: 10px !important;
    line-height: 1.3 !important;
}

#productConfigModal .price-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    padding: 7px !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    border-left: 3px solid #DE208B !important;
}

#productConfigModal .price-section .price {
    font-size: 24px !important;
    color: #DE208B !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

#productConfigModal .price-section .old-price {
    text-decoration: line-through !important;
    color: #6c757d !important;
    font-size: 18px !important;
    margin-right: 8px !important;
    font-weight: 500 !important;
}

#productConfigModal .price-section .event-price {
    color: #DE208B !important;
    font-weight: 800 !important;
    font-size: 24px !important;
}

#productConfigModal .price-section .discount-badge {
    background: linear-gradient(135deg, #ff4757, #ff3742) !important;
    color: white !important;
    padding: 2px 6px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3) !important;
}

#productConfigModal .product-description {
    color: #6c757d !important;
    line-height: 1.6 !important;
    font-size: 16px !important;
    background-color: #f8f9fa !important;
    padding: 10px !important;
    border-radius: 8px !important;
    border-left: 3px solid #DE208B !important;
}

#productConfigModal .product-basic-info {
    background-color: #f8f9fa !important;
    padding: 10px !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
}

#productConfigModal .product-basic-info .info-row {
    display: flex !important;
    margin-bottom: 5px !important;
    font-size: 13px !important;
    align-items: center !important;
}

#productConfigModal .product-basic-info .info-row:last-child {
    margin-bottom: 0 !important;
}

#productConfigModal .product-basic-info .label {
    font-weight: 600 !important;
    color: #495057 !important;
    min-width: 70px !important;
    margin-right: 10px !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

#productConfigModal .divider {
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #DE208B, transparent) !important;
    margin: 15px 0 !important;
    border: none !important;
}

/* Opciones del producto en el modal */
#productConfigModal .component-options {
    margin-bottom: 10px !important;
    padding: 12px !important;
    background-color: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
}

#productConfigModal .component-options h4 {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin-bottom: 12px !important;
    color: #495057 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Estilos para selectores de talla y componentes del modal - Similar a product detail */

/* Selector de talla general del producto en el modal */
#productConfigModal .modal-product-size-selector {
    margin-bottom: 12px !important;
    padding: 8px !important;
    background-color: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

#productConfigModal .modal-product-size-selector h4 {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 5px !important;
    color: #495057 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid #DE208B !important;
    padding-bottom: 0px !important;
}

#productConfigModal .modal-product-size-options {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 0 !important;
    list-style: none !important;
    margin: 0 !important;
}

#productConfigModal .modal-product-size-options li {
    margin: 0 !important;
}

#productConfigModal .modal-product-size-option {
    display: block !important;
    padding: 4px 7px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    color: #6c757d !important;
    font-size: 8px !important;
    font-weight: 500 !important;
    background-color: white !important;
    min-width: 22px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

#productConfigModal .modal-product-size-option:hover {
    border-color: #DE208B !important;
    color: #DE208B !important;
    background-color: rgba(222, 32, 139, 0.05) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    text-decoration: none !important;
}

#productConfigModal .modal-product-size-option.active {
    background: linear-gradient(135deg, #DE208B, #c81d7e) !important;
    border-color: #DE208B !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(222, 32, 139, 0.3) !important;
}

/* Contenedor de componentes del modal */
#productConfigModal .modal-components-container {
    margin-bottom: 10px !important;
    padding: 10px !important;
    background-color: white !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    animation: slideDown 0.5s ease-out !important;
}

#productConfigModal .modal-components-container h4 {
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    color: #2c3e50 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    border-bottom: 2px solid #DE208B !important;
    padding-bottom: 6px !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Selector de componente individual en el modal */
#productConfigModal .modal-component-selector {
    display: inline-block;
    vertical-align: top !important;
    padding: 5px 5px !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #e3e6ea !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s ease !important;
    width: auto !important;
}

#productConfigModal .modal-component-selector:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border-color: #d0d4d9 !important;
}

#productConfigModal .modal-component-selector:last-child {
    margin-bottom: 0 !important;
}

#productConfigModal .modal-component-selector h5 {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin-bottom: 5px !important;
    padding-bottom: 0px !important;
    border-bottom: 2px solid #f0f2f5 !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Lista de colores de componentes en el modal */
#productConfigModal .modal-component-color-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0 !important;
    list-style: none !important;
    margin: 0 !important;
}

#productConfigModal .modal-component-color-list li {
    margin: 0 !important;
    position: relative !important;
    margin-bottom: 5px !important;
}

#productConfigModal .modal-component-color-option {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    border: 3px solid #e9ecef !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    cursor: pointer !important;
    margin-bottom: 5px;
    margin-top: 5px;
}

#productConfigModal .modal-component-color-option:hover {
    transform: scale(1.15) !important;
    border-color: #DE208B !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

#productConfigModal .modal-component-color-option.active {
    border-color: #DE208B !important;
    box-shadow: 0 0 0 3px rgba(222, 32, 139, 0.3) !important;
    transform: scale(1.1) !important;
}

#productConfigModal .modal-component-color-option.active:after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 8px !important;
    font-weight: bold !important;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8) !important;
}

#productConfigModal .modal-component-color-option.low-stock:after {
    content: '' !important;
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    width: 8px !important;
    height: 8px !important;
    background-color: #ffc107 !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

#productConfigModal .modal-component-color-option.no-stock {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    position: relative !important;
}

#productConfigModal .modal-component-color-option.no-stock:after {

    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 7px !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

#productConfigModal .modal-component-color-option.no-stock:hover {
    transform: none !important;
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

/* Información de stock de componentes en el modal */
#productConfigModal .modal-component-stock-info {
    margin-top: 2px !important;
    padding: 2px 3px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 4px !important;
    border-left: 2px solid #28a745 !important;
    font-size: 5px !important;
    font-weight: 500 !important;
    color: #495057 !important;
    display: none !important;
    transition: all 0.3s ease !important;
}

#productConfigModal .modal-component-stock-info.show {
    display: block !important;
    animation: slideDown 0.3s ease !important;
}

#productConfigModal .modal-component-stock-info.low-stock {
    border-left-color: #ffc107 !important;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    color: #856404 !important;
}

#productConfigModal .modal-component-stock-info.no-stock {
    border-left-color: #dc3545 !important;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    color: #721c24 !important;
}

/* Información de técnicas en el modal */
#productConfigModal .modal-technique-info {
    background-color: #fff3e0 !important;
    border: 1px solid #ff9800 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    margin-top: 8px !important;
    margin-bottom: 5px !important;
}

#productConfigModal .modal-technique-info .technique-label {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #e65100 !important;
    text-transform: uppercase !important;
    margin-bottom: 5px !important;
}

#productConfigModal .modal-technique-info .technique-detail {
    font-size: 9px !important;
    color: #bf360c !important;
    margin-bottom: 3px !important;
}

#productConfigModal .modal-technique-info .technique-detail:last-child {
    margin-bottom: 0 !important;
}

/* Información de técnicas principal en el modal */
#productConfigModal .technique-info {
    background-color: #e8f5e8 !important;
    border: 1px solid #4caf50 !important;
    border-radius: 8px !important;
    padding: 10px !important;
    margin-bottom: 12px !important;
}

#productConfigModal .technique-info h5 {
    color: #2e7d32 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

#productConfigModal .technique-info .technique-details {
    font-size: 9px !important;
    color: #1b5e20 !important;
    line-height: 1.4 !important;
}

#productConfigModal .technique-info .technique-area {
    font-weight: 500 !important;
    color: #2e7d32 !important;
}

#productConfigModal .technique-info .technique-cost {
    color: #d84315 !important;
    font-weight: 600 !important;
}

/* Información de técnicas por tamaño */
#productConfigModal .size-technique-info {
    background-color: #fff3e0 !important;
    border: 1px solid #ff9800 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    margin-top: 8px !important;
    margin-bottom: 5px !important;
}

#productConfigModal .size-technique-info .technique-label {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #e65100 !important;
    text-transform: uppercase !important;
    margin-bottom: 5px !important;
}

#productConfigModal .size-technique-info .technique-detail {
    font-size: 9px !important;
    color: #bf360c !important;
    margin-bottom: 3px !important;
}

#productConfigModal .product-size-options {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 0 !important;
    list-style: none !important;
}

#productConfigModal .product-size-options li a {
    display: block !important;
    padding: 4px 7px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    color: #6c757d !important;
    font-size: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    min-width: 22px !important;
    text-align: center !important;
    background-color: white !important;
}

#productConfigModal .product-size-options li a:hover {
    border-color: #DE208B !important;
    color: #DE208B !important;
    background-color: rgba(222, 32, 139, 0.05) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    padding: 2px 5px !important;
    font-size: 7px !important;
    min-width: 16px !important;
}

#productConfigModal .product-size-options li a.active {
    background: linear-gradient(135deg, #DE208B, #c81d7e) !important;
    border-color: #DE208B !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(222, 32, 139, 0.3) !important;
    padding: 2px 5px !important;
    font-size: 7px !important;
    min-width: 16px !important;
}

/* Controles de cantidad mejorados */
#productConfigModal .quantity-section {
    margin-top: 8px;
}

#productConfigModal .quantity-section .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#productConfigModal .quantity-controls {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.06),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#productConfigModal .quantity-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(222, 32, 139, 0.1) 0%, rgba(26, 113, 185, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#productConfigModal .quantity-controls:hover::before {
    opacity: 1;
}

#productConfigModal .quantity-controls:focus-within {
    border-color: #DE208B;
    box-shadow:
        0 0 0 4px rgba(222, 32, 139, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.12),
        inset 0 1px 3px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

#productConfigModal .quantity-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 0;
    cursor: pointer;
    color: #495057;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
}

#productConfigModal .quantity-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(222, 32, 139, 0.3) 0%, transparent 70%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

#productConfigModal .quantity-btn:hover::before {
    width: 60px;
    height: 60px;
}

#productConfigModal .quantity-btn:hover {
    background: linear-gradient(135deg, #DE208B 0%, #c81d7e 100%);
    color: white;
    transform: scale(1.05);
    box-shadow:
        0 4px 15px rgba(222, 32, 139, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

#productConfigModal .quantity-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

#productConfigModal .quantity-btn.decrease::after {
    content: '−';
    font-size: 20px;
    line-height: 1;
}

#productConfigModal .quantity-btn.increase::after {
    content: '+';
    font-size: 18px;
    line-height: 1;
}

#productConfigModal .quantity-input {
    border: none;
    padding: 0 12px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    width: 50px;
    height: 28px;
    background: transparent;
    color: #495057;
    flex-shrink: 0;
    outline: none;
    transition: all 0.3s ease;
}

#productConfigModal .quantity-input:focus {
    color: #DE208B;
    background: rgba(222, 32, 139, 0.05);
}

#productConfigModal .quantity-input::-webkit-outer-spin-button,
#productConfigModal .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#productConfigModal .quantity-input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
}

/* Contador de evento en el modal */
#productConfigModal .event-countdown {
    margin-top: 10px !important;
    padding: 3px 5px !important;
    background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
    border-radius: 8px !important;
    font-size: 8px !important;
    color: #856404 !important;
    font-weight: 600 !important;
    border-left: 3px solid #ffc107 !important;
    display: inline-block !important;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2) !important;
}

/* Botones del modal mejorados */
#productConfigModal .modal-footer {
    padding: 10px 20px !important;
    border-top: 1px solid #e9ecef !important;
    background-color: #f8f9fa !important;
    flex-shrink: 0 !important;
}

#productConfigModal .modal-footer .btn-cancel {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    color: white !important;
    margin-right: 10px !important;
}

#productConfigModal .modal-footer .btn-cancel:hover {
    background: linear-gradient(135deg, #5a6268, #495057) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

#productConfigModal .modal-footer .btn-primary {
    background: linear-gradient(135deg, #DE208B, #c81d7e) !important;
    color: white !important;
    position: relative !important;
    overflow: hidden !important;
}

#productConfigModal .modal-footer .btn-primary::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: left 0.5s ease !important;
}

#productConfigModal .modal-footer .btn-primary:hover::before {
    left: 100% !important;
}

#productConfigModal .modal-footer .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #c81d7e, #b51b6f) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(222, 32, 139, 0.4) !important;
}

#productConfigModal .modal-footer .btn-primary:disabled {
    background: linear-gradient(135deg, #cccccc, #999999) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

#productConfigModal .modal-footer .btn-primary:disabled::before {
    display: none !important;
}

/* Estilos para disponibilidad de stock */
.color-option.out-of-stock,
.color-option-modal.out-of-stock {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    position: relative;
}

.color-option.out-of-stock::after,
.color-option-modal.out-of-stock::after {

    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

.color-option.in-stock:hover,
.color-option-modal.in-stock:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.size-option.out-of-stock,
.size-option-modal.out-of-stock {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    color: #999 !important;
    text-decoration: line-through !important;
}

/* Estilos para contenido extendido en desktop del modal */
.modal-product-extended-info.desktop-only {
    display: block;
    margin-top: 30px;
}

#productConfigModal .mobile-only {
    display: none;
}

@media (max-width: 991px) {
    .modal-product-extended-info.desktop-only {
        display: none;
    }

    #productConfigModal .mobile-only {
        display: block;
    }
}

/* Responsive para el modal */
@media (max-width: 991px) {
    #productConfigModal .modal-dialog {
        max-width: 95% !important;
        margin: 8px auto !important;
    }

    #productConfigModal .product-config-info {
        margin-bottom: 10px !important;
    }
}

@media (max-width: 767px) {
    #productConfigModal .modal-dialog {
        margin: 5px !important;
        max-width: none !important;
    }

    #productConfigModal .modal-body {
        padding: 12px !important;
    }

    #productConfigModal .product-config-image {
        margin-bottom: 12px !important;
    }

    #productConfigModal .product-config-info {
        padding: 12px !important;
        margin-top: 12px !important;
    }

    #productConfigModal .product-title {
        font-size: 16px !important;
        margin-bottom: 5px !important;
    }

    #productConfigModal .price-section {
        padding: 6px !important;
        margin-bottom: 5px !important;
    }

    #productConfigModal .price-section .price {
        font-size: 10px !important;
    }

    #productConfigModal .product-basic-info {
        padding: 8px !important;
        margin-bottom: 10px !important;
    }

    #productConfigModal .product-basic-info .info-row {
        font-size: 8px !important;
        margin-bottom: 4px !important;
    }

    #productConfigModal .component-options {
        padding: 10px !important;
        margin-bottom: 12px !important;
    }

    #productConfigModal .component-options h4 {
        font-size: 9px !important;
        margin-bottom: 5px !important;
    }

    #productConfigModal .product-color-options li a {
        width: 15px !important;
        height: 15px !important;
    }

    #productConfigModal .product-color-options li a.active:after {
        font-size: 6px !important;
    }

    #productConfigModal .product-size-options li a {
        padding: 2px 4px !important;
        font-size: 6px !important;
        min-width: 14px !important;
    }

    #productConfigModal .quantity-section {
        margin-top: 16px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #productConfigModal .quantity-section .form-label {
        font-size: 7px;
        margin-bottom: 6px;
        text-align: center;
    }

    #productConfigModal .quantity-controls {
        max-width: 200px;
        width: 100%;
    }

    #productConfigModal .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 10px;
    }

    #productConfigModal .quantity-input {
        width: 60px;
        height: 32px;
        font-size: 12px;
    }

    #productConfigModal .modal-footer {
        padding: 12px !important;
    }

    #productConfigModal .modal-footer .btn {
        padding: 7px 14px !important;
        font-size: 11px !important;
        min-width: 80px !important;
    }

    #productConfigModal .event-countdown {
        padding: 3px 5px !important;
        font-size: 8px !important;
    }

    #productConfigModal .color-stock-info {
        font-size: 10px !important;
        padding: 5px 7px !important;
    }

    #productConfigModal .modal-component-stock-info {
        font-size: 5px !important;
        padding: 2px 3px !important;
    }

    #productConfigModal .stock-indicator {
        font-size: 10px !important;
    }

    #productConfigModal .tooltip-content {
        font-size: 8px !important;
        padding: 4px 6px !important;
    }

    #productConfigModal .technique-info h5,
    #productConfigModal .modal-technique-info .technique-label {
        font-size: 10px !important;
    }

    #productConfigModal .technique-info .technique-details,
    #productConfigModal .modal-technique-info .technique-detail {
        font-size: 9px !important;
    }

    #productConfigModal .gallery-main-image>div {
        width: 120px !important;
        height: 120px !important;
    }

    #productConfigModal .gallery-thumb,
    #productConfigModal .gallery-thumb-more {
        width: 30px !important;
        height: 30px !important;
        font-size: 8px !important;
    }

    #productConfigModal .gallery-thumb.active::after {
        font-size: 7px !important;
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    #productConfigModal .product-config-actions .row {
        text-align: center !important;
    }

    #productConfigModal .quantity-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    #productConfigModal .quantity-controls {
        max-width: 200px !important;
    }

    #productConfigModal .modal-footer {
        flex-direction: column !important;
        gap: 8px !important;
    }

    #productConfigModal .modal-footer .btn {
        width: 100% !important;
        margin-right: 0 !important;
    }
}

/* Estilos para etiquetas de eventos en el modal */
#productConfigModal .event-label {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 12px !important;
    z-index: 10 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    text-transform: uppercase !important;
    max-width: 100px !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
}

#productConfigModal .event-label.image-only {
    background-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 110px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#productConfigModal .event-label img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
    max-height: 60px !important;
    border-radius: 3px !important;
}

#productConfigModal .event-label.image-only img {
    max-height: 100% !important;
    width: auto !important;
    max-width: 100% !important;
    object-position: center !important;
    object-fit: contain !important;
}

/* Estilos para mostrar stock por color en el modal */
#productConfigModal .color-stock-info {
    margin-top: 8px !important;
    padding: 5px 7px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 8px !important;
    border-left: 3px solid #28a745 !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #495057 !important;
    display: none !important;
    transition: all 0.3s ease !important;
}

#productConfigModal .color-stock-info.show {
    display: block !important;
    animation: slideDown 0.3s ease !important;
}

#productConfigModal .color-stock-info.low-stock {
    border-left-color: #ffc107 !important;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    color: #856404 !important;
}

#productConfigModal .color-stock-info.no-stock {
    border-left-color: #dc3545 !important;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    color: #721c24 !important;
}

#productConfigModal .stock-indicator {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

#productConfigModal .stock-icon {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background-color: #28a745 !important;
}

#productConfigModal .stock-icon.low {
    background-color: #ffc107 !important;
}

#productConfigModal .stock-icon.out {
    background-color: #dc3545 !important;
}

/* Mejoras para opciones de color con indicador de stock en el modal */
#productConfigModal .product-color-options li {
    position: relative !important;
    margin-bottom: 5px !important;
}

#productConfigModal .product-color-options li a.low-stock:after {
    content: '' !important;
    position: absolute !important;
    top: -3px !important;
    right: -3px !important;
    width: 8px !important;
    height: 8px !important;
    background-color: #ffc107 !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

#productConfigModal .product-color-options li a.no-stock {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    position: relative !important;
}

#productConfigModal .product-color-options li a.no-stock:after {

    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-size: 7px !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

#productConfigModal .product-color-options li a.no-stock:hover {
    transform: none !important;
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

/* Tooltip para mostrar stock al hacer hover en el modal */
#productConfigModal .color-tooltip {
    position: relative !important;
}

#productConfigModal .color-tooltip:hover .tooltip-content {
    visibility: visible !important;
    opacity: 1 !important;
}

#productConfigModal .tooltip-content {
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    bottom: 120% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #333 !important;
    color: white !important;
    text-align: center !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    font-size: 8px !important;
    white-space: nowrap !important;
    z-index: 1000 !important;
    transition: opacity 0.3s !important;
    pointer-events: none !important;
}

#productConfigModal .tooltip-content::after {
    content: "" !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    margin-left: -5px !important;
    border-width: 5px !important;
    border-style: solid !important;
    border-color: #333 transparent transparent transparent !important;
}

/* Animaciones para el modal */
@keyframes slideDown {
    from {
        opacity: 0 !important;
        transform: translateY(-10px) !important;
    }

    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* NUEVO: Estilos mejorados para la galería de imágenes en el modal */
#productConfigModal .gallery-main-image {
    margin-bottom: 14px;
}

#productConfigModal .gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

#productConfigModal .gallery-thumb {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#productConfigModal .gallery-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(222, 32, 139, 0.3) !important;
}

#productConfigModal .gallery-thumb.active {
    box-shadow: 0 4px 20px rgba(222, 32, 139, 0.4) !important;
}

#productConfigModal .gallery-thumb.active::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #DE208B;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#productConfigModal .gallery-thumb-more:hover {
    background: linear-gradient(135deg, #DE208B, #c81d7e) !important;
    color: white !important;
    border-color: #DE208B !important;
    transform: scale(1.1);
}

/* Responsive para galerías en modal */
@media (max-width: 768px) {
    #productConfigModal .product-config-image {
        margin-bottom: 10px !important;
        padding: 10px !important;
    }

    #productConfigModal .gallery-main-image {
        margin-bottom: 12px;
    }

    #productConfigModal .gallery-main-image>div {
        width: 120px !important;
        height: 120px !important;
    }

    #productConfigModal .gallery-thumb {
        width: 30px !important;
        height: 30px !important;
    }

    #productConfigModal .gallery-thumb-more {
        width: 30px !important;
        height: 30px !important;
    }
}

@media (max-width: 480px) {
    #productConfigModal .product-config-image {
        margin-bottom: 12px !important;
        padding: 8px !important;
    }

    #productConfigModal .gallery-main-image {
        margin-bottom: 10px;
    }

    #productConfigModal .gallery-main-image>div {
        width: 180px !important;
        height: 180px !important;
        padding: 12px !important;
    }

    #productConfigModal .gallery-thumb {
        width: 30px !important;
        height: 30px !important;
    }

    #productConfigModal .gallery-thumb-more {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
    }

    #productConfigModal .gallery-thumbnails {
        gap: 8px;
    }
}

/* NUEVO: Mejoras para el espaciado del contenido del modal */
#productConfigModal .product-config-info {
    padding-left: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    padding: 10px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    height: fit-content !important;
    margin-top: 0 !important;
}

@media (max-width: 991px) {
    #productConfigModal .product-config-info {
        margin-bottom: 10px !important;
    }
}

@media (max-width: 767px) {
    #productConfigModal .product-config-info {
        padding: 12px !important;
        margin-top: 12px !important;
    }
}