.main-container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Tarjetas de producto */
.product-card {
    background-color: var(--card-background);
    border: none;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative; 
    overflow: hidden; 
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}
.product-image {
    width: 100%;
    height: 180px;
    object-fit: fill;
}

/* Estilos para precios y descuentos */
.price-container { 
    min-height: 50px; 
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los precios */
    justify-content: center;
}
.product-price-old {
    font-size: 0.9em;
    text-decoration: line-through;
    color: var(--accent-color);
    margin-right: 8px;
}
.product-price-actual {
    color: var(--highlight-color);
    font-weight: bold;
}
.discount-badge {
    position: absolute;
    top: 10px;
    right: -40px;
    background-color: var(--highlight-color);
    color: white;
    padding: 5px 40px;
    font-weight: bold;
    font-size: 0.9em;
    transform: rotate(45deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Estilos para control de cantidad en tarjeta */
.quantity-controller-card {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 0.5rem;
}
.quantity-controller-card .btn {
   width: 35px;
   height: 35px;
   padding: 0;
   font-size: 1.1rem; 
   flex-shrink: 0;
   border-radius: 50% !important;
}
.quantity-controller-card .card-quantity-input {
   width: 50px;
   text-align: center;
   border: 1px solid #ddd;
   border-radius: 4px;
   -moz-appearance: textfield;
   font-size: 1rem;
   padding: 0.25rem;
}
.quantity-controller-card .card-quantity-input::-webkit-outer-spin-button,
.quantity-controller-card .card-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity-controller-card .card-quantity-unit {
    display: none;
}

/* Carrito y modales */
.cart-fab {
    background-color: var(--highlight-color);
    border: none;
    position: fixed;
    bottom: 110px;
    right: 25px;
    z-index: 1049; /* Menor que el modal */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cart-count {
    background-color: var(--accent-color); 
    position: absolute; 
    top: -5px; 
    right: -5px;
}
.modal-content { background-color: var(--card-background); }
.cart-item-row { display: flex; align-items: center; margin-bottom: 1rem; }
.cart-item-row img { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; margin-right: 1rem; }
.quantity-controls { display: flex; align-items: center; }
.quantity-controls input { width: 50px; text-align: center; border: 1px solid #ddd; margin: 0 5px; background-color: #fff; color: var(--text-color); }
.quantity-controls input::-webkit-outer-spin-button, 
.quantity-controls input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quantity-controls input[type=number] { -moz-appearance: textfield; }


/* --- ESTILOS RESPONSIVE PARA EL CARRITO EN MÓVILES --- */

/* --- ✅ AJUSTES AVANZADOS PARA CARRITO RESPONSIVE --- */

@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    /* 3. LÍNEA SEPARADORA */
    .cart-item-row {
        flex-wrap: wrap;
        position: relative;
        padding: 1.5rem 35px 1.5rem 0; /* Espacio para el botón de eliminar */
        margin-bottom: 1.5rem;
        border-bottom: 1px solid #f0f0f0; /* Línea separadora suave */
    }
    .cart-item-row:last-of-type {
        border-bottom: none; /* Sin línea en el último producto */
        margin-bottom: 0;
    }

    /* Contenedor del nombre y precio unitario */
    .cart-item-row > .flex-grow-1 {
        flex-basis: calc(100% - 76px); /* Ocupa todo el ancho menos la imagen */
    }

    /* Controles de cantidad */
    .quantity-controls {
        flex-basis: 100%; 
        margin-left: 76px; /* Se alinea con el texto de arriba */
        margin-top: 0.75rem;
        justify-content: flex-start; /* Alinea los botones a la izquierda */
    }
    
    /* 1. SUBTOTAL CENTRADO */
    .cart-item-row > strong {
        flex-basis: 100%; /* Ocupa toda la línea, debajo de los controles */
        margin-left: 0;  /* Quitamos el margen izquierdo para que use todo el ancho */
        margin-top: 0.75rem;
        text-align: center; /* Centramos el texto */
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--text-color);
    }

    /* 2. BOTÓN 'X' BIEN CENTRADO */
    .cart-item-row .remove-item {
        position: absolute;
        top: 50%; /* Lo posiciona a la mitad de la altura del contenedor */
        right: 0px;
        transform: translateY(-50%); /* Lo ajusta para un centrado vertical perfecto */
        
        /* Estilos para centrar el contenido (la 'x') y mejorar la apariencia */
        background-color: var(--accent-color);
        color: white;
        border-radius: 5px;
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        font-size: 1rem;
        line-height: 1; /* Asegura que la 'x' quede perfectamente centrada */
    }
}

/* --- ✅ ALINEACIÓN DE COLUMNAS EN EL CARRITO (DESKTOP) --- */

@media (min-width: 576px) {

    .cart-item-row {
        display: flex;
        align-items: center;
    }

    /* 1. Nombre del producto: le decimos que ocupe todo el espacio sobrante */
    .cart-item-row > .flex-grow-1 {
        flex: 1; /* Permite que este elemento crezca y se encoja */
    }

    /* 2. Controles de cantidad: le damos un ancho fijo */
    .quantity-controls {
        flex-shrink: 0; /* Evita que se encoja */
        min-width: 130px; /* Ancho mínimo para la columna */
        justify-content: center;
    }

    /* 3. Subtotal: le damos un ancho fijo y alineamos el texto a la derecha */
    .cart-item-row > strong {
        flex-shrink: 0; /* Evita que se encoja */
        width: 110px; /* Ancho fijo para la columna */
        text-align: right; /* Alinea el precio a la derecha */
        margin-right: 1rem;
    }

    /* 4. Botón de eliminar: le damos un espacio fijo */
    .cart-item-row .remove-item {
        flex-shrink: 0; /* Evita que se encoja */
    }
}

/* Estilo opcional para el botón de eliminar en el carrito */
.cart-item-row .remove-item {
    border: none;
    color: #fff; /* Usa tu color de acento rojo */
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.cart-item-row .remove-item:hover {
    opacity: 1;
    color: #fff; /* O un rojo más oscuro */
}


/* --- Carrusel general (PC) --- */
#hero-carousel .carousel-item {
  /* Altura del carrusel en pantallas grandes */
  height: 60vh; /* 60% de la altura de la ventana */
  background-color: #f0f0f0; /* Color de fondo mientras carga */
}

#hero-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cubre todo el espacio sin deformar */
  object-position: center; /* Centra la imagen si se recorta */
}

/* --- Carrusel en móviles y tablets --- */
@media (max-width: 768px) {
  #hero-carousel .carousel-item {
    height: auto; /* Altura automática según la imagen */
    max-height: 60vh; /* Máximo 60% de la pantalla */
  }

  #hero-carousel .carousel-item img {
    width: 100%;
    height: 200px; /* Mantiene proporciones originales */
    max-height: 60vh;
    object-fit: fill;
    object-position: center;
  }
}

