/* ============================================================
   Stone House Foça QR Menü — Ana Stil
   v3.0 — Mobile → Tablet → Desktop Responsive
   ============================================================ */

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

/* ============================================================
   CSS Değişkenleri
   ============================================================ */
:root {
  --primary:        #AA907B;
  --primary-dark:   #8D745E;
  --primary-light:  #F5F1ED;
  --primary-mid:    #D4C7BB;
  --accent:         #C5A992;
  --bg:             #f4f5f7;
  --card-bg:        #ffffff;
  --text:           #1a1a1a;
  --text-muted:     #6b6b6b;
  --text-light:     #b0b0b0;
  --border:         #e8e8e8;
  --shadow-sm:      0 1px 4px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10), 0 8px 32px rgba(0,0,0,.06);
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --radius-pill:    999px;
  --font:           'Inter', system-ui, -apple-system, sans-serif;
  --transition:     .22s cubic-bezier(.4,0,.2,1);

  /* Layout boyutları */
  --sidebar-w:      220px;
  --header-h:       70px;
}

.d-mobile-none { display: none; }
@media (min-width: 768px) { .d-mobile-none { display: block; } }

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
}

/* Hide Scrollbar */
::-webkit-scrollbar {
  display: none;
}
html {
  scrollbar-width: none; /* Firefox */
}
body {
  -ms-overflow-style: none; /* IE/Edge */
}

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

/* ============================================================
   Sayfa Sarmalayıcı — Mobile First (max 480px)
   ============================================================ */
.page-wrap {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

/* ============================================================
   HEADER — Logo + Dil Seçici
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
  height: var(--header-h);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.logo-placeholder {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -.4px;
}

.logo-leaf {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(170,144,123,.3);
}

/* Dil Seçici */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 3px;
  border: 1px solid var(--border);
}

.lang-btn {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  display: inline-block;
  letter-spacing: .3px;
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--card-bg);
  color: var(--primary-dark);
  box-shadow: 0 1px 4px rgba(0,0,0,.10);
}

/* ============================================================
   SLIDER / HERO BANNER — Mobile
   ============================================================ */
.slider-section {
  overflow: hidden;
  padding: 12px 0 8px;
}

.swiper { width: 100%; }

.slider-card {
  background: linear-gradient(135deg, #fff9f0 0%, #fffdfa 50%, #fde6c1 100%);
  border-radius: var(--radius-lg);
  margin: 0 16px;
  padding: 24px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 152px;
  position: relative;
  overflow: hidden;
}

.slider-card::before {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 220px;
  height: 220px;
  background: rgba(170,144,123,.07);
  border-radius: 50%;
}

.slider-card::after {
  content: '';
  position: absolute;
  right: 60px;
  bottom: -50px;
  width: 150px;
  height: 150px;
  background: rgba(197,169,146,.05);
  border-radius: 50%;
}

.slider-text {
  flex: 1;
  z-index: 1;
  padding-right: 12px;
}

.slider-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  font-style: italic;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 6px;
}

.slider-text p {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  line-height: 1.45;
}

.slider-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 1;
  border: 3px solid rgba(255,255,255,.6);
}

.slider-image-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-mid), #a8d57c);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(170,144,123,.2);
}

/* Swiper pagination */
.swiper-pagination { bottom: 4px !important; }

.swiper-pagination-bullet {
  background: var(--primary);
  opacity: .35;
  width: 6px;
  height: 6px;
  transition: all var(--transition);
}

.swiper-pagination-bullet-active {
  opacity: 1;
  width: 18px;
  border-radius: 3px;
}

/* ============================================================
   ARAMA BARI
   ============================================================ */
.search-section {
  padding: 10px 16px;
  background: var(--bg);
  position: sticky;
  top: calc(var(--header-h) + var(--tabs-h) - 1px);
  z-index: 85;
  box-shadow: 0 4px 10px -5px rgba(0,0,0,0.05);
}

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

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
  width: 16px;
  height: 16px;
}

.search-input {
  width: 100%;
  padding: 13px 16px 13px 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(170,144,123,.12), var(--shadow-sm);
}

.search-input::placeholder { color: var(--text-light); }

.no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  display: none;
  grid-column: 1 / -1; /* grid içinde tam genişlik */
}

.no-results-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: .5;
}

