/* Design System for Struga Restaurant Digital Menu */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* CSS Custom Variables for Theme / Brightness Controls */
:root {
  /* Default: Light Mode (Parchment Paper Theme) */
  --bg-primary: #f8f3eb;
  --bg-secondary: #f4edd3;
  --bg-card: #fcfbf7;
  --text-primary: #2b1f1d;
  --text-secondary: #6e5e5b;
  --accent: #8c6239;
  --accent-light: #cfa161;
  --accent-hover: #b0824b;
  --border-color: #e3d9c3;
  --shadow: rgba(43, 31, 29, 0.08);
  --shadow-hover: rgba(43, 31, 29, 0.15);
  --card-radius: 16px;
  
  /* Paper Texture Effects */
  --paper-grain: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.03) 100%);
  --paper-color: #f7f1e5;
  
  /* Header heights */
  --header-height: 80px;
  --tabs-height: 60px;
}

/* Dark Mode Theme overrides (Triggers when .dark-theme is active) */
:root.dark-theme {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-card: #181818;
  --text-primary: #f5f5f5;
  --text-secondary: #aaaaaa;
  --accent: #d4af37; /* Metallic Gold */
  --accent-light: #cfa161;
  --accent-hover: #e5c158;
  --border-color: #2b2721;
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-hover: rgba(212, 175, 55, 0.1);
  --paper-grain: linear-gradient(rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  position: relative;
}

/* Paper Texture background wrapper (Light Theme only, dark gets solid) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  background-color: var(--bg-primary);
  background-image: 
    var(--paper-grain),
    radial-gradient(var(--bg-card) 10%, transparent 11%),
    radial-gradient(var(--bg-card) 10%, transparent 11%);
  background-size: 100% 100%, 8px 8px, 8px 8px;
  background-position: 0 0, 0 0, 4px 4px;
  opacity: 0.85;
  pointer-events: none;
}

h1, h2, h3, h4, .font-serif {
  font-family: 'Playfair Display', serif;
}

/* Sticky Header styling */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(248, 243, 235, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.dark-theme header {
  background-color: rgba(10, 10, 10, 0.95);
}

/* Logo container */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-container img {
  height: 55px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px var(--shadow));
}

.restaurant-title-group {
  display: flex;
  flex-direction: column;
}

.restaurant-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.restaurant-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

/* Controls (Theme + Lang + Cart) */
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Brightness Slider Control */
.brightness-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brightness-icon {
  font-size: 1.2rem;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease;
}

.brightness-icon:hover {
  transform: rotate(30deg);
}

/* Language Dropdown Selector styling */
.lang-selector-wrapper {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px var(--shadow);
}

.lang-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, 140px);
  gap: 4px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 110;
}

.lang-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 0.8rem;
  font-weight: 500;
}

.lang-option:hover {
  background-color: var(--bg-secondary);
}

.lang-option.active {
  background-color: var(--bg-secondary);
  color: var(--accent);
}

.flag-icon {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Floating Cart Badge styling */
.cart-trigger {
  position: relative;
  background-color: var(--accent);
  border: none;
  color: #ffffff;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 10px var(--shadow);
  transition: all 0.3s ease;
}

.cart-trigger:hover {
  background-color: var(--accent-hover);
  transform: scale(1.05);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff3b30;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--bg-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Sticky Category Navigation Menu styling */
.category-tabs-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: var(--tabs-height);
  background-color: rgba(244, 237, 211, 0.95);
  border-bottom: 1px solid var(--border-color);
  z-index: 90;
  display: flex;
  overflow-x: auto;
  align-items: center;
  padding: 0 20px;
  scrollbar-width: none;
}

.dark-theme .category-tabs-nav {
  background-color: rgba(18, 18, 18, 0.95);
}

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

.category-tab {
  flex: 0 0 auto;
  padding: 8px 18px;
  margin-right: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
}

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

.category-tab.active {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--shadow);
}

/* Main Content Page Container */
.menu-main-content {
  margin-top: calc(var(--header-height) + var(--tabs-height) + 20px);
  padding: 20px 5%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Section Header styling */
.menu-section {
  scroll-margin-top: calc(var(--header-height) + var(--tabs-height) + 20px);
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s forwards ease;
}

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

.section-title-wrapper {
  display: flex;
  flex-direction: column;
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
}

.section-title-greek {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 2px;
}

/* Grid of Items */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

/* Menu Item Card styling */
.menu-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 20px;
  box-shadow: 0 4px 15px var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Crumpled look overlay for card background (Light Theme) */
.menu-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.4) 0%, rgba(0,0,0,0.01) 100%);
  z-index: 1;
  pointer-events: none;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow-hover);
  border-color: var(--accent-light);
}

.card-top {
  position: relative;
  z-index: 2;
  margin-bottom: 15px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.item-number-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.item-number {
  color: var(--accent);
  font-family: 'Outfit', sans-serif;
  margin-right: 4px;
}

.item-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  white-space: nowrap;
}

