/* ==========================================================================
   Dudhane Textile - storefront design system
   ========================================================================== */
:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e7e9f0;
    --line-strong: #d3d8e4;

    --brand: #4f46e5;
    --brand-2: #7c3aed;
    --brand-dark: #3730a3;
    --brand-soft: #eef0ff;
    --accent: #f43f5e;
    --accent-soft: #fff1f3;
    --success: #059669;
    --success-soft: #e8f8f1;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
    --ring: 0 0 0 4px rgba(79, 70, 229, 0.16);
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* legacy aliases (inline styles in a few templates) */
    --brand-900: var(--ink);
    --brand-800: var(--ink-2);
    --brand-700: var(--brand);
    --leaf-50: var(--bg);
    --leaf-100: var(--brand-soft);
    --saffron-500: var(--accent);
    --saffron-100: var(--accent-soft);
    --radius-legacy: var(--radius);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

main { min-height: 62vh; }
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: var(--font); font-weight: 800; letter-spacing: -0.02em; }
::selection { background: var(--brand-soft); color: var(--brand-dark); }
.container { --bs-gutter-x: 1.5rem; max-width: 1240px; }

/* ---------- Buttons ---------- */
.btn, .btn-add-cart, .btn-buy-now {
    border-radius: 12px !important;
    font-family: var(--font);
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: 0;
    transition: all .18s ease;
}
.btn-primary, .btn-success, .btn-brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    border: 0 !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(79, 70, 229, .28);
}
.btn-primary:hover, .btn-success:hover, .btn-brand:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(79, 70, 229, .36);
    filter: brightness(1.06);
}
.btn-primary:disabled, .btn-success:disabled { opacity: .5; box-shadow: none; transform: none; }
.btn-outline-primary, .btn-outline-success, .btn-ghost, .btn-outline-secondary {
    background: var(--surface) !important;
    border: 1px solid var(--line-strong) !important;
    color: var(--ink) !important;
}
.btn-outline-primary:hover, .btn-outline-success:hover, .btn-ghost:hover, .btn-outline-secondary:hover {
    border-color: var(--ink) !important;
    background: var(--ink) !important;
    color: #fff !important;
}
.btn-lg { padding: .8rem 1.6rem; font-size: .98rem; }
.btn-sm { font-size: .82rem; }
.btn-light { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }

