/* Deshi Drop — base styles (colors, layout, components) */

  :root {
    --fm-white: #ffffff;
    --fm-charcoal: #24231f;
    --fm-beige: #eee8dd;
    --fm-beige-dark: #ddd2bf;
    --fm-accent: #1c6b3c; /* deshi green */
    --fm-accent-dark: #144f2c;
    --fm-accent-soft: #e3efe6;
    --fm-red: #c8202f; /* deshi red */
    --fm-red-dark: #a1181f;
    --fm-muted: #000000;
    --fm-card: #ffffff;
    --fm-border: #ece6da;
    --shadow-soft: 0 2px 10px rgba(36,35,31,.04);
    --shadow-lift: 0 20px 40px rgba(36,35,31,.1);
    --radius: 18px;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Dark mode no longer auto-applies based on the viewer's system
     setting — a branded storefront should look the same (pure white
     background) for everyone. Add data-theme="dark" to <html> manually
     if you ever want a dark version. */

  :root[data-theme="dark"] {
    --fm-white: #1c1b19;
    --fm-charcoal: #f3f1ec;
    --fm-beige: #28261f;
    --fm-beige-dark: #35322a;
    --fm-card: #242220;
    --fm-border: #3a362e;
    --fm-muted: #a9a398;
  }

  html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--hdr-h, 0px) + 8px); }
  @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background:
      radial-gradient(circle at 0% 0%, rgba(28,107,60,0.04), transparent 45%),
      radial-gradient(circle at 100% 15%, rgba(200,32,47,0.03), transparent 40%),
      var(--fm-white);
    color: var(--fm-charcoal);
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3, .brand { font-family: 'Manrope', sans-serif; font-weight: 800; letter-spacing: -0.5px; }

  a { color: inherit; text-decoration: none; }

  img { max-width: 100%; display: block; }

  .wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }


  /* LANGUAGE TOGGLE */

  .lang-bar {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 3px 10px; margin: 0; color: #000; font-size: 12px; font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, #1c6b3c 0%, #7bc294 22%, #ffffff 50%, #7bc294 78%, #1c6b3c 100%);
    border-bottom: 1px solid rgba(20,79,44,.25);
  }

  .lang-opt { background: none; border: none; color: #000; font-size: 12px; font-weight: 700; cursor: pointer; padding: 3px 6px; font-family: 'Inter'; border-radius: 6px; }

  .lang-opt:hover { background: rgba(28,107,60,.1); }

  .lang-opt:focus-visible { outline: 2px solid var(--fm-accent-dark); outline-offset: 1px; }

  .lang-opt.active { color: var(--fm-accent-dark); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

  .lang-sep { color: var(--fm-accent-dark); opacity: .6; }


  /* HEADER */

  header {
    position: sticky; top: 0; z-index: 50;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--fm-white);
    border-bottom: 1px solid var(--fm-border);
  }

  .nav-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px; gap: 12px; }

  .brand { font-size: 20px; color: var(--fm-accent-dark); white-space: nowrap; }

  .brand span { color: var(--fm-charcoal); }

  .search-box {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: var(--fm-beige); border-radius: 999px; padding: 9px 16px;
    max-width: 420px;
  }

  .search-box input { border: none; background: transparent; outline: none; width: 100%; font-size: 14px; color: var(--fm-charcoal); font-family: 'Inter'; }

  .icon-btn { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--fm-beige); flex-shrink: 0; position: relative; }

  .cart-count { position: absolute; top: -4px; right: -4px; background: var(--fm-red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 50%; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; }

  .nav-links { display: none; gap: 26px; padding: 0 20px 8px; font-size: 14px; font-weight: 500; color: var(--fm-muted); }


  /* HERO */

  .hero {
    padding: 48px 20px 40px;
    background: linear-gradient(135deg, var(--fm-accent-soft) 0%, var(--fm-white) 55%, rgba(200,32,47,0.06) 100%);
  }

  .hero-inner { max-width: 1100px; margin: 0 auto; display: grid; gap: 28px; align-items: center; }

  .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--fm-accent-dark); margin-bottom: 10px; }

  .hero h1 { font-size: 36px; line-height: 1.12; margin: 0 0 16px; letter-spacing: -1px; }

  .hero p { color: var(--fm-muted); font-size: 16px; line-height: 1.7; margin: 0 0 28px; max-width: 460px; font-weight: 400; }

  .btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; border: none; }

  .btn-primary { background: linear-gradient(135deg, var(--fm-accent) 0%, var(--fm-accent-dark) 100%); color: #fff; }

  .btn-primary:hover { background: linear-gradient(135deg, var(--fm-accent-dark) 0%, #123a21 100%); }

  .btn-ghost { background: transparent; border: 1.5px solid var(--fm-border); color: var(--fm-charcoal); margin-left: 10px; }


  /* Desktop: center the whole page content instead of a left/right split layout */


  .hero-art {
    border-radius: 24px;
    background: linear-gradient(145deg, var(--fm-accent-soft) 0%, var(--fm-beige-dark) 60%, rgba(200,32,47,0.12) 100%);
    overflow: hidden; position: relative;
    padding: 28px 24px;
  }

  .biz-card { width: 100%; }

  .biz-card h3 {
    font-size: 15px; font-weight: 700; color: var(--fm-accent-dark);
    text-transform: uppercase; letter-spacing: .5px; margin: 0 0 10px;
  }

  .biz-card ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }

  .biz-card li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--fm-charcoal); line-height: 1.4; }

  .biz-card li svg { flex-shrink: 0; margin-top: 2px; }

  .biz-card .biz-divider { height: 1px; background: var(--fm-border); margin: 16px 0; }

  .biz-card .biz-areas { font-size: 13.5px; color: var(--fm-muted); line-height: 1.6; }

  .biz-card .biz-areas b { color: var(--fm-charcoal); }

  .biz-card .biz-fee {
    margin-top: 14px; display: inline-block; background: var(--fm-red); color: #fff;
    font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  }


  /* SOCIAL ICON BUTTONS (used by the header social bar) */

  .social-float {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; justify-items: center;
    padding: 10px 8px; border-radius: 18px;
    background: linear-gradient(180deg, var(--fm-accent) 0%, var(--fm-accent-dark) 55%, #fff 150%);
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
  }

  .social-float a {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: transform .2s ease;
    cursor: pointer;
  }

  .social-float a:hover { transform: scale(1.1); }


  /* FLOATING WHATSAPP BUTTON — same pill/padding/shadow treatment as
     .social-float, so it reads as part of the same design system */

  .wa-wrap {
    position: fixed; right: 16px; bottom: 90px; z-index: 60;
    padding: 10px; border-radius: 999px;
    background: linear-gradient(180deg, #25D366 0%, #128C4A 100%);
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
  }

  .wa-float {
    width: 42px; height: 42px; border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: transform .2s ease;
    cursor: pointer;
  }

  .wa-float:hover { transform: scale(1.1); }


  /* SECTION HEADINGS */

  .section { padding: 44px 20px; }

  .section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }

  .section-head h2 { font-size: 24px; margin: 0; }

  .section-head a { font-size: 13px; font-weight: 600; color: var(--fm-accent-dark); }


  /* CATEGORY PILLS */

  .cat-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }

  .cat-pill {
    flex-shrink: 0; padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--fm-card); border: 1px solid var(--fm-border); white-space: nowrap;
  }

  .cat-pill.active { background: var(--fm-charcoal); color: var(--fm-white); border-color: var(--fm-charcoal); }


  /* PRODUCT GRID */

  .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }


  .card {
    background: var(--fm-card); border: 1px solid var(--fm-border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-soft);
    transition: box-shadow .3s ease, transform .3s ease;
  }

  .card:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); }

  .card:hover .add-btn { background: var(--fm-accent); }

  .add-btn { transition: background .25s ease, transform .15s ease; }

  .add-btn:active { transform: scale(0.9); }

  .fade-in { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }

  .fade-in.visible { opacity: 1; transform: translateY(0); }


  /* Real product photo cards + 3D tilt/zoom hover ("product viewer" feel) */

  .card-img.has-photo { background: #f2efe9; }

  .product-photo {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .25s ease-out;
    will-change: transform;
  }

  .tilt-card { transition: transform .15s ease-out; transform-style: preserve-3d; will-change: transform; }

  .tilt-card.tilt-touch { transform: perspective(700px) rotateY(6deg) rotateX(-3deg) translateY(-4px); }

  .card-img {
    aspect-ratio: 1/1; background: var(--fm-beige); display: flex; align-items: center; justify-content: center; position: relative;
  }

  .card-img svg { width: 58%; height: 58%; }

  .tag { position: absolute; top: 10px; left: 10px; background: var(--fm-red); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }

  .card-body { padding: 13px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

  .card-cat { font-size: 11px; color: var(--fm-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }

  .card-name { font-size: 14px; font-weight: 600; line-height: 1.35; }

  .card-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 6px; }

  .price { font-family: 'Manrope'; font-weight: 700; font-size: 15px; }

  .add-btn {
    width: 32px; height: 32px; border-radius: 50%; background: var(--fm-charcoal); color: var(--fm-white);
    display: flex; align-items: center; justify-content: center; font-size: 18px; border: none; cursor: pointer; flex-shrink: 0;
  }


  /* NEWSLETTER */

  .newsletter { background: var(--fm-beige); padding: 48px 20px; text-align: center; }

  .newsletter h3 { font-size: 22px; margin: 0 0 8px; }

  .newsletter p { color: var(--fm-muted); font-size: 14px; margin: 0 0 20px; }

  .news-form { display: flex; width: 100%; gap: 10px; max-width: 420px; margin: 0 auto; }

  .news-form input { flex: 1; min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--fm-border); font-family: 'Inter'; font-size: 14px; outline: none; }


  /* FOOTER */

  footer { padding: 40px 20px 32px; border-top: 1px solid var(--fm-border); }

  .foot-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }

  footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 12px; color: var(--fm-muted); }

  footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }

  .foot-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--fm-border); font-size: 12px; color: var(--fm-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }


  /* bottom mobile nav */

  .mobile-tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--fm-card); border-top: 1px solid var(--fm-border);
    display: flex; justify-content: space-around; padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .tab-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--fm-muted); font-weight: 600; }

  .tab-item { position: relative; }
  .tab-item.active { color: #000; }
  .tab-item.active::before { content: ""; position: absolute; top: -10px; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--fm-accent); }

  a.tab-item { text-decoration: none; }
  .tab-item { min-width: 52px; }

  body { padding-bottom: 70px; }




  /* ARABIC (RTL) / BANGLA FONTS */

  :lang(ar), :lang(ar) * { font-family: 'Noto Sans Arabic', 'Inter', sans-serif; }
  :lang(bn), :lang(bn) * { font-family: 'Noto Sans Bengali', 'Inter', sans-serif; }
  :lang(ar) .brand, :lang(ar) .brand * { letter-spacing: 0; }
  :lang(ar) .eyebrow, :lang(ar) .card-cat, :lang(ar) footer h4, :lang(ar) .biz-card h3, :lang(ar) .tag { letter-spacing: 0; text-transform: none; }
  [dir="rtl"] .btn-ghost { margin-left: 0; margin-right: 10px; }


  /* WELCOME POPUP */

  body.modal-open { overflow: hidden; }

  .welcome-overlay {
    position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(0,0,0,.55);
  }

  .welcome-overlay[hidden] { display: none; }

  .welcome-card {
    position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow-y: auto;
    padding: 28px 22px 22px; border-radius: 22px; color: #000; font-weight: 700;
    background: linear-gradient(150deg, #8fd1a4 0%, #d4eedc 45%, #ffffff 100%);
    border: 2px solid var(--fm-accent); box-shadow: 0 24px 60px rgba(0,0,0,.35);
  }

  .welcome-close {
    position: absolute; top: 10px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%;
    border: none; background: rgba(255,255,255,.8); color: #000; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer;
  }

  .welcome-close:focus-visible, .welcome-btn:focus-visible { outline: 3px solid #000; outline-offset: 2px; }

  .welcome-card h2 { margin: 0 28px 14px; font-size: 19px; line-height: 1.5; text-align: center; color: #000; display: flex; flex-direction: column; }

  .verse { margin: 14px 0; padding: 14px 14px 12px; border-radius: 14px; background: rgba(255,255,255,.75); text-align: center; }

  .quran-ar { margin: 0 0 10px; font-family: 'Amiri', 'Noto Naskh Arabic', serif; font-size: 26px; line-height: 2; font-weight: 700; color: #000; }

  .verse p { margin: 4px 0; font-size: 14px; line-height: 1.55; font-weight: 700; }

  .verse figcaption { margin-top: 8px; font-size: 12px; font-weight: 800; }

  .welcome-btn {
    display: block; width: 100%; padding: 13px 16px; border: none; border-radius: 999px; cursor: pointer;
    font-size: 14px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--fm-accent) 0%, var(--fm-accent-dark) 100%);
  }


  header { box-shadow: 0 2px 10px rgba(0,0,0,.06); }


  /* ===== WELCOME POPUP: prayer section, entrance + exit animation ===== */
  .welcome-overlay { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .welcome-card h2 { margin: 0 28px 14px; }
  .wl-prayer { margin: 14px 0 0; padding: 12px 12px 12px; border-radius: 14px; text-align: center; background: rgba(255,255,255,.8); border: 1.5px solid rgba(28,107,60,.5); }
  .wl-prayer h3 { margin: 0 0 9px; font: 800 15px/1.3 'Manrope', sans-serif; letter-spacing: 0; color: #000; }
  .wl-prayer-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .wl-prayer-row li { display: flex; flex-direction: column; gap: 1px; padding: 7px 4px; border-radius: 10px; background: #fff; border: 1px solid rgba(20,79,44,.22); }
  .wl-prayer-row .pn { font-size: 12px; font-weight: 700; }
  .wl-prayer-row .pt { font-family: 'Manrope', sans-serif; font-size: 15px; font-weight: 800; white-space: nowrap; }
  .wl-prayer-row .pt small { margin-left: 2px; font-size: 10px; font-weight: 700; }
  .wl-prayer-row li.next { background: #e6f6ec; border-color: var(--fm-accent); box-shadow: 0 0 0 1px var(--fm-accent); }
  @media (min-width: 520px) { .wl-prayer-row { grid-template-columns: repeat(6, 1fr); gap: 5px; } .wl-prayer-row .pn { font-size: 11.5px; } .wl-prayer-row .pt { font-size: 13.5px; } .wl-prayer-row .pt small { display: block; margin: 0; font-size: 9.5px; } }
  .wl-cta { position: sticky; bottom: -22px; margin: 14px -22px -22px; padding: 14px 22px 22px; background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.92) 38%); }

  @media (prefers-reduced-motion: no-preference) {
    .welcome-overlay:not([hidden]) { animation: wlFade .35s ease-out both; }
    .welcome-overlay.closing { animation: wlFadeOut .25s ease-in both; }
    .welcome-overlay:not([hidden]) .welcome-card { animation: wlCardIn .6s cubic-bezier(.2,.9,.25,1.12) both; }
    .welcome-overlay.closing .welcome-card { animation: wlCardOut .25s ease-in both; }
    .welcome-overlay:not([hidden]):not(.closing) .wl-in { animation: wlRise .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.16s + var(--i, 0) * .09s); }
    .welcome-overlay:not([hidden]):not(.closing) .wl-prayer-row li { animation: wlPop .45s cubic-bezier(.2,.9,.3,1.25) both; animation-delay: calc(.4s + var(--j, 0) * .06s); }
    .welcome-overlay:not([hidden]):not(.closing) .wl-prayer-row li.next { animation: wlPop .45s cubic-bezier(.2,.9,.3,1.25) both, wlGlow 2.6s ease-in-out 1.2s infinite; animation-delay: calc(.4s + var(--j, 0) * .06s), 1.2s; }
    .welcome-overlay:not([hidden]):not(.closing) .welcome-close { animation: wlSpin .6s .3s cubic-bezier(.2,.8,.2,1) both; }
    .welcome-btn { position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 6px 16px rgba(20,79,44,.3); }
    .welcome-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(20,79,44,.35); }
    .welcome-btn:active { transform: scale(.98); }
    .welcome-btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: wlSheen 1.1s 1.1s ease-out 1 both; }
    @keyframes wlFade { from { opacity: 0; } to { opacity: 1; } }
    @keyframes wlFadeOut { from { opacity: 1; } to { opacity: 0; } }
    @keyframes wlCardIn { from { opacity: 0; transform: translateY(28px) scale(.94); } to { opacity: 1; transform: none; } }
    @keyframes wlCardOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px) scale(.96); } }
    @keyframes wlRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
    @keyframes wlPop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
    @keyframes wlGlow { 0%, 100% { box-shadow: 0 0 0 1px var(--fm-accent), 0 0 0 0 rgba(28,107,60,.35); } 50% { box-shadow: 0 0 0 1px var(--fm-accent), 0 0 0 5px rgba(28,107,60,0); } }
    @keyframes wlSpin { from { opacity: 0; transform: rotate(-90deg) scale(.6); } to { opacity: 1; transform: none; } }
    @keyframes wlSheen { from { left: -60%; } to { left: 140%; } }
  }

  /* ===== HOME <-> QURAN TRANSITION =====
     Browsers with the View Transitions API crossfade + slide the page (tab bar stays put);
     others get the same motion from a small enter animation on the incoming view. */
  .mobile-tabbar { view-transition-name: dd-tabbar; }
  @media (prefers-reduced-motion: no-preference) {
    ::view-transition-group(dd-tabbar) { animation-duration: 0s; }
    ::view-transition-old(root) { animation: ddVtOut .2s cubic-bezier(.4,0,1,1) both; }
    ::view-transition-new(root) { animation: ddVtIn .34s cubic-bezier(.2,.8,.2,1) both; }
    html[data-vt="back"]::view-transition-old(root) { animation-name: ddVtOutBack; }
    html[data-vt="back"]::view-transition-new(root) { animation-name: ddVtInBack; }
    @keyframes ddVtOut { to { opacity: 0; transform: translateX(-24px); } }
    @keyframes ddVtIn { from { opacity: 0; transform: translateX(28px); } }
    @keyframes ddVtOutBack { to { opacity: 0; transform: translateX(24px); } }
    @keyframes ddVtInBack { from { opacity: 0; transform: translateX(-28px); } }
    .vt-in-fwd { animation: ddVtIn .34s cubic-bezier(.2,.8,.2,1) both; }
    .vt-in-back { animation: ddVtInBack .34s cubic-bezier(.2,.8,.2,1) both; }
  }

.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
