/* ==========================================================================
   GÖL RESTAURANT - MENU PAGE CSS (Nova Plus UI/UX Entegrasyon)
   ========================================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --primary-color: #D4AF37;
  --primary-color-rgb: 212, 175, 55;
  --primary-text-color: #ffffff;
  --center-icon-color: #D4AF37;
  --price-color: #D4AF37;
  --bg-color: #0F1215;
  --card-bg: #1E252D;
  --text-color: #F7F9FA;
  --muted-color: #718096;
  --border-color: rgba(212, 175, 55, 0.2);
  --bottom-nav-height: 70px;
  --gold-primary: #D4AF37;
}

body.light-theme {
  --bg-color: #F7F9FA;
  --card-bg: #EDF2F7;
  --text-color: #1A202C;
  --muted-color: #718096;
  --border-color: rgba(212, 175, 55, 0.4);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }

body {
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--bottom-nav-height) + 30px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.container-fluid { width: 100%; padding: 0 15px; }
.text-center { text-align: center; }
.text-muted { color: var(--muted-color) !important; }
.small { font-size: 0.85rem; }
.fw-bold { font-weight: 700 !important; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.ms-1 { margin-left: 4px; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.p-0 { padding: 0 !important; }
.p-2 { padding: 8px; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.text-uppercase { text-transform: uppercase; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.top-0 { top: 0; }
.end-0 { right: 0; }
.border-0 { border: 0 !important; }
.rounded-circle { border-radius: 50%; }

.navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 8px 15px !important;
}

.navbar-brand {
  color: var(--gold-primary) !important;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.navbar-brand span { color: var(--gold-primary) !important; }

.lang-toggle-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; outline: none;
  color: var(--primary-text-color);
  transition: all .2s ease;
  font-size: 0.85rem;
}
.lang-toggle-btn:active { transform: scale(0.95); }

/* ── Top Banner ── */
.main-banner { width: 100%; overflow: hidden; }
.banner-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0 0 15px 15px;
}
@media (min-width: 768px) {
  .banner-img { height: 500px; }
}

/* ── Search + Legal Wrapper ── */
.search-legal-wrapper {
  margin: -20px 0 15px 0;
  position: relative;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.search-box {
  flex-grow: 1;
  position: relative;
}

.search-box input {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 15px 12px 45px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 0.9rem;
  outline: none;
}

.search-box input::placeholder { color: var(--muted-color); }

.search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-color);
}

@keyframes softPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.legal-btn {
  background: var(--card-bg);
  border: 1px solid var(--primary-color);
  border-radius: 12px;
  width: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  animation: softPulse 1.5s infinite alternate ease-in-out;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.legal-btn i { color: var(--primary-color) !important; }

/* ── Popular Section ── */
.popular-title {
  color: #ff4757 !important;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.popular-slider-container {
  overflow-x: auto;
  white-space: nowrap;
  padding: 5px 0 15px 0;
  scrollbar-width: none;
}
.popular-slider-container::-webkit-scrollbar { display: none; }

.popular-slider {
  display: flex;
  gap: 12px;
}

.fav-card {
  flex: 0 0 auto;
  width: 155px;
  background: var(--card-bg);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.fav-card:active { transform: scale(0.97); }

.fav-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}

.fav-card .fav-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 3px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  min-height: 32px;
}

.fav-card .fav-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--price-color);
}

/* ── Category Grid ── */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
@media(min-width: 768px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }

.category-card {
  height: 110px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border-color);
  background: linear-gradient(145deg, var(--card-bg), var(--bg-color));
  transition: transform 0.2s, border 0.3s, box-shadow 0.3s;
}
.category-card:active { transform: scale(0.98); }

.category-header {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  display: block;
}

.category-header img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0; transition: transform 0.4s ease;
}

.category-card:hover img,
.category-card:active img { transform: scale(1.05); }

.category-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); z-index: 1; transition: background 0.3s;
}

.category-card[aria-expanded="true"] .category-header::before {
  background: rgba(var(--primary-color-rgb), 0.6);
}

.category-title {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 2; width: 90%; text-align: center; font-weight: 800; font-size: 1.3rem;
  color: #ffffff !important; text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
  letter-spacing: 0.5px; text-transform: uppercase;
}

.category-card[aria-expanded="true"] {
  border: 3px solid var(--primary-color);
  box-shadow: 0 0 15px rgba(var(--primary-color-rgb), 0.4);
}

.category-header::after { display: none; }