/* ---------- Forms ---------- */
.form-control, .form-select {
    background-color: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--ink);
    font-family: var(--font);
    min-height: 46px;
    padding: .6rem .95rem;
}
textarea.form-control { min-height: 110px; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: var(--ring); }
.form-control::placeholder { color: #94a3b8; }
label { color: var(--ink-2); font-size: .82rem; font-weight: 700; margin-bottom: 6px; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* ---------- Announcement + header ---------- */
.top-strip {
    background: linear-gradient(90deg, #111827, #1e1b4b);
    color: rgba(255, 255, 255, .85);
    font-size: .78rem;
    font-weight: 500;
}
.top-strip .container { align-items: center; display: flex; gap: 18px; justify-content: space-between; min-height: 36px; }
.top-strip i { color: #a5b4fc; margin-right: 7px; }

.app-header {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow .2s ease;
}
.app-header.scrolled { box-shadow: 0 8px 28px rgba(15, 23, 42, .08); }
.header-main { align-items: center; display: grid; gap: 22px; grid-template-columns: auto minmax(240px, 1fr) auto; padding: 14px 0 10px; }

.brand-logo, .footer-brand {
    align-items: center; color: var(--ink); display: inline-flex; font-size: 1.32rem; font-weight: 800;
    gap: 10px; letter-spacing: -0.03em; line-height: 1; text-decoration: none;
}
.brand-logo:hover, .footer-brand:hover { color: var(--ink); }
.brand-logo .saaj, .footer-brand span span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark {
    align-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-radius: 12px; color: #fff;
    display: inline-flex; font-size: .95rem; height: 38px; justify-content: center; width: 38px; box-shadow: 0 6px 14px rgba(79, 70, 229, .3);
}

.search-container { max-width: 560px; position: relative; width: 100%; }
.search-container i { color: var(--muted); left: 16px; pointer-events: none; position: absolute; top: 50%; transform: translateY(-50%); }
.search-container .form-control {
    background: var(--bg); border: 1px solid transparent; border-radius: 999px; font-size: .9rem; min-height: 44px; padding-left: 44px; padding-right: 90px;
}
.search-container .form-control:focus { background: #fff; border-color: var(--brand); }
.search-container button {
    background: var(--ink); border: 0; border-radius: 999px; color: #fff; font-size: .78rem; font-weight: 700;
    padding: 6px 16px; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
}
.search-container button:hover { background: var(--brand); }

.action-pills { align-items: center; display: flex; gap: 8px; justify-content: flex-end; }
.action-pill {
    align-items: center; background: transparent; border-radius: 999px; color: var(--ink); display: inline-flex;
    font-size: .86rem; font-weight: 700; gap: 8px; padding: 9px 14px; position: relative;
}
.action-pill:hover { background: var(--bg); color: var(--brand); }
.action-pill .badge {
    background: var(--accent) !important; border-radius: 999px; color: #fff !important; font-size: .68rem; font-weight: 800;
    min-width: 20px; padding: 4px 6px; position: absolute; right: -2px; top: -2px; transition: transform .2s ease;
}
.action-pill .badge.is-empty { display: none; }
.cart-icon.bump .badge { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.4); } }

.scrolling-nav-wrapper {
    align-items: center; display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; white-space: nowrap;
}
.scrolling-nav-wrapper::-webkit-scrollbar { display: none; }
.nav-item-link, .nav-empty {
    border-radius: 999px; color: var(--ink-2); display: inline-flex; font-size: .85rem; font-weight: 600; padding: 7px 15px;
}
.nav-item-link:hover { background: var(--bg); color: var(--ink); }
.nav-item-link.active { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 34px 0 10px; }
.hero-grid { display: grid; gap: 28px; grid-template-columns: 1.05fr .95fr; align-items: stretch; }
.hero-copy {
    background: radial-gradient(900px 400px at 0% 0%, #e0e7ff 0%, transparent 60%), radial-gradient(600px 300px at 100% 100%, #fce7f3 0%, transparent 60%), #fff;
    border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: clamp(28px, 4.5vw, 56px);
    display: flex; flex-direction: column; justify-content: center;
}
.pill {
    align-items: center; background: var(--brand-soft); border-radius: 999px; color: var(--brand-dark); display: inline-flex;
    font-size: .78rem; font-weight: 700; gap: 8px; padding: 6px 14px; width: fit-content;
}
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.9rem); font-weight: 800; line-height: 1.04; margin: 18px 0 16px; }
.grad { background: linear-gradient(135deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 1.05rem; max-width: 470px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stats { border-top: 1px dashed var(--line-strong); display: flex; gap: 34px; margin-top: 32px; padding-top: 22px; }
.hero-stats strong { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.hero-stats span { color: var(--muted); font-size: .8rem; font-weight: 600; }

.hero-visual { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; grid-template-rows: 1.25fr 1fr; }
.hero-tile {
    border-radius: var(--radius-lg); color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
    min-height: 150px; overflow: hidden; padding: 22px; position: relative; transition: transform .25s ease, box-shadow .25s ease;
}
.hero-tile:hover { color: #fff; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hero-tile.big { grid-column: 1 / -1; }
.hero-tile i.bg-icon { font-size: 7rem; opacity: .16; position: absolute; right: 16px; top: 8px; transform: rotate(-12deg); }
.hero-tile small { font-weight: 600; opacity: .85; }
.hero-tile strong { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.hero-tile .go { align-items: center; background: rgba(255, 255, 255, .22); border-radius: 50%; display: inline-flex; height: 34px; justify-content: center; position: absolute; right: 18px; top: 18px; width: 34px; backdrop-filter: blur(4px); }
.g1 { background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #db2777); }
.g2 { background: linear-gradient(135deg, #0ea5e9, #4f46e5); }
.g3 { background: linear-gradient(135deg, #f97316, #f43f5e); }
.g4 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.g5 { background: linear-gradient(135deg, #a855f7, #ec4899); }
.g6 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.g7 { background: linear-gradient(135deg, #14b8a6, #22c55e); }
.g8 { background: linear-gradient(135deg, #6366f1, #06b6d4); }

/* ---------- Sections ---------- */
.section { padding: 46px 0 6px; }
.section-head { align-items: flex-end; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.section-head p { color: var(--muted); margin: 4px 0 0; }
.link-arrow { align-items: center; display: inline-flex; font-weight: 700; gap: 8px; }
.link-arrow:hover { gap: 12px; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); margin-top: 34px; }
.feature { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; gap: 14px; padding: 18px; }
.feature i { align-items: center; background: var(--brand-soft); border-radius: 12px; color: var(--brand); display: inline-flex; flex: 0 0 auto; font-size: 1.05rem; height: 44px; justify-content: center; width: 44px; }
.feature strong { display: block; font-size: .92rem; }
.feature span { color: var(--muted); font-size: .8rem; }

.cat-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.cat-tile {
    border-radius: var(--radius); color: #fff; display: flex; flex-direction: column; justify-content: space-between; min-height: 150px;
    overflow: hidden; padding: 20px; position: relative; transition: transform .25s ease, box-shadow .25s ease;
}
.cat-tile:hover { color: #fff; transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-tile i.bg-icon { bottom: -14px; font-size: 5.5rem; opacity: .17; position: absolute; right: 8px; transform: rotate(-10deg); }
.cat-tile .ico { align-items: center; background: rgba(255, 255, 255, .22); border-radius: 12px; display: inline-flex; height: 42px; justify-content: center; width: 42px; backdrop-filter: blur(4px); }
.cat-tile strong { display: block; font-size: 1.05rem; font-weight: 800; }
.cat-tile span { font-size: .8rem; opacity: .85; }

.promo {
    align-items: center; background: linear-gradient(120deg, #111827, #312e81 60%, #7c3aed); border-radius: var(--radius-lg); color: #fff;
    display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; margin-top: 50px; overflow: hidden; padding: clamp(26px, 4vw, 44px); position: relative;
}
.promo::after { background: radial-gradient(circle, rgba(244, 63, 94, .5), transparent 65%); content: ""; height: 320px; position: absolute; right: -60px; top: -80px; width: 320px; }
.promo h3 { color: #fff; font-size: clamp(1.4rem, 3vw, 2.1rem); margin: 0 0 6px; }
.promo p { color: rgba(255, 255, 255, .78); margin: 0; }
.promo .btn { position: relative; z-index: 1; }
.btn-light-solid { background: #fff !important; border: 0 !important; color: var(--ink) !important; }
.btn-light-solid:hover { background: var(--accent-soft) !important; color: var(--accent) !important; }

/* ---------- Product grid + card ---------- */
.p-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.p-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column;
    overflow: hidden; position: relative; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.p-card:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-4px); }
.p-media { aspect-ratio: 1 / 1.08; background: var(--bg); display: block; overflow: hidden; position: relative; }
.p-media img { height: 100%; object-fit: cover; transition: transform .5s ease; width: 100%; }
.p-card:hover .p-media img { transform: scale(1.05); }
.ph {
    align-items: center; background: linear-gradient(140deg, hsl(var(--h) 85% 94%), hsl(calc(var(--h) + 35) 80% 85%));
    color: hsl(var(--h) 45% 38%); display: flex; height: 100%; justify-content: center; position: relative; width: 100%;
}
.ph i { font-size: 3.4rem; opacity: .55; }
.ph em { bottom: 12px; font-size: .68rem; font-style: normal; font-weight: 700; left: 14px; letter-spacing: .12em; opacity: .55; position: absolute; text-transform: uppercase; }
.badge-off {
    background: var(--accent); border-radius: 999px; box-shadow: 0 6px 14px rgba(244, 63, 94, .35); color: #fff; font-size: .72rem;
    font-weight: 800; left: 12px; padding: 5px 11px; position: absolute; top: 12px; z-index: 2;
}
.badge-out { background: rgba(15, 23, 42, .82); border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 700; padding: 5px 11px; position: absolute; right: 12px; top: 12px; z-index: 2; }
.p-card.is-out .p-media { filter: grayscale(.6); opacity: .8; }
.p-body { display: flex; flex: 1; flex-direction: column; padding: 16px 16px 6px; }
.p-cat { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.p-title { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; margin: 4px 0 10px; min-height: 2.7em; }
.p-title a { -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink); display: -webkit-box; overflow: hidden; }
.p-title a:hover { color: var(--brand); }
.p-price { align-items: baseline; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.p-price .now { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.p-price .was { color: var(--muted); font-size: .85rem; text-decoration: line-through; }
.p-gst { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.p-actions { display: grid; gap: 8px; grid-template-columns: 1fr auto; padding: 12px 16px 16px; }
.btn-add-cart {
    align-items: center; background: var(--ink) !important; border: 0 !important; color: #fff !important; display: inline-flex;
    font-size: .84rem !important; gap: 8px; justify-content: center; min-height: 42px; padding: 8px 14px;
}
.btn-add-cart:hover { background: var(--brand) !important; transform: translateY(-1px); }
.btn-buy-now {
    align-items: center; background: var(--brand-soft) !important; border: 0 !important; color: var(--brand-dark) !important; display: inline-flex;
    font-size: .84rem !important; justify-content: center; min-height: 42px; padding: 8px 14px;
}
.btn-buy-now:hover { background: var(--brand) !important; color: #fff !important; }
.btn-add-cart:disabled, .btn-buy-now:disabled { cursor: not-allowed; opacity: .45; transform: none !important; }

/* ---------- Listing page ---------- */
.page-head { padding: 30px 0 6px; }
.crumbs { color: var(--muted); font-size: .82rem; font-weight: 600; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs span { margin: 0 6px; opacity: .6; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 8px 0 4px; }
.page-head p { color: var(--muted); margin: 0; }

.chip-row { display: flex; gap: 8px; margin: 22px 0 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); flex: 0 0 auto;
    font-size: .84rem; font-weight: 600; padding: 8px 16px; white-space: nowrap;
}
.chip small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.active small { color: rgba(255, 255, 255, .7); }

.toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin: 14px 0 22px; }
.toolbar .count { color: var(--muted); font-size: .9rem; font-weight: 600; }
.toolbar .count strong { color: var(--ink); }
.toolbar form { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.toolbar .form-select { min-height: 42px; padding-right: 2.2rem; width: auto; }
.switch { align-items: center; color: var(--ink-2); cursor: pointer; display: inline-flex; font-size: .85rem; font-weight: 600; gap: 8px; margin: 0; }
.switch input { accent-color: var(--brand); height: 17px; width: 17px; }

.pagination-modern { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 38px 0 6px; }
.pagination-modern a, .pagination-modern span {
    align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink-2); display: inline-flex;
    font-size: .88rem; font-weight: 700; height: 42px; justify-content: center; min-width: 42px; padding: 0 12px;
}
.pagination-modern a:hover { border-color: var(--ink); color: var(--ink); }
.pagination-modern .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination-modern .gap { background: transparent; border: 0; min-width: 20px; padding: 0; }
.pagination-modern .disabled { opacity: .4; pointer-events: none; }

.empty-state { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 56px 24px; text-align: center; }
.empty-state i { color: var(--brand); font-size: 2.8rem; margin-bottom: 14px; opacity: .8; }

/* ---------- Product detail ---------- */
.detail { align-items: start; display: grid; gap: 34px; grid-template-columns: 1.02fr .98fr; margin-top: 8px; }
.gallery { position: sticky; top: 150px; }
.gallery-main { aspect-ratio: 1 / 1.05; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.gallery-main .carousel, .gallery-main .carousel-inner, .gallery-main .carousel-item { height: 100%; }
.gallery-main img { height: 100%; object-fit: cover; width: 100%; }
.carousel-control-prev, .carousel-control-next { background: rgba(15, 23, 42, .5); border-radius: 50%; height: 40px; opacity: 1; top: 50%; transform: translateY(-50%); width: 40px; }
.carousel-control-prev { left: 14px; }
.carousel-control-next { right: 14px; }
.gallery-main { position: relative; }
.gallery-main .ph { align-items: center; display: flex; flex-direction: column; gap: 10px; height: 100%; justify-content: center; }
.gallery-main [hidden] { display: none !important; }
.gal-nav { align-items: center; background: rgba(15, 23, 42, .55); border: 0; border-radius: 50%; color: #fff; display: flex; height: 40px; justify-content: center; position: absolute; top: 50%; transform: translateY(-50%); width: 40px; }
.gal-nav:hover { background: rgba(15, 23, 42, .8); }
.gal-nav.prev { left: 12px; }
.gal-nav.next { right: 12px; }
.gal-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gal-thumbs:empty { display: none; }
.gal-thumbs button { background: var(--bg); border: 2px solid transparent; border-radius: 12px; flex: 0 0 72px; height: 84px; overflow: hidden; padding: 0; }
.gal-thumbs button.on { border-color: var(--brand); }
.gal-thumbs img { height: 100%; object-fit: cover; width: 100%; }

/* colour picker */
.color-picker { margin-top: 16px; }
.cp-label { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.cp-label b { color: var(--ink); }
.cp-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-sw { background: transparent; border: 2px solid var(--line-strong); border-radius: 50%; height: 40px; padding: 3px; position: relative; width: 40px; }
.cp-sw span { border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); display: block; height: 100%; width: 100%; }
.cp-sw:hover { border-color: var(--ink-2); }
.cp-sw.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.cp-sw.out { opacity: .45; }
.cp-sw.out::after { background: linear-gradient(to top right, transparent calc(50% - 1px), var(--accent) 50%, transparent calc(50% + 1px)); border-radius: 50%; content: ""; inset: 0; position: absolute; }
.cart-color { color: var(--muted); display: block; font-size: .8rem; font-weight: 600; }
.p-dots { align-items: center; display: flex; gap: 5px; margin: 6px 0 2px; }
.p-dots i { border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); display: block; height: 14px; width: 14px; }
.p-dots small { color: var(--muted); font-size: .75rem; margin-left: 2px; }
.color-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.color-filter a { border: 2px solid var(--line-strong); border-radius: 50%; display: block; height: 28px; padding: 2px; width: 28px; }
.color-filter a span { border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); display: block; height: 100%; width: 100%; }
.color-filter a.on { border-color: var(--brand); }
.detail-info { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 3vw, 34px); }
.detail-info h1 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.15; margin: 12px 0 14px; }
.detail-price { align-items: baseline; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.detail-price .now { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.detail-price .was { color: var(--muted); font-size: 1.05rem; text-decoration: line-through; }
.detail-price .save { background: var(--success-soft); border-radius: 999px; color: var(--success); font-size: .8rem; font-weight: 800; padding: 4px 12px; }
.stock-status { align-items: center; display: inline-flex; font-size: .85rem; font-weight: 700; gap: 8px; margin-top: 10px; }
.stock-status::before { background: currentColor; border-radius: 50%; content: ""; height: 8px; width: 8px; }
.stock-status.in { color: var(--success); }
.stock-status.out { color: var(--accent); }
.detail-desc { color: var(--ink-2); margin: 18px 0; }
.buy-row { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.qty-stepper { align-items: center; background: var(--bg); border-radius: 12px; display: inline-flex; padding: 4px; }
.qty-stepper button { background: var(--surface); border: 0; border-radius: 9px; box-shadow: var(--shadow-xs); font-size: 1.1rem; font-weight: 700; height: 38px; width: 38px; }
.qty-stepper button:hover { color: var(--brand); }
.qty-stepper input { background: transparent; border: 0; font-weight: 800; text-align: center; width: 46px; }
.qty-stepper input:focus { outline: none; }
.buy-row .btn-add-cart, .buy-row .btn-buy-now { flex: 1 1 150px; min-height: 50px; }
.price-breakdown { background: var(--bg); border-radius: var(--radius); font-size: .9rem; margin-top: 22px; padding: 16px 18px; }
.price-breakdown h6 { font-size: .78rem; letter-spacing: .08em; margin-bottom: 10px; text-transform: uppercase; color: var(--muted); }
.price-breakdown div { display: flex; justify-content: space-between; padding: 4px 0; }
.price-breakdown .total-row { border-top: 1px dashed var(--line-strong); font-weight: 800; margin-top: 6px; padding-top: 10px; }
.trust-list { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; list-style: none; margin: 22px 0 0; padding: 0; }
.trust-list li { align-items: center; color: var(--ink-2); display: flex; font-size: .84rem; font-weight: 600; gap: 10px; }
.trust-list i { align-items: center; background: var(--brand-soft); border-radius: 10px; color: var(--brand); display: inline-flex; flex: 0 0 auto; height: 32px; justify-content: center; width: 32px; }

/* ---------- Cart / checkout / account ---------- */
.cart-shell, .checkout-shell, .account-shell { margin: 0 auto; max-width: 1180px; }
.eyebrow { color: var(--brand); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.checkout-panel, .summary-panel, .cart-table-wrap, .address-form, .card, .success-panel {
    background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-lg) !important; box-shadow: var(--shadow-xs) !important;
}
.checkout-panel, .summary-panel, .address-form, .success-panel { padding: clamp(20px, 3vw, 30px); }
.checkout-panel + .checkout-panel { margin-top: 18px; }
.summary-panel.sticky-lg-top { top: 150px; }
.step-title { align-items: center; display: flex; gap: 12px; margin-bottom: 20px; }
.step-title span { align-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-radius: 12px; color: #fff; display: inline-flex; font-weight: 800; height: 34px; justify-content: center; width: 34px; }
.step-title h4, .summary-panel h4 { font-size: 1.1rem; margin: 0; }
.address-list, .payment-method { display: grid; gap: 10px; }
.address-card, .payment-option {
    background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; display: flex; gap: 12px; padding: 15px; transition: all .18s ease;
}
.address-card:hover, .payment-option:hover { border-color: var(--brand); }
.address-card:has(input:checked), .payment-option:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.address-card input, .payment-option input { accent-color: var(--brand); margin-top: 5px; }
.address-card small, .payment-option small { color: var(--muted); display: block; line-height: 1.5; }
.delivery-note { align-items: flex-start; background: var(--success-soft); border-radius: var(--radius); color: var(--ink); display: flex; gap: 12px; padding: 14px 16px; }
.delivery-note i { color: var(--success); margin-top: 4px; }
.delivery-note small { color: var(--muted); display: block; }
.summary-line, .summary-total { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; padding: 12px 0; }
.summary-total { border-bottom: 0; border-top: 2px solid var(--ink); font-size: 1.12rem; margin-top: 8px; }
.cart-table-wrap { overflow: hidden; }
.cart-mobile-list { display: none; }
.table { color: var(--ink); margin: 0; }
.table thead th { background: var(--bg); border-bottom: 0; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; padding: 14px; text-transform: uppercase; }
.table > :not(caption) > * > * { border-bottom-color: var(--line); padding: 16px 14px; }
.cart-product { align-items: center; display: flex; gap: 14px; min-width: 230px; font-weight: 700; }
.cart-product img { background: var(--bg); border-radius: 12px; height: 68px; object-fit: cover; width: 68px; }
.qty-input { max-width: 90px; }
.cart-mobile-card { border-bottom: 1px solid var(--line); padding: 16px; }
.cart-mobile-card:last-child { border-bottom: 0; }
.cart-mobile-main { align-items: center; display: grid; gap: 12px; grid-template-columns: 74px 1fr; }
.cart-mobile-main img { aspect-ratio: 1; background: var(--bg); border-radius: 12px; object-fit: cover; width: 74px; }
.cart-mobile-main h3 { -webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box; font-size: .95rem; margin: 0 0 4px; overflow: hidden; }
.cart-mobile-price { color: var(--brand); font-weight: 800; }
.cart-mobile-controls { align-items: end; display: grid; gap: 10px; grid-template-columns: 88px 1fr 40px; margin-top: 13px; }
.cart-mobile-controls label span, .cart-mobile-subtotal span { color: var(--muted); display: block; font-size: .7rem; font-weight: 800; margin-bottom: 4px; text-transform: uppercase; }
.cart-mobile-controls .qty-input { max-width: none; min-height: 40px; text-align: center; }
.cart-mobile-subtotal { text-align: right; }
.cart-mobile-subtotal strong { display: block; }
.icon-button { align-items: center; background: var(--accent-soft); border: 0; border-radius: 12px; color: var(--accent); display: inline-flex; height: 38px; justify-content: center; width: 38px; }
.icon-button:hover { background: var(--accent); color: #fff; }
.list-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); overflow: hidden; }
.list-group-item { border-color: var(--line); color: var(--ink-2); font-size: .9rem; font-weight: 700; padding: 14px 18px; }
.list-group-item i { color: var(--muted); margin-right: 10px; width: 18px; }
.list-group-item:hover { background: var(--bg); color: var(--ink); }
.list-group-item.active { background: var(--brand-soft); border-color: var(--line); color: var(--brand-dark); }
.list-group-item.active i { color: var(--brand); }
.card { overflow: hidden; }
.card-header, .card-header.text-white { background: var(--surface) !important; border-bottom: 1px solid var(--line) !important; color: var(--ink) !important; padding: 18px 24px; }
.card-header h4 { color: var(--ink); font-size: 1.05rem; margin: 0; }
.card-body { padding: clamp(18px, 3vw, 26px); }
.modal-content { border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header, .modal-header.text-white { background: var(--surface) !important; border-bottom: 1px solid var(--line); color: var(--ink) !important; }
.modal-title { font-weight: 800; }
.badge { border-radius: 999px; font-weight: 700; padding: .42em .8em; }
.badge.bg-success { background: var(--success-soft) !important; color: var(--success) !important; }
.badge.bg-warning { background: #fff4d6 !important; color: #a16207 !important; }
.badge.bg-danger { background: var(--accent-soft) !important; color: var(--accent) !important; }
.badge.bg-secondary { background: var(--bg) !important; color: var(--ink-2) !important; }
.alert { border: 0; border-radius: var(--radius); }
.address-item { background: var(--bg); border-color: var(--line) !important; border-radius: var(--radius) !important; }
.success-panel { margin: 0 auto; max-width: 720px; text-align: center; }
.success-panel .status-icon { font-size: 4.2rem; }

/* ---------- Toasts ---------- */
.toast-stack { bottom: 22px; display: flex; flex-direction: column; gap: 10px; position: fixed; right: 22px; z-index: 9999; }
.custom-toast {
    align-items: center; animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.2); background: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg);
    color: #fff; display: flex; font-size: .9rem; font-weight: 600; gap: 12px; min-width: 240px; padding: 14px 20px; transition: opacity .3s ease, transform .3s ease;
}
.custom-toast i { color: #34d399; font-size: 1.1rem; }
.custom-toast.error i { color: #fb7185; }
.custom-toast.leaving { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { background: #0b1120; color: rgba(255, 255, 255, .66); margin-top: 72px; padding: 56px 0 26px; }
.footer-brand { color: #fff; }
.footer-brand:hover { color: #fff; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: 1.5fr .8fr .8fr 1fr; }
.site-footer p { font-size: .9rem; margin: 16px 0 0; max-width: 330px; }
.site-footer h5 { color: #fff; font-size: .78rem; letter-spacing: .1em; margin-bottom: 16px; text-transform: uppercase; }
.site-footer ul { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: rgba(255, 255, 255, .66); font-size: .9rem; }
.site-footer a:hover { color: #fff; }
.social-links { display: flex; gap: 10px; }
.social-links a { align-items: center; background: rgba(255, 255, 255, .08); border-radius: 12px; color: #fff; display: inline-flex; height: 40px; justify-content: center; width: 40px; }
.social-links a:hover { background: var(--brand); }
.footer-note { font-size: .86rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 40px; padding-top: 22px; }
.footer-bottom small { font-size: .8rem; }
.pay-badges { display: flex; gap: 8px; }
.pay-badges span { background: rgba(255, 255, 255, .08); border-radius: 8px; font-size: .72rem; font-weight: 700; padding: 4px 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .cat-grid .cat-tile:nth-child(n+7) { display: none; }
    .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991.98px) {
    .header-main { grid-template-columns: 1fr auto; }
    .search-container { grid-column: 1 / -1; max-width: none; order: 3; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { grid-template-rows: auto; }
    .detail { grid-template-columns: 1fr; }
    .gallery { position: static; }
    .summary-panel.sticky-lg-top { top: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-grid .cat-tile:nth-child(n+7) { display: flex; }
    .p-grid { gap: 14px; grid-template-columns: repeat(2, 1fr); }
    .p-body { padding: 12px 12px 4px; }
    .p-title { font-size: .86rem; }
    .p-price .now { font-size: 1.05rem; }
    .p-actions { padding: 10px 12px 12px; }
    .btn-add-cart span.lbl { display: none; }
}
@media (max-width: 575.98px) {
    .top-strip span + span { display: none; }
    .action-pill span:not(.badge) { display: none; }
    .features { grid-template-columns: 1fr; }
    .hero-stats { flex-wrap: wrap; gap: 14px 26px; }
    .hero-stats strong { font-size: 1.25rem; }
    .toolbar form { width: 100%; }
    .trust-list { grid-template-columns: 1fr; }
    .cart-shell > .d-flex { align-items: flex-start !important; flex-direction: column; }
    .cart-desktop-table { display: none; }
    .cart-mobile-list { display: block; }
    .footer-grid { grid-template-columns: 1fr; }
    .site-footer { margin-top: 48px; padding-top: 40px; }
    .toast-stack { left: 16px; right: 16px; }
}
