/* === Grails Menu — Mobile-First Styles === */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'FuturaDemiC';
    src: url('/assets/fonts/FuturaDemiC-Regular.otf') format('opentype');
    font-display: swap;
}

:root {
    --header-bg: #FFE3FA;
    --teal: #1C4154;
    --pink: #DE528C;
    --purple: #7D0AFF;
    --white: #FFFFFF;
    --bg: #F8F8F8;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --border: #EEEEEE;
    --font-brand: 'FuturaDemiC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* === Header === */
.menu-header {
    background: var(--white) url('/assets/images/header-bg.png') no-repeat center top;
    background-size: 100%;
    padding: 20px 16px;
    position: relative;
    z-index: 100;
    text-align: center;
}

.menu-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.menu-logo img {
    height: 60px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.menu-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.menu-icon-btn {
    color: var(--pink);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    padding: 4px;
}

.fav-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--pink);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* === Category Grid (Landing Page) === */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 16px;
}

.category-card {
    display: block;
    text-decoration: none;
    position: relative;
    height: 200px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.category-card-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

.category-card:hover .category-card-img img {
    transform: scale(1.1);
}

.category-card.featured {
    box-shadow: 0px 6px 10px 3px rgba(218, 48, 200, 0.47);
    animation: bounce-1 1s linear infinite;
    transform-origin: bottom;
    order: -1;
}

@keyframes bounce-1 {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.category-card-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 40px 12px 14px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-align: center;
    font-family: var(--font-brand);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.featured-dot {
    margin-right: 2px;
}

@media (min-width: 480px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .category-card {
        height: 240px;
    }
}

@media (min-width: 768px) {
    .category-card {
        height: 280px;
    }
}

/* === Search === */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.search-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--header-bg);
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    font-family: var(--font-body);
}

.search-bar button {
    background: none;
    border: none;
    color: var(--pink);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* === Banners === */
.menu-banner {
    max-width: 900px;
    margin: 0 auto;
}

.menu-banner {
    padding: 8px 16px;
}

.menu-banner {
    position: relative;
    overflow: visible;
    margin-top: 4px;
}

.menu-banner img {
    width: 100%;
    max-width: 750px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.banner-close {
    position: absolute;
    top: 4px;
    right: max(calc((100% - 750px) / 2 + 8px), 10px);
    width: 20px;
    height: 20px;
    background: #ddd;
    border: none;
    border-radius: 50%;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.banner-close:hover {
    background: #ccc;
    color: #333;
}

.menu-banner a {
    display: block;
}

/* === Greeting === */
.menu-greeting {
    text-align: center;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-light);
    background: var(--white);
    max-width: 900px;
    margin: 0 auto;
}

/* === Category Tabs === */
.category-tabs {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--white);
    max-width: 900px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.tabs-arrow {
    flex-shrink: 0;
    width: 28px;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tabs-arrow:hover {
    color: var(--pink);
}

.tabs-arrow.visible {
    display: flex;
}

.category-tabs-scroll {
    position: relative;
}

.category-tabs-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.category-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.category-tab {
    flex-shrink: 0;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    text-decoration: none;
}

.category-tab:hover {
    color: var(--text);
}

.category-tab.active {
    color: var(--pink);
    border-bottom-color: var(--pink);
}

.category-tab.featured {
    background: linear-gradient(135deg, #FFF3CD, #FFE082);
    color: #8B6914;
    font-weight: 700;
    order: -1;
    border-radius: 6px 6px 0 0;
    border-bottom: 3px solid #F0C040;
}

.category-tab.featured.active {
    background: linear-gradient(135deg, #FFE082, #FFD54F);
    color: #6D5010;
    border-bottom-color: #E6A800;
}

.featured-badge {
    margin-right: 4px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* === Main Content === */
.menu-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    min-height: 50vh;
}

/* === Subcategory Pills === */
.subcategory-pills-wrap {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.pills-arrow {
    flex-shrink: 0;
    width: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pills-arrow:hover {
    color: var(--pink);
}

.pills-arrow.visible {
    display: flex;
}

.subcategory-pills {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 12px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
}

.subcategory-pills::-webkit-scrollbar {
    display: none;
}

.subcategory-pill {
    flex-shrink: 0;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-body);
}

.subcategory-pill:hover,
.subcategory-pill.active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

/* === Category Description === */
.category-description {
    padding: 12px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    border-bottom: 1px solid var(--border);
}

/* === Dietary Filters === */
.dietary-filters {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.filter-btn {
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-body);
}

.filter-btn.active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

/* === Item List === */
.item-list {
    padding: 0;
}

.item-row {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
    gap: 12px;
}

.item-row:hover {
    background: #FAFAFA;
}

.item-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg);
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--purple);
    margin-bottom: 2px;
    line-height: 1.3;
    letter-spacing: 0.2px;
    transition: color 0.15s;
}

.item-row:hover .item-name {
    color: #9B40FF;
}

.item-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-extras-preview {
    font-size: 11px;
    color: var(--pink);
    margin-top: 2px;
    font-style: italic;
}

.item-badges {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.badge {
    font-size: 11px;
    line-height: 1;
}

.badge-new {
    background: var(--pink);
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.item-heart {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    padding: 0;
    transition: color 0.15s;
}

.item-heart.favorited,
.item-heart:hover {
    color: var(--pink);
}

.item-heart.favorited svg {
    fill: var(--pink);
}

.admin-edit-link {
    display: inline-block;
    font-size: 14px;
    text-decoration: none;
    opacity: 0.3;
    transition: opacity 0.15s;
    margin-top: 4px;
}
.admin-edit-link:hover {
    opacity: 1;
}

.fav-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.fav-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === Subcategory Headers === */
.subcategory-header {
    padding: 16px 16px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.subcategory-header h3 {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.subcategory-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0;
    line-height: 1.4;
    font-style: italic;
}

.subcategory-desc strong {
    font-style: normal;
}

/* === Item Cards Grid (for hookah styles, etc.) === */
.item-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px 16px;
}

.item-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
    text-align: center;
}

.item-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.item-card-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg);
}

.item-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-card-info {
    padding: 10px 8px;
}

.item-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.item-card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--purple);
}

