/* Import premium Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- Root & Theme Variables --- */
:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-speed: 0.3s;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

/* Day Vibe (Sandy Golden Beach) */
body.theme-day {
  --bg-color: #f7f3eb;
  --bg-gradient: radial-gradient(circle at top, #fcfaf6 0%, #f7f3eb 100%);
  --text-primary: #0d1e3d;
  --text-secondary: #5a6b82;
  --accent-gold: #c39839;
  --accent-gold-hover: #a87f2a;
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(195, 152, 57, 0.15);
  --shadow-color: rgba(13, 30, 61, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(195, 152, 57, 0.1);
  --input-bg: rgba(13, 30, 61, 0.04);
  --overlay-bg: rgba(255, 255, 255, 0.95);
  --status-bar-bg: #f7f3eb;
  --btn-quick-bg: rgba(255, 255, 255, 0.8);
  --btn-quick-border: rgba(195, 152, 57, 0.2);
}

/* Sunset Vibe (Aegean Dusk) */
body.theme-sunset {
  --bg-color: #27142a;
  --bg-gradient: linear-gradient(180deg, #1c0e20 0%, #2b1731 50%, #461f38 100%);
  --text-primary: #fff2e6;
  --text-secondary: #cba8be;
  --accent-gold: #f4a261;
  --accent-gold-hover: #e76f51;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(244, 162, 97, 0.18);
  --shadow-color: rgba(0, 0, 0, 0.25);
  --glass-bg: rgba(39, 20, 42, 0.9);
  --glass-border: rgba(244, 162, 97, 0.15);
  --input-bg: rgba(255, 255, 255, 0.06);
  --overlay-bg: rgba(28, 14, 32, 0.96);
  --status-bar-bg: #1c0e20;
  --btn-quick-bg: rgba(255, 255, 255, 0.06);
  --btn-quick-border: rgba(244, 162, 97, 0.3);
}

/* Night Vibe (Luxury Lounge) */
body.theme-night {
  --bg-color: #070e17;
  --bg-gradient: radial-gradient(circle at top, #0d1a29 0%, #070e17 100%);
  --text-primary: #f0f4f8;
  --text-secondary: #8ea1b6;
  --accent-gold: #d1b470;
  --accent-gold-hover: #b89a54;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(209, 180, 112, 0.15);
  --shadow-color: rgba(0, 0, 0, 0.45);
  --glass-bg: rgba(7, 14, 23, 0.94);
  --glass-border: rgba(209, 180, 112, 0.1);
  --input-bg: rgba(255, 255, 255, 0.04);
  --overlay-bg: rgba(7, 14, 23, 0.98);
  --status-bar-bg: #070e17;
  --btn-quick-bg: rgba(255, 255, 255, 0.03);
  --btn-quick-border: rgba(209, 180, 112, 0.2);
}

/* --- Base Styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background var(--transition-speed), color var(--transition-speed);
}

/* --- App Wrapper (Brightness Controlled) --- */
#appWrapper {
  transition: filter 0.15s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Floating Quick Settings & Tools --- */
.quick-tools {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 12px;
  z-index: 100;
}

.btn-icon-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--btn-quick-bg);
  border: 1px solid var(--btn-quick-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: all var(--transition-speed) ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-icon-round:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.btn-icon-round:active {
  transform: translateY(0);
}

/* --- Header & Branding --- */
header.hero {
  text-align: center;
  padding: 60px 20px 30px;
  position: relative;
  overflow: hidden;
}

.logo-container {
  max-width: 140px;
  margin: 0 auto 12px;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 4px 8px var(--shadow-color));
}

.logo-svg {
  width: 100%;
  height: auto;
}

/* Sun ray animation */
.sun-ray {
  transform-origin: 60px 48px;
  animation: rotateSun 40s linear infinite;
}

@keyframes rotateSun {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logo-wave {
  animation: waveMotion 4s ease-in-out infinite alternate;
}

@keyframes waveMotion {
  0% { transform: translateY(0px); }
  100% { transform: translateY(2px); }
}

header.hero h1 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 500;
}

/* --- Navigation Carousel (Sticky Categories) --- */
.nav-container {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px var(--shadow-color);
  padding: 10px 0;
  transition: background var(--transition-speed);
}

.category-nav {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px;
  gap: 12px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.category-nav::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.category-nav {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.cat-tab {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed);
}

.cat-tab.active {
  color: var(--text-primary);
  background: var(--input-bg);
  box-shadow: inset 0 0 0 1px var(--card-border);
}

/* --- Main Menu Container --- */
.menu-content {
  flex: 1;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.menu-section {
  scroll-margin-top: 140px;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--card-border) 0%, transparent 100%);
}

.items-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Menu Cards (Premium Vibe) --- */
.menu-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: all var(--transition-speed) ease;
}

.menu-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.item-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}

.item-price {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-gold);
  white-space: nowrap;
}

