/* ==========================================================================
   1. VARIABLES, FUENTES Y RESET
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap');

:root {
    --beige: #E9C4B6;
    --violet: #7b2cbf;
    --violet-dark: #5a189a;
    --white: #ffffff;
    --black: #1a1a1a;
    --gray: #e0e0e0;
    --violet-premium: #8C1C5E;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--beige);
    color: var(--black);
}

.highlight {
    color: var(--violet-premium);
}

/* ==========================================================================
   2. ANIMACIONES (Keyframes)
   ========================================================================== */
@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes slideIn {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes bump {
    0% { transform: scale(1); }
    10% { transform: scale(1.3); }
    30% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; pointer-events: none; }
}

/* ==========================================================================
   3. NAVBAR Y NAVEGACIÓN
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    gap: 15px;
    background: rgba(233, 196, 182, 0.7); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0 !important;
    left: 0;
    width: 100%;
    margin-top: 0 !important;
    z-index: 1000;
}

/* Logo */
.logo { 
    font-family: 'Playfair Display'; 
    font-size: 1.5rem; 
    font-weight: bold; 
}

.logo span { color: var(--violet); }

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.logo-imgbo {
    height: 60px !important;
    width: 60px;
    display: block;
    object-fit: contain;
    filter: none;
    opacity: 1;
    visibility: visible;
}

/* Menú de navegación */
.nav-menu-fixed {
    display: flex;
    gap: 20px;
    margin-right: 20px;
    z-index: 5;
}

.nav-item {
    text-decoration: none;
    color: #000000;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
}

.nav-item:hover {
    color: var(--violet-premium);
    transform: translateY(-2px);
}

.navbar a, .product-card h3 {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* ==========================================================================
   4. MARQUESINA (Marquee)
   ========================================================================== */
.marquee-container {
    flex-grow: 0;
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    width: 300px;
    margin-left: 15px;
}

.marquee-content {
    display: flex;
    color: var(--black);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    animation: scroll-left 20s linear infinite;
}

.marquee-content span {
    display: inline-flex;
    align-items: center;
    padding-right: 15px;
}

.marquee-icon {
    height: 1.2em;
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
}

.nav-side-left, 
.nav-side-right {
    flex: 1; 
    display: flex;
    align-items: center;
}

.nav-side-right {
    justify-content: flex-end;
}

/* ==========================================================================
   5. BUSCADOR
   ========================================================================== */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
    margin: 0 20px;
}

#searchInput {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 45px 10px 20px ;
    border-radius: 50px;
    width: 100%;
    flex-shrink: 0;
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-item-quick {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.search-item-quick:hover { background-color: #f9f0f6; }
.search-item-quick img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; }
.search-item-info { display: flex; flex-direction: column; }
.search-item-name { font-size: 0.85rem; font-weight: 600; color: #333; }
.search-item-price { font-size: 0.8rem; color: var(--violet-premium); font-weight: 700; }

.input-with-icon {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    right: 15px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
    pointer-events: none;
}
.search-item-more {
    padding: 12px;
    text-align: center;
    background-color: #fdf6f9;
    color: var(--violet-premium);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border-top: 1px solid #eee;
    transition: background 0.3s;
}

.search-item-more:hover {
    background-color: var(--violet-premium);
    color: white;
}

/* ==========================================================================
   6. HERO SECTION
   ========================================================================== */
.hero-section {
    height: 85vh; 
    background-image: url('img/rulosfondo.png');
    background-size: cover;
    background-position: 80% center;  
    margin-top: -90px; 
    padding-top: 110px; 
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    color: var(--white); 
    box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.2); 
}

.hero-content {
    max-width: 500px; 
    text-align: left; 
}

.hero-content h1 {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -2px;
    color: var(--white);
    margin-bottom: 20px;
}

.hero-content h2 {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--white);
}

/* ==========================================================================
   7. GRILLA Y TARJETAS DE PRODUCTOS
   ========================================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 50px 5%;
}

.product-card {
    max-width: 300px; 
    width: 100%;
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.product-price {
    margin-top: auto;
    padding-top: 15px; 
    font-weight: 700;
    font-size: 1rem;
    color: var(--violet-premium);
}

.product-image-container {
    width: 100%;
    height: 250px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
    transition: transform 0.3s ease;
}

.product-card:hover .product-img { transform: scale(1.05); }
.product-card img:not(.product-img) { width: 100%; height: 200px; object-fit: cover; border-radius: 5px; }

/* ==========================================================================
   8. ACCIONES Y BOTONES
   ========================================================================== */
