:root{
  --bg: #17130F;
  --ink: #F2E9DE;
  --muted: #A99C8D;
  --muted-dim: #756A5D;
  --ember: #C1521E;
  --ember-bright: #E07438;
  --ember-deep: #7A2E10;
  --gold: #B4923E;
  --line: rgba(242,233,222,0.11);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; }

.wrap{ max-width: 620px; margin: 0 auto; padding: 0 22px; }

/* HERO */
.hero{ position: relative; padding: 64px 22px 40px; text-align: center; overflow: hidden; }
.hero::before{
  content: "";
  position: absolute; top: -120px; left: 50%;
  width: 520px; height: 420px; transform: translateX(-50%);
  background: radial-gradient(circle, var(--ember-deep) 0%, rgba(122,46,16,0.35) 40%, transparent 72%);
  filter: blur(6px); opacity: 0.85;
  animation: ember-breathe 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ember-breathe{
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.95; transform: translateX(-50%) scale(1.06); }
}
.hero-inner{ position: relative; opacity: 0; animation: rise 0.9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: 0.1s; }
@keyframes rise{ from{ opacity: 0; transform: translateY(14px); } to{ opacity: 1; transform: translateY(0); } }

.kicker{ font-size: 13px; color: var(--muted); letter-spacing: 0.02em; margin: 0 0 6px; }
.brand{
  font-family: 'Fraunces', serif; font-weight: 500; font-style: italic;
  font-size: clamp(52px, 16vw, 76px); line-height: 1; margin: 0;
  background: linear-gradient(180deg, #FBEFE2 0%, var(--ember-bright) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline{ font-family: 'Fraunces', serif; font-style: italic; font-size: 17px; color: var(--muted); margin: 10px 0 26px; }
.hero-rule{ width: 56px; height: 2px; margin: 0 auto 24px; background: linear-gradient(90deg, transparent, var(--ember-bright), transparent); }
.hero-meta{ font-size: 13px; color: var(--muted-dim); line-height: 1.9; }
.hero-meta strong{ color: var(--muted); font-weight: 600; }

/* STICKY NAV */
.nav-shell{ position: sticky; top: 0; z-index: 20; background: rgba(23,19,15,0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav{ max-width: 620px; margin: 0 auto; display: flex; gap: 26px; overflow-x: auto; padding: 16px 22px; scrollbar-width: none; }
.nav::-webkit-scrollbar{ display: none; }
.nav button{
  all: unset; cursor: pointer; font-family: 'Manrope', sans-serif; font-size: 14.5px; font-weight: 600;
  color: var(--muted-dim); white-space: nowrap; padding-bottom: 8px; border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.nav button:focus-visible{ outline: 2px solid var(--ember-bright); outline-offset: 3px; }
.nav button.active{ color: var(--ink); border-bottom-color: var(--ember-bright); }

/* SECTIONS */
section.course{ padding: 46px 0 8px; scroll-margin-top: 62px; }
.course-head{ display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.course-head h2{ font-family: 'Fraunces', serif; font-weight: 500; font-size: 27px; margin: 0; }
.course-head span{ font-size: 12.5px; color: var(--muted-dim); }
.course-rule{ height: 1px; background: linear-gradient(90deg, var(--gold), transparent 75%); opacity: 0.55; margin-bottom: 26px; }

.item{ padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.item:last-child{ border-bottom: none; }
.item-thumb{ width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: rgba(242,233,222,0.06); }
.item-body{ flex: 1; min-width: 0; }
.item-row{ display: flex; align-items: baseline; gap: 10px; }
.item-name{ font-family: 'Fraunces', serif; font-weight: 500; font-size: 18px; color: var(--ink); }
.item-name .tag{ font-family: 'Manrope', sans-serif; font-style: normal; font-weight: 700; font-size: 10.5px; color: var(--ember-bright); vertical-align: middle; margin-left: 6px; letter-spacing: 0.02em; }
.leader{ flex: 1; border-bottom: 1px dotted var(--muted-dim); opacity: 0.5; transform: translateY(-4px); }
.price{ font-size: 15.5px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.desc{ font-size: 13.5px; color: var(--muted); margin-top: 5px; line-height: 1.55; max-width: 46ch; }

/* FOOTER */
footer{ margin-top: 50px; padding: 38px 0 46px; border-top: 1px solid var(--line); text-align: center; }
.footer-brand{ font-family: 'Fraunces', serif; font-style: italic; font-size: 22px; color: var(--ink); margin-bottom: 14px; }
.footer-info{ font-size: 13.5px; color: var(--muted); line-height: 2; }
.footer-note{ margin-top: 18px; font-size: 11.5px; color: var(--muted-dim); }

.empty-state{ text-align: center; color: var(--muted-dim); padding: 60px 22px; font-size: 14px; }

.test-env-banner{
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: #B3261E; color: #fff; text-align: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em;
  padding: 5px 10px;
}

/* Karşılama katmanı (JS ile açılıp kapanır) */
.landing-overlay{
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.landing-overlay::before{
  content: "";
  position: absolute; top: -120px; left: 50%;
  width: 520px; height: 420px; transform: translateX(-50%);
  background: radial-gradient(circle, var(--ember-deep) 0%, rgba(122,46,16,0.35) 40%, transparent 72%);
  filter: blur(6px); opacity: 0.85;
  animation: ember-breathe 7s ease-in-out infinite;
  pointer-events: none;
}
.landing-overlay.closing{ opacity: 0; visibility: hidden; pointer-events: none; }
.landing-inner{ position: relative; }
.go-btn{
  all: unset; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 30px; padding: 15px 34px;
  background: linear-gradient(180deg, var(--ember-bright), var(--ember));
  color: #FFF6EE; font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 15px;
  border-radius: 999px;
  box-shadow: 0 10px 30px -8px rgba(193,82,30,0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.go-btn:hover{ transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(193,82,30,0.65); }
.go-btn:active{ transform: translateY(0); }
.go-btn svg{ transition: transform 0.2s ease; }
.go-btn:hover svg{ transform: translateX(3px); }
@media (prefers-reduced-motion: reduce){
  .landing-overlay{ transition: none; }
}

/* Fırsat / stok / favoriler */
.tag-out{ color: #E0574A !important; }
.price-orig{ text-decoration: line-through; color: var(--muted-dim); font-weight: 500; font-size: 12.5px; margin-right: 4px; }
.item-out{ opacity: 0.5; }
.item-out .item-name{ color: var(--muted); }

.fav-btn{
  all: unset; cursor: pointer; color: var(--muted-dim); flex-shrink: 0; display: flex; align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
}
.fav-btn:hover{ color: var(--ember-bright); }
.fav-btn.active{ color: var(--ember-bright); }
.fav-btn.active svg path{ fill: currentColor; }
.fav-btn.bump{ transform: scale(1.3); }

.nav button.fav-filter{ margin-left: auto; }
.nav button.fav-filter.active{ color: var(--ember-bright); border-bottom-color: var(--ember-bright); }
#fav-count{ font-variant-numeric: tabular-nums; }

.item.item-hidden{ display: none; }

/* Ürün detay modalı */
.modal-backdrop{
  display: none; position: fixed; inset: 0; background: rgba(10,8,6,0.72);
  z-index: 100; align-items: flex-end; justify-content: center;
}
.modal-backdrop.open{ display: flex; }
.modal-card{
  background: var(--bg); width: 100%; max-width: 480px; border-radius: 18px 18px 0 0;
  max-height: 86vh; overflow-y: auto; position: relative;
  animation: modal-rise 0.25s ease-out;
}
@keyframes modal-rise{ from{ transform: translateY(24px); opacity: 0; } to{ transform: translateY(0); opacity: 1; } }
.modal-close{
  all: unset; position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 50%; background: rgba(0,0,0,0.4); color: var(--ink); display: flex;
  align-items: center; justify-content: center; cursor: pointer; z-index: 2;
}
.modal-image{ width: 100%; height: 220px; object-fit: cover; display: block; }
.modal-body{ padding: 22px 24px 30px; }
.modal-body h3{ font-family: 'Fraunces', serif; font-weight: 500; font-size: 22px; margin: 0 0 8px; }
.modal-price{ color: var(--gold); font-weight: 700; font-size: 17px; margin: 0 0 14px; }
.modal-desc{ color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.modal-meta{ color: var(--muted-dim); font-size: 12.5px; line-height: 1.8; margin: 0; }

/* Masa bilgisi banner'ı */
.table-banner{
  position: sticky; top: 0; z-index: 25;
  background: var(--ember); color: #FFF3EA; text-align: center;
  font-size: 12.5px; font-weight: 700; padding: 7px 12px; letter-spacing: 0.02em;
}

/* Sepete ekle butonu */
.add-to-cart-btn{
  all: unset; cursor: pointer; margin-top: 10px;
  display: inline-flex; align-items: center; padding: 7px 16px;
  border: 1px solid var(--ember); color: var(--ember-bright);
  border-radius: 999px; font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 12.5px;
  transition: background 0.2s ease, color 0.2s ease;
}
.add-to-cart-btn:hover{ background: var(--ember); color: #fff; }
.add-to-cart-btn.added{ background: var(--ember); color: #fff; }

/* Sepet float butonu */
.cart-fab{
  all: unset; cursor: pointer; position: fixed; right: 18px; bottom: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(180deg, var(--ember-bright), var(--ember));
  color: #FFF6EE; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -6px rgba(193,82,30,0.6);
}
.cart-fab #cart-count{
  position: absolute; top: -4px; right: -4px; background: #fff; color: var(--ember);
  font-size: 11px; font-weight: 800; border-radius: 50%; width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
}

.cart-empty{ color: var(--muted); font-size: 14px; padding: 20px 0; text-align: center; }
.cart-line{ display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line-name{ font-size: 14px; color: var(--ink); }
.cart-line-price{ font-size: 12.5px; color: var(--muted); }
.cart-qty{ display: flex; align-items: center; gap: 8px; }
.cart-qty button{ all: unset; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; background: rgba(242,233,222,0.1); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.cart-total-row{ display: flex; justify-content: space-between; padding: 14px 0; margin-top: 6px; border-top: 1px solid var(--line); font-size: 15px; }
.cart-total-row strong{ color: var(--gold); }
.cart-submit-btn{ width: 100%; justify-content: center; margin-top: 14px; }
.cart-success{ text-align: center; color: #7CC28A; font-weight: 700; padding: 16px 0; }
.alert-inline{ color: var(--muted-dim); font-size: 13px; text-align: center; padding: 10px 0; }
.cart-pay-btn{ background: linear-gradient(180deg, #2E8B57, #1F6B41); box-shadow: 0 10px 30px -8px rgba(31,107,65,0.55); margin-top: 10px; }
.pay-card{ max-width: 480px; height: 88vh; max-height: 640px; display: flex; flex-direction: column; padding: 0; }
.pay-card .cart-empty{ margin: auto; }
#pay-iframe{ flex: 1; width: 100%; border: none; border-radius: 0 0 18px 18px; }