.item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 6px;
  font-weight: 300;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--card-border);
}

footer h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

footer p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Modals & Panels (Glassmorphism overlays) --- */
.overlay-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--overlay-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}

.overlay-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 90%;
  max-width: 440px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 50px var(--shadow-color);
  position: relative;
  overflow: hidden;
  padding: 30px 20px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-speed);
}

.btn-close:hover {
  background: var(--input-bg);
}

/* --- Language Grid Layout --- */
.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar for Language Selection List */
.lang-grid::-webkit-scrollbar {
  width: 4px;
}
.lang-grid::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 2px;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-speed);
  font-weight: 500;
}

.lang-btn .flag {
  font-size: 1.2rem;
  line-height: 1;
}

.lang-btn:hover {
  border-color: var(--accent-gold);
  background: var(--input-bg);
  transform: translateY(-1px);
}

.lang-btn.active {
  background: var(--glass-bg);
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1.5px var(--accent-gold);
}

/* --- Settings Overlay Drawer Panel --- */
.settings-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  box-shadow: 0 -10px 30px var(--shadow-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 150;
  transform: translateY(100%);
  transition: transform var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
}

.settings-panel.active {
  transform: translateY(0);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-section-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

/* --- Theme Grid Layout --- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.theme-option {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  padding: 12px 6px;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.theme-option svg {
  width: 20px;
  height: 20px;
}

.theme-option span {
  font-size: 0.75rem;
  font-weight: 500;
}

.theme-option:hover {
  border-color: var(--accent-gold);
}

.theme-option.selected {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 1.5px var(--accent-gold);
  background: var(--input-bg);
}

/* --- Slider Custom Styling --- */
.slider-container {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 14px 20px;
}

.slider-container svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--input-bg);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  transition: transform 0.1s ease;
  box-shadow: 0 2px 6px var(--shadow-color);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-gold-hover);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer;
  transition: transform 0.1s ease;
  box-shadow: 0 2px 6px var(--shadow-color);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-gold-hover);
}

/* Responsive spacing tweaks */
@media (max-width: 480px) {
  header.hero {
    padding: 50px 16px 20px;
  }
  
  header.hero h1 {
    font-size: 1.8rem;
  }
  
  .lang-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Greek Subtitle styling when foreign language is active --- */
.item-subtitle-gr {
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 400;
  opacity: 0.85;
}

/* --- Cart Buttons & Controls inside Menu Cards --- */
.item-cart-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.btn-add-to-cart {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: var(--border-radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-add-to-cart:hover {
  background: var(--accent-gold);
  color: var(--bg-color);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 3px 6px;
  background: var(--input-bg);
}

.btn-qty {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 1px 3px var(--shadow-color);
}

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

.qty-val {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 16px;
  text-align: center;
}

/* --- Floating Cart Button --- */
.btn-cart-floating {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
  transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-cart-floating:hover {
  transform: scale(1.08) translateY(-2px);
  background: var(--accent-gold-hover);
}

.btn-cart-floating:active {
  transform: scale(0.95);
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ff4a4a;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* --- Waiter Tip inside Cart Modal --- */
.waiter-tip {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-secondary);
  background: var(--input-bg);
  border-left: 3px solid var(--accent-gold);
  padding: 10px 14px;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  margin-bottom: 20px;
  font-weight: 400;
}

/* --- Cart Items List & Layout --- */
.cart-items-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 6px;
}

.cart-items-list::-webkit-scrollbar {
  width: 4px;
}
.cart-items-list::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 2px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--card-border);
  gap: 12px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.cart-item-gr {
  display: block;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 2px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-price {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-gold);
  min-width: 50px;
  text-align: right;
}

/* --- Cart Summary & Total --- */
.cart-summary {
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
}

#cartTotalPrice {
  color: var(--accent-gold);
}

.btn-clear-cart {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  border-radius: var(--border-radius-md);
  padding: 10px;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-clear-cart:hover {
  background: #ff4a4a;
  color: white;
  border-color: #ff4a4a;
}
