@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0c0d12;
    --bg-card: rgba(20, 22, 33, 0.7);
    --bg-card-hover: rgba(28, 31, 46, 0.85);
    --primary: #ff7a00;
    --primary-glow: rgba(255, 122, 0, 0.4);
    --secondary: #e63946;
    --secondary-glow: rgba(230, 57, 70, 0.4);
    --accent-gold: #ffb703;
    --accent-blue: #2b82c9;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 122, 0, 0.6);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    min-height: 100vh;
    padding-bottom: 40px;
    overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Container */
.container {
    width: 100%;
    max-width: 480px; /* Locked to mobile device size layout for QR comensales */
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
header {
    padding: 20px 0 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    background-color: rgba(12, 13, 18, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.logo-container {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 11px;
    text-align: center;
    color: var(--primary);
    text-transform: uppercase;
}

.bar-info {
    text-align: center;
}

.bar-info h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--text-white), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
}

.status-badge.abierto {
    background-color: rgba(46, 196, 182, 0.15);
    color: #2ec4b6;
    border: 1px solid rgba(46, 196, 182, 0.3);
}

.status-badge.cerrado {
    background-color: rgba(230, 57, 70, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(230, 57, 70, 0.3);
}

/* Promotions Slider */
.promotions-section {
    margin: 20px 0;
}

.promotions-section h2 {
    font-family: var(--font-heading);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.promo-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none; /* Hide scrollbar for clean mobile experience */
}

.promo-wrapper::-webkit-scrollbar {
    display: none;
}

.promo-card {
    flex: 0 0 85%;
    scroll-snap-align: start;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-glass);
}

.promo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 20%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0));
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.promo-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
}

.promo-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

/* Search Bar */
.search-container {
    margin: 15px 0;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 25px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 122, 0, 0.2);
    background-color: var(--bg-card-hover);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

/* Categories Horizontal Navigation */
.categories-nav {
    position: sticky;
    top: 155px; /* Adjust based on header height */
    z-index: 90;
    background-color: var(--bg-dark);
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-glass);
}

.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 6px 0;
    scrollbar-width: none;
}

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

.category-btn {
    white-space: nowrap;
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-white);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(255, 122, 0, 0.3);
    font-weight: 600;
}

/* Product Section */
.products-section {
    margin-top: 10px;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 10px 0;
    border-left: 3px solid var(--primary);
    padding-left: 8px;
    color: var(--text-white);
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Product Card */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    backdrop-filter: blur(8px);
}

.product-card:active {
    transform: scale(0.98);
    background-color: var(--bg-card-hover);
}

.product-card.agotado {
    opacity: 0.6;
}

.product-card-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background-color: #1a1c24;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-card-img img {
    transform: scale(1.08);
}

.product-card-details {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    min-width: 0; /* Ensures text truncation works */
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4px;
}

.product-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 4px;
}

.product-price {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 14px;
    color: var(--primary);
    flex-shrink: 0;
}

.product-desc-short {
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Badges */
.badge {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-spicy {
    background-color: rgba(230, 57, 70, 0.15);
    color: var(--secondary);
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.badge-featured {
    background-color: rgba(255, 183, 3, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(255, 183, 3, 0.3);
}

.badge-out {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modal Detail (Inmersivo bottom sheet / fade-in) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Bottom sheet on mobile */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    width: 100%;
    max-width: 480px;
    background: #11131c;
    border-top: 2px solid var(--primary);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.8);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-body {
    overflow-y: auto;
    padding-bottom: 30px;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-glass);
    color: var(--text-white);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1002;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.modal-img-container {
    width: 100%;
    height: 250px;
    position: relative;
    background-color: #07080a;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 20px;
}

.modal-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.2;
}

.modal-price {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.modal-category {
    font-size: 12px;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.modal-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.modal-badges .badge {
    padding: 3px 10px;
    font-size: 10px;
}

.modal-desc-title {
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Footer Section */
.footer-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.social-link {
    color: var(--text-muted);
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary);
}

.footer-address {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.footer-phone {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 5px;
}

.footer-credit {
    font-size: 9px;
    color: rgba(255,255,255,0.2);
    margin-top: 20px;
}
