/* Estilos para la tabla de especificaciones del producto */
table.spec {
    font-size: 16px !important;
}

table.spec th {
    font-size: 16px !important;
    padding: 10px !important;
    font-weight: 600 !important;
}

table.spec td {
    font-size: 16px !important;
    padding: 10px !important;
}

/* Precio de venta - destacado */
table.spec td.sales {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #7f7474 !important;
    padding: 12px 10px !important;
}

/* Estilos para la tabla de cantidad - Reset y modernización */
table.num {
    border: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

table.num tbody,
table.num tr,
table.num td {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* Contenedor principal de cantidad */
table.num > tbody > tr {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Input de cantidad */
table.num input[name="product_num"] {
    width: 70px !important;
    height: 46px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    text-align: center !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    background: #ffffff !important;
    color: #2c3e50 !important;
}

table.num input[name="product_num"]:focus {
    border-color: #7f7474 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(127, 116, 116, 0.15) !important;
}

/* Contenedor de botones +/- */
table.num > tbody > tr > td > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin: 0 !important;
    width: auto !important;
}

/* Botones +/- modernos */
table.num a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: #7f7474 !important;
    border-radius: 6px !important;
    padding: 0 !important;
    border: none !important;
    text-decoration: none !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

table.num a:hover {
    background: #5d5454 !important;
    transform: scale(1.05) !important;
}

table.num a:active {
    transform: scale(0.95) !important;
}

/* Ocultar las imágenes de flechas */
table.num a img {
    display: none !important;
}

/* Estilos para el botón de agregar al carrito */
.cart_in {
    text-align: center;
    margin: 20px 0;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cart_in input[type="image"] {
    display: none !important;
}

/* Botón moderno para agregar al carrito */
.cart-add-button {
    background: linear-gradient(135deg, #7f7474 0%, #5d5454 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(127, 116, 116, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 250px;
}

.cart-add-button:hover {
    background: linear-gradient(135deg, #5d5454 0%, #4a4040 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(127, 116, 116, 0.4);
}

.cart-add-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(127, 116, 116, 0.3);
}

/* Mensaje de producto en el carrito */
.cart-added-message {
    background: linear-gradient(135deg, #6abd45 0%, #5aa83c 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(106, 189, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: slideIn 0.4s ease-out;
    max-width: 300px;
    margin: 0 auto;
}

.cart-added-message::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón deshabilitado cuando ya está en el carrito */
.cart_in input[type="image"].disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Estilos para la tabla de cantidad */
table.num {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

table.num tbody,
table.num tr {
    display: flex;
    align-items: center;
    gap: 10px;
}

table.num td {
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    table.spec th,
    table.spec td {
        font-size: 15px !important;
        padding: 8px !important;
    }
    
    table.spec td.sales {
        font-size: 20px !important;
        padding: 10px 8px !important;
    }
    
    table.num input[name="product_num"] {
        width: 60px !important;
        height: 42px !important;
        font-size: 18px !important;
    }
    
    table.num a {
        width: 32px !important;
        height: 18px !important;
        font-size: 12px !important;
    }
    
    .cart-added-message {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .cart-add-button {
        padding: 14px 30px;
        font-size: 15px;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    table.spec th,
    table.spec td {
        font-size: 14px !important;
        padding: 7px !important;
    }
    
    table.spec td.sales {
        font-size: 18px !important;
        padding: 9px 7px !important;
    }
    
    table.num > tbody > tr {
        gap: 8px !important;
    }
    
    table.num input[name="product_num"] {
        width: 55px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
    
    table.num a {
        width: 30px !important;
        height: 16px !important;
        font-size: 11px !important;
    }
}
