:root {
  --radius: 14px;

  /* ☀️ Light mod: daha koyu altın (kontrast iyi) */
  --accent: #B7791F;

  /* 🌙 Dark mod: daha parlak altın */
  --accent-dark: #FFC83D;

  --bg-light: #f5f6fa;
  --text-light: #1a1a1a;
  --card-light: #fff;

  --bg-dark: #070b14;
  --text-dark: #e9eefc;
  --card-dark: #0f172a;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-light);
  transition: background 0.3s, color 0.3s;
}

body.dark {
  --accent: var(--accent-dark);
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.6);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}

#siteLogo {
  height: 70px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 12px rgba(255, 204, 0, 0.45));
}

body.dark header {
  background: rgba(7,11,20,0.70);
}

h1 { font-size: 20px; font-weight: 600; }
button#themeToggle { background: none; border: none; font-size: 22px; cursor: pointer; color: inherit; }

/* ============================
   KATEGORİLER (GRID TASARIM)
   ============================ */

.categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 20px;

  /* eski yatay scroll davranışını kapat */
  overflow: visible;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: auto;
}

.category-card {
  width: 100%;
  height: 150px; /* ✅ görsele daha yakın */

  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;

  background-size: cover;
  background-position: center;

  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ✅ daha yumuşak overlay (görseldeki gibi) */
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0.10) 55%,
    rgba(0,0,0,0.00) 100%
  );
}

/* dark modda overlay biraz daha güçlü kalsın */
body.dark .category-card::after {
  background: linear-gradient(to top,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.14) 55%,
    rgba(0,0,0,0.00) 100%
  );
}

.category-card span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;                 /* ✅ kartın altına tam yapıştı */

  width: calc(100% - 22px);  /* ✅ sol boşluk korunuyor */
  padding: 14px 14px;

  text-align: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;

  color: #fff;

  /* ✅ Daha doğal blur */
  background: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  border-radius: 0 0 16px 16px;   /* ✅ alt köşeler kartla hizalı */
  box-shadow: 0 -8px 20px rgba(0,0,0,0.25);

  z-index: 2;
}

body.dark .category-card span{
   background: rgba(0, 0, 0, 0.38);
}

.category-card:hover {
  transform: translateY(-3px);
}

/* ✅ aktifte sarı glow yok (ışık tamamen kalktı) */
.category-card.active {
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  transform: translateY(-3px);
}

/* çok küçük ekranlarda kart yüksekliği biraz düşsün */
@media (max-width: 380px){
  .category-card{ height: 135px; }
}

/* ============================
   ÜRÜNLER
   ============================ */

.menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  padding: 20px;
}

.card {
  background-color: var(--card-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, background 0.3s, color 0.3s;
  max-width: 100%;
}

body.dark .card {
  background-color: var(--card-dark);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.06);
}

.card:hover { transform: scale(1.02); }

.card img {
  width: 100%;
  height: 185px;
  object-fit: cover;
}

.card-content{
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0px;
}

/* ✅ BURASI DÜZELTİLDİ: desc{ değil .desc{ olmalı */
.desc{
  margin: 6px 0 0;
  font-size: 14px;
  color: inherit;
  opacity: .85;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  transition: all 0.3s ease;
}

.card-content h3{
  margin: 0;
  font-size: 18px;
  line-height: 1.2;

  display: -webkit-box;
  -webkit-line-clamp: 1;      /* ✅ 1 satır */
  -webkit-box-orient: vertical;
  overflow: hidden;

  transition: all 0.3s ease;
}

.card-content p { font-size: 14px; margin: 6px 0; color: inherit; }

.price{
  margin-top: 8px;
  align-self: flex-start;

  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;

  color: #7A4D00;
  background: rgba(183, 121, 31, 0.12);
  border: 1px solid rgba(183, 121, 31, 0.35);

  padding: 5px 10px;
  border-radius: 8px;
  display: inline-block;
}

body.dark .price{
  color: #FFE082;
  background: rgba(255, 193, 7, 0.10);
  border: 1px solid rgba(255, 193, 7, 0.30);
}

body.dark #siteLogo { content:url("logo.png"); }
body:not(.dark) #siteLogo { content:url("logo.png"); }

/* 📱 Mobilde ürünleri yatay kart yap (desktop bozulmaz) */
@media (max-width: 600px){

  .menu{
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .card{
    display: flex;
    align-items: stretch;
  }

  .card img{
    width: 120px;
    height: 100%;
    object-fit: cover;
    flex: 0 0 120px;
  }

  .card-content{
    flex: 1;
    padding: 10px 12px;
    gap: 6px;
  }

  .card-content h3{
    font-size: 15px;

    display: -webkit-box;
    -webkit-line-clamp: 1;   /* ✅ mobilde de 1 satır */
    -webkit-box-orient: vertical;
    overflow: hidden;

    line-height: 1.2;
    transition: all 0.3s ease;
  }

  .desc{
    font-size: 12px;
    line-height: 1.25;
    margin: 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;   /* ✅ mobilde de 2 satır */
    -webkit-box-orient: vertical;
    overflow: hidden;

    transition: all 0.3s ease;
  }

  .price{
    font-size: 14px;
    padding: 4px 8px;
    margin-top: 6px;
  }
}

/* ✅ Geri butonu (sadece stil) */
#backBtn{
  border: none;
  background: rgba(0,0,0,0.06);
  color: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1;
}

body.dark #backBtn{
  background: rgba(255,255,255,0.08);
}

/* hover sadece desktop'ta */
@media (hover: hover){
  #backBtn:hover{
    background: rgba(0,0,0,0.10);
  }
  body.dark #backBtn:hover{
    background: rgba(255,255,255,0.12);
  }
}

/* ✅ Kart açılınca tüm metin görünsün */
.card.expanded h3{
  -webkit-line-clamp: unset;
  display: block;
}

.card.expanded .desc{
  -webkit-line-clamp: unset;
  display: block;
}
