/* ========================================================
   THE PITA BAR TAIPEI - MAIN STYLESHEET
   Mediterranean Aesthetic, Responsive, Accessible, Fast
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
  /* Color Palette */
  --primary: #c8532f;           /* Warm Mediterranean Terracotta */
  --primary-hover: #b04321;
  --primary-light: #faede8;
  --primary-gradient: linear-gradient(135deg, #c8532f 0%, #e06d48 100%);
  
  --secondary: #2b533d;         /* Olive Green */
  --secondary-hover: #224230;
  --secondary-light: #edf4ef;
  
  --accent-gold: #d49419;       /* Honey Gold */
  --accent-gold-light: #fef7e8;
  --accent-blue: #1d5f8a;       /* Aegean Blue */
  --accent-blue-light: #eaf3f9;
  
  --dark: #191c1a;              /* Rich Charcoal */
  --dark-soft: #2d3330;
  --text-main: #272d2a;
  --text-muted: #626c66;
  --text-light: #8a948e;
  
  --bg-page: #faf8f5;           /* Warm Sand/Cream */
  --bg-surface: #ffffff;
  --bg-surface-alt: #f4f0eb;
  
  --border-light: #e9e3da;
  --border-focus: #c8532f;
  
  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(25, 28, 26, 0.05);
  --shadow-sm: 0 4px 12px rgba(25, 28, 26, 0.06);
  --shadow-md: 0 8px 24px rgba(25, 28, 26, 0.08);
  --shadow-lg: 0 16px 40px rgba(25, 28, 26, 0.12);
  --shadow-hover: 0 12px 30px rgba(200, 83, 47, 0.18);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --max-width: 1240px;
  --header-height: 76px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Noto Sans TC', sans-serif;
  color: var(--dark);
  font-weight: 700;
  line-height: 1.25;
}

/* ========================================================
   CONTAINER & UTILITY
   ======================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.badge-secondary {
  background-color: var(--secondary-light);
  color: var(--secondary);
}

.badge-gold {
  background-color: var(--accent-gold-light);
  color: var(--accent-gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  transition: all var(--trans-base);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(200, 83, 47, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 83, 47, 0.45);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-outline {
  border: 1.5px solid var(--border-light);
  background-color: var(--bg-surface);
  color: var(--dark);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.btn-outline-white {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #ffffff;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
  background: #ffffff;
  color: var(--dark);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* ========================================================
   HEADER & NAVIGATION
   ======================================================== */
.top-announcement {
  background: var(--dark);
  color: #ffffff;
  font-size: 0.82rem;
  padding: 8px 16px;
  text-align: center;
  letter-spacing: 0.02em;
}

.top-announcement a {
  color: var(--accent-gold);
  text-decoration: underline;
  margin-left: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
  transition: all var(--trans-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.98);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img {
  height: 48px;
  width: auto;
  border-radius: 6px;
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--dark);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark-soft);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-btn-wrapper {
  position: relative;
}

.cart-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--trans-fast);
}

.cart-nav-btn:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  color: var(--primary);
}

.cart-badge {
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--dark);
  padding: 8px;
}

@media (max-width: 992px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-surface);
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  transition: right var(--trans-base);
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-base);
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.mobile-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-link {
  font-size: 1.15rem;
  font-weight: 600;
  padding: 10px 0;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.mobile-link.active {
  color: var(--primary);
}

/* ========================================================
   FLOATING CART LAUNCHER
   ======================================================== */
.floating-cart-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 990;
  background: var(--dark);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-base);
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.floating-cart-pill:hover {
  transform: translateY(-4px) scale(1.02);
  background: var(--primary);
  box-shadow: var(--shadow-hover);
}

.floating-cart-pill.empty {
  display: none;
}

/* ========================================================
   CART DRAWER & ORDERING MODAL
   ======================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 100%;
  max-width: 460px;
  height: 100vh;
  background-color: var(--bg-surface);
  z-index: 2100;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: right var(--trans-base);
}

.cart-drawer.open {
  right: 0;
}

.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2050;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-base);
}

.cart-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-header {
  padding: 20px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark);
}

.cart-item-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--primary);
  margin-top: 4px;
}

.cart-item-price {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  margin-top: 4px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all var(--trans-fast);
}

.qty-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.qty-val {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.remove-btn {
  color: var(--text-light);
  padding: 4px;
  transition: color var(--trans-fast);
}

.remove-btn:hover {
  color: #dc2626;
}

.cart-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.cart-empty-state svg {
  margin: 0 auto 16px;
  color: var(--text-light);
}

.cart-footer {
  padding: 20px 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.order-type-picker {
  display: flex;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}

.order-type-btn {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  transition: all var(--trans-fast);
  color: var(--text-muted);
}

.order-type-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.order-notes-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  margin-bottom: 14px;
  background: var(--bg-page);
}

.order-notes-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-summary-line.total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer {
  background: var(--dark);
  color: #d1d8d4;
  padding: 70px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.footer-brand p {
  color: #9ea9a2;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--primary);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #b0bcb4;
  font-size: 0.9rem;
  transition: color var(--trans-fast);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: #b0bcb4;
}

.footer-info-item svg {
  flex-shrink: 0;
  color: var(--accent-gold);
  margin-top: 3px;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #7b8880;
  flex-wrap: wrap;
  gap: 16px;
}

/* ========================================================
   TOAST NOTIFICATIONS
   ======================================================== */
.toast-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--dark);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.toast.toast-success {
  background: #1e3a29;
  border-color: #38a169;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* Language Selector */
.lang-selector {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-alt);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px 5px;
  gap: 2px;
}

.lang-btn {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: all var(--trans-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  line-height: 1.2;
}

.lang-btn:hover {
  color: var(--primary);
}

.lang-btn.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(200, 83, 47, 0.3);
}

.lang-divider {
  font-size: 0.72rem;
  color: var(--border-light);
  user-select: none;
}

/* Header Booking Button Responsive */
.btn-header-book {
  display: inline-flex;
}
@media (max-width: 768px) {
  .btn-header-book {
    display: none !important;
  }
}

/* Top Announcement bar language selector styling */
.top-announcement .lang-selector {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.top-announcement .lang-btn {
  color: rgba(255, 255, 255, 0.85);
}
.top-announcement .lang-btn:hover {
  color: #ffffff;
}
.top-announcement .lang-btn.active {
  background: var(--accent-gold);
  color: var(--dark);
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.top-announcement .lang-divider {
  color: rgba(255, 255, 255, 0.4);
}