@media (min-width: 480px) {
    .item-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .item-cards-grid {
        grid-template-columns: repeat(5, 1fr);
        padding: 12px 24px;
    }
}

/* === Hookah Pricing Tiers === */
.hookah-pricing {
    max-width: 400px;
    margin: 0 auto;
}

.hookah-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: var(--text);
}

.hookah-tier.specialty {
    justify-content: center;
    background: var(--bg);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 6px 16px;
    margin-top: 8px;
}

.hookah-tier strong {
    color: var(--text);
}

.hookah-tier span:last-child {
    font-weight: 700;
    color: var(--text);
}

.empty-state {
    padding: 40px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* === Item Modal === */
.item-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.item-modal {
    background: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-image-wrap {
    position: relative;
    width: 100%;
    background: var(--bg);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    display: block;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev { left: 8px; }
.modal-next { right: 8px; }

.modal-image-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.modal-image-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
}

.modal-image-dots .dot.active {
    background: white;
}

.modal-body {
    padding: 16px 20px;
}

.modal-category {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 6px;
}

.modal-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.modal-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.modal-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-extras {
    background: #F9F5FF;
    border: 1px solid #E8DEFF;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-extras strong, .modal-extras b {
    color: var(--text);
}

.modal-fav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.15s;
    width: 100%;
    justify-content: center;
    font-family: var(--font-body);
}

.modal-fav-btn:hover,
.modal-fav-btn.favorited {
    background: #FFF0F5;
    border-color: var(--pink);
    color: var(--pink);
}

.modal-fav-btn.favorited svg {
    fill: var(--pink);
    stroke: var(--pink);
}

.modal-nav-items {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}

.modal-nav-items button {
    background: none;
    border: none;
    color: var(--teal);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 0;
    font-family: var(--font-body);
}

.modal-nav-items button:hover {
    color: var(--pink);
}

/* === Favorites Page === */
.favorites-page {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    min-height: 80vh;
    padding: 20px 16px;
}

.favorites-title {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 1px;
}

.favorites-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.favorites-empty svg {
    display: block;
    margin: 0 auto 12px;
    color: #ddd;
}

/* === Footer === */
.menu-footer {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
    text-align: center;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lang-btn {
    background: none;
    border: none;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 600;
    padding: 2px 4px;
}

.lang-btn.active {
    color: var(--teal);
}

.lang-toggle span {
    color: var(--text-muted);
}

.menu-footer-notice {
    font-size: 10px;
    color: #bbb;
    margin-bottom: 12px;
    line-height: 1.8;
}

.menu-footer-disclaimer {
    font-size: 10px;
    color: #ccc;
    font-style: italic;
    margin-bottom: 12px;
    line-height: 1.8;
}

.menu-footer-text {
    font-size: 10px;
    color: #ccc;
    line-height: 1.8;
}

/* === Loading skeleton === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-row {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.skeleton-thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
}

.skeleton-lines {
    flex: 1;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-line:nth-child(1) { width: 60%; }
.skeleton-line:nth-child(2) { width: 90%; }
.skeleton-line:nth-child(3) { width: 40%; }

/* === Responsive === */
@media (min-width: 768px) {
    .menu-header-inner,
    .menu-wrap,
    .category-tabs,
    .menu-greeting,
    .menu-banner,
    .menu-footer {
        max-width: 900px;
    }

    .category-grid {
        max-width: 900px;
        margin: 0 auto;
    }

    .item-row {
        padding: 16px 24px;
    }

    .item-thumb {
        width: 70px;
        height: 70px;
    }

    .item-name {
        font-size: 16px;
    }

    .item-desc {
        font-size: 14px;
        -webkit-line-clamp: 3;
    }

    .subcategory-pills {
        padding: 12px 24px;
    }

    .category-description {
        padding: 12px 24px;
    }

    .dietary-filters {
        padding: 10px 24px;
    }
}

@media (min-width: 1024px) {
    .menu-header-inner,
    .menu-wrap,
    .category-tabs,
    .menu-greeting,
    .menu-banner,
    .menu-footer {
        max-width: 960px;
    }

    .menu-logo img {
        height: 70px;
    }

    .category-grid {
        max-width: 960px;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 24px;
    }

    .category-card {
        height: 300px;
        border-radius: 22px;
    }

    .category-card-name {
        font-size: 16px;
        padding: 50px 16px 18px;
    }
}
