/* ══════════════════════════════════════════════════════
   Safid by SORI TOUR — Elegant Cafe Menu
   Palette: ivory / graphite / sand / coffee
   ══════════════════════════════════════════════════════ */

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

:root {
    /* ── Core palette ── */
    --ivory: #f7f4ef;
    --ivory-warm: #f3efe8;
    --cream: #ece7de;
    --sand: #ddd6c9;
    --taupe: #c8bfb1;
    --graphite: #2a2a28;
    --graphite-soft: #3d3d3a;
    --coffee: #8b7355;
    --coffee-light: #a08b6e;
    --coffee-pale: rgba(240, 139, 38, 0.12);

    /* ── Semantic tokens ── */
    --bg: var(--ivory);
    --bg-card: #ffffff;
    --bg-secondary: var(--ivory-warm);
    --text-primary: var(--graphite);
    --text-secondary: #6b6860;
    --text-muted: #9e978c;
    --border: #e5dfd6;
    --border-light: #eee9e1;
    --accent: #F08B26;
    --accent-hover: #d97a1d;

    /* ── Spacing & shape ── */
    --r: 12px;
    --r-sm: 8px;
    --r-lg: 16px;
    --max-w: 460px;
    --shadow-sm: 0 1px 4px rgba(42, 42, 40, 0.04);
    --shadow: 0 2px 12px rgba(42, 42, 40, 0.05);
    --shadow-lg: 0 8px 32px rgba(42, 42, 40, 0.07);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* ══ Container ══ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ══ Header ══ */
.header {
    text-align: center;
    padding: 48px 20px 32px;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sand), transparent);
}

.cafe-name {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 300;
    font-size: 2.8rem;
    color: var(--graphite);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 6px;
}

.cafe-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.logo-container {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

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

.hours-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ══ Language switcher ══ */
.lang-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
}

.lang-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
}

.lang-btn {
    padding: 7px 18px;
    border-radius: 100px;
    border: 1px solid transparent;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--graphite);
    color: #ffffff;
    border-color: var(--graphite);
}

/* ══ WiFi bar ══ */
.wifi-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 14px 20px;
    border-radius: var(--r);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.wifi-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wifi-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    background: var(--coffee-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--accent);
}

.wifi-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wifi-pass {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--text-primary);
}

.wifi-copy-btn {
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.03em;
}

.wifi-copy-btn:hover,
.wifi-copy-btn.copied {
    background: var(--graphite);
    border-color: var(--graphite);
    color: #ffffff;
}

/* ══ Menu Section ══ */
.menu-section {
    margin-top: 8px;
}

.menu-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    padding-left: 2px;
}

/* ══ Category ══ */
.category {
    margin-bottom: 24px;
}

.cat-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.cat-name {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.cat-count {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ══ Menu Items ══ */
.cat-items {
    padding: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.item-name {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.item-dot {
    flex: 1;
    height: 1px;
    margin: 0 12px;
    background: repeating-linear-gradient(90deg,
            var(--taupe) 0px,
            var(--taupe) 2px,
            transparent 2px,
            transparent 6px);
    opacity: 0.4;
    min-width: 20px;
}

.item-price {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
}

/* ══ Decorative divider between categories ══ */
.cat-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    margin-bottom: 24px;
}

.cat-divider::before,
.cat-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sand), transparent);
}

.cat-divider-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--taupe);
    margin: 0 16px;
}

/* ══ Links section ══ */
.links-section {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.link-card:hover {
    border-color: var(--taupe);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.link-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: var(--coffee-pale);
}

.link-text {
    flex: 1;
}

.link-title {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.link-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.link-arrow {
    font-size: 0.8rem;
    color: var(--taupe);
    transition: transform 0.2s ease;
}

.link-card:hover .link-arrow {
    transform: translateX(3px);
}

/* ══ Review CTA ══ */
.review-section {
    margin-top: 28px;
    padding: 32px 24px;
    border-radius: var(--r-lg);
    background: var(--ivory-warm);
    border: 1px solid var(--border-light);
    text-align: center;
}

.review-section h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.review-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.review-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 100px;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.review-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(240, 139, 38, 0.2);
}

.review-btn.secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.review-btn.secondary:hover {
    border-color: var(--taupe);
    background: rgba(255, 255, 255, 0.6);
}

/* ══ Footer ══ */
.footer {
    margin-top: 40px;
    text-align: center;
    padding: 24px 20px;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--accent-hover);
}

.footer .footer-line {
    display: block;
    margin-top: 4px;
}

/* ══ Animations ══ */
.fade-in {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(1) {
    animation-delay: 0.05s;
}

.fade-in:nth-child(2) {
    animation-delay: 0.1s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.15s;
}

.fade-in:nth-child(4) {
    animation-delay: 0.2s;
}

.fade-in:nth-child(5) {
    animation-delay: 0.25s;
}

.fade-in:nth-child(6) {
    animation-delay: 0.3s;
}

.fade-in:nth-child(7) {
    animation-delay: 0.35s;
}

.fade-in:nth-child(8) {
    animation-delay: 0.4s;
}

/* ══ Desktop centering ══ */
@media (min-width: 520px) {
    body {
        background: #eae5dc;
    }

    .container {
        margin-top: 24px;
        margin-bottom: 24px;
        background: var(--bg);
        border-radius: var(--r-lg);
        padding: 0 20px 60px;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-light);
    }

    .lang-bar {
        background: var(--bg);
        border-radius: var(--r-lg) var(--r-lg) 0 0;
    }
}

/* ══ Subtle hover on menu items ══ */
.menu-item:hover .item-name {
    color: var(--accent);
}

/* ══ Popular Section ══ */
.special-section {
    margin-bottom: 32px;
}

.popular-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

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

.popular-card {
    min-width: 140px;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: var(--r);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.popular-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--taupe);
}

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

.popular-img-placeholder {
    width: 100%;
    height: 100px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
}

.popular-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.popular-name {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.2;
}

/* ══ List Item Images & Badges ══ */
.item-img-small {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid var(--border-light);
}

.popular-badge {
    color: var(--accent);
    font-size: 0.9rem;
    margin-left: 6px;
    align-self: flex-start;
}

/* ══ Review Popup ══ */
.review-popup {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.review-popup.show {
    bottom: 24px;
    opacity: 1;
    visibility: visible;
}

.review-popup .rp-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 600;
}

.review-popup .rp-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.review-popup .rp-btns {
    display: flex;
    gap: 8px;
    width: 100%;
}

.review-popup .review-btn {
    flex: 1;
    justify-content: center;
}

.review-popup .review-btn.secondary {
    flex: 0 0 44px;
    padding: 0;
}