/**
 * Estilos Responsivos y Compactos para Botones de Productos
 */

/* Contenedor del footer del producto */
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.05);
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Contenedor del precio */
.product-price-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Contenedor de acciones (botones) */
.product-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Botón de información (ℹ️) */
.btn-product-info {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.btn-product-info:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-product-info:active {
    transform: translateY(0);
}

/* Botón agregar al carrito */
.btn-add-cart {
    padding: 0.65rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.btn-add-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-add-cart i {
    font-size: 1rem;
}

/* Responsive Design */

/* Tablets y pantallas medianas */
@media (max-width: 992px) {
    .product-footer {
        gap: 0.5rem;
    }
    
    .btn-add-cart {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-product-info {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .product-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .product-price-container {
        text-align: center;
        order: 1;
    }
    
    .product-actions {
        order: 2;
        width: 100%;
    }
    
    .btn-product-info {
        width: 45px;
        height: 45px;
        min-width: 45px;
        font-size: 1.2rem;
    }
    
    .btn-add-cart {
        flex: 1;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-text {
        display: inline;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .product-footer {
        gap: 0.5rem;
    }
    
    .btn-add-cart {
        padding: 0.7rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-add-cart .btn-text {
        font-size: 0.85rem;
    }
    
    .btn-product-info {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 360px) {
    .btn-add-cart {
        padding: 0.65rem 0.5rem;
        font-size: 0.85rem;
        gap: 0.35rem;
    }
    
    .btn-add-cart i {
        font-size: 0.9rem;
    }
    
    .btn-product-info {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.1rem;
    }
}

/* Animaciones adicionales */
@keyframes buttonPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-add-cart:focus,
.btn-product-info:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Estados de carga */
.btn-add-cart:disabled {
    animation: none;
}

.btn-add-cart .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
