/* ============================================================================
   TasteHaste — Premium Minimalist Customer-Facing Stylesheet
   ============================================================================ */

:root {
    --bg: #fafaf9;
    --surface: #ffffff;
    --text: #1c1917;
    --text-muted: #78716c;
    --border: #e7e5e4;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fef3c7;
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --transition: 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: none; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a {
    font-size: 0.9375rem; font-weight: 500; color: var(--text-muted);
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.cart-btn {
    position: relative; display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: var(--radius-sm);
    background: var(--text); color: #fff;
    font-size: 0.875rem; font-weight: 600;
    transition: transform var(--transition), background var(--transition);
}
.cart-btn:hover { background: var(--accent); }
.cart-btn:active { transform: scale(0.97); }
.cart-count {
    position: absolute; top: -6px; right: -6px;
    background: var(--accent); color: #fff;
    font-size: 0.6875rem; font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
}

/* Hero */
.hero {
    position: relative; overflow: hidden;
    padding: 4rem 0 5rem;
    background: linear-gradient(135deg, #1c1917 0%, #292524 100%);
    color: #fff;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245,158,11,0.15) 0%, transparent 50%);
}
.hero-content { position: relative; max-width: 640px; }
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700; line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}
.hero p {
    font-size: 1.125rem; color: rgba(255,255,255,0.7);
    margin-bottom: 2rem; max-width: 480px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--accent); color: #1c1917;
    border-radius: var(--radius-sm); font-weight: 600;
    font-size: 0.9375rem;
    transition: transform var(--transition), background var(--transition);
}
.btn-primary:hover { background: #fbbf24; }
.btn-primary:active { transform: scale(0.97); }
.btn-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent; color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm); font-weight: 600;
    font-size: 0.9375rem;
    transition: border-color var(--transition), background var(--transition);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.05); }

/* Section */
.section { padding: 4rem 0; }
.section-title {
    font-family: var(--font-display);
    font-size: 2rem; font-weight: 700;
    letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 2.5rem; }

/* Category tabs */
.category-tabs {
    display: flex; gap: 0.5rem; overflow-x: auto;
    padding-bottom: 0.5rem; margin-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.category-tabs::-webkit-scrollbar { height: 4px; }
.category-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.tab-btn {
    padding: 0.5rem 1.25rem; border-radius: 100px;
    font-size: 0.875rem; font-weight: 500;
    white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}
.tab-btn:hover { border-color: var(--accent); color: var(--text); }
.tab-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Menu grid */
.menu-grid {
    display: grid; gap: 1rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .menu-grid { grid-template-columns: repeat(3, 1fr); } }

.menu-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex; flex-direction: column;
}
.menu-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.menu-card-image {
    width: 100%; height: 180px;
    border-radius: var(--radius-sm);
    object-fit: cover; margin-bottom: 1rem;
    background: var(--bg);
}
.menu-card-name { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.25rem; }
.menu-card-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; flex: 1; }
.menu-card-footer {
    display: flex; align-items: center; justify-content: space-between;
}
.menu-card-price { font-size: 1.125rem; font-weight: 700; }
.add-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--text); color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem; font-weight: 600;
    transition: all var(--transition);
}
.add-btn:hover { background: var(--accent); color: #1c1917; }
.add-btn:active { transform: scale(0.95); }

/* Cart drawer */
.cart-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.4);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
    width: 100%; max-width: 420px;
    background: var(--surface);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 1.125rem; font-weight: 600; }
.cart-close { font-size: 1.5rem; color: var(--text-muted); line-height: 1; padding: 0.25rem; }
.cart-close:hover { color: var(--text); }
.cart-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty { text-align: center; padding: 3rem 0; color: var(--text-muted); }
.cart-empty .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }
.cart-item {
    display: flex; gap: 1rem; padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.9375rem; font-weight: 500; margin-bottom: 0.25rem; }