/* ============================================================
   KATEGORİ GRID YAPISI
   ============================================================ */
.category-grid-container {
  padding: 20px 16px;
  animation: fadeIn 0.5s ease;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.category-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid var(--border);
}

.category-card:active {
  transform: scale(0.96);
}

.category-card-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.75);
  transition: transform 0.6s ease, filter 0.3s ease;
}

.category-card-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 20%, rgba(0,0,0,0.7) 100%);
  z-index: 2;
}

.category-card-name {
  position: relative;
  z-index: 3;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  padding: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  line-height: 1.2;
}

/* Kategori Sayfası Başlığı */
.category-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--card-bg);
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.back-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 1.3rem;
  transition: var(--transition);
  border: 1.5px solid var(--border);
}

.back-btn:active { transform: scale(0.9); }

.cat-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}

.menu-content {
  padding: 10px 16px 80px;
}

/* ============================================================
   ÜRÜN KARTI — Mobile
   ============================================================ */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center; /* Üstten hizala ki içerik uzayınca görsel yukarıda kalsın */
  gap: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: default;
  border: 1px solid transparent;
  overflow: hidden;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(170,144,123,.08);
}

.product-img-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden; /* Dışarı taşan görseli keser */
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  border: 2px solid var(--border);
  background: var(--bg);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-img-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 2px 8px rgba(170,144,123,.15);
  border: 2px solid rgba(170,144,123,.12);
}

.product-info {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px; /* İsme çok yakın olsun */
  line-height: 1.2;
}

.product-subtitle {
  font-size: 0.84rem; /* Hafif büyüdü */
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px; /* Açıklamadan biraz uzaklaşsın */
  line-height: 1.2;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

.product-price {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  align-self: center; /* Fiyatı da üstten hizala */
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: -.2px;
  margin-top: 2px;
}

/* ============================================================
   ARAMA DURUMU
   ============================================================ */
.product-card.hidden { display: none; }

mark {
  background: #fff3a3;
  border-radius: 2px;
  padding: 0 1px;
}

/* ============================================================
   LAZY LOAD
   ============================================================ */
.product-img[data-src] {
  opacity: 0;
  transition: opacity .35s ease;
}
.product-img.loaded { opacity: 1; }

/* ============================================================
   ANİMASYONLAR
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.slider-section { animation: fadeIn .4s ease both; }

.product-card { animation: fadeInUp .3s ease both; }

.category-section:nth-child(1) .product-card { animation-delay: .04s; }
.category-section:nth-child(2) .product-card { animation-delay: .08s; }
.category-section:nth-child(3) .product-card { animation-delay: .12s; }
.category-section:nth-child(4) .product-card { animation-delay: .16s; }
.category-section:nth-child(5) .product-card { animation-delay: .20s; }

/* ============================================================
   RESPONSIVE — Tablet Küçük (≥ 640px)
   Mobil layoutu korur, sayfa biraz genişler
   ============================================================ */
@media (min-width: 640px) {
  .page-wrap {
    max-width: 640px;
    box-shadow: 0 0 40px rgba(0,0,0,.08);
  }
}

@media (min-width: 768px) {
  .page-wrap {
    max-width: 900px;
    margin: 20px auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .category-card-name { font-size: 1.2rem; }

  .category-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1100px) {
  .page-wrap {
    max-width: 1100px;
    margin: 40px auto;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }

  .category-card-name { font-size: 1.4rem; }

  .category-grid-container {
    padding: 40px;
  }

  .category-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* ============================================================
   ÜRÜN DETAY MODAL — CSS
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

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

.modal-container {
  width: 100%;
  max-width: 500px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

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

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform var(--transition);
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-mid));
}

.modal-body {
  padding: 24px 28px 32px;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.modal-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.modal-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 20px; /* Açıklamadan uzaklaşsın */
  margin-top: -10px; /* Başlığa çok yakın olsun */
  line-height: 1.2;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .modal-overlay {
    padding: 16px;
    align-items: center;
  }
  
  .modal-container {
    border-radius: var(--radius-lg);
    transform: translateY(20px);
    max-width: 100%;
  }

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

  .modal-body {
    padding: 20px 24px 32px;
  }
}

.modal-note {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(230, 126, 34, 0.85);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  letter-spacing: 0.3px;
  display: none; /* JS ile gösterilecek */
}
