/* Stage 8: main page and «Endirimlər» in the approved style E «Gündəlik». Phone first, then tablet and desktop.
   The old stylesheets are still loaded for the owner's windows (editor, import, accounts); everything inside .e-app
   is reset first so none of the old page rules leak in. SVG icons are left alone (they rely on their attributes). */
.e-app :where(*:not(svg, svg *)) { all: revert; }
:root { --e-green:#17703F; --e-green-dark:#0F5530; --e-green-soft:#EAF4EE; --e-orange:#E2650F; --e-orange-ink:#B8500C; --e-orange-soft:#FFF6EF;
  --e-ink:#1C1F1A; --e-muted:#4A5046; --e-soft:#5F655B; --e-line:#E7E9E4; --e-r:12px;
  --e-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; }
body.e-site { margin:0; background:#fff; color:var(--e-ink); font:400 16px/1.5 var(--e-font); -webkit-text-size-adjust:100%; }
body.e-site::before, body.e-site::after { content:none !important; display:none !important; }
.e-app { display:block; min-height:100vh; padding-bottom:80px; box-sizing:border-box; font:inherit; color:inherit; }
.e-app :where(*:not(svg, svg *)) { box-sizing:border-box; }
.e-app a { color:var(--e-green); }
.e-app :focus-visible { outline:3px solid var(--e-orange); outline-offset:2px; }
.e-app button { font:inherit; color:inherit; cursor:pointer; }
.e-app img { max-width:100%; }

/* header */
.e-header { position:sticky; top:0; z-index:10; display:flex; flex-direction:column; gap:12px; padding:12px 16px; background:#fff; border-bottom:1px solid var(--e-line); }
.e-header-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.e-logo { display:flex; flex-direction:column; line-height:1; text-decoration:none; }
.e-logo-name { font-style:italic; font-weight:800; font-size:24px; color:var(--e-orange-ink); }
.e-logo-sub { font-weight:700; font-size:11px; letter-spacing:5px; color:var(--e-green); margin-top:3px; }
.e-back { width:44px; height:44px; margin-left:-10px; display:flex; align-items:center; justify-content:center; color:var(--e-ink); }
.e-title { flex:1; margin:0; font-size:21px; font-weight:800; }
.e-title #e-title-count { font-size:15px; font-weight:600; color:var(--e-soft); }
.e-header-actions { display:flex; align-items:center; gap:8px; }
.e-lang { display:flex; border:1px solid #D5D9D2; border-radius:10px; overflow:hidden; }
.e-lang button { height:40px; min-width:42px; padding:0 8px; border:0; background:#fff; font-weight:600; font-size:13px; }
.e-lang button[aria-pressed=true] { background:var(--e-ink); color:#fff; }
.e-cart { height:40px; padding:0 12px; border-radius:10px; background:var(--e-green); color:#fff !important; display:inline-flex; align-items:center; gap:8px; text-decoration:none; font-weight:700; font-size:14px; white-space:nowrap; }
.e-search { display:flex; align-items:center; gap:10px; height:48px; padding:0 14px; border:1.5px solid var(--e-ink); border-radius:var(--e-r); color:var(--e-muted); }
.e-search input { flex:1; min-width:0; border:0; outline:0; background:transparent; font:400 16px var(--e-font); color:var(--e-ink); }
.e-open { margin:0; display:flex; align-items:center; gap:8px; font-size:13px; color:#3F453B; }
.e-open .dot { width:8px; height:8px; border-radius:50%; background:#9AA195; flex-shrink:0; }
.e-open .dot.open { background:#1F9D55; }
.e-open b.open { color:var(--e-green); }

/* layout */
.e-main { display:flex; flex-direction:column; gap:26px; padding:18px 16px 24px; max-width:640px; margin:0 auto; }
.e-block { display:flex; flex-direction:column; gap:12px; }
.e-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.e-head h2, .e-main h2 { margin:0; font-size:19px; font-weight:800; line-height:1.25; }
.e-head a { font-size:14px; font-weight:600; text-decoration:none; white-space:nowrap; }
.e-muted { margin:0; color:var(--e-muted); }
.e-muted.small { font-size:12.5px; line-height:1.5; color:var(--e-soft); }
.e-note { margin:0; padding:12px 14px; border-radius:var(--e-r); background:#FDECEA; color:#9B1C1C; font-size:14px; }
.e-note.ok { background:var(--e-green-soft); color:var(--e-green-dark); }

/* sections */
.e-sections { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px 8px; }
.e-section { display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; text-decoration:none; color:var(--e-ink) !important; }
.e-section span { width:100%; aspect-ratio:76/70; border-radius:14px; overflow:hidden; background:#F3EDE8; display:block; }
.e-section img { width:100%; height:100%; object-fit:cover; display:block; }
.e-section b { font-size:12px; font-weight:600; line-height:1.2; }
.e-section small { font-size:11px; color:var(--e-soft); }

/* chips */
.e-chips { display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; margin:0 -16px; padding:0 16px; }
.e-chips::-webkit-scrollbar { display:none; }
.e-chips button { flex-shrink:0; height:40px; padding:0 14px; border-radius:999px; border:1px solid #D5D9D2; background:#fff; font-weight:600; font-size:13px; white-space:nowrap; }
.e-chips button[aria-pressed=true] { background:var(--e-ink); color:#fff; border-color:var(--e-ink); }

/* product rows */
.e-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.e-row { display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--e-line); }
.e-row:last-child { border-bottom:0; }
.e-thumb { position:relative; width:92px; height:92px; flex-shrink:0; padding:0; border:0; border-radius:12px; overflow:hidden; background:#F3EDE8; }
.e-thumb img { width:92px; height:92px; object-fit:cover; display:block; }
.e-badge { position:absolute; left:6px; top:6px; background:var(--e-orange-ink); color:#fff; font-weight:700; font-size:12px; padding:2px 7px; border-radius:6px; }
.e-badge.gift { background:var(--e-green); }
.e-badge.big { font-size:15px; padding:5px 10px; border-radius:8px; left:12px; top:12px; }
.e-row-copy { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.e-name { padding:0; border:0; background:none; text-align:left; font-size:15px; font-weight:600; line-height:1.3; color:var(--e-ink); overflow-wrap:anywhere; }
.e-meta { font-size:12.5px; color:var(--e-muted); }
.e-row-foot { display:flex; align-items:flex-end; justify-content:space-between; gap:8px; margin-top:auto; flex-wrap:wrap; }
.e-price { display:flex; flex-direction:column; gap:1px; }
.e-price span { display:flex; align-items:baseline; gap:6px; }
.e-price strong { font-size:19px; font-weight:800; }
.e-price strong.sale, .e-card-price strong.sale { color:var(--e-orange-ink); }
.e-price s { font-size:12.5px; color:var(--e-soft); }
.e-price small { font-size:11.5px; color:var(--e-soft); }
.e-add { height:44px; padding:0 16px; border-radius:10px; border:0; background:var(--e-green); color:#fff; font-weight:700; font-size:14px; }
.e-add.in { background:#fff; color:var(--e-green); border:1.5px solid var(--e-green); }
.e-step { display:inline-flex; align-items:center; height:44px; border-radius:10px; border:1.5px solid var(--e-green); overflow:hidden; }
.e-step button { width:42px; height:44px; border:0; background:#fff; color:var(--e-green); font-weight:700; font-size:20px; }
.e-step span { min-width:40px; text-align:center; font-weight:700; font-size:15px; }
.e-heart { width:44px; height:44px; border-radius:12px; border:1px solid #D5D9D2; background:#fff; color:var(--e-ink); display:inline-flex; align-items:center; justify-content:center; padding:0; }
.e-heart[aria-pressed=true] { color:var(--e-orange-ink); border-color:#F6D3B8; background:var(--e-orange-soft); }

/* buttons */
.e-btn { height:48px; padding:0 18px; border-radius:var(--e-r); border:0; background:var(--e-green); color:#fff !important; display:inline-flex; align-items:center; justify-content:center; gap:8px; font-weight:700; font-size:15px; text-decoration:none; }
.e-btn.outline { background:#fff; color:var(--e-ink) !important; border:1.5px solid var(--e-ink); }
.e-btn.dark { background:var(--e-ink); }
.e-btn.light { background:#fff; color:var(--e-ink) !important; }
.e-two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }

/* bakery — one of the shop's best sellers: a big, warm block */
.e-bakery { display:grid; grid-template-rows:auto auto; border-radius:18px; overflow:hidden; background:#2B1A10; color:#FFF6EF; }
.e-bakery-copy { padding:18px 18px 16px; display:flex; flex-direction:column; gap:8px; }
.e-kicker { font-size:12px; font-weight:800; letter-spacing:1.5px; text-transform:uppercase; color:#F6B27A; }
.e-bakery h2 { color:#fff; font-size:21px; }
.e-bakery p { margin:0; font-size:14.5px; line-height:1.5; color:#F3E2D3; }
.e-bakery .e-btn { align-self:flex-start; margin-top:4px; }
.e-bakery-photos { position:relative; aspect-ratio:4/3; background:#1C120B; }
.e-bakery-photos img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .6s ease; }
.e-bakery-photos img.on { opacity:1; }
.e-dots { position:absolute; left:0; right:0; bottom:10px; display:flex; justify-content:center; gap:2px; }
.e-dots button { width:44px; height:28px; border:0; background:none; padding:0; display:flex; align-items:center; justify-content:center; }
.e-dots button::after { content:""; width:9px; height:9px; border-radius:50%; background:rgb(255 255 255 / .55); }
.e-dots button[aria-pressed=true]::after { background:#fff; width:22px; border-radius:6px; }

/* Tez and shop */
.e-tez { border-radius:16px; background:var(--e-green-soft); padding:18px; display:flex; flex-direction:column; gap:8px; }
.e-tez h2 { color:var(--e-green-dark); }
.e-tez p { margin:0; font-size:14px; line-height:1.5; color:#2C4A38; }
.e-tez .e-btn { align-self:flex-start; }
.e-pill { align-self:flex-start; font-weight:700; font-size:12px; color:var(--e-green-dark); border:1.5px solid var(--e-green-dark); border-radius:999px; padding:4px 10px; }
.e-shop dl { margin:0; display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 14px; font-size:14px; }
.e-shop dt { color:var(--e-muted); }
.e-shop dd { margin:0; font-weight:600; }

/* deals page */
.e-tools { margin-top:-8px; }
.e-select { display:flex; flex-direction:column; gap:4px; font-size:12.5px; font-weight:600; color:var(--e-muted); }
.e-select select { height:44px; border-radius:10px; border:1px solid #D5D9D2; background:#fff; padding:0 10px; font:600 14px var(--e-font); color:var(--e-ink); }
.e-group { display:flex; flex-direction:column; gap:4px; }
.e-group h2 { display:flex; align-items:baseline; justify-content:space-between; font-size:16px; margin-top:6px; }
.e-group h2 span { font-size:13px; font-weight:600; color:var(--e-soft); }

/* product card (full screen on phones) */
.e-card-dialog { width:100%; max-width:560px; max-height:100%; height:100%; margin:0 auto; padding:0; border:0; background:#fff; color:var(--e-ink); overflow:auto; }
.e-card-dialog::backdrop { background:rgb(28 31 26 / .45); }
.e-card { display:flex; flex-direction:column; gap:16px; padding:10px 16px 140px; }
.e-card-top { display:flex; align-items:center; gap:8px; }
.e-card-top span { flex:1; }
.e-icon { width:44px; height:44px; margin-left:-10px; border:0; background:none; display:flex; align-items:center; justify-content:center; padding:0; }
.e-card figure { position:relative; margin:0; }
.e-card figure img { width:100%; height:300px; object-fit:cover; border-radius:18px; display:block; background:#F3EDE8; }
.e-card figcaption { position:absolute; left:12px; bottom:12px; background:rgb(255 255 255 / .92); color:#3F453B; font-weight:600; font-size:12px; padding:5px 10px; border-radius:999px; }
.e-card-section { align-self:flex-start; font-size:13px; font-weight:600; text-decoration:none; }
.e-card h2 { margin:0; font-size:24px; line-height:1.2; }
.e-card-price { display:flex; flex-direction:column; gap:6px; padding:16px; border-radius:16px; background:var(--e-orange-soft); }
.e-card-price div { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.e-card-price strong { font-size:30px; font-weight:800; }
.e-card-price s { font-size:16px; color:var(--e-soft); }
.e-save { font-weight:700; font-size:13px; color:#6B2E05; background:#FFE3CF; padding:3px 8px; border-radius:6px; }
.e-card-price small { font-size:13.5px; color:var(--e-muted); }
.e-until { font-size:13.5px; color:#6B2E05; }
.e-card-price p { margin:0; font-size:14px; }
.e-facts { list-style:none; margin:0; padding:0; font-size:14px; color:#3F453B; }
.e-card h3 { margin:0 0 10px; font-size:17px; font-weight:800; }
.e-similar { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.e-similar button { display:flex; flex-direction:column; gap:5px; padding:0; border:0; background:none; text-align:left; }
.e-similar img { width:100%; height:96px; object-fit:cover; border-radius:12px; background:#F3EDE8; }
.e-similar span { font-size:12.5px; font-weight:600; line-height:1.25; }
.e-similar b { font-size:15px; font-weight:800; color:var(--e-orange-ink); }
.e-card-bar { position:fixed; left:0; right:0; bottom:0; padding:12px 16px calc(14px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid var(--e-line); display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:center; }
.e-card-bar .e-btn { flex:1; min-width:200px; max-width:528px; }
.e-weights { display:flex; flex-wrap:wrap; gap:8px; width:100%; max-width:528px; }
.e-weights > button { height:44px; min-width:72px; padding:0 12px; border-radius:10px; border:1.5px solid var(--e-green); background:#fff; color:var(--e-green); font-weight:700; }
.e-weights > button[aria-pressed=true] { background:var(--e-green); color:#fff; }

/* footer and tab bar */
.e-footer { display:flex; flex-direction:column; gap:10px; padding:20px 16px 24px; max-width:640px; margin:0 auto; border-top:1px solid var(--e-line); font-size:13px; color:var(--e-muted); }
.e-footer p { margin:0; }
.e-footer-links { display:flex; flex-wrap:wrap; gap:8px; }
.e-footer-links button { min-height:44px; padding:0 14px; border-radius:10px; border:1px solid #D5D9D2; background:#fff; font-weight:600; font-size:13px; color:var(--e-ink); }
.e-tabbar { position:fixed; left:0; right:0; bottom:0; z-index:9; height:calc(66px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); background:#fff; border-top:1px solid var(--e-line); display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:center; }
.e-tabbar a { display:flex; flex-direction:column; align-items:center; gap:3px; font-size:11px; font-weight:600; color:var(--e-muted); text-decoration:none; min-height:48px; justify-content:center; }
.e-tabbar a[aria-current] { color:var(--e-green); font-weight:700; }

/* tablets and desktops */
@media (min-width:768px) {
  .e-header { padding:14px 24px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-areas:"logo search actions" "open open open"; align-items:center; }
  .e-header-row { display:contents; }
  .e-logo, .e-back, .e-title { grid-area:logo; }
  .e-header-actions { grid-area:actions; }
  .e-search { grid-area:search; }
  .e-open { grid-area:open; }
  .e-main, .e-footer { max-width:1100px; padding-left:24px; padding-right:24px; }
  .e-sections { grid-template-columns:repeat(8,minmax(0,1fr)); }
  .e-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:28px; }
  .e-row:last-child { border-bottom:1px solid var(--e-line); }
  .e-bakery { grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); grid-template-rows:none; }
  .e-bakery-copy { justify-content:center; padding:28px; }
  .e-bakery-photos { aspect-ratio:auto; min-height:320px; }
  .e-chips { margin:0; padding:0; flex-wrap:wrap; }
  .e-tools { max-width:520px; }
  .e-card-dialog { height:auto; max-height:92vh; margin:4vh auto; border-radius:20px; }
  .e-card-bar { position:sticky; }
  .e-similar { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (min-width:1200px) { .e-list { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion:reduce) { .e-app *, .e-app *::before { transition:none !important; animation:none !important; } }
@media (max-width:767px) { body.e-site[data-page=deals] .e-lang { display:none; } }