.cart-item-price { font-size: 0.8125rem; color: var(--text-muted); }
.cart-item-controls { display: flex; align-items: center; gap: 0.5rem; }
.qty-btn {
    width: 28px; height: 28px;
    border: 1px solid var(--border); border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; font-weight: 600;
    transition: all var(--transition);
}
.qty-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.qty-display { min-width: 24px; text-align: center; font-size: 0.875rem; font-weight: 600; }
.cart-item-remove { color: var(--danger); font-size: 0.75rem; margin-left: 0.5rem; }
.cart-item-remove:hover { text-decoration: underline; }
.cart-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 0.25rem 0; font-size: 0.9375rem; }
.cart-summary-row.total { font-weight: 700; font-size: 1.125rem; padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: 0.5rem; }
.cart-checkout-btn {
    width: 100%; padding: 0.875rem; margin-top: 1rem;
    background: var(--accent); color: #1c1917;
    border-radius: var(--radius-sm); font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition);
}
.cart-checkout-btn:hover { background: #fbbf24; }
.cart-checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text); margin-bottom: 0.375rem; }
.form-label .req { color: var(--danger); }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 0.75rem 1rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 0.9375rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}
.form-input.error { border-color: var(--danger); }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 0.25rem; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* Radio cards */
.radio-group { display: grid; gap: 0.75rem; }
.radio-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem; border: 2px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: all var(--transition);
}
.radio-card:hover { border-color: var(--accent); }
.radio-card.selected { border-color: var(--accent); background: var(--accent-light); }
.radio-card input { accent-color: var(--accent); }
.radio-card-label { font-weight: 600; font-size: 0.9375rem; }
.radio-card-desc { font-size: 0.8125rem; color: var(--text-muted); }

/* Checkout */
.checkout-page { padding: 2rem 0 4rem; }
.checkout-grid {
    display: grid; gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 1024px) { .checkout-grid { grid-template-columns: 1fr 400px; } }
.checkout-summary {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    position: sticky; top: 80px; align-self: start;
}
.summary-row { display: flex; justify-content: space-between; padding: 0.375rem 0; font-size: 0.9375rem; }
.summary-row.total { font-weight: 700; font-size: 1.125rem; padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: 0.5rem; }
.summary-items { margin-bottom: 1rem; }
.summary-item { display: flex; justify-content: space-between; padding: 0.25rem 0; font-size: 0.875rem; color: var(--text-muted); }

/* Order success */
.success-page { padding: 4rem 0; text-align: center; }
.success-icon {
    width: 72px; height: 72px; margin: 0 auto 1.5rem;
    border-radius: 50%; background: rgba(34,197,94,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--success);
}
.success-page h1 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.5rem; }
.success-page p { color: var(--text-muted); margin-bottom: 2rem; }
.order-details {
    max-width: 500px; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; text-align: left;
}
.order-details h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.order-detail-row { display: flex; justify-content: space-between; padding: 0.375rem 0; font-size: 0.9375rem; }
.order-detail-row.total { font-weight: 700; padding-top: 0.75rem; border-top: 1px solid var(--border); margin-top: 0.5rem; }

/* Info cards */
.info-grid {
    display: grid; gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.75rem;
}
.info-card-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--accent-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 1rem;
}
.info-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.info-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* Footer */
.site-footer {
    background: #1c1917; color: rgba(255,255,255,0.6);
    padding: 3rem 0 2rem; margin-top: 4rem;
}
.footer-grid {
    display: grid; gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-col h4 { color: #fff; font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col p, .footer-col a { font-size: 0.875rem; line-height: 1.8; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem; margin-top: 2rem;
    text-align: center; font-size: 0.8125rem;
}

/* Toast */
.toast {
    position: fixed; bottom: 1.5rem; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text); color: #fff;
    padding: 0.75rem 1.5rem; border-radius: 100px;
    font-size: 0.875rem; font-weight: 500;
    z-index: 300; opacity: 0;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Mobile menu */
.mobile-menu-btn { display: flex; align-items: center; padding: 0.5rem; }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }
.mobile-nav { display: none; padding: 1rem 0; border-top: 1px solid var(--border); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 0.75rem 0; font-size: 0.9375rem; color: var(--text-muted); }

/* Loading */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Badge */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 100px; font-size: 0.6875rem; font-weight: 600;
    background: var(--accent-light); color: var(--accent-dark);
}
.badge.success { background: rgba(34,197,94,0.1); color: var(--success); }
.badge.danger { background: rgba(239,68,68,0.1); color: var(--danger); }
