/* ================================================================= */
/* DETALLE DE PRODUCTO - ESTILOS PROFESIONALES                       */
/* ================================================================= */

/* Transiciones y suavizado general */
.card, .btn, .form-control, img {
    transition: all 0.25s ease-in-out;
}

/* ----------------------------------------------------------------- */
/* 1. BOTÓN REGRESAR CON HOVER ELEGANTE Y FLUIDO                     */
/* ----------------------------------------------------------------- */
.btn-regresar-detalle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.25s ease-in-out;
}

.btn-regresar-detalle:hover {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

/* ----------------------------------------------------------------- */
/* 2. IMAGEN PRINCIPAL (CORRECCIÓN DE SUPERPOSICIÓN)                 */
/* ----------------------------------------------------------------- */
/* ================================================================= */
/* CORRECCIÓN DEFINITIVA DE LA IMAGEN (EVITAR SUPERPOSICIÓN)         */
/* ================================================================= */

/* Reemplazamos el sticky-top por un posicionamiento normal o estático seguro */
.col-lg-5 .card.sticky-top {
    position: relative !important;
    top: 0 !important;
    z-index: 1 !important;
    border-radius: 12px;
    overflow: hidden;
}

.card img.card-img-top {
    transition: transform 0.4s ease;
}

.card [role="button"]:hover img.card-img-top {
    transform: scale(1.03);
}

/* ----------------------------------------------------------------- */
/* 3. BOTONES DE VARIANTES (Tallas / Opciones)                       */
/* ----------------------------------------------------------------- */
.opcion-variante-desktop,
.opcion-variante-panel {
    border-radius: 8px !important;
    font-size: 0.95rem;
    border: 1px solid #ced4da !important;
    color: #343a40;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.opcion-variante-desktop:hover:not(:disabled),
.opcion-variante-panel:hover:not(:disabled) {
    background-color: #e9ecef;
    border-color: #adb5bd !important;
    color: #000000;
}

/* Estado activo / seleccionado para variantes */
.opcion-variante-desktop.active,
.opcion-variante-panel.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

/* Estado deshabilitado (Sin stock) */
.opcion-variante-desktop.disabled,
.opcion-variante-panel.disabled,
.opcion-variante-desktop:disabled,
.opcion-variante-panel:disabled {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
    color: #adb5bd !important;
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.65;
}

/* ----------------------------------------------------------------- */
/* 4. SELECTOR DE CANTIDAD (Input Group + Botones)                   */
/* ----------------------------------------------------------------- */
.input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-group .btn-outline-secondary {
    border-color: #ced4da;
    color: #495057;
    background-color: #f8f9fa;
}

.input-group .btn-outline-secondary:hover {
    background-color: #e2e6ea;
    color: #212529;
    border-color: #adb5bd;
}

.input-group input.form-control {
    border-color: #ced4da;
    font-size: 1rem;
    color: #212529;
    background-color: #ffffff;
}

/* Ocultar flechas nativas del input number */
/* ----------------------------------------------------------------- */
/* SELECTOR DE CANTIDAD (COMPATIBILIDAD TOTAL PARA INPUT NUMBER)     */
/* ----------------------------------------------------------------- */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

input[type=number] {
    -webkit-appearance: textfield; /* Compatibilidad con Safari y Chrome antiguos */
    -moz-appearance: textfield;    /* Compatibilidad con Firefox */
    appearance: textfield;         /* Propiedad estándar moderna unificada */
}

/* ----------------------------------------------------------------- */
/* 5. BOTONES DE ACCIÓN PRINCIPAL                                    */
/* ----------------------------------------------------------------- */
.btn-primary {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.3);
}

.btn-success {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(25, 135, 84, 0.3);
}

/* ----------------------------------------------------------------- */
/* 6. OFFCANVAS MÓVIL Y BOTÓN "X" MUY NOTORIO                        */
/* ----------------------------------------------------------------- */
.panel-agregar-carrito {
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    border: none;
}

/* Botón X de cierre altamente visible y estilizado */
.panel-agregar-carrito .btn-close {
    background-color: #f1f3f5;
    opacity: 1;
    padding: 0.75rem;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.panel-agregar-carrito .btn-close:hover {
    background-color: #dee2e6;
    transform: scale(1.1);
}

.offcanvas-backdrop {
    background-color: rgba(0, 0, 0, 0.55);
}

/* ----------------------------------------------------------------- */
/* 7. NOTIFICACIONES TOAST FLOTANTES                                 */
/* ----------------------------------------------------------------- */
.toast-container {
    z-index: 2000 !important;
}

.toast {
    border-radius: 10px;
    background-color: #198754 !important;
    color: white;
    backdrop-filter: blur(10px);
}