/* ============================================================
   Apon BD — Storefront styles (mobile-first, no framework)
   Phase 1: design system + foundation layout. Components for
   product cards / cart / checkout / landing pages extend in Phase 5+.
   ============================================================ */


/*
 * GLOBAL BENGALI TYPOGRAPHY
 * -------------------------
 * Any Bengali/Bangla text rendered anywhere in this application
 * must use the Hind Siliguri font.
 *
 * Scope:
 * - Storefront / Frontend
 * - Product pages
 * - Buttons and CTAs
 * - Cart
 * - Checkout
 * - Reviews
 * - Homepage sections
 * - Static/content pages
 * - Admin Dashboard
 * - Admin forms/tables/modals
 *
 * Do not introduce another Bengali font without an explicit
 * architectural decision.
 */


:root {
    --brand: #0e7c3a;
    --brand-dark: #0a5c2b;
    --brand-soft: #e8f5ec;
    --accent: #f59e0b;
    --ink: #1a1a1a;
    --muted: #5f6368;
    --line: #e5e7eb;
    --bg: #ffffff;
    --bg-alt: #f7f8f7;
    --danger: #c0392b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, .08);
    --font: "Hind Siliguri", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --max: 1140px;
}


*, *::before, *::after { box-sizing: border-box; }
fieldset { min-width: 0; max-width: 100%; }


html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }


body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
}


img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; }
p { margin: 0 0 1em; }


.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }


.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 0; }


/* ── Header ── */
.top-strip {
    background: var(--brand-dark); color: #fff;
    text-align: center; font-size: 14px; padding: 6px 12px;
}
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
    width: 40px; height: 40px; border-radius: 10px; flex: 0 0 40px;
    background: var(--brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700;
}
.brand-text { font-weight: 700; font-size: 19px; line-height: 1.15; }
.brand-text small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 40px; object-fit: cover; }


.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); }


.main-nav { display: none; flex-direction: column; gap: 2px; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 14px; }
.main-nav.open { display: flex; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.main-nav a:last-child { border-bottom: 0; }
.main-nav .nav-cta { color: var(--brand); }
.cart-count { display: inline-block; min-width: 22px; text-align: center; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; font-size: 13px; padding: 0 6px; }


/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 12px 22px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 16px; line-height: 1.45; text-align: center;
    text-decoration: none; cursor: pointer; overflow-wrap: break-word;
    border: 2px solid transparent; transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--brand-dark); border-color: var(--brand); }
.btn-lg { min-height: 54px; font-size: 17px; padding: 14px 28px; }


/* ── Hero / sections ── */
.hero { background: linear-gradient(180deg, var(--brand-soft), #fff); padding: 40px 0 32px; }
.hero-inner { display: grid; gap: 24px; }
.eyebrow { color: var(--brand-dark); font-weight: 700; margin-bottom: .4em; }
.hero h1 { font-size: 30px; }
.lead { color: var(--muted); font-size: 17px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero-media { display: flex; }
.hero-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 28px 22px; width: 100%;
    display: flex; flex-direction: column; gap: 8px; justify-content: center;
}
.hero-card-badge { align-self: flex-start; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 12px; }
.hero-card-title { font-weight: 700; font-size: 18px; }
.hero-card-price { color: var(--brand-dark); font-weight: 700; font-size: 22px; }


.section { padding: 36px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 24px; text-align: center; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: 1fr; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature h3 { margin-bottom: .3em; color: var(--brand-dark); }
.feature p { color: var(--muted); margin: 0; }
.cta-band { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-band .hero-ctas { justify-content: center; }


/* ── FAQ / forms / flash ── */
.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; min-height: 44px; }
.flash-wrap { padding-top: 12px; }
.flash { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 10px; font-weight: 600; }
.flash-success { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid var(--brand); }
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid var(--danger); }
.flash-info { background: #e8f0fe; color: #1a56db; border: 1px solid #1a56db; }


.error-page { text-align: center; padding: 30px 0; }
.debug-box { text-align: left; background: #111; color: #eee; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 13px; }


/* ── Footer ── */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 20px; }
.footer-grid { display: grid; gap: 18px; padding-top: 28px; padding-bottom: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.footer-bottom { border-top: 1px solid var(--line); padding: 12px 0; color: var(--muted); font-size: 14px; text-align: center; }


/* ── Landing mode (Phase 5 extends) ── */
body.landing .site-header, body.landing .site-footer { display: none; }
.sticky-cta {
    position: sticky; bottom: 0; z-index: 40; background: #fff;
    border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    display: flex; gap: 10px;
}
.sticky-cta .btn { flex: 1; }


/* ── Breakpoints ── */
@media (min-width: 640px) {
    .hero h1 { font-size: 36px; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}
@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .main-nav { display: flex; position: static; flex-direction: row; align-items: center; gap: 22px; border: 0; padding: 0; }
    .main-nav a { border: 0; padding: 6px 0; }
    .hero-inner { grid-template-columns: 1.1fr .9fr; align-items: center; }
    .hero { padding: 64px 0 56px; }
    .section { padding: 56px 0; }
}