/* Greek translation subtitle (Visible in dual language mode) */
.greek-translation-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-style: italic;
  border-left: 2px solid var(--accent-light);
  padding-left: 8px;
}

/* Descriptions */
.item-description {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-top: 10px;
}

.item-description-greek {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 6px;
  opacity: 0.85;
}

/* Add Button */
.card-bottom {
  position: relative;
  z-index: 2;
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
}

.add-btn {
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px var(--shadow);
  transition: all 0.3s ease;
}

.add-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.add-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Order Summary drawer / Slide-up Cart */
.order-drawer {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 450px;
  max-width: 100%;
  height: 100vh;
  background-color: var(--bg-card);
  box-shadow: -5px 0 30px rgba(0,0,0,0.15);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border-color);
}

.order-drawer.open {
  transform: translateX(0);
}

.order-drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-secondary);
}

.order-drawer-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.close-drawer-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Cart Items Container */
.order-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px dashed var(--border-color);
  animation: fadeIn 0.3s ease;
}

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

.order-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 60%;
}

.order-item-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.order-item-title-greek {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.order-item-qty-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.qty-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.order-item-price-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.order-item-price {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--accent);
}

/* Empty State */
.empty-cart-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 60%;
  text-align: center;
  color: var(--text-secondary);
  padding: 30px;
}

.empty-cart-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

/* Drawer Footer */
.order-drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 1.25rem;
  font-weight: 700;
}

.order-total-val {
  color: var(--accent);
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
}

.show-waiter-btn {
  width: 100%;
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all 0.3s ease;
}

.show-waiter-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* Waiter Presentation Screen / Modal */
.waiter-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.98);
  z-index: 300;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.waiter-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.waiter-modal-content {
  background-color: #ffffff;
  color: #111111;
  width: 600px;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.waiter-modal-header {
  padding: 20px;
  background-color: #8c6239;
  color: white;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.waiter-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.waiter-modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
}

.waiter-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
}

.waiter-instr-text {
  font-size: 0.9rem;
  color: #555555;
  margin-bottom: 25px;
  line-height: 1.5;
  border-left: 4px solid #8c6239;
  padding-left: 12px;
}

/* Massive display items list for waiter */
.waiter-items-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.waiter-item-card {
  border: 2px solid #8c6239;
  background-color: #fcfbf9;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.waiter-item-left {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.waiter-item-num-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  background-color: #8c6239;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.waiter-item-names {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.waiter-item-greek {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111111;
}

.waiter-item-translated {
  font-size: 0.95rem;
  color: #666666;
}

.waiter-item-qty {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  background-color: #f3edd3;
  color: #8c6239;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #cfa161;
}

/* Footer terms and notes */
.menu-footer {
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo {
  height: 70px;
  width: auto;
  filter: drop-shadow(0 2px 4px var(--shadow));
}

.footer-address {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-terms {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.5;
}

.footer-socials {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-icon {
  color: var(--accent);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.social-icon:hover {
  transform: scale(1.1);
}

/* Overlay for Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .restaurant-title-group {
    display: none; /* Hide text on small mobile, show just logo image */
  }
  
  .lang-dropdown {
    grid-template-columns: repeat(1, 140px);
    right: -20px;
  }
  
  .lang-btn {
    padding: 6px 10px;
  }
  
  .menu-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .order-drawer {
    width: 100%;
  }
  
  .waiter-modal-content {
    max-height: 95vh;
  }
  
  .waiter-item-greek {
    font-size: 1.1rem;
  }
  
  .waiter-item-num-badge {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  
  .waiter-item-qty {
    font-size: 1.4rem;
    padding: 4px 10px;
  }
}

/* Chef Banner Styles */
.chef-banner-section {
  width: 100%;
  margin-bottom: 40px;
}
.chef-banner-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 25px;
  box-shadow: 0 4px 15px var(--shadow);
  display: flex;
  align-items: center;
  gap: 25px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.chef-banner-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(207, 161, 97, 0.05) 0%, transparent 100%);
  pointer-events: none;
}
.chef-banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-hover);
  border-color: var(--accent-light);
}
.chef-photo-container {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}
.chef-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent-light);
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.3s ease;
}
.chef-banner-card:hover .chef-photo {
  transform: scale(1.05);
}
.chef-badge {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  font-family: 'Outfit', sans-serif;
}
.chef-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chef-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}
.chef-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-style: italic;
}
.chef-welcome-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .chef-banner-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 15px;
  }
  .chef-photo-container {
    width: 100px;
    height: 100px;
  }
  .chef-title {
    font-size: 1.5rem;
  }
  .chef-subtitle {
    font-size: 0.9rem;
  }
  .chef-welcome-text {
    font-size: 0.85rem;
  }
}
