/* Variables and Base Theme */
:root {
    --primary: #ff5e00;      /* Appetite-inducing orange/red */
    --primary-hover: #ff7524;
    --bg-dark: #121212;      /* Deep dark background */
    --bg-surface: #1e1e1e;   /* Dark raised surface */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --whatsapp: #25D366;
    --whatsapp-hover: #1EBE5D;
    
    --radius: 12px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    --border: 1px solid rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
}

/* Header */
header {
    background-color: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: var(--border);
    padding: 1rem 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-info h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.store-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Status Badges para Abierto/Cerrado */
.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-open {
    background: rgba(37, 211, 102, 0.15); /* verde fosforescente base */
    color: #39ff14; /* Neon green */
    border: 1px solid rgba(57, 255, 20, 0.3);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}

.status-closed {
    background: rgba(255, 0, 0, 0.15);
    color: #ff3333;
    border: 1px solid rgba(255, 51, 51, 0.3);
}

.status-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
    animation: blink-warning 2s infinite;
}

@keyframes blink-warning {
    0% { box-shadow: 0 0 0 rgba(255, 193, 7, 0); }
    50% { box-shadow: 0 0 15px rgba(255, 193, 7, 0.5); }
    100% { box-shadow: 0 0 0 rgba(255, 193, 7, 0); }
}

/* Category Navigation */
.category-nav {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }

.cat-pill {
    white-space: nowrap;
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    border: var(--border);
    transition: all 0.2s;
}

.cat-pill:hover, .cat-pill.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Products List */
main {
    padding-bottom: 200px; /* Espacio extra generoso para liberar el botón flotante en móviles */
}

.category-section {
    margin-top: 2rem;
    scroll-margin-top: 100px; /* Offset for sticky header */
}

.category-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: var(--border);
    color: var(--text-primary);
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    border: var(--border);
    align-items: center;
}

.product-img {
    width: 80px;
    height: 80px;
    background-color: #2c2c2c; /* placeholder bg */
    border-radius: 8px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2rem;
    transition: transform 0.3s ease;
}

/* Efecto Zoom en Hover */
.prod-img-container {
    overflow: hidden;
    border-radius: 8px;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

/* Mobile zoom (tap o mantencion prolongada vs hover de desktop) */
@media (hover: hover) {
    .product-card:hover .product-img {
        transform: scale(2) translateX(25%) translateY(10%) ; /* Zoom hacia el centro de la pantalla aprox dependiendo layout */
        z-index: 10;
        position: relative;
        box-shadow: 0 10px 20px rgba(0,0,0,0.8);
        border-radius: 4px;
        backface-visibility: hidden;
    }
    
    /* Para que el overflow hidden no corte el zoom si desborda la tarjeta, 
       vamos a aplicar el efecto directo a la imagen sin que el contenedor padre lo corte brutalmente. */
    .product-card {
        overflow: visible; 
    }
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap; 
}

.price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.15rem;
}

.btn-add {
    background: rgba(255, 94, 0, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add:hover {
    background: var(--primary);
    color: white;
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 400px;
    background: var(--whatsapp);
    color: white;
    padding: 1rem;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1000;
    font-weight: 600;
    border: none;
    outline: none;
}

.floating-cart.hidden {
    display: none;
}

.floating-cart:hover {
    background: var(--whatsapp-hover);
    transform: translateX(-50%) translateY(-2px);
}

.cart-qty {
    background: white;
    color: var(--whatsapp);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
}

/* Cart Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    display: flex;
    justify-content: flex-end;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cart-modal {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    height: 100%;
    transform: translateX(100%);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .cart-modal {
    transform: translateX(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Cart Items */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.item-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.item-price { color: var(--text-secondary); font-size: 0.85rem; }

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-qty {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
}

/* Form Styles */
.form-group {
    margin-top: 1.5rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0,0,0,0.2);
    border: var(--border);
    border-radius: 8px;
    color: white;
    margin-bottom: 1rem;
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
}
label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: var(--border);
    background: rgba(0,0,0,0.2);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.btn-whatsapp-submit {
    width: 100%;
    background: var(--whatsapp);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-whatsapp-submit:hover {
    background: var(--whatsapp-hover);
}

/* Admin Styles Overlay */
.admin-login {
    max-width: 400px; margin: 100px auto; padding: 2rem; background: var(--bg-surface); border-radius: var(--radius); text-align: center;
}
.admin-btn {
    background-color: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; cursor: pointer; width: 100%; font-weight: 600;
}
.admin-table {
    width: 100%; border-collapse: collapse; margin-top: 1.5rem;
}
.admin-table th, .admin-table td {
    padding: 0.75rem; text-align: left; border-bottom: var(--border);
}
.admin-header {
    background: rgba(0,0,0,0.2); display: flex; justify-content: space-between; padding: 1rem 2rem; align-items: center; border-bottom: var(--border);
}
.admin-panel {
    padding: 2rem; max-width: 1000px; margin: 0 auto;
}