/* Estilos para el nuevo botón de Ayuda (FAQ) con tu diseño personalizado */
.faq-fab {
    background-color: white; /* Fondo blanco, como pediste */
    color: #212529; /* Letras negras */
    border: 2px solid #28a745; /* Borde verde de 2px para el botón */
    position: fixed;
    bottom: 35px; 
    right: 25px;
    z-index: 1050;
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 50rem; /* Forma de píldora */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 500;
}

/* Efecto al pasar el mouse */
.faq-fab:hover {
    background-color: white;
    color: #212529; /* Mantiene el texto negro al pasar el mouse */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.faq-fab-logo {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    border: 2px solid #F29F05;
    background-color: white;
    overflow: visible;
    position: relative; /* Necesario para mover la imagen relativa al contenedor */
}

.faq-fab-logo img {
    height: 75px !important;
    width: 75px !important;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Modal con estilo chat bot */
#faqModal .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    background: #f8f9fa;
    overflow: hidden;
}

#faqModal .modal-header {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

#faqModal .modal-header .modal-title::before {
    content: "💬";
    font-size: 1.4rem;
    margin-right: 6px;
}

#faqModal .modal-body {
    background-color: #ffffff;
    padding: 20px;
}

/* Acordeón tipo burbuja */
#faqModal .accordion-button {
    background: #e9f7ef;
    border-radius: 8px;
    font-weight: 500;
    color: #155724;
    box-shadow: none;
}

#faqModal .accordion-button:not(.collapsed) {
    background: #c3e6cb;
    color: #0f5132;
}

#faqModal .accordion-body {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Footer con botones más suaves */
#faqModal .modal-footer {
    border-top: none;
    background-color: #f1f3f5;
}

#faqModal .modal-footer .btn-secondary {
    border-radius: 50rem;
    padding: 6px 20px;
}

.chat-bubble {
    background: #f1f3f5;
    border-radius: 15px;
    padding: 10px 15px;
    margin: 5px 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.bot-message {
    background: #e0f7e9;
    border: 1px solid #28a745;
}