/* Botón Carrito Navbar */
#cartBtn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--violet-premium);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
#cartCount {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--white);
    color: var(--violet-premium);
    font-size: 0.75rem;
    font-weight: 900;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--violet-premium);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#cartBtn:hover {
    filter: brightness(1.1); 
    transform: translateY(-2px);
}

#cartBtn img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 50%;
}

.bump { animation: bump 300ms ease-out !important; }

/* Controles de cantidad */
.product-controls, .product-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.qty-input {
    width: 55px;
    padding: 8px;
    text-align: center;
    border: 2px solid var(--gray);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    color: var(--violet-premium);
    outline: none;
    transition: border-color 0.3s;
}

.qty-input:focus {
    border-color: var(--violet-premium);
    background-color: #fdf6f9;
}

/* Botón Agregar */
.add-btn, .btn-add {
    background-color: white;
    color: var(--violet-premium);
    border: 2px solid var(--violet-premium);
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add { background: var(--black); color: white; border: none; flex-grow: 1; padding: 10px 15px; border-radius: 5px; font-weight: 600; }
.btn-add:hover { background: var(--violet); }
.add-btn:hover { background-color: var(--violet-premium); color: white; box-shadow: 0 4px 10px rgba(140, 28, 94, 0.2); transform: translateY(-2px); }

/* ==========================================================================
   9. CARRITO (Modal lateral)
   ========================================================================== */
.cart-modal {
    position: fixed;
    right: -100%;
    top: 0;
    width: 350px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: 0.4s;
    z-index: 1000;
    padding: 30px;
}

.cart-modal.active { right: 0; }

.close-cart {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem; 
    cursor: pointer; 
    color: var(--violet-premium); 
    transition: transform 0.2s ease;
}

.close-cart:hover { transform: scale(1.2); }

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.item-details { display: flex; align-items: center; gap: 10px; max-width: 65%; }
.item-qty-badge { background-color: var(--bg-main); color: var(--violet-premium); font-weight: 900; font-size: 0.75rem; padding: 2px 8px; border-radius: 12px; border: 1px solid var(--violet-premium); }
.item-name { font-size: 0.85rem; line-height: 1.3; color: #555; text-transform: capitalize; max-width: 65%; }
.item-right-side { display: flex; align-items: center; gap: 12px; }
.item-price { font-size: 0.95rem; font-weight: 700; color: var(--violet-premium); }
.remove-item-btn { background: #f0f0f0; color: #888; border: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; transition: all 0.2s ease; }
.remove-item-btn:hover { background-color: #ff4d4d; color: white; transform: rotate(90deg); }

.cart-content p { margin-top: 25px; font-size: 1.2rem; display: flex; justify-content: space-between; font-weight: 900; color: var(--black); }
.cart-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; padding-bottom: 20px; }

#checkoutBtn, .btn-pay {
    background-color: var(--violet-premium);
    color: white;
    width: 100%;
    padding: 10px;
    border: none;
    margin-top: 20px;
    cursor: pointer;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(140, 28, 94, 0.3);
    transition: all 0.3s ease;
    border-radius: 50px;
}

#checkoutBtn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(140, 28, 94, 0.4); }
.btn-pay { background: var(--violet); }

#clearCartBtn {
    background: transparent;
    color: #b0b0b0;
    border: none;
    text-decoration: underline;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.3s;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

#clearCartBtn:hover { color: #ff4d4d; background: none; }
.empty-cart-msg { text-align: center; color: #aaa; font-style: italic; padding: 20px 0; }

/* ==========================================================================
   10. MODAL DETALLE Y NOTIFICACIONES
   ========================================================================== */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content-detail {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    animation: slideIn 0.4s ease;
}

.detail-container { display: flex; gap: 40px; flex-wrap: wrap; }
.detail-img-box { flex: 1; min-width: 300px; }
.detail-img-box img { width: 100%; height: auto; object-fit: contain; }
.detail-info { flex: 1; min-width: 300px; }
.product-description { line-height: 1.6; color: #666; margin: 20px 0; }
.detail-price { font-size: 1.8rem; font-weight: 900; color: var(--violet-premium); margin-bottom: 25px; }
.close-detail { position: absolute; right: 25px; top: 15px; font-size: 2.5rem; cursor: pointer; color: #ccc; }

.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2ecc71;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDownFade 0.5s ease forwards, fadeOut 0.5s ease 2.5s forwards;
}

/* ==========================================================================
   11. FOOTER Y REDES SOCIALES
   ========================================================================== */
.main-footer {
    background-color: #fdf6f9; 
    color: #444;
    padding: 60px 20px 20px;
    margin-top: 80px;
    border-top: 2px solid #fceef3;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-section { flex: 1; min-width: 250px; }
.footer-logo { font-family: 'Montserrat', sans-serif; color: var(--violet-premium); font-weight: 900; letter-spacing: 2px; margin-bottom: 15px; }
.footer-section h3 { font-size: 1.1rem; color: var(--violet-premium); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
.footer-section p { line-height: 1.6; font-size: 0.9rem; color: #666; }

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.social-icons a {
    color: #333;
    font-size: 24px;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-icons i {
    transition: all 0.4s ease;
}

.social-icons a:hover { transform: translateY(-3px); }
.social-icons a:hover .fa-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); 
    webkit-background-clip: text;
    background-clip: text;
    color: transparent !important; }
.social-icons a:hover .fa-facebook-f { background: linear-gradient(to bottom, #18acfe, #1877f2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    filter: drop-shadow(0 0 2px rgba(24, 119, 242, 0.4)); } 
.social-icons a:hover .fa-tiktok { color: #000 !important;
    text-shadow: 
    2px 2px 0px #ff0050, -2px -2px 0px #00f2ea; 
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.5));}
.social-icons a:hover .fa-globe { background: linear-gradient(to bottom, #87CEEB, #00BFFF);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    filter: drop-shadow(0 0 2px rgba(0, 191, 255, 0.4)); }

.social-icons i {
    transition: all 0.4s ease;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    font-size: 0.8rem;
    color: #999;
}

/* ==========================================================================
   12. RESPONSIVE Y OTROS
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #45f077, #25D366, #075e54);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none; 
}

.whatsapp-float:hover { 
    transform: scale(1.1) translateY(-5px); 
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    background: linear-gradient(135deg, #25D366, #075e54); /* Se oscurece un toque */
    color: #FFF;
}

/* 3. Animación de Pulso Atractor */
@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Si usás una imagen adentro en vez de icono de Font Awesome */
.whatsapp-float img { 
    width: 30px; 
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

@media (min-width: 1024px) {
    .logo-imgbo { height: 75px !important; }
}

@media (max-width: 1100px) {
    .nav-menu-fixed { display: none; }
}

@media print {
    body * { display: none !important; }
    
    #printReceipt { 
        display: block !important; 
        padding: 30px;
        font-family: 'Montserrat', sans-serif;
        color: #000;
        width: 100%;
    }

    #printReceipt * { display: revert !important; }

    .receipt-header { 
        text-align: center; 
        margin-bottom: 30px; 
        display: block !important; 
    }
    .receipt-logo-header { width: 100px; margin-bottom: 10px; display: inline-block !important; }
    .receipt-header h1 { font-size: 24pt; color: #8C1C5E; margin: 0; display: block !important; }
    
    /* Estilo para Fecha y Número de Pedido */
    .receipt-header p { 
        margin: 5px 0; 
        font-size: 11pt; 
        color: #333; 
        display: block !important; 
    }

    .receipt-table {
        display: table !important;
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    .receipt-table th {
        display: table-cell !important;
        border-bottom: 2px solid #eee;
        padding: 10px;
        text-align: left;
        font-size: 10pt;
        color: #8C1C5E;
        text-transform: uppercase;
    }

    .receipt-table td {
        display: table-cell !important;
        padding: 10px;
        border-bottom: 1px solid #eee;
        font-size: 11pt;
    }

    .col-qty, .col-price, .col-subtotal { text-align: right !important; }
    .col-qty { width: 60px; }
    .col-price { width: 100px; }
    .col-subtotal { width: 120px; font-weight: bold; }

    .receipt-footer {
        margin-top: 30px;
        display: block !important;
    }

    .receipt-total-line {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        gap: 15px;
        font-size: 18pt;
        font-weight: 900;
        color: #8C1C5E;
        margin-bottom: 20px;
    }

    .thank-you-note {
        display: flex !important; 
        align-items: center !important; 
        justify-content: flex-end;
        gap: 8px;
        font-style: normal; 
        color: #555;
        margin-top: 20px;
    }

    .receipt-logo-footer {
        width: 32px; 
        height: auto;
        display: inline-block !important;
        transform: translateY(3px); 
    }

    /* Configuración de página */
    @page { size: auto; margin: 0; }
    body { margin: 1.5cm; }
}

.print-only { display: none; }