/* ===================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   =================================== */
:root {
    --primary-color: #0F2C59;    /* Azul Oscuro Sanbrei */
    --accent-color: #ed4307;     /* Naranja Vibrante (#ed4307) */
    --whatsapp-color: #25d366;   /* Verde WhatsApp */
    --bg-color: #f4f4f4;         /* Fondo limpio */
    --text-color: #333333;       /* Texto principal */
    --gray-light: #e0e0e0;       /* Bordes y líneas tenues */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding-bottom: 80px;
}

/* ===================================
   HERO / HEADER CON PORTADA Y LOGO
   =================================== */
.store-hero {
    background: #fff;
    margin-bottom: 10px;
}

.hero-banner {
    position: relative;
    width: 100%;
    height: 160px; /* Altura predeterminada para celulares */
    background-image: url('assets/img/banner-sabrei1.png');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 15px;
}

/* Ajuste exclusivo para computadores (pantallas a partir de 768px de ancho) */
@media (min-width: 768px) {
    .hero-banner {
        height: 280px; /* Aumentamos el alto en PC para que la imagen se vea completa y respire mejor */
    }
}

/* Barra de búsqueda flotante en el banner */
.search-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    width: 260px;
    max-width: 100%;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    width: 100%;
    color: #333;
}

.search-icon {
    color: #666;
    flex-shrink: 0;
}


/* Franja de perfil naranja con bordes uniformes y simetría */
.hero-profile-container {
    background-color: #ed4307 !important;
    padding: 15px 25px !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    border-radius: 0 !important;
    border: 3px solid #ed4307 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Logo redondo perfecto debajo del banner */
.store-logo-wrapper {
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background-color: #ffffff !important;
    border: 3px solid #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    margin: 0 !important;
}

.store-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

.store-info-text {
    flex: 1;
    text-align: left;
}

.title-badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.store-title {
    font-size: 1.15rem;
    color: #ffffff !important;
    font-weight: bold;
}

.whatsapp-badge {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff !important;
    color: #ed4307 !important;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.store-description {
    font-size: 0.82rem;
    color: #ffffff !important;
    line-height: 1.4;
}

/* ===================================
   CATEGORÍAS DESLIZABLES (MÓVIL Y WEB)
   =================================== */
.categories-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 12px 15px;
    background: #0F2C59 !important;
    border: 3px solid #0F2C59 !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.categories-container::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 70px;
    flex-shrink: 0;
    text-align: center;
}

.category-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ed4307 !important;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    margin-bottom: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.category-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.category-name {
    font-size: 0.7rem;
    color: #ffffff !important;
    font-weight: 600;
}

/* ===================================
   GRILLA DE PRODUCTOS
   =================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Importar Montserrat desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');
.product-card {

    
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Montserrat', sans-serif; /* <-- Añade esto aquí */
}

.product-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 170px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    cursor: pointer;
}

.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 12px;
    color:#0F2C59;
    font-family: 'Montserrat', sans-serif; /* <-- Añade esto aquí */
}



.product-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.75rem;
    color: #0F2C59 !important; /* <-- Reemplaza el color anterior por este azul */
    margin-bottom: 6px;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ed4307 !important;
    margin-bottom: 10px;
}

.btn-details {
    width: 100%;
    background: #fff;
    border: 1px solid #ed4307 !important;
    color: #ed4307 !important;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.btn-details:hover {
    background: #ed4307 !important;
    color: #fff !important;
}

/* ===================================
   BOTÓN FLOTANTE Y PANEL CARRITO
   =================================== */
.cart-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--whatsapp-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99;
    transition: transform 0.2s;
}

.cart-floating-btn:hover {
    transform: scale(1.05);
}

.cart-count {
    background: #fff;
    color: var(--whatsapp-color);
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.85rem;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.cart-item-info h4 {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.cart-item-info p {
    font-size: 0.8rem;
    color: #666;
}

.btn-remove {
    background: none;
    border: none;
    color: #d9534f;
    cursor: pointer;
    font-size: 0.8rem;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-light);
    background: #fafafa;
}

.cart-total {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.btn-whatsapp-checkout {
    display: block;
    width: 100%;
    background-color: var(--whatsapp-color);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}

/* ===================================
   MODAL DE PRODUCTOS
   =================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    padding: 10px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
}

.modal-gallery {
    padding: 20px 0 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fafafa;
    border-bottom: 1px solid var(--gray-light);
}

.modal-main-image-container {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-main-image-container img {
    max-height: 100%;
    max-width: 90%;
    object-fit: contain;
}

.carousel-dots {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
}

.dot.active {
    background: #333;
}

.modal-body {
    padding: 20px;
}

.modal-title-text {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.modal-price-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ed4307;
    margin-bottom: 10px;
}

.modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
}

.quantity-selector button {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
}

.quantity-selector span {
    padding: 0 5px;
    font-weight: bold;
}

.btn-add-cart {
    flex: 1;
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
}

/* ===================================
   RESPONSIVE MÓVIL
   =================================== */
@media (max-width: 600px) {
    .hero-banner {
        height: 120px;
        padding: 10px;
    }
    .hero-profile-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px !important;
    }
    .title-badge-row {
        justify-content: center;
    }
    .search-box {
        width: 100%;
    }
}


/* FORZAR ESTILOS DENTRO DEL MODAL */

/* Título del producto dentro del modal (Azul Corporativo) */
.modal-content h2,
.modal-content h3,
.modal-body h2,
.modal-body h3,
#modal-title {
    color: #0F2C59 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
}

/* Párrafo de descripción dentro del modal (Gris legible) */
.modal-content p,
.modal-body p,
#modal-description {
    color: #444343 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}


/* Contenedor para alinear los precios en horizontal (al lado) */
.product-price-container {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre el precio tachado y el nuevo */
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif !important;
}

/* Estilo para el precio anterior tachado */
.old-price {
    font-size: 0.8rem;
    color: #888888 !important;
    text-decoration: line-through; /* Esto es lo que tacha el texto */
}

/* Estilo para tu precio actual en oferta */
.product-price {
    font-size: 0.95rem;
    font-weight: bold;
    color: #ed4307 !important;
    margin-bottom: 0; /* Quitamos el margen anterior para que el flex lo controle */
}


/* ===================================
   FOOTER Y ENLACES LEGALES
   =================================== */
.store-footer {
    background-color: #ed4307; /* Azul Corporativo */
    color: #ffffff;
    text-align: center;
    padding: 25px 15px;
    margin-top: 40px;
    border-top: 3px solid #ed4307; /* Detalle naranja vibrante */
    font-family: 'Montserrat', sans-serif;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-copy {
    font-size: 0.8rem;
    color: #e0e0e0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ed4307;
    text-decoration: underline;
}

.separator {
    color: #ed4307;
}