/* ═══════════════════════════════════════════════════════════════
   home.css — clean storefront layer (header · banner · category
   tiles · product rows · footer).  Loaded AFTER style.css + theme.
   Colours follow the admin theme (--brand-*), so changing the theme
   in Admin → Settings still recolours everything here.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --et-ink:     #14182b;
  --et-mute:    #5d647a;
  --et-line:    #e5e8f2;
  --et-panel:   color-mix(in srgb, var(--brand-600, #4f46e5) 5%, #ffffff);
  --et-accent:  var(--brand-700, #4338ca);
  --et-accent-d:var(--brand-900, #312e81);
  --et-star:    #f5b301;
  --et-off:     #e11d48;
  --et-font:    'Inter', 'Noto Sans Bengali', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body { background: #fff; font-family: var(--et-font); color: var(--et-ink); }
.et-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.et-wrap, .et-nav, .et-footer, .et-sec, .et-card { font-family: var(--et-font); }

/* ── Announcement (only shows when admin has set a message) ──── */
.et-ann { background: var(--et-accent-d); color: #fff; font-size: .8rem; text-align: center; padding: 8px 16px; line-height: 1.4; }
.et-ann b { background: rgba(255,255,255,.18); padding: 1px 8px; border-radius: 6px; letter-spacing: .05em; margin-left: 4px; }

/* ── Header ──────────────────────────────────────────────────── */
.et-nav { position: sticky; top: 0; z-index: 900; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--et-line); }
.et-nav-in { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.et-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--et-ink); flex: none; }
.et-logo img { height: min(var(--logo-h, 40px), 44px); width: auto; max-width: 190px; object-fit: contain; display: block; }
.et-logo-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--et-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.et-logo-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--et-accent); }

