/* ==========================================================================
   SEVİNÇ TOPTAN — arayüz
   Palet doğrudan logodan alınmıştır: koyu zeytin gövde, turuncu eylem rengi.
   ========================================================================== */

:root{
  --ink:#2E3D1F;          /* logo yazı yeşili */
  --ink-2:#41552B;
  --olive:#4A5D2B;
  --amber:#E8871E;        /* TOPTAN turuncusu */
  --amber-d:#C86F12;
  --apricot:#F5A93F;
  --cream:#FBF7EF;        /* logo zemini */
  --paper:#FFFFFF;
  --line:#E7E0D0;
  --line-2:#F0EBDF;
  --muted:#7C7767;
  --ok:#3F7D3A;
  --warn:#B4471F;

  --r-sm:8px; --r:12px; --r-lg:18px; --r-xl:24px;
  --sh-1:0 1px 2px rgba(46,61,31,.06), 0 1px 3px rgba(46,61,31,.05);
  --sh-2:0 4px 14px rgba(46,61,31,.10);
  --sh-3:0 12px 34px rgba(46,61,31,.16);

  --f-body:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --f-disp:'IBM Plex Sans Condensed','IBM Plex Sans',system-ui,sans-serif;
  --f-num:'IBM Plex Mono',ui-monospace,monospace;

  --topbar:104px;
  --tabs:0px;
  --safe-b:env(safe-area-inset-bottom,0px);
}
[dir="rtl"]{ --f-body:'IBM Plex Sans Arabic','IBM Plex Sans',sans-serif;
             --f-disp:'IBM Plex Sans Arabic','IBM Plex Sans Condensed',sans-serif; }

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; font-family:var(--f-body); color:var(--ink);
  background:var(--cream); font-size:15px; line-height:1.5;
  -webkit-font-smoothing:antialiased; overscroll-behavior-y:none;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; cursor:pointer; border:0; background:none; }
input,select{ font:inherit; color:inherit; }
:focus-visible{ outline:2.5px solid var(--amber); outline-offset:2px; border-radius:4px; }
svg{ width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.9;
     stroke-linecap:round; stroke-linejoin:round; }

