/* ============================================================
   Charukon — Apple UI style v2 (premium)
   Apple.com-inspired, not a clone. Clean minimal white,
   large type, generous whitespace, #f5f5f7 soft sections,
   Inter + Hind Siliguri, soft layered shadows, refined pills.
   No build step: this file is linked directly from public/css.
   ============================================================ */

:root {
    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-elevated: #fbfbfd;
    --bg-dark: #000000;
    --text: #1d1d1f;
    --text-2: #424245;
    --muted: #6e6e73;
    --border: #d2d2d7;
    --border-soft: #e8e8ed;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-dark: #2997ff;
    --success: #1d7a3d;
    --danger: #d70015;
    --gold: #b7791f;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.06), 0 24px 56px rgba(0, 0, 0, 0.12);
    --font: "Inter", "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Bengali", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }

::selection { background: rgba(0, 113, 227, 0.16); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}
.site-header.scrolled {
    background: rgba(251, 251, 253, 0.92);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 64px;
}
.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    letter-spacing: -0.02em;
    line-height: 1;
}
.logo:hover { text-decoration: none; }
.logo-tag {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.06em;
    line-height: 1.2;
    margin-top: 2px;
}
.main-nav { display: flex; gap: 30px; margin-left: auto; }
.main-nav a {
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    opacity: 0.85;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}
.main-nav a:hover { opacity: 1; text-decoration: none; border-bottom-color: var(--accent); }
.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 980px;
    background: var(--bg-soft);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
}
.cart-link:hover { text-decoration: none; background: #e8e8ed; }
.cart-link:active { transform: scale(0.97); }
.cart-link svg { flex: none; }
.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 5px;
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 113, 227, 0.28); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(0, 113, 227, 0.34); }
.btn-outline { border-color: var(--border); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--text); box-shadow: var(--shadow-sm); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; box-shadow: var(--shadow-md); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-block { display: block; width: 100%; margin-top: 12px; }
.btn-orange { background: #f05020; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(240, 80, 32, 0.32); }
.btn-orange:hover { background: #d9481c; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(240, 80, 32, 0.4); }
.full-btn { display: block; width: 100%; margin-top: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
    cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.inline-form { display: inline; }

/* ---------- Flash messages ---------- */
.flash {
    margin: 20px auto 0;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    box-shadow: var(--shadow-sm);
}
.flash-success { background: #e6f4ea; color: var(--success); border: 1px solid #b9e2c3; }
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c0; }
.flash-list { margin: 0; padding-left: 18px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
}
.section-eyebrow {
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 8px;
}
.section-title { font-size: clamp(28px, 4vw, 40px); margin: 0; }
.section-title-sm { font-size: 21px; margin: 0 0 16px; }
.section-head-center { text-align: center; margin-bottom: 32px; }
.section-head-center .section-title { margin: 0; }
.section-subtitle { color: var(--muted); font-size: 17px; margin: 10px 0 0; line-height: 1.6; }
.section-head-link { font-size: 16px; font-weight: 500; white-space: nowrap; padding-bottom: 4px; }
.section-note { color: var(--muted); font-size: 14px; margin: -16px 0 24px; }
.page-title { font-size: clamp(32px, 5vw, 44px); margin: 0 0 8px; }
.page-subtitle { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
.breadcrumb { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.breadcrumb a { font-weight: 500; }
.empty-note { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- Hero (text-only, cream) ---------- */
.hero {
    padding: 96px 0 104px;
    text-align: center;
    background: #fbfaf6;
    overflow: hidden;
}
.hero-inner { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.hero-title-serif {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 0 0 20px;
}
.hero-title-accent { color: #f05020; font-style: italic; }
.hero-subtitle { color: var(--muted); font-size: clamp(17px, 2.4vw, 21px); max-width: 640px; margin: 0 auto 34px; line-height: 1.55; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Category tiles (white cards, centred text) ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.category-tile {
    display: block;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
}
.category-tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-tile-media { display: block; background: #fbfaf6; }
.category-tile-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.4s ease; }
.category-tile:hover .category-tile-media img { transform: scale(1.06); }
.category-tile-body { display: block; padding: 18px 16px 20px; text-align: left; }
.category-tile-name { display: block; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; color: var(--text); }
.category-tile-count { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.category-tile-link { display: block; color: #f05020; font-size: 15px; font-weight: 600; margin-top: 8px; }

/* ---------- Spotlight (dark feature block) ---------- */
.spotlight-dark {
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    padding: clamp(32px, 5vw, 64px);
    box-shadow: var(--shadow-lg);
}
.spotlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
}
.spotlight-image img { width: 100%; border-radius: var(--radius); background: #fff; box-shadow: 0 8px 32px rgba(255, 255, 255, 0.08); }
.spotlight-eyebrow { color: var(--accent-dark); font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 10px; }
.spotlight-title { font-size: clamp(30px, 4vw, 44px); margin: 0 0 14px; color: #fff; }
.spotlight-desc { color: #a1a1a6; margin: 0 0 22px; font-size: 17px; }
.spotlight-dark .product-price .price { color: #fff; }
.spotlight-dark .regular-price { color: #86868b; }
.spotlight-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.spotlight-cta-row .btn-outline { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.spotlight-cta-row .btn-outline:hover { border-color: #fff; box-shadow: none; }

/* ---------- Filter pills ---------- */
.filter-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; justify-content: center; }
.filter-pill {
    padding: 9px 20px;
    border-radius: 5px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.filter-pill:hover { text-decoration: none; border-color: var(--text); transform: translateY(-1px); }
.filter-pill.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- Product search ---------- */
.search-box { position: relative; max-width: 560px; margin: 0 auto 24px; }
.search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-box input { width: 100%; padding: 13px 16px 13px 48px; border: 1px solid var(--border); border-radius: 5px; font-family: var(--font); font-size: 16px; background: #fff; outline: none; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15); }
.empty-msg { display: none; text-align: center; color: var(--muted); font-size: 16px; margin: 24px 0; }

/* ---------- Product grid & cards ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #dcdce0; }
.product-image { position: relative; display: block; background: var(--bg-soft); aspect-ratio: 1 / 1; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-image img { transform: scale(1.05); }
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 11px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    z-index: 1;
}
.badge-sale { background: var(--danger); }
.badge-spotlight { background: var(--text); top: 12px; left: 12px; }
.badge-sale + .badge-spotlight { top: 50px; }
.product-info { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.product-name { font-size: 17px; font-weight: 700; margin: 0 0 2px; letter-spacing: -0.01em; }
.product-name a { color: var(--text); }
.product-name a:hover { text-decoration: none; color: var(--accent); }
.product-category { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.product-price { margin: 0 0 14px; }
.price { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.regular-price { color: var(--muted); text-decoration: line-through; font-size: 15px; font-weight: 500; margin-left: 8px; }
.out-of-stock { color: var(--danger); font-weight: 600; margin: 0; }

/* Card actions — "কিনুন" (buy, orange) + "কার্টে যোগ করুন" (secondary), side by side */
.card-add-form { margin: 0; }
.card-actions { display: flex; flex-direction: row; gap: 8px; margin-top: auto; }
.card-actions .btn { margin-top: 0; min-width: 0; white-space: nowrap; }
.card-actions .btn-buy { flex: 0 0 auto; }
.card-actions .btn-cart { flex: 1 1 auto; }
.btn-buy {
    background: #f05020;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(240, 80, 32, 0.32);
}
.btn-buy:hover { background: #d9481c; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(240, 80, 32, 0.4); }
.btn-cart {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-cart:hover { border-color: var(--text); box-shadow: var(--shadow-sm); }
.btn-cart svg { flex: none; }
.card-actions .btn-sm { padding: 10px 10px; font-size: 13px; }

/* ---------- Product page ---------- */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.product-page-gallery { position: sticky; top: 88px; }
.product-page-image { position: relative; background: var(--bg-soft); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.product-page-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex: 0 0 72px; width: 72px; height: 72px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: var(--bg-soft); cursor: pointer; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: #f05020; }
.product-page-info { min-width: 0; }
.product-page-meta { color: var(--muted); font-size: 14px; margin: 22px 0 0; }
.product-page .card-actions { margin-top: 8px; }
.product-page .card-actions .btn-buy { flex: 0 0 auto; }
.product-page .card-actions .btn-cart { flex: 1 1 auto; }
.product-image-link { display: block; }
.product-page-title { font-size: clamp(28px, 4vw, 38px); margin: 0 0 6px; }
.product-page-price { margin: 18px 0; }
.product-page-price .price { font-size: 28px; }
.save-note { color: var(--success); font-size: 14px; font-weight: 700; margin-left: 8px; }
.product-desc { color: var(--muted); margin: 0 0 18px; font-size: 17px; }
.stock-line { margin: 0 0 22px; }
.in-stock { color: var(--success); font-weight: 700; }
.field-label { font-weight: 700; font-size: 15px; margin: 22px 0 10px; }
.size-selector { display: flex; flex-wrap: wrap; gap: 10px; }
.size-btn {
    min-width: 76px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.size-btn:hover { border-color: var(--text); transform: translateY(-1px); }
.size-btn.selected { background: var(--text); color: #fff; border-color: var(--text); box-shadow: var(--shadow-sm); }
.size-hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 980px;
    overflow: hidden;
    background: #fff;
}
.qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.15s ease;
}
.qty-btn:hover { background: var(--bg-soft); }
.qty-input {
    width: 48px;
    border: none;
    text-align: center;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
    background: transparent;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-form .btn-block { margin-top: 26px; }
.buy-meta {
    margin-top: 30px;
    padding: 20px 22px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-2);
    font-size: 15px;
    box-shadow: var(--shadow-sm);
}
.buy-meta p { margin: 6px 0; }
.buy-meta p:first-child { margin-top: 0; }
.buy-meta p:last-child { margin-bottom: 0; }

/* ---------- Cart (HTML design: item cards + summary card) ---------- */
.empty-cart { text-align: center; padding: 56px 0; }
.empty-cart h2 { font-size: 24px; margin: 0 0 8px; }
.empty-cart p { color: var(--muted); margin: 0 0 20px; }
.empty-icon {
    width: 88px; height: 88px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--bg-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
}
.two-col { display: grid; grid-template-columns: 1fr 400px; gap: 26px; align-items: start; padding: 24px 0 10px; }
.cart-item { display: flex; gap: 16px; background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px; }
.cart-item-image { display: block; flex: none; background: var(--bg-soft); border-radius: var(--radius-sm); overflow: hidden; }
.cart-item-image img { width: 104px; height: 104px; object-fit: cover; }
.ci-body { flex: 1; min-width: 0; }
.cart-item-name { font-size: 16.5px; line-height: 1.35; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.cart-item-name a { color: var(--text); }
.cart-item-name a:hover { color: var(--accent); text-decoration: none; }
.ci-meta { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.ci-meta .ci-discount { color: #b7791f; font-weight: 600; }
.ci-foot { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.ci-foot form { display: contents; }
.ci-price { font-weight: 700; font-size: 16px; margin-left: auto; }
.remove-btn { border: 0; background: transparent; color: var(--danger); font-size: 13.5px; font-weight: 600; padding: 8px 4px; min-height: 36px; cursor: pointer; font-family: var(--font); }
.qty-ctl { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 3px; }
.qty-ctl .qty-btn { width: 40px; height: 40px; border-radius: 7px; font-size: 19px; }
.qty-ctl .qty-input { width: 36px; -moz-appearance: textfield; appearance: textfield; }
.qty-ctl .qty-input::-webkit-outer-spin-button, .qty-ctl .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.summary-card { background: #fff; border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; position: sticky; top: 84px; }
.summary-card h3 { margin: 0 0 16px; font-size: 20px; }
.srow { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); margin-bottom: 9px; gap: 10px; }
.srow span:last-child { color: var(--text); font-weight: 600; }
.srow.total { font-size: 19px; font-weight: 700; color: var(--text); border-top: 1px solid var(--border); padding-top: 13px; margin-top: 13px; }
.srow.total span:last-child { font-weight: 800; }
.zone-label { font-weight: 600; font-size: 14px; color: var(--text); margin: 12px 0 4px; }
.zone-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.zone { border: 1px solid var(--border); border-radius: 7px; padding: 12px 14px; display: flex; gap: 9px; align-items: flex-start; cursor: pointer; min-height: 56px; background: #fff; }
.zone input { margin-top: 3px; accent-color: #f05020; }
.zone b { font-size: 14.5px; display: block; }
.zone small { color: var(--muted); font-size: 12.5px; }
.zone:has(input:checked) { border-color: #f05020; box-shadow: 0 0 0 3px rgba(240, 80, 32, 0.15); background: #fff7f5; }
.coupon-row { display: flex; gap: 10px; margin-top: 16px; }
.coupon-row input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 980px;
    font-family: var(--font);
    font-size: 15px;
    outline: none;
}
.coupon-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15); }
.coupon-note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; line-height: 1.6; }
.coupon-msg { color: var(--danger); font-size: 13.5px; margin: 10px 0 0; }
.coupon-msg:empty { display: none; }
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: none; align-items: center; gap: 14px; }
.sticky-bar.show { display: flex; }
.sb-total { font-weight: 700; font-size: 17px; }
.sb-total small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.sticky-bar .btn { margin-left: auto; }
.btn-wa {
    background: #1faa55;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(31, 170, 85, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-wa:hover { background: #1b964b; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 22px rgba(31, 170, 85, 0.34); }

/* ---------- Summary / order ---------- */
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    font-size: 16px;
}
.summary-row.muted { color: var(--muted); }
.summary-row.total { font-weight: 800; font-size: 19px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    color: var(--muted);
    font-size: 15px;
}
.summary-note { color: var(--muted); font-size: 14px; margin-top: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- Checkout (HTML-system layout, Apple aesthetic) ---------- */
.steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 28px;
    font-size: 15px;
    font-weight: 600;
}
.step { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    flex: none;
}
.step.done { color: var(--success); }
.step.done .step-num { background: var(--success); border-color: var(--success); color: #fff; }
.step.current { color: var(--text); }
.step.current .step-num { background: #f05020; border-color: #f05020; color: #fff; box-shadow: 0 2px 8px rgba(240, 80, 32, 0.35); }
.step-sep { flex: 0 0 36px; height: 1px; background: var(--border); }
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
.form-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.form-card-title { font-size: 21px; margin: 0 0 20px; }
.form-narrow { max-width: 640px; }
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 16px;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15); }
.field-hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.err { display: none; color: var(--danger); font-size: 13.5px; font-weight: 500; margin: 6px 0 0; }
.err.show { display: block; }
.radio-card { display: block; margin-bottom: 12px; cursor: pointer; }
.radio-card:last-child { margin-bottom: 0; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card-body {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.radio-card:hover .radio-card-body { border-color: #b9b9c0; }
.radio-card input:checked + .radio-card-body { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15); background: #f0f7ff; }
.radio-card input:checked + .radio-card-body::after {
    content: "✓";
    position: absolute;
    top: -9px; right: 12px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.radio-card-title { font-weight: 700; }
.radio-card-desc { color: var(--muted); font-size: 14px; }
.radio-card-price { font-weight: 800; white-space: nowrap; }
.pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    flex: none;
}
.pay-badge.cod { background: var(--success); }
.pay-badge.bkash { background: #e2136e; }
.pay-badge.nagad { background: #f6921e; }
.pay-badge.rocket { background: #8c3494; }
.pay-opt-body { display: flex; align-items: flex-start; gap: 14px; }
.pay-opt-text { flex: 1; min-width: 0; }
.pay-opt-text .radio-card-title { display: block; margin-bottom: 2px; }
.pay-detail {
    margin-top: 14px;
    padding: 16px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
}
.pay-detail .sendto { display: block; font-size: 15px; margin-bottom: 14px; }
.pay-detail .field:last-child { margin-bottom: 0; }
.trx-box { margin-top: 16px; padding: 16px; background: var(--bg-soft); border-radius: var(--radius-sm); }
.trx-note { margin: 0 0 12px; font-size: 15px; }
.order-summary {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 26px 28px;
    position: sticky;
    top: 84px;
    box-shadow: var(--shadow-md);
}
.sum-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.sum-item:last-of-type { border-bottom: none; }
.sum-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--bg-soft); flex: none; }
.sum-item-info { flex: 1; min-width: 0; }
.sum-item-name { font-size: 15px; font-weight: 600; margin: 0; line-height: 1.35; }
.sum-item-meta { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }
.sum-item-price { font-weight: 800; font-size: 15px; white-space: nowrap; }

/* ---------- Order success ---------- */
.success-box { text-align: center; padding: 24px 0; }
.success-icon {
    width: 88px; height: 88px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #e6f4ea;
    color: var(--success);
    font-size: 42px;
    line-height: 88px;
    box-shadow: 0 0 0 8px rgba(29, 122, 61, 0.08);
}
.success-order-no { font-size: 19px; margin: 0 0 8px; }
.order-details {
    text-align: left;
    margin: 32px 0;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 26px 28px;
    box-shadow: var(--shadow-sm);
}
.pay-note { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px 18px; font-size: 15px; }

/* ---------- Testimonials & trust ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card {
    margin: 0;
    padding: 26px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.testimonial-stars { color: #f5a623; font-size: 15px; letter-spacing: 2px; margin-bottom: 12px; }
.testimonial-text { margin: 0 0 18px; font-size: 16px; line-height: 1.6; flex: 1; }
.testimonial-foot { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 800;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex: none;
}
.testimonial-name { color: var(--text); font-size: 14.5px; font-weight: 700; }
.testimonial-role { color: var(--muted); font-size: 13px; }
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-item {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.trust-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.trust-icon {
    width: 52px; height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #e8f0fe;
    color: var(--accent);
    font-size: 22px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.trust-title { font-size: 17px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.trust-text { color: var(--muted); font-size: 14.5px; margin: 0; line-height: 1.55; }
.delivery-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.delivery-title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.delivery-text { color: var(--muted); margin: 0; }

/* ---------- Legal pages ---------- */
.legal-text h2 { font-size: 21px; margin: 32px 0 8px; }
.legal-text p { margin: 0 0 12px; color: var(--text-2); line-height: 1.75; }
.legal-text h2:first-child { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); margin-top: 56px; padding: 60px 0 0; border-top: 1px solid var(--border-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; }
.footer-logo { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.footer-tag { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; margin: 2px 0 14px; }
.footer-heading { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 14px; }
.footer-text { color: var(--muted); font-size: 14px; margin: 0 0 10px; line-height: 1.65; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-contact { list-style: none; margin: 0 0 10px; padding: 0; color: var(--muted); font-size: 14px; }
.footer-contact li { margin-bottom: 7px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 44px; padding: 20px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 24px);
    z-index: 200;
    background: var(--text);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 22px;
    border-radius: 980px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: calc(100vw - 48px);
    text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Admin ---------- */
.admin-body { background: var(--bg-soft); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; flex: none; background: #fff; border-right: 1px solid var(--border-soft); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 50; }
.admin-logo { display: block; padding: 20px 24px; font-size: 22px; font-weight: 800; color: var(--text); border-bottom: 1px solid var(--border-soft); }
.admin-logo:hover { text-decoration: none; }
.admin-side-nav { flex: 1; overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-side-nav a, .admin-nav-group-btn { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 5px; color: var(--text-2); font-size: 15px; font-weight: 500; }
.admin-side-nav a:hover, .admin-nav-group-btn:hover { background: var(--bg-soft); text-decoration: none; }
.admin-side-nav a.active, .admin-nav-group-btn.active { background: rgba(240, 80, 32, 0.09); color: #f05020; font-weight: 700; box-shadow: inset 3px 0 0 #f05020; }
.admin-nav-group-btn { width: 100%; background: none; border: none; cursor: pointer; font-family: var(--font); text-align: left; }
.admin-nav-caret { font-size: 12px; color: var(--muted); transition: transform 0.2s ease; }
.admin-nav-group.open .admin-nav-caret { transform: rotate(180deg); }
.admin-nav-sub { display: none; padding: 2px 0 2px 14px; }
.admin-nav-group.open .admin-nav-sub { display: block; }
.admin-nav-sub a { font-size: 14px; padding: 8px 14px; }
.admin-sidebar-foot { border-top: 1px solid var(--border-soft); padding: 16px 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.admin-sidebar-foot a { color: var(--text); font-size: 15px; }
.admin-main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; gap: 16px; padding: 12px 28px; }
.admin-topbar-title { font-size: 20px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar-right { display: flex; align-items: center; gap: 18px; margin-left: auto; flex: none; }
.admin-bell { position: relative; display: inline-flex; color: var(--text); }
.admin-bell:hover { color: #f05020; }
.admin-bell-badge { position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #f05020; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.admin-user { font-weight: 600; font-size: 15px; }
.admin-view-site { font-size: 15px; color: var(--text); }
.admin-sidebar-backdrop { display: none; }
.admin-main { padding: 28px; flex: 1; }
.admin-guest { padding-top: 24px; padding-bottom: 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-head .page-subtitle { flex: 1; }
.admin-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 5px; padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.admin-card .table { border: none; box-shadow: none; }
.stat-grid.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sales-chart { display: flex; align-items: stretch; gap: 10px; height: 220px; padding-top: 8px; }
.sales-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.sales-bar-value { font-size: 13px; font-weight: 700; }
.sales-bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, #ff7a45, #f05020); border-radius: 5px 5px 0 0; }
.sales-bar-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sales-bar-rev { font-size: 11px; color: var(--muted); white-space: nowrap; }
/* Admin cards use the 5px radius (the storefront keeps its own radii). */
.admin-main .stat-card, .admin-main .form-card, .admin-main .table, .admin-main .flash, .admin-main .login-card { border-radius: 5px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat-number { font-size: 32px; font-weight: 700; margin: 0 0 4px; }
.stat-label { color: var(--muted); margin: 0; font-size: 14px; }
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; font-size: 15px; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--bg-soft); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-soft);
    color: var(--text);
}
.status-pending { background: #fff4e0; color: #8a5a00; }
.status-confirmed { background: #e6f4ea; color: var(--success); }
.status-delivered { background: #e8f0fe; color: #1a56db; }
.status-cancelled { background: #fdecea; color: var(--danger); }
.low-stock { color: var(--danger); }
.check-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check-label input { width: 18px; height: 18px; accent-color: var(--accent); }
.login-wrap { display: flex; justify-content: center; padding: 64px 0; }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; width: 100%; max-width: 440px; }
.login-title { font-size: 26px; margin: 0 0 4px; text-align: center; }
.login-sub { color: var(--muted); text-align: center; margin: 0 0 28px; }
.login-hint { color: var(--muted); font-size: 13px; text-align: center; margin: 20px 0 0; }
.pagination { margin-top: 24px; display: flex; justify-content: center; }
.pagination nav { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 14px; color: var(--text); }
.pagination a:hover { text-decoration: none; border-color: var(--text); }
.pagination span[aria-current="page"] { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .trust-strip { grid-template-columns: repeat(2, 1fr); }
    .checkout-grid { grid-template-columns: 1fr; }
    .order-summary { position: static; }
    .two-col { grid-template-columns: 1fr; }
    .summary-card { position: static; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid.stat-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .product-page-gallery { position: static; }
    .product-page-image { position: static; }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    .section { padding: 52px 0; }
    .hero { padding: 64px 0 56px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .spotlight { grid-template-columns: 1fr; gap: 28px; }
    .spotlight-dark { padding: 28px 24px; }
    .product-page { grid-template-columns: 1fr; gap: 28px; }
    .admin-two-col { grid-template-columns: 1fr; }
    .delivery-strip { grid-template-columns: 1fr; gap: 24px; }
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 8px 24px 16px;
        border-bottom: 1px solid var(--border);
        margin-left: 0;
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 10px 0; border-bottom: 1px solid var(--bg-soft); }
    .site-header { position: sticky; }
    .admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh; width: 280px; transform: translateX(-105%); transition: transform 0.25s ease; box-shadow: var(--shadow-lg); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 40; }
    .admin-sidebar-backdrop.show { display: block; }
    .admin-topbar { padding: 10px 16px; }
    .admin-topbar-right .admin-view-site, .admin-topbar-right .admin-user { display: none; }
    .admin-main { padding: 20px 16px; }
    .admin-card { padding: 18px; }
    .cart-item-image img { width: 72px; height: 72px; }
    .table { display: block; overflow-x: auto; }
    .steps { overflow-x: auto; }
    .step-sep { flex-basis: 20px; }
}

@media (max-width: 520px) {
    .product-grid { gap: 12px; }
    .category-grid { grid-template-columns: 1fr; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .trust-strip { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .hero-actions .btn { padding: 12px 20px; font-size: 15px; }
    .zone-row { grid-template-columns: 1fr; }
    .card-actions { gap: 6px; }
    .card-actions .btn-sm { padding: 9px 6px; font-size: 12px; }
    .card-actions .btn-cart { gap: 4px; }
    .form-card { padding: 22px; }
    .order-summary, .summary-card { padding: 22px; }
}