.et-search { flex: 1 1 auto; max-width: 440px; margin: 0 auto; display: flex; align-items: center; background: #f3f4fa; border: 1.5px solid transparent; border-radius: 999px; padding: 0 6px 0 18px; transition: border-color .15s, background .15s, box-shadow .15s; }
.et-search:focus-within { background: #fff; border-color: var(--brand-500, #6366f1); box-shadow: 0 0 0 4px rgba(var(--brand-rgb, 79,70,229), .12); }
.et-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font: inherit; font-size: .92rem; height: 42px; color: var(--et-ink); box-shadow: none; padding: 0; }
.et-search input::placeholder { color: #8a91a6; }
.et-search button { border: 0; background: transparent; color: var(--et-ink); width: 36px; height: 36px; border-radius: 50%; font-size: 1.15rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.et-search button:hover { background: rgba(var(--brand-rgb, 79,70,229), .1); color: var(--et-accent); }

.et-links { display: flex; align-items: center; gap: 4px; flex: none; }
.et-links > a, .et-dd-btn { color: var(--et-mute); font: inherit; font-weight: 600; font-size: .93rem; padding: 8px 12px; border-radius: 10px; text-decoration: none; background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.et-links > a:hover, .et-dd-btn:hover, .et-dd.open .et-dd-btn { color: var(--et-accent); background: var(--et-panel); }
.et-links > a.is-active { color: var(--et-ink); }

.et-dd { position: relative; }
.et-dd-btn i { font-size: .8rem; transition: transform .15s; }
.et-dd.open .et-dd-btn i { transform: rotate(180deg); }
.et-dd-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--et-line); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(20,24,43,.22); padding: 8px; z-index: 950; }
.et-dd.open .et-dd-menu { display: block; }
.et-dd-menu a { display: flex; justify-content: space-between; gap: 14px; padding: 9px 12px; border-radius: 9px; color: var(--et-ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.et-dd-menu a:hover { background: var(--et-panel); color: var(--et-accent); }
.et-dd-menu a em { font-style: normal; color: #8a91a6; font-weight: 500; }

.et-login { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 12px; background: var(--et-panel); color: var(--et-accent); font-weight: 700; font-size: .92rem; text-decoration: none; border: 1px solid color-mix(in srgb, var(--brand-600, #4f46e5) 14%, #fff); white-space: nowrap; }
.et-login:hover { background: color-mix(in srgb, var(--brand-600, #4f46e5) 10%, #fff); color: var(--et-accent-d); }

.et-lang { display: inline-flex; background: #f3f4fa; border-radius: 999px; padding: 3px; }
.et-lang a { padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--et-mute); text-decoration: none; }
.et-lang a.active { background: #fff; color: var(--et-accent); box-shadow: 0 1px 3px rgba(20,24,43,.12); }

.et-cart { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--et-ink); font-size: 1.4rem; text-decoration: none; flex: none; transition: transform .2s; }
.et-cart:hover { background: var(--et-panel); color: var(--et-accent); }
.et-cart .cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--et-off); color: #fff; font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* Mobile menu (hidden on desktop) */
.et-burger, .et-drawer, .et-drawer-bg { display: none; }
@media (max-width: 860px) {
  .et-nav-in { flex-wrap: nowrap; gap: 6px; padding: 8px 0; min-height: 0; }
  .et-logo { margin-right: auto; }
  /* top bar = logo + cart + menu only */
  .et-nav-in > .et-search, .et-nav-in > .et-links, .et-nav-in > .et-lang { display: none; }
  .et-burger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--et-panel); color: var(--et-ink); font-size: 1.45rem; cursor: pointer; flex: none; }
  .et-drawer-bg { display: block; position: fixed; inset: 0; background: rgba(20,24,43,.45); opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 1000; }
  .et-drawer-bg.open { opacity: 1; visibility: visible; }
  .et-drawer { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); background: #fff; z-index: 1001; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); box-shadow: -18px 0 40px -16px rgba(20,24,43,.35); }
  .et-drawer.open { transform: none; }
  .et-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 1.05rem; }
  .et-drawer-head button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: var(--et-panel); font-size: 1.2rem; cursor: pointer; color: var(--et-ink); }
  .et-drawer .et-search { display: flex; max-width: none; margin: 0 0 14px; }
  .et-drawer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-weight: 700; font-size: .88rem; color: var(--et-mute); }
  .et-drawer-title { margin: 14px 4px 6px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a91a6; }
  .et-drawer-links { display: flex; flex-direction: column; }
  .et-drawer-links a { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 10px; color: var(--et-ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
  .et-drawer-links a i { font-size: 1.2rem; color: var(--et-accent); }
  .et-drawer-links a em { margin-left: auto; font-style: normal; color: #8a91a6; font-weight: 500; font-size: .82rem; }
  .et-drawer-links a:active, .et-drawer-links a:hover { background: var(--et-panel); }
  body.et-menu-open { overflow: hidden; }
}
@media (max-width: 520px) { .et-wrap { padding: 0 14px; } .et-logo img { max-width: 150px; } }

/* ── Banner (existing carousel, kept; now shown uncropped) ──── */
.et-banner { padding-top: 18px; }
.et-banner .banner-carousel { margin: 0; border-radius: 18px; border: 1px solid var(--et-line); box-shadow: none; background: #f3f4fa; transition: height .45s ease; }
.et-banner .banner-track { align-items: flex-start; }
.et-banner .banner-slide img { display: block; width: 100%; height: auto; aspect-ratio: auto; border-radius: 0; object-fit: contain; }
.et-banner .banner-dots { bottom: 12px; background: rgba(15,18,38,.38); padding: 5px 10px; gap: 6px; }
.et-banner .banner-dots .dot { width: 7px; height: 7px; padding: 0; }
.et-banner .banner-dots .dot.active { width: 22px; background: #fff; box-shadow: none; }

/* ── Category tiles ──────────────────────────────────────────── */
.et-quick { padding: 26px 0 8px; }
.et-quick-in { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 10px; -webkit-overflow-scrolling: touch; }
.et-quick-in::-webkit-scrollbar { display: none; }
.et-quick-in > a:first-child { margin-left: auto; }
.et-quick-in > a:last-child  { margin-right: auto; }
.et-tile { flex: none; width: 100px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--et-ink); text-align: center; }
.et-tile-box { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; background: linear-gradient(145deg, var(--brand-600, #4f46e5), var(--et-accent-d)); box-shadow: 0 8px 18px -8px rgba(var(--brand-rgb, 79,70,229), .65); transition: transform .18s, box-shadow .18s; }
.et-tile-box i { font-size: 1.7rem; }
.et-tile:hover .et-tile-box { transform: translateY(-3px); box-shadow: 0 12px 22px -8px rgba(var(--brand-rgb, 79,70,229), .7); }
.et-tile-name { font-size: .8rem; font-weight: 600; line-height: 1.3; color: #2a3048; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.et-tile.is-active .et-tile-name { color: var(--et-accent); font-weight: 800; }
.et-tile.is-active .et-tile-box { outline: 3px solid color-mix(in srgb, var(--brand-600, #4f46e5) 30%, #fff); outline-offset: 3px; }

/* ── Section panel ───────────────────────────────────────────── */
.et-main { padding-bottom: 36px; }
.et-sec { position: relative; background: var(--et-panel); border-radius: 22px; padding: 20px 22px 22px; margin-top: 22px; }
.et-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.et-sec-title { margin: 0; font-size: 1.2rem; font-weight: 800; color: var(--et-accent-d); letter-spacing: -.01em; line-height: 1.3; padding-left: 12px; border-left: 4px solid var(--et-accent); }
.et-sec-all { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .92rem; color: var(--brand-600, #4f46e5); text-decoration: none; white-space: nowrap; }
.et-sec-all:hover { color: var(--et-accent-d); }

.et-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -2px; -webkit-overflow-scrolling: touch; }
.et-track::-webkit-scrollbar { display: none; }
.et-track > .et-card { flex: 0 0 204px; scroll-snap-align: start; }

.et-arrow { position: absolute; top: 50%; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--et-line); background: #fff; color: var(--et-ink); font-size: 1.05rem; display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 16px -4px rgba(20,24,43,.25); transform: translateY(-30%); transition: opacity .15s, transform .15s; opacity: 0; }
.et-arrow:hover { color: var(--et-accent); }
.et-arrow.l { left: -12px; } .et-arrow.r { right: -12px; }
@media (hover: hover) and (min-width: 900px) { .et-arrow { display: inline-flex; } .et-sec:hover .et-arrow { opacity: 1; } }

/* ── Product card ────────────────────────────────────────────── */
.et-card { background: #fff; border: 1px solid var(--et-line); border-radius: 14px; padding: 7px 7px 12px; display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.et-card:hover { border-color: color-mix(in srgb, var(--brand-600, #4f46e5) 35%, #fff); box-shadow: 0 10px 24px -14px rgba(var(--ink-rgb, 20,24,43), .35); }
.et-cover-wrap { position: relative; }
.et-cover { display: block; aspect-ratio: 4 / 5; background: #fff; border-radius: 9px; overflow: hidden; }
.et-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.et-nocover { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: #c7cbe0; background: var(--et-panel); }
.et-off { position: absolute; top: 6px; left: 6px; background: var(--et-off); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; line-height: 1.2; }
.et-add { position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--et-accent); color: #fff; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 14px -4px rgba(var(--brand-rgb, 79,70,229), .6); transition: transform .15s, background .15s; padding: 0; }
.et-add:hover { background: var(--et-accent-d); transform: scale(1.06); }
.et-add:disabled { opacity: .8; cursor: default; transform: none; }
.et-add .loader { animation: etspin .8s linear infinite; }
@keyframes etspin { to { transform: rotate(360deg); } }
.et-body { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 0; text-decoration: none; color: inherit; flex: 1; }
.et-title { font-size: .9rem; font-weight: 700; line-height: 1.38; color: var(--et-ink); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.76em; }
.et-body:hover .et-title { color: var(--et-accent); }
.et-stars { display: inline-flex; align-items: center; gap: 1px; color: #d9dcea; font-size: .82rem; }
.et-stars .on { color: var(--et-star); }
.et-stars small { margin-left: 5px; color: var(--et-mute); font-size: .72rem; font-weight: 600; }
.et-price { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: auto; padding-top: 2px; }
.et-price s { color: #8a91a6; font-size: .8rem; font-weight: 500; }
.et-price b { color: var(--brand-700, #1d4ed8); font-size: 1.02rem; font-weight: 800; }

/* ── Interstitial banner between sections ───────────────────── */
.et-inter { margin-top: 22px; }
.et-inter a, .et-inter > div { display: block; border-radius: 18px; overflow: hidden; border: 1px solid var(--et-line); }
.et-inter img { display: block; width: 100%; height: auto; }

/* ── Listing page (search / category / all) ─────────────────── */
.et-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; color: var(--et-mute); font-size: .84rem; }
.et-crumbs a { color: var(--et-mute); text-decoration: none; font-weight: 600; }
.et-crumbs a:hover { color: var(--et-accent); }
.et-crumbs i { font-size: .7rem; }
.et-crumbs span { color: var(--et-ink); font-weight: 700; }

.et-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 14px 0 18px; }
.et-bar h1 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--et-accent-d); padding-left: 12px; border-left: 4px solid var(--et-accent); }
.et-bar p { margin: 4px 0 0 16px; color: var(--et-mute); font-size: .85rem; }
.et-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.et-filters input[type=number], .et-filters select { height: 40px; border: 1.5px solid var(--et-line); border-radius: 10px; background: #fff; padding: 0 12px; font: inherit; font-size: .88rem; color: var(--et-ink); box-shadow: none; width: auto; }
.et-filters input[type=number] { width: 88px; }
.et-filters input:focus, .et-filters select:focus { outline: 0; border-color: var(--brand-500, #6366f1); }
.et-check { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 600; color: var(--et-mute); cursor: pointer; }
.et-check input { accent-color: var(--et-accent); width: 16px; height: 16px; }
.et-btn { height: 40px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--et-accent); color: #fff; font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.et-btn:hover { background: var(--et-accent-d); color: #fff; }
.et-btn.ghost { background: var(--et-panel); color: var(--et-accent); }
.et-btn.ghost:hover { background: color-mix(in srgb, var(--brand-600, #4f46e5) 12%, #fff); color: var(--et-accent-d); }

.et-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(198px, 1fr)); gap: 16px; }
.et-empty { text-align: center; padding: 56px 16px; color: var(--et-mute); background: var(--et-panel); border-radius: 22px; }
.et-empty i { font-size: 2.6rem; color: var(--et-accent); }
.et-empty h2 { margin: 10px 0 4px; color: var(--et-ink); font-size: 1.15rem; }
.et-empty p { margin: 0 0 18px; }
.et-pager { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.et-pager a, .et-pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--et-line); background: #fff; color: var(--et-ink); font-weight: 700; font-size: .9rem; text-decoration: none; }
.et-pager a:hover { border-color: var(--et-accent); color: var(--et-accent); }
.et-pager .cur { background: var(--et-accent); border-color: var(--et-accent); color: #fff; }

/* ── Footer ──────────────────────────────────────────────────── */
.et-footer { background: var(--et-panel); margin-top: 36px; padding: 30px 0 26px; text-align: center; color: var(--et-mute); font-size: .88rem; }
.et-pay { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 18px; font-weight: 600; }
.et-pay img.rzp { height: 22px; width: auto; }
.et-pay .logos { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.et-pay .logos img { height: 20px; width: auto; max-width: 54px; object-fit: contain; }
.et-flinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 14px; }
.et-flinks a { color: var(--et-accent-d); font-weight: 600; text-decoration: none; }
.et-flinks a:hover { color: var(--brand-600, #4f46e5); text-decoration: underline; }
.et-copy { font-size: .8rem; }

/* ── Phones ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .et-sec { padding: 16px 12px 16px 14px; border-radius: 18px; margin-left: -6px; margin-right: -6px; }
  .et-sec-title { font-size: 1.05rem; }
  .et-track { gap: 12px; }
  .et-track > .et-card { flex-basis: 158px; }
  .et-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .et-title { font-size: .84rem; }
  /* Category tiles: fixed 4-per-row grid on phones (no sideways scrolling) */
  .et-quick { padding-top: 18px; }
  .et-quick-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 6px; overflow: visible; padding: 4px 0 8px; }
  .et-quick-in > a:first-child, .et-quick-in > a:last-child { margin: 0; }
  .et-tile { width: auto; min-width: 0; gap: 7px; }
  .et-tile-box { width: 56px; height: 56px; font-size: 1.3rem; border-radius: 16px; }
  .et-tile-box i { font-size: 1.5rem; }
  .et-tile-name { font-size: .72rem; line-height: 1.25; }
  .et-bar { align-items: flex-start; }
  .et-filters { width: 100%; }
  .et-filters .et-btn, .et-filters select { flex: 1; }
  .et-banner .banner-carousel { border-radius: 14px; }
  .et-footer { padding-bottom: 90px; } /* clear the mobile bottom bar */
}
@media (prefers-reduced-motion: reduce) {
  .et-banner .banner-carousel, .et-tile-box, .et-card, .et-add { transition: none; }
}

@media (max-width: 360px) {
  .et-tile-box { width: 50px; height: 50px; font-size: 1.15rem; border-radius: 14px; }
  .et-tile-name { font-size: .68rem; }
}
