/* ==========================================================================
   Abla Pastanesi & Cafe - Modern Artisan Bakery Theme
   Aesthetics: Rich Caramel, Deep Espresso, Warm Cream, Gold Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --color-primary: #854D0E;          /* Warm Roasted Gold */
  --color-primary-light: #CA8A04;    /* Caramel Amber */
  --color-primary-dark: #713F12;     /* Deep Chestnut */
  --color-espresso: #20130F;         /* Rich Coffee Ground */
  --color-espresso-light: #3D271E;   /* Cafe Noir */
  --color-cream: #FEFCE8;            /* Fresh Dough Vanilla Cream */
  --color-cream-soft: #FFFBEB;       /* Warm Background Tint */
  --color-surface: #FFFFFF;
  --color-text-main: #1C1917;
  --color-text-muted: #78716C;
  --color-text-light: #A8A29E;
  --color-border: #E7E5E4;
  --color-border-warm: #FDE68A;
  
  /* Status Colors */
  --badge-popular-bg: #FEF3C7;
  --badge-popular-text: #92400E;
  --badge-fresh-bg: #DCFCE7;
  --badge-fresh-text: #166534;
  --badge-out-bg: #FEE2E2;
  --badge-out-text: #991B1B;

  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 8px rgba(32, 19, 15, 0.04);
  --shadow-md: 0 8px 24px rgba(32, 19, 15, 0.08);
  --shadow-lg: 0 16px 40px rgba(32, 19, 15, 0.12);
  --shadow-warm: 0 10px 30px rgba(202, 138, 4, 0.18);
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(254, 243, 199, 0.6);

  /* Dimensions & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --max-width: 540px; /* Mobile First Centered App Layout */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: #F8F6F0;
  background-image: 
    radial-gradient(at 0% 0%, rgba(254, 243, 199, 0.4) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(253, 230, 138, 0.25) 0px, transparent 50%);
  color: var(--color-text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

#app-container {
  width: 100%;
  max-width: var(--max-width);
  background: var(--surface-color, #FAFAF7);
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.06);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 90px; /* Bottom bar space */
}

/* ==========================================================================
   Header & Store Branding
   ========================================================================== */
.hero-header {
  position: relative;
  background: linear-gradient(145deg, #2D1A13 0%, #1A0D08 100%);
  color: #FFF;
  padding: 24px 20px 28px;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-header::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(202, 138, 4, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.header-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #FDE68A;
  border: 1px solid rgba(253, 230, 138, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 8px #22C55E;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.table-badge {
  background: #CA8A04;
  color: #FFF;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(202, 138, 4, 0.4);
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.brand-avatar {
  width: 96px;
  height: 66px;
  border-radius: 18px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: #FFFBEB;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.85rem;
  color: #D6D3D1;
  margin-top: 3px;
  font-weight: 400;
}

.header-quick-info {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.info-chip {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  color: #E7E5E4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.info-chip:hover, .info-chip:active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.info-chip.wifi-btn {
  background: linear-gradient(135deg, rgba(202, 138, 4, 0.25) 0%, rgba(202, 138, 4, 0.1) 100%);
  border-color: rgba(253, 230, 138, 0.3);
  color: #FEF08A;
  font-weight: 600;
}

/* ==========================================================================
   Search & Filter Section
   ========================================================================== */
.sticky-search-wrap {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(231, 229, 228, 0.8);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 42px 12px 42px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: #FFF;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--color-text-main);
  outline: none;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px rgba(202, 138, 4, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  background: #F5F5F4;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

/* Categories Scroll Bar */
.categories-nav {
  padding: 10px 18px 6px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}

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

.cat-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: #FFF;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.cat-pill .cat-icon {
  font-size: 1.1rem;
}

.cat-pill:hover {
  border-color: var(--color-primary-light);
  color: var(--color-text-main);
}

.cat-pill.active {
  background: var(--color-espresso);
  border-color: var(--color-espresso);
  color: #FFFBEB;
  box-shadow: 0 4px 14px rgba(32, 19, 15, 0.25);
  transform: scale(1.02);
}

/* ==========================================================================
   Product Grid & Cards
   ========================================================================== */
.menu-section {
  padding: 16px 18px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-espresso);
  font-weight: 700;
}

.product-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

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

.product-card {
  background: #FFF;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(231, 229, 228, 0.85);
  box-shadow: var(--shadow-sm);
  display: flex;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-warm);
}

.product-card.out-of-stock {
  opacity: 0.65;
  filter: grayscale(40%);
}

.product-thumb-box {
  width: 125px;
  min-width: 125px;
  height: 125px;
  position: relative;
  overflow: hidden;
  background: #F5F5F4;
}

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

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

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.badge-popular {
  background: #FEF3C7;
  color: #92400E;
}

.badge-fresh {
  background: #DCFCE7;
  color: #166534;
}

.badge-out {
  background: #991B1B;
  color: #FFF;
}

.product-details {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.25;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price-tag {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.price-amount {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--color-espresso);
  font-family: var(--font-sans);
}

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

.price-unit {
  font-size: 0.72rem;
  color: var(--color-text-light);
  margin-left: 2px;
}

.quick-view-btn {
  background: #FEF3C7;
  color: #92400E;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-view-btn:hover {
  background: #FDE68A;
  transform: scale(1.1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--color-text-muted);
}

.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}

/* ==========================================================================
   Bottom Action Bar & Floating Elements
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(231, 229, 228, 0.9);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.btn-action-primary {
  flex: 1;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFF;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-action-primary:active {
  transform: scale(0.98);
}

.btn-action-secondary {
  background: #FFF;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-main);
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-action-secondary:hover {
  background: #F5F5F4;
}

.btn-maps-review {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}

/* ==========================================================================
   Footer & Admin Link
   ========================================================================== */
.site-footer {
  padding: 30px 20px 40px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--color-border);
  margin-top: 20px;
  background: #FFF;
}

.admin-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-light);
  font-size: 0.78rem;
  text-decoration: none;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px dashed #D6D3D1;
  transition: all 0.2s;
}

.admin-switch-btn:hover {
  color: var(--color-espresso);
  border-color: var(--color-primary);
  background: #FEFCE8;
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 12, 10, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-sheet {
  background: #FFF;
  width: 100%;
  max-width: var(--max-width);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 24px 20px 32px;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

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

.sheet-handle {
  width: 44px;
  height: 5px;
  background: #E7E5E4;
  border-radius: 4px;
  margin: -6px auto 18px;
}

.sheet-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: #F5F5F4;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* Product Detail Inside Sheet */
.sheet-product-img {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.sheet-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 18px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.wifi-card-content {
  text-align: center;
  padding: 10px 0;
}

.wifi-badge-large {
  width: 64px;
  height: 64px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
}

.copy-pass-box {
  background: #F5F5F4;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #20130F;
  color: #FFF;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 300;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