/* ===================================================== üst çubuk ========= */
.topbar{
  position:sticky; top:0; z-index:60; background:var(--ink);
  padding-top:env(safe-area-inset-top,0px);
  box-shadow:0 1px 0 rgba(0,0,0,.18);
}
.topbar__in{
  display:flex; align-items:center; gap:14px;
  max-width:1360px; margin:0 auto; padding:9px 16px;
}
.brand{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.brand img{ width:42px; height:42px; object-fit:contain;
            background:var(--cream); border-radius:10px; padding:2px; }
.brand__txt{ display:flex; flex-direction:column; line-height:1.15; }
.brand__txt b{ font-family:var(--f-disp); font-size:17px; font-weight:700;
               letter-spacing:.045em; color:var(--cream); }
.brand__txt i{ font-style:normal; font-size:10.5px; color:#B8C4A4; letter-spacing:.02em; }

.seek{ flex:1 1 auto; position:relative; max-width:560px; }
.seek svg{ position:absolute; inset-inline-start:13px; top:50%; transform:translateY(-50%);
           width:17px; height:17px; color:var(--muted); pointer-events:none; }
.seek input{
  width:100%; height:42px; padding-inline:38px 14px; border-radius:21px;
  border:1.5px solid transparent; background:#F6F3EA; color:var(--ink);
  transition:border-color .16s, background .16s;
}
.seek input::placeholder{ color:#9B9585; }
.seek input:focus{ outline:none; border-color:var(--amber); background:#fff; }

.topbar__act{ display:flex; align-items:center; gap:9px; flex:0 0 auto; }
.pill{
  display:flex; align-items:center; gap:7px; height:38px; padding:0 13px;
  border-radius:19px; background:rgba(255,255,255,.11); color:var(--cream);
  font-family:var(--f-num); font-size:12px; font-weight:600; letter-spacing:.05em;
  transition:background .16s;
}
.pill:hover{ background:rgba(255,255,255,.19); }
.pill__sep{ width:1px; height:13px; background:rgba(255,255,255,.3); }

.cartbtn{
  position:relative; display:grid; place-items:center; width:40px; height:40px;
  border-radius:12px; background:var(--amber); color:#fff; transition:background .16s;
}
.cartbtn:hover{ background:var(--amber-d); }
.cartbtn svg{ width:21px; height:21px; }
.cartbtn__n{
  position:absolute; top:-5px; inset-inline-end:-5px; min-width:19px; height:19px;
  padding:0 5px; border-radius:10px; background:var(--paper); color:var(--ink);
  font-family:var(--f-num); font-size:11px; font-weight:600;
  display:grid; place-items:center; box-shadow:var(--sh-1);
}

/* ===================================================== kategori rayı ===== */
.rail{ background:var(--ink-2); }
.rail__in{
  display:flex; gap:4px; max-width:1360px; margin:0 auto; padding:0 12px;
  overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.rail__in::-webkit-scrollbar{ display:none; }
.rail__i{
  flex:0 0 auto; padding:11px 14px 10px; font-size:13.5px; font-weight:500;
  color:#C3CFAE; white-space:nowrap; border-bottom:2.5px solid transparent;
  transition:color .15s, border-color .15s;
}
.rail__i:hover{ color:#fff; }
.rail__i.is-on{ color:#fff; border-bottom-color:var(--amber); font-weight:600; }

/* ===================================================== gövde ============= */
.main{ max-width:1360px; margin:0 auto;
       padding:20px 16px calc(28px + var(--tabs) + var(--safe-b)); }

.head{ display:flex; align-items:baseline; justify-content:space-between;
       gap:14px; margin:4px 0 16px; flex-wrap:wrap; }
.head h1{
  font-family:var(--f-disp); font-size:clamp(21px,3.4vw,30px); font-weight:700;
  letter-spacing:.01em; margin:0;
}
.head__n{ font-family:var(--f-num); font-size:12.5px; color:var(--muted); font-weight:500; }

.sortbar{ display:flex; gap:7px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.chip{
  padding:7px 13px; border-radius:17px; background:var(--paper); font-size:12.5px;
  font-weight:500; border:1.5px solid var(--line); transition:all .15s;
}
.chip:hover{ border-color:var(--olive); }
.chip.is-on{ background:var(--ink); color:var(--cream); border-color:var(--ink); }

/* ===================================================== ürün ızgarası ===== */
.grid{
  display:grid; gap:12px;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
}
@media(min-width:700px){ .grid{ gap:16px;
  grid-template-columns:repeat(auto-fill,minmax(196px,1fr)); } }

.card{
  background:var(--paper); border-radius:var(--r-lg); overflow:hidden;
  border:1px solid var(--line-2); display:flex; flex-direction:column;
  transition:transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s, border-color .18s;
}
@media(hover:hover){ .card:hover{ transform:translateY(-3px);
  box-shadow:var(--sh-2); border-color:var(--line); } }

.card__img{
  position:relative; aspect-ratio:1/1; background:linear-gradient(160deg,#FCFAF5,#F3EFE4);
  overflow:hidden;
}
.card__img img{
  width:100%; height:100%; object-fit:contain; padding:8px;
  transition:transform .3s cubic-bezier(.2,.8,.3,1); opacity:0;
}
.card__img img.rdy{ opacity:1; }
@media(hover:hover){ .card:hover .card__img img{ transform:scale(1.06); } }

.tag{
  position:absolute; top:8px; inset-inline-start:8px; padding:3px 8px;
  border-radius:6px; font-size:10px; font-weight:700; letter-spacing:.07em;
  text-transform:uppercase;
}
.tag--new{ background:var(--amber); color:#fff; }
.tag--out{ background:rgba(46,61,31,.86); color:#fff;
           inset-inline-start:auto; inset-inline-end:8px; }

.card__body{ padding:11px 12px 12px; display:flex; flex-direction:column;
             gap:9px; flex:1; }
.card__ttl{
  font-size:13px; font-weight:500; line-height:1.35; color:var(--ink-2);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; min-height:35px;
}
.card__price{ display:flex; align-items:baseline; gap:7px; flex-wrap:wrap;
              margin-top:auto; }
.price{
  font-family:var(--f-num); font-size:17px; font-weight:600; color:var(--ink);
  letter-spacing:-.02em; font-variant-numeric:tabular-nums;
}
.price--old{ font-size:12px; color:var(--muted); text-decoration:line-through;
             font-weight:500; }

/* adet + ekle */
.buy{ display:flex; gap:6px; align-items:stretch; }
.step{
  display:flex; align-items:center; border:1.5px solid var(--line);
  border-radius:10px; overflow:hidden; background:var(--paper); flex:0 0 auto;
}
.step button{ width:24px; height:34px; display:grid; place-items:center;
              color:var(--olive); font-size:15px; font-weight:600;
              transition:background .13s; }
.step button:hover{ background:var(--line-2); }
.step input{
  width:26px; height:34px; border:0; text-align:center; background:transparent;
  font-family:var(--f-num); font-size:12.5px; font-weight:600;
  -moz-appearance:textfield; padding:0;
}
.step input::-webkit-outer-spin-button,
.step input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }

.add{
  flex:1 1 auto; min-width:0; height:34px; padding:0 6px; border-radius:10px;
  background:var(--ink); color:var(--cream); font-size:11.5px; font-weight:600;
  display:grid; place-items:center; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; letter-spacing:-.01em;
  transition:background .15s, transform .1s;
}
/* sepette adet kutusu daha ferah */
.line .step button{ width:30px; }
.line .step input{ width:34px; font-size:13px; }
.add:hover{ background:var(--olive); }
.add:active{ transform:scale(.97); }
.add.is-done{ background:var(--ok); }
.add:disabled{ background:var(--line); color:var(--muted); cursor:not-allowed; }

/* ===================================================== bölüm başlığı ==== */
.sec{ margin:30px 0 14px; display:flex; align-items:center; gap:12px; }
.sec h2{ font-family:var(--f-disp); font-size:19px; font-weight:700; margin:0;
         letter-spacing:.015em; white-space:nowrap; }
.sec__ln{ flex:1; height:1.5px; background:var(--line); }
.sec__more{ font-size:12.5px; font-weight:600; color:var(--amber-d);
            white-space:nowrap; }
.sec__more:hover{ text-decoration:underline; }

/* ===================================================== kahraman ========= */
.hero{
  position:relative; background:linear-gradient(135deg,var(--ink) 0%,var(--olive) 100%);
  border-radius:var(--r-xl); padding:30px 24px; margin-bottom:8px;
  overflow:hidden; color:var(--cream);
}
.hero::after{
  content:""; position:absolute; inset-inline-end:-70px; top:-70px;
  width:260px; height:260px; border-radius:50%;
  background:radial-gradient(circle,rgba(245,169,63,.30),transparent 68%);
}
.hero__k{ font-family:var(--f-num); font-size:11px; letter-spacing:.22em;
          color:var(--apricot); text-transform:uppercase; margin:0 0 8px; }
.hero h1{ font-family:var(--f-disp); font-size:clamp(26px,5.2vw,42px);
          font-weight:700; margin:0 0 8px; letter-spacing:.01em; line-height:1.1; }
.hero p{ margin:0 0 18px; font-size:14px; color:#D5DEC4; max-width:46ch; }
.hero__st{ display:flex; gap:26px; flex-wrap:wrap; position:relative; }
.hero__st div b{ display:block; font-family:var(--f-num); font-size:22px;
                 font-weight:600; color:#fff; }
.hero__st div span{ font-size:11px; color:#B8C4A4; letter-spacing:.04em; }

/* ===================================================== sepet ============ */
.cart{ display:grid; gap:18px; }
@media(min-width:960px){ .cart{ grid-template-columns:1fr 348px;
                                align-items:start; } }

.lines{ background:var(--paper); border-radius:var(--r-lg);
        border:1px solid var(--line-2); overflow:hidden; }
.line{ display:grid; grid-template-columns:64px 1fr auto; gap:12px;
       padding:13px 14px; border-bottom:1px solid var(--line-2);
       align-items:center; }
.line:last-child{ border-bottom:0; }
.line__img{ width:64px; height:64px; border-radius:10px; background:#F7F4EC;
            object-fit:contain; padding:5px; }
.line__ttl{ font-size:13.5px; font-weight:500; line-height:1.35;
            display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
            overflow:hidden; }
.line__unit{ font-family:var(--f-num); font-size:11.5px; color:var(--muted);
             margin-top:3px; }
.line__end{ display:flex; flex-direction:column; align-items:flex-end; gap:7px; }
.line__tot{ font-family:var(--f-num); font-size:15px; font-weight:600;
            font-variant-numeric:tabular-nums; }
.line__del{ font-size:11px; color:var(--warn); font-weight:500; }
.line__del:hover{ text-decoration:underline; }

.panel{ background:var(--paper); border-radius:var(--r-lg);
        border:1px solid var(--line-2); padding:18px; position:sticky; top:124px; }
.panel h3{ font-family:var(--f-disp); font-size:16px; margin:0 0 14px;
           letter-spacing:.02em; }
.row{ display:flex; justify-content:space-between; align-items:center;
      padding:7px 0; font-size:13.5px; color:var(--muted); }
.row b{ font-family:var(--f-num); color:var(--ink); font-weight:600; }
.row--big{ margin-top:9px; padding-top:14px; border-top:2px solid var(--line);
           font-size:14px; color:var(--ink); font-weight:600; }
.row--big b{ font-size:23px; letter-spacing:-.02em; }

.fld{ margin-bottom:11px; }
.fld label{ display:block; font-size:11.5px; font-weight:600; color:var(--muted);
            margin-bottom:5px; letter-spacing:.02em; }
.fld input,.fld textarea{
  width:100%; padding:10px 12px; border:1.5px solid var(--line);
  border-radius:10px; background:#FDFCF8; transition:border-color .15s;
  font-size:13.5px; resize:vertical;
}
.fld input:focus,.fld textarea:focus{ outline:none; border-color:var(--amber);
                                       background:#fff; }

.btn{
  display:inline-grid; place-items:center; padding:12px 20px; border-radius:12px;
  background:var(--ink); color:var(--cream); font-size:14px; font-weight:600;
  transition:background .15s, transform .1s; text-align:center;
}
.btn:hover{ background:var(--olive); }
.btn:active{ transform:scale(.985); }
.btn--full{ width:100%; }
.btn--amber{ background:var(--amber); }
.btn--amber:hover{ background:var(--amber-d); }
.btn--ghost{ background:transparent; color:var(--ink);
             border:1.5px solid var(--line); }
.btn--ghost:hover{ background:var(--line-2); }
.btn[disabled]{ opacity:.55; pointer-events:none; }

/* ===================================================== boş durum ======== */
.empty{ text-align:center; padding:56px 20px; }
.empty svg{ width:52px; height:52px; margin:0 auto 16px; color:var(--line);
            stroke-width:1.4; }
.empty h2{ font-family:var(--f-disp); font-size:19px; margin:0 0 6px; }
.empty p{ color:var(--muted); font-size:13.5px; margin:0 0 20px; }

/* ===================================================== alt sekmeler ===== */
.tabs{ display:none; }
@media(max-width:859px){
  :root{ --tabs:60px; }
  .tabs{
    position:fixed; inset-inline:0; bottom:0; z-index:70; display:flex;
    background:rgba(255,255,255,.93); backdrop-filter:saturate(180%) blur(18px);
    -webkit-backdrop-filter:saturate(180%) blur(18px);
    border-top:1px solid var(--line); padding-bottom:var(--safe-b);
  }
  .tabs__i{ flex:1; display:flex; flex-direction:column; align-items:center;
            gap:3px; padding:8px 2px 6px; color:var(--muted); font-size:10px;
            font-weight:500; transition:color .15s; }
  .tabs__i svg{ width:22px; height:22px; }
  .tabs__i.is-on{ color:var(--ink); font-weight:600; }
  .tabs__i.is-on svg{ color:var(--amber); }
  .tabs__wrap{ position:relative; width:22px; height:22px; }
  .tabs__n{ position:absolute; top:-5px; inset-inline-end:-8px; min-width:16px;
            height:16px; padding:0 4px; border-radius:8px; background:var(--amber);
            color:#fff; font-family:var(--f-num); font-size:9.5px;
            display:grid; place-items:center; }
}

/* mobil düzen sadeleştirmeleri */
@media(max-width:640px){
  .brand__txt{ display:none; }
  .topbar__in{ gap:9px; padding:8px 12px; }
  .main{ padding:14px 12px calc(24px + var(--tabs) + var(--safe-b)); }
  .hero{ padding:24px 18px; border-radius:var(--r-lg); }
  .pill{ height:36px; padding:0 10px; }
  .line{ grid-template-columns:56px 1fr; }
  .line__img{ width:56px; height:56px; }
  .line__end{ grid-column:1 / -1; flex-direction:row;
              justify-content:space-between; align-items:center; }
}

/* ===================================================== alt sayfa ======== */
.sheet{ position:fixed; inset:0; z-index:90; display:grid; align-items:end; }
.sheet[hidden]{ display:none; }
@media(min-width:700px){ .sheet{ align-items:center; justify-items:center; } }
.sheet__bg{ position:absolute; inset:0; background:rgba(30,38,20,.42);
            animation:fade .2s ease; }
.sheet__box{
  position:relative; width:100%; max-width:440px; background:var(--paper);
  border-radius:var(--r-xl) var(--r-xl) 0 0; padding:10px 20px
    calc(22px + var(--safe-b)); animation:up .26s cubic-bezier(.2,.9,.3,1);
  max-height:88vh; overflow-y:auto;
}
@media(min-width:700px){ .sheet__box{ border-radius:var(--r-xl);
  animation:pop .2s ease; margin:20px; } }
.sheet__grip{ width:38px; height:4px; border-radius:2px; background:var(--line);
              margin:0 auto 14px; }
@media(min-width:700px){ .sheet__grip{ display:none; } }
.sheet__h{ font-family:var(--f-disp); font-size:17px; margin:0 0 16px; }
.sheet__lbl{ font-size:11px; font-weight:700; color:var(--muted);
             letter-spacing:.11em; text-transform:uppercase; margin:16px 0 8px; }
.sheet__note{ font-family:var(--f-num); font-size:10.5px; color:var(--muted);
              margin:16px 0; line-height:1.7; }

.opts{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.opts--4{ grid-template-columns:repeat(auto-fit,minmax(72px,1fr)); }
.opt{
  padding:11px 6px; border-radius:12px; border:1.5px solid var(--line);
  background:var(--paper); display:flex; flex-direction:column; align-items:center;
  gap:3px; transition:all .15s;
}
.opt b{ font-family:var(--f-num); font-size:14px; font-weight:600; }
.opt span{ font-size:10.5px; color:var(--muted); }
.opt:hover{ border-color:var(--olive); }
.opt.is-on{ border-color:var(--amber); background:#FEF6EA; }
.opt.is-on b{ color:var(--amber-d); }

/* ===================================================== bildirim ========= */
.toast{
  position:fixed; inset-inline:0; bottom:calc(var(--tabs) + var(--safe-b) + 16px);
  z-index:95; margin:0 auto; width:fit-content; max-width:88vw;
  padding:11px 20px; border-radius:22px; background:var(--ink); color:var(--cream);
  font-size:13.5px; font-weight:500; box-shadow:var(--sh-3);
  animation:up .22s cubic-bezier(.2,.9,.3,1);
}
.toast[hidden]{ display:none; }

@keyframes fade{ from{opacity:0} }
@keyframes up{ from{ transform:translateY(18px); opacity:0 } }
@keyframes pop{ from{ transform:scale(.96); opacity:0 } }

/* ===================================================== yönetim ========== */
.adm{ max-width:1080px; margin:0 auto; }
.adm__grid{ display:grid; gap:14px;
            grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
            margin-bottom:22px; }
.stat{ background:var(--paper); border:1px solid var(--line-2);
       border-radius:var(--r); padding:15px 16px; }
.stat b{ display:block; font-family:var(--f-num); font-size:24px;
         font-weight:600; letter-spacing:-.02em; }
.stat span{ font-size:11.5px; color:var(--muted); }
.box{ background:var(--paper); border:1px solid var(--line-2);
      border-radius:var(--r-lg); padding:20px; margin-bottom:16px; }
.box h2{ font-family:var(--f-disp); font-size:16px; margin:0 0 14px; }
.tbl{ width:100%; border-collapse:collapse; font-size:13px; }
.tbl th{ text-align:start; padding:8px 10px; background:#F8F6F0;
         font-size:11px; letter-spacing:.06em; text-transform:uppercase;
         color:var(--muted); font-weight:700; }
.tbl td{ padding:9px 10px; border-top:1px solid var(--line-2); }
.tbl .num{ font-family:var(--f-num); font-variant-numeric:tabular-nums; }
.mgrid{ display:grid; gap:10px;
        grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); }

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.01ms !important;
                        transition-duration:.01ms !important; }
}

/* --- dar ekranlarda adet ve buton alt alta: metin kirpilmaz, dokunma alani buyur --- */
@media(max-width:520px){
  .grid .buy{ flex-direction:column; gap:6px; }
  .grid .step{ width:100%; justify-content:space-between; }
  .grid .step button{ width:34px; }
  .grid .step input{ flex:1 1 auto; width:auto; }
  .grid .add{ width:100%; font-size:12.5px; }
}
[dir="rtl"] .add{ letter-spacing:0; }