.category-products-wrapper {
  grid-column: 1 / -1;
  padding-top: 5px;
  padding-bottom: 15px;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.category-products-wrapper.collapsed {
  max-height: 0 !important;
  padding: 0;
  overflow: hidden;
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media(min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card-v3 {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  cursor: pointer;
  transition: transform 0.2s;
}
.product-card-v3:active { transform: scale(0.97); }

.product-img-v3 {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.product-info-v3 {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name-v3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-desc-v3 {
  font-size: 0.75rem;
  color: var(--muted-color);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-v3 {
  margin-top: auto;
  font-weight: 700;
  color: var(--price-color);
  font-size: 1rem;
  text-align: right;
}

.product-date-v3 {
  font-size: 0.65rem;
  color: var(--muted-color);
  margin-top: 4px;
  text-align: left;
  border-top: 1px solid var(--border-color);
  padding-top: 4px;
  width: 100%;
}

.badge-v3 {
  position: absolute;
  top: 8px; left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #000;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 16px; left: 0; right: 0; margin: 0 auto;
  width: calc(100% - 32px); max-width: 400px; height: 60px;
  background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-radius: 999px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4); display: flex;
  justify-content: space-around; align-items: center; z-index: 2000; padding: 0 15px;
  transition: all 0.3s ease; animation: pulseMenu 2s infinite;
}

@keyframes pulseMenu {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0, 0.3); }
  70% { transform: scale(1.02); box-shadow: 0 0 0 15px rgba(0,0,0, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0, 0); }
}

.bottom-nav.scrolled {
  bottom: 10px; height: 48px; width: calc(100% - 64px); padding: 0 10px;
  animation: none !important; transform: scale(1); box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.bottom-nav.scrolled .nav-item-btn span { display: none; }
.bottom-nav.scrolled .nav-action-wrapper { top: -10px; }
.bottom-nav.scrolled .nav-action-btn { width: 45px; height: 45px; font-size: 1.1rem; border-width: 3px; }

.nav-action-wrapper { position: relative; top: -20px; transition: all 0.3s ease; }

.nav-action-btn {
  background: var(--card-bg);
  color: var(--center-icon-color) !important;
  width: 55px; height: 55px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2); font-size: 1.4rem;
  border: 4px solid var(--primary-color); transition: all 0.3s ease;
  text-decoration: none;
}

.nav-item-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--primary-text-color);
  opacity: 0.85;
  font-size: 0.7rem; text-decoration: none;
  gap: 3px; background: none; border: none; transition: all 0.2s;
  cursor: pointer;
}
.nav-item-btn:active, .nav-item-btn:hover {
  color: var(--primary-text-color);
  opacity: 1;
  transform: scale(1.05);
}
.nav-item-btn i { font-size: 1.1rem; }

@media(min-width: 992px) {
  .bottom-nav { display: none !important; }
  body { padding-bottom: 0 !important; }
}

/* ── Product Modal ── */
.product-modal-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-bottom: 3px solid var(--primary-color);
  display: block;
}

.modal-price { color: var(--price-color) !important; }

body.dark .modal-content { background: #1a1d20; color: #e9ecef; border: none; }
body.dark .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

.floating-close-btn {
  position: absolute;
  bottom: 25px; right: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1060;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.floating-close-btn:active { transform: scale(0.95); }

body.dark .floating-close-btn {
  background: rgba(30, 30, 30, 0.85);
  color: #f8f9fa;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Custom Modals (Non-Bootstrap) ── */
.custom-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.custom-modal-card {
  background: var(--card-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.custom-modal-header h5 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-modal-close {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.custom-modal-close:hover { opacity: 1; }

.custom-modal-body {
  padding: 20px;
}

.form-control {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  outline: none;
  font-size: 0.9rem;
  resize: vertical;
}

.btn-gold-full {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #E5C158 0%, #D4AF37 50%, #B89218 100%);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-gold-full:active { opacity: 0.85; }

.btn-outline-gold {
  padding: 8px 24px;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  background: transparent;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline-gold:hover {
  background: var(--primary-color);
  color: #fff;
}

.btn-reset-search {
  padding: 10px 24px;
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  background: transparent;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
}

/* Social Grid */
.social-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 10px; }
.social-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 15px; border-radius: 12px; text-decoration: none; color: var(--text-color);
  background: var(--bg-color); border: 1px solid var(--border-color); transition: transform 0.2s;
}
.social-btn:active { transform: scale(0.95); }
.social-btn i { font-size: 2rem; margin-bottom: 8px; }
.social-btn span { font-size: 0.85rem; font-weight: 600; }
.social-insta { color: #E1306C; }
.social-face { color: #1877F2; }
.social-google { color: #DB4437; }
.social-tiktok { color: #000; }
body.dark .social-tiktok { color: #fff; }

/* ── Footer ── */
.site-footer {
  background-color: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 30px 15px 100px 15px;
  text-align: center;
  margin-top: auto;
  border-radius: 20px 20px 0 0;
}
.site-footer p.fw-bold { color: var(--gold-primary); }
.site-footer a { color: var(--gold-primary); opacity: 0.8; text-decoration: none; }
.site-footer a:hover { opacity: 1; }

/* ── Allergen ── */
.allergen-item { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.allergen-icon { width: 24px !important; height: 24px !important; min-width: 24px; color: #444; }
.allergen-icon svg { width: 100%; height: 100%; fill: currentColor; }
.allergen-icon .icon-circle { fill: currentColor; opacity: 0.15; }
.allergen-icon .icon-text { fill: currentColor; font-weight: 700; font-size: 13px; }
body.dark .allergen-icon { color: #f5f5f5 !important; }

.allergen-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(var(--primary-color-rgb), 0.12);
  color: var(--primary-color);
  border: 1px solid rgba(var(--primary-color-rgb), 0.25);
}

/* ── Desktop Overrides ── */
@media (min-width: 992px) {
  .category-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
  }
  .category-card {
    width: 100% !important;
    height: 150px !important;
    margin-bottom: 20px !important;
  }
  .category-title { font-size: 24px !important; }
  .product-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
  }
  .navbar { padding: 15px 5% !important; }
  .main-banner { max-width: 1200px; margin: 20px auto 0 auto !important; }
  .banner-img { height: 500px !important; border-radius: 15px !important; }
}

@media (min-width: 1400px) {
  .product-grid { grid-template-columns: repeat(5, 1fr) !important; }
}
