/* Estilos minimalistas para bestseller cards */
.bestseller-card {
    transition: all 0.3s ease;
}

.bestseller-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
}

/* Ocultar el tag "Producto Pro" */
.bestseller-tag {
    display: none !important;
}

/* Descripción truncada a una línea */
.bestseller-description {
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
}

/* Botón minimalista "Ver detalle" */
.btn-detail-minimal {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1946AB;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 8px 0;
}

.btn-detail-minimal:hover {
    color: #3366CC;
    gap: 8px;
}

.btn-detail-minimal i {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.btn-detail-minimal:hover i {
    transform: translateX(3px);
}

/* Botón de WhatsApp verde en el modal */
.btn-whatsapp-modal {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 12px 30px !important;
    font-size: 1.05rem !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
    transition: all 0.3s ease !important;
}

.btn-whatsapp-modal:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5) !important;
}

.btn-whatsapp-modal i {
    font-size: 1.2rem;
}

/* Mejoras al modal de producto */
#productModal .modal-content {
    border-radius: 24px !important;
    overflow: hidden;
}

#productModal .modal-body {
    padding: 2rem !important;
}

#productModal #modalProductImage {
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    width: 100%;
    height: auto;
    object-fit: contain;
}

#productModal #modalProductName {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
}

#productModal #modalProductDescription {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #64748b;
}

#productModal #modalProductPrice {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #1946AB 0%, #3366CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fix modal z-index - modal must be above navbar (z-index: 1000001) */
#productModal.modal {
    z-index: 1000010 !important;
}

#productModal .modal-backdrop {
    z-index: 1000005 !important;
}

/* Measure item in modal - hide price, show only measure */
.measure-item-modal {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.measure-item-modal:hover {
    border-color: #1946AB;
    background: #f8f9ff;
}

.measure-item-modal .measure-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
}

/* Hide price in modal measures */
.measure-item-modal .measure-price {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-whatsapp-modal {
        width: 100%;
        margin-top: 1rem;
    }

    #productModal #modalProductPrice {
        font-size: 2rem;
    }

    #productModal .d-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    /* Mobile: adjust modal margin to not be hidden by navbar */
    #productModal .modal-dialog {
        margin-top: 80px !important;
    }

    .measure-item-modal {
        padding: 6px 10px;
    }

    .measure-item-modal .measure-name {
        font-size: 0.8rem;
    }
}

/* Desktop: ensure modal is not hidden by navbar */
@media (min-width: 769px) {
    #productModal .modal-dialog {
        margin-top: 100px !important;
    }
}