/* ============================================================
   MEGASHOP BIDYAKUT — Storefront foundation styles
   Shared layout: navbar, footer, placeholder hero.
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
    /* Brand — emerald/deep green */
    --primary: #0d6e4b;
    --primary-dark: #095638;
    --primary-darker: #064228;
    --primary-soft: #e8f5ef;

    /* Secondary — teal */
    --secondary: #0f766e;
    --secondary-dark: #115e59;
    --secondary-soft: #e7f6f4;

    /* Accent — orange/golden */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-soft: #fef3c7;

    --text-color: #202b25;
    --text-light: #5b6b62;
    --muted-color: #6c757d;
    --border-color: #e5ece8;
    --bg-body: #f6f9f7;
    --bg-white: #ffffff;

    --heading-color: #0b3d2c;

    --success-color: #1a7f4f;
    --success-soft: #e7f6ee;
    --warning-color: #b26a00;
    --warning-soft: #fff4d6;
    --danger-color: #c0392b;
    --danger-soft: #fdecec;
    --info: #0ea5e9;
    --info-soft: #e7f4fd;

    --shadow-sm: 0 1px 3px rgba(9, 86, 56, 0.08);
    --shadow-md: 0 10px 30px rgba(9, 86, 56, 0.12);
    --radius-sm: 0.5rem;
    --radius: 0.75rem;

    /* Supporting hues — used for vibrant accents (Phase 7) */
    --blue: #2563eb;
    --blue-dark: #1e40af;
    --blue-soft: #e8effd;
    --purple: #7c3aed;
    --purple-dark: #6d28d9;
    --purple-soft: #f2ecfc;
    --rose: #e11d48;
    --rose-dark: #be123c;
    --rose-soft: #fde8ec;

    /* Section tints — soft pastel bands */
    --tint-green: #eefaf3;
    --tint-teal: #eefaf9;
    --tint-amber: #fff8eb;
    --tint-blue: #eff5ff;
    --tint-purple: #f5f0fe;
    --tint-rose: #fff0f3;

    /* Depth */
    --shadow-lg: 0 18px 42px rgba(9, 86, 56, 0.16);
    --radius-lg: 1.125rem;

    /* Gradients */
    --grad-brand: linear-gradient(135deg, #0f766e 0%, #0d6e4b 55%, #095638 100%);
    --grad-amber: linear-gradient(135deg, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
    --grad-hero: linear-gradient(150deg, #ffffff 0%, #e9f7f0 42%, #d3efe6 100%);

    --font-bangla: "Noto Sans Bengali", "Hind Siliguri", "SolaimanLipi", sans-serif;
}

/* ------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------ */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-bangla);
    background: var(--bg-body);
    color: var(--text-color);
    line-height: 1.7;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography base: bold headings, semibold buttons/labels, clean mixed text */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.35;
}

.btn {
    font-weight: 600;
}

.form-label {
    font-weight: 600;
}

/* Align prices/order numbers neatly alongside Bengali text */
.product-price,
.product-info-price-current,
.cart-item-total-amount,
.order-detail-meta strong,
.vstat-value {
    font-variant-numeric: tabular-nums;
}

a {
    transition: color 0.15s ease-in-out;
}

/* ------------------------------------------------------------
   3. MAIN WRAPPER
   ------------------------------------------------------------ */
.main-wrap {
    min-height: calc(100vh - 160px);
    padding-bottom: 2.5rem;
}

/* ------------------------------------------------------------
   4. SITE HEADER / NAVBAR
   ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.site-header.is-scrolled {
    box-shadow: 0 4px 16px rgba(9, 86, 56, 0.14);
}

.topbar {
    border-bottom: 1px solid var(--border-color);
}

/* ---- Brand ---- */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}

.brand-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(9, 86, 56, 0.25);
}

.brand-logo .brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.brand-name {
    font-size: clamp(1.05rem, 4.5vw, 1.4rem);
    font-weight: 800;
    color: var(--text-color);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45vw;
}

/* ---- Mobile hamburger ---- */
.toggler-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--primary);
    background: var(--bg-white);
}

.toggler-btn:hover {
    background: var(--primary-soft);
}

/* ---- Search ---- */
.search-form {
    position: relative;
    flex: 1 1 auto;
    max-width: 640px;
    margin-bottom: 0;
}

.search-form .form-control {
    border-radius: 50px;
    padding: 0.6rem 3.1rem 0.6rem 2.6rem;
    border-color: var(--border-color);
    background: #f2f7f4;
    font-size: 0.95rem;
}

.search-form .form-control:focus {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 75, 0.15);
}

.search-form-icon {
    position: absolute;
    left: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-color);
    font-size: 0.9rem;
    z-index: 5;
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 0.3rem;
    top: 0.3rem;
    bottom: 0.3rem;
    width: 44px;
    border: none;
    border-radius: 50px;
    background: var(--primary);
    color: #ffffff;
    display: grid;
    place-items: center;
    z-index: 5;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* ---- Action icons ---- */
.topbar-actions {
    flex-shrink: 0;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f2f7f4;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* ---- Account dropdown ---- */
.account-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 42px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: #f2f7f4;
    color: var(--text-color);
    font-weight: 600;
    padding: 0 0.9rem;
}

.account-btn:hover,
.account-btn:focus,
.account-btn.show {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.account-label {
    font-size: 0.9rem;
}

.account-menu {
    min-width: 230px;
    padding: 0.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.account-menu .dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.account-menu .dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--primary);
}

.account-menu .dropdown-item:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.account-menu .dropdown-item.text-danger i {
    color: #dc3545;
}

.dropdown-divider {
    border-color: var(--border-color);
}

/* ---- Mobile search row ---- */
.mobile-search {
    background: var(--bg-white);
}

.mobile-search .search-form {
    max-width: none;
}

/* ------------------------------------------------------------
   5. CATEGORY BAR (DESKTOP)
   ------------------------------------------------------------ */
.catbar {
    background: var(--primary);
}

.catbar-inner {
    min-height: 48px;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #ffffff;
    color: var(--primary-dark);
    font-weight: 700;
    border-radius: 0.55rem;
    padding: 0.5rem 1rem;
    margin: 0.45rem 0;
}

.cat-btn:hover,
.cat-btn.show {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.cat-caret {
    font-size: 0.7rem;
    margin-left: 0.15rem;
}

.cat-menu {
    min-width: 280px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
}

.cat-menu .dropdown-item {
    border-radius: 0.5rem;
    padding: 0.55rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.cat-menu .dropdown-item i {
    color: var(--primary);
    font-size: 0.75rem;
}

.cat-menu .dropdown-item:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.catbar-msg {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-left: 1rem;
    text-align: center;
}

/* ------------------------------------------------------------
   6. MOBILE OFF-CANVAS MENU
   ------------------------------------------------------------ */
.mobile-menu {
    width: 300px;
    max-width: 85vw;
}

.mobile-menu .offcanvas-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

.mobile-menu .offcanvas-body {
    padding: 1rem 1.25rem 2rem;
}

.mobile-section {
    margin-bottom: 1.5rem;
}

.mobile-section-title {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--muted-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.65rem;
}

.mobile-welcome {
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.6rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.98rem;
    font-weight: 600;
}

.mobile-link i {
    width: 20px;
    text-align: center;
    color: var(--primary);
}

.mobile-link:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* ------------------------------------------------------------
   7. HERO & CTA
   ------------------------------------------------------------ */
.hero {
    padding: 3.5rem 0 1rem;
}

.hero-card {
    background: linear-gradient(150deg, #ffffff 0%, #eef7f2 60%, #e7f1fd 100%);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    padding: 1rem;
    overflow: hidden;
}

.hero-icon {
    font-size: 2.6rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.hero-sub {
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    color: var(--text-light);
    max-width: 640px;
    margin: 0 auto 1.75rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem 1.6rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
}

.hero-btn i {
    font-size: 0.9rem;
}

.hero-btn-primary {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
}

.hero-btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
}

.hero-btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 1px solid var(--primary);
}

.hero-btn-outline:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* ------------------------------------------------------------
   8. HOME SECTIONS
   ------------------------------------------------------------ */
.home-section {
    padding: 2.5rem 0 0.5rem;
}

.section-head {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.15rem;
}

.section-sub {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ------------------------------------------------------------
   9. SHOP CATEGORY CHIPS
   ------------------------------------------------------------ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.cat-chip {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.cat-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.cat-chip-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.15rem;
}

.cat-chip-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cat-chip-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.02rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cat-chip-count {
    font-size: 0.82rem;
    color: var(--muted-color);
}

/* ------------------------------------------------------------
   10. PRODUCT CARDS
   ------------------------------------------------------------ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none;
}

.product-card:hover {
    box-shadow: none;
    transform: none;
}

.product-card-media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    overflow: hidden;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-img-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2.4rem;
    color: #b9cfc3;
}

.product-card .product-badge { display: none; }
.product-badge.discount { display: none; }
.product-badge.stock { display: none; }
.product-badge.popular { display: none; }

/* ---- Product card info row ---- */
.product-card-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.55rem 0.75rem 0;
}

.product-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.18rem 0.52rem;
    border-radius: 0.4rem;
    white-space: nowrap;
    line-height: 1.4;
}

.product-stock-badge.in {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid rgba(4, 120, 87, 0.16);
}

.product-stock-badge.low {
    background: #fff7ed;
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.16);
}

.product-stock-badge.out {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.16);
}

.product-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    flex-grow: 1;
}

.product-name {
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.98rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name:hover {
    color: var(--primary);
}

.product-shop {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--muted-color);
    text-decoration: none;
}

.product-shop:hover {
    color: var(--primary);
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.product-price-old {
    font-size: 0.88rem;
    color: var(--muted-color);
    text-decoration: line-through;
}

.product-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #b7791f;
    font-weight: 700;
}

.product-rating-count {
    color: var(--muted-color);
    font-weight: 400;
}

/* ------------------------------------------------------------
   11. SHOP CARDS
   ------------------------------------------------------------ */
.shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.shop-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none;
}

.shop-card:hover {
    box-shadow: none;
    transform: none;
}

.shop-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    min-height: 100px;
    background: #ffffff;
    overflow: hidden;
}

.shop-card-media img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.shop-img-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 2.6rem;
    color: var(--primary);
}

.shop-card-location {
    display: none;
}

.shop-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    flex-grow: 1;
}

.shop-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-color);
    text-decoration: none;
}

.shop-name:hover {
    color: var(--primary);
}

.shop-category {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 50px;
    padding: 0.15rem 0.6rem;
}

.shop-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.2rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-card-meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted-color);
}

.shop-rating {
    color: #b7791f;
    font-weight: 700;
}

/* ------------------------------------------------------------
   12. EMPTY STATES
   ------------------------------------------------------------ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    background: var(--bg-white);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.5rem;
}

.empty-state-text {
    margin: 0;
    color: var(--muted-color);
}

/* ------------------------------------------------------------
   13. CATEGORY PAGE
   ------------------------------------------------------------ */
.category-page {
    padding: 1.5rem 0 1rem;
}

.category-page .breadcrumb {
    margin-bottom: 1.1rem;
    font-size: 0.9rem;
}

.category-page .breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.category-page .breadcrumb-item a:hover {
    color: var(--primary-dark);
}

.category-page .breadcrumb-item.active {
    color: var(--text-light);
}

/* ---- Category header ---- */
.category-head {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(150deg, #ffffff 0%, #eef7f2 60%, #e7f1fd 100%);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-sm);
    padding: 2rem 1.5rem;
}

.category-head-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 18px;
    background: var(--primary);
    color: #ffffff;
    font-size: 1.9rem;
    box-shadow: 0 8px 20px rgba(9, 86, 56, 0.25);
    object-fit: cover;
}

.category-head-body {
    min-width: 0;
}

.category-head-title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.15rem;
}

.category-head-desc {
    color: var(--text-light);
    font-size: 0.98rem;
    margin: 0 0 0.55rem;
}

.category-head-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
}

/* ---- Toolbar: search + sort ---- */
.category-toolbar {
    margin: 1.5rem 0 0.4rem;
}

.category-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.category-search {
    position: relative;
    flex: 1 1 280px;
    max-width: 440px;
}

.category-search .form-control {
    border-radius: 50px;
    padding: 0.6rem 3.1rem 0.6rem 2.6rem;
    border-color: var(--border-color);
    background: #f2f7f4;
    font-size: 0.95rem;
}

.category-search .form-control:focus {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 75, 0.15);
}

.category-search-btn {
    position: absolute;
    right: 0.3rem;
    top: 0.3rem;
    bottom: 0.3rem;
    width: 44px;
    border: none;
    border-radius: 50px;
    background: var(--primary);
    color: #ffffff;
    display: grid;
    place-items: center;
}

.category-search-btn:hover {
    background: var(--primary-dark);
}

.category-search-btn-label {
    display: none;
}

.category-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-sort-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.category-sort-select {
    width: auto;
    min-width: 150px;
    border-radius: 50px;
    border-color: var(--border-color);
    background-color: var(--bg-white);
    font-size: 0.9rem;
}

.results-count {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.4rem 0 1.25rem;
}

/* ---- Shop card extensions ---- */
.shop-card-media.has-cover {
    background: #ffffff;
}

.shop-card-media.has-cover .shop-card-avatar {
    display: none;
}

.shop-card-cover {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.shop-card-avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #ffffff;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 2rem;
    overflow: hidden;
}

.shop-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-radius: 50px;
    padding: 0.15rem 0.6rem;
}

.shop-verified i {
    color: var(--primary);
}

.shop-rating-count {
    color: var(--muted-color);
    font-weight: 400;
}

.shop-rating.empty {
    color: var(--muted-color);
    font-weight: 600;
}

.shop-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    align-self: flex-start;
    margin-top: 0.6rem;
    padding: 0.42rem 0.95rem;
    border-radius: 50px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.shop-view-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* ---- Pagination ---- */
.category-page .page-link {
    color: var(--primary);
    border-color: var(--border-color);
    border-radius: 0.5rem;
    margin: 0 0.15rem;
}

.category-page .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

.category-page .page-item.disabled .page-link {
    color: var(--muted-color);
    background: var(--bg-white);
    border-color: var(--border-color);
}

/* ------------------------------------------------------------
   14. NOT-FOUND / ERROR PAGES
   ------------------------------------------------------------ */
.notfound-section {
    padding: 3rem 0 1rem;
}

.notfound-card {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    padding: 3rem 1.5rem;
}

.notfound-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.notfound-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.notfound-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------
   15. FOOTER
   ------------------------------------------------------------ */
.site-footer {
    background: #0b3d2c;
    color: #cfe3d8;
    margin-top: 2rem;
}

.site-footer a {
    color: #cfe3d8;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-top {
    padding: 3rem 0 2rem;
}

.footer-brand .brand-name {
    color: #ffffff;
    max-width: none;
}

.footer-brand .brand-logo {
    background: #ffffff;
    color: var(--primary);
    box-shadow: none;
}

.footer-about {
    margin: 1rem 0 1.25rem;
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 360px;
}

.footer-contact {
    margin: 0 0 1.25rem;
}

.footer-contact li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-bottom: 0.45rem;
    font-size: 0.93rem;
}

.footer-contact i {
    color: #7fd1ab;
    margin-top: 0.3rem;
    width: 16px;
    text-align: center;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transition: background 0.15s ease;
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: 0.55rem;
}

.site-footer ul a {
    font-size: 0.93rem;
    opacity: 0.92;
}

.site-footer ul a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
}

/* ------------------------------------------------------------
   16. RESPONSIVE TWEAKS
   ------------------------------------------------------------ */
@media (max-width: 991.98px) {
    .icon-btn {
        width: 38px;
        height: 38px;
        font-size: 0.98rem;
    }

    .account-btn {
        height: 38px;
        padding: 0 0.7rem;
    }

    .card-grid,
    .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .category-head {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .hero {
        padding-top: 2rem;
    }

    .hero-card {
        padding: 2rem 1rem 1.75rem;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
    }

    .home-section {
        padding-top: 2rem;
    }

    .card-grid,
    .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
        gap: 0.75rem;
    }

    .cat-chip {
        padding: 0.75rem 0.85rem;
        gap: 0.65rem;
    }

    .cat-chip-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .shop-card-media {
        min-height: 60px;
    }

    .toggler-btn {
        width: 38px;
        height: 38px;
    }

    .category-page {
        padding-top: 1rem;
    }

    .category-head {
        flex-direction: column;
        text-align: center;
        gap: 0.9rem;
        padding: 1.5rem 1rem;
    }

    .category-head-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }

    .category-toolbar-form {
        flex-direction: column;
        align-items: stretch;
    }

    .category-search {
        flex-basis: auto;
        max-width: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .category-search .form-control {
        flex: 1;
        min-width: 0;
        padding-right: 1rem;
    }

    .category-search-btn {
        position: static;
        width: auto;
        flex-shrink: 0;
        padding: 0.6rem 1rem;
        display: inline-flex;
        place-items: normal;
        align-items: center;
    }

    .category-sort {
        justify-content: flex-start;
    }

    .category-search-btn-icon {
        display: none;
    }

    .category-search-btn-label {
        display: inline;
    }

    .notfound-card {
        padding: 2.25rem 1.25rem;
    }
}

/* ============================================================
   PRODUCT CARD ACTIONS (Phase 3D)
   ============================================================ */
.product-card-actions {
    display: flex;
    gap: .5rem;
    padding: 0 1rem 1rem;
    margin-top: auto;
}

.product-card-cart-form {
    flex: 1 1 auto;
    min-width: 0;
}

.add-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    background: var(--primary);
    border: 1px solid var(--primary);
    color: #fff;
    border-radius: 50rem;
    font-weight: 600;
    font-size: .88rem;
    padding: .5rem .9rem;
    white-space: nowrap;
    transition: background .15s ease-in-out, border-color .15s ease-in-out;
}

.add-cart-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.add-cart-btn:disabled {
    background: #b7c4bd;
    border-color: #b7c4bd;
    color: #fff;
    cursor: not-allowed;
}

.add-cart-btn-lg {
    width: auto;
    font-size: 1rem;
    padding: .7rem 1.5rem;
}

.card-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: var(--primary-soft);
    border: 1px solid var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 50rem;
    font-weight: 600;
    font-size: .88rem;
    padding: .5rem .9rem;
    white-space: nowrap;
    transition: background .15s ease-in-out, border-color .15s ease-in-out;
}

.card-details-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ============================================================
   STATUS BADGES (Phase 3D)
   ============================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 50rem;
    font-size: .78rem;
    font-weight: 700;
    padding: .28rem .7rem;
    white-space: nowrap;
}

.status-badge i {
    font-size: .7rem;
}

.status-active,
.status-in {
    background: #e7f6ee;
    color: #1a7f4f;
}

.status-low {
    background: #fff3e0;
    color: #b26a00;
}

.status-out {
    background: #fdecec;
    color: #c0392b;
}

/* ============================================================
   SHOP DETAIL PAGE (Phase 3D)
   ============================================================ */
.shop-detail-page {
    padding: 1.25rem 0 3rem;
}

.shop-detail-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2.25rem;
}

.shop-detail-cover {
    position: relative;
    min-height: 120px;
    background: linear-gradient(120deg, var(--primary), #1d9bf0);
}

.shop-detail-cover img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.shop-detail-cover-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, .55);
}

.shop-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1.5rem;
    margin-top: -48px;
    position: relative;
    z-index: 1;
}

.shop-detail-logo {
    width: 96px;
    height: 96px;
    flex: 0 0 auto;
    border-radius: 1rem;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-size: 2.4rem;
    color: var(--primary);
}

.shop-detail-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.shop-detail-title {
    padding-top: 3rem;
    flex: 1 1 260px;
    min-width: 220px;
}

.shop-detail-name {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 .3rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.shop-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .78rem;
    font-weight: 700;
    color: #1d9bf0;
    background: #e8f4ff;
    border-radius: 50rem;
    padding: .2rem .6rem;
}

.shop-detail-category {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    background: var(--primary-soft);
    border-radius: 50rem;
    padding: .3rem .8rem;
}

.shop-detail-category:hover {
    background: var(--primary);
    color: #fff;
}

.shop-detail-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    padding-top: 3rem;
}

.shop-detail-rating {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .9rem;
    font-weight: 700;
    color: var(--text-color);
    background: #fff8e1;
    border-radius: 50rem;
    padding: .3rem .8rem;
}

.shop-detail-rating .fa-star {
    color: #f5a623;
}

.shop-rating-count {
    color: var(--muted-color);
    font-weight: 600;
}

.shop-detail-count {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    color: var(--text-light);
    background: #f3f6f4;
    border-radius: 50rem;
    padding: .3rem .8rem;
}

.shop-detail-desc {
    color: var(--text-light);
    line-height: 1.8;
    padding: 1.25rem 1.5rem 0;
    margin: 0;
}

.shop-detail-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 1.25rem 1.5rem;
    margin: 0;
}

.shop-detail-info li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    color: var(--text-light);
}

.shop-detail-info li a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.shop-detail-info li a:hover {
    text-decoration: underline;
}

.shop-detail-info i {
    color: var(--primary);
    width: 1rem;
    text-align: center;
}

.shop-products {
    margin-top: .5rem;
}

/* ============================================================
   PRODUCT DETAIL PAGE (Phase 3D)
   ============================================================ */
.product-detail-page {
    padding: 1.25rem 0 3rem;
}

.product-detail-main {
    margin-bottom: 1.5rem;
}

.product-gallery-main {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: #f7faf8;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-gallery-placeholder {
    font-size: 4rem;
    color: #c2d3cb;
}

.product-gallery-thumbs {
    display: flex;
    gap: .6rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}

.gallery-thumb {
    width: 74px;
    height: 74px;
    border: 2px solid var(--border-color);
    border-radius: .6rem;
    overflow: hidden;
    background: #fff;
    padding: 0;
    cursor: pointer;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.product-info-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: 100%;
}

.product-info-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 .6rem;
    line-height: 1.3;
}

.product-info-rating {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: .7rem;
}

.rating-stars {
    color: #f5a623;
    font-weight: 700;
}

.rating-link {
    color: var(--primary);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
}

.rating-link:hover {
    text-decoration: underline;
}

.product-info-stock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-bottom: .9rem;
}

.stock-remaining {
    font-size: .85rem;
    color: var(--text-light);
}

.product-info-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .7rem;
    padding: 1rem 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: .8rem;
}

.product-info-price-current {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}

.product-info-price-old {
    font-size: 1.05rem;
    color: var(--muted-color);
    text-decoration: line-through;
}

.product-info-discount {
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    background: #c0392b;
    border-radius: 50rem;
    padding: .25rem .7rem;
}

.product-min-order {
    font-size: .85rem;
    color: var(--text-light);
    margin: 0 0 .9rem;
}

.product-min-order i {
    color: var(--primary);
}

.product-info-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .15rem 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: .9rem;
    margin: 0 0 1.1rem;
}

.product-info-meta li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .88rem;
    padding: .28rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.product-info-meta li span {
    color: var(--muted-color);
}

.product-info-meta li strong,
.product-info-meta li a {
    color: var(--text-color);
    font-weight: 600;
    text-decoration: none;
}

.product-info-meta li a:hover {
    color: var(--primary);
}

.product-buy-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
}

.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 50rem;
    overflow: hidden;
    background: #f7faf8;
}

.qty-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: .9rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s ease-in-out;
}

.qty-btn:hover {
    background: var(--primary-soft);
}

.qty-input {
    width: 60px;
    height: 42px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-out-of-stock-note {
    margin: .8rem 0 0;
    font-size: .88rem;
    color: #c0392b;
    font-weight: 600;
}

/* Shop card inside product page */
.product-shop-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.product-shop-logo {
    width: 62px;
    height: 62px;
    border-radius: .8rem;
    border: 1px solid var(--border-color);
    background: #f7faf8;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
}

.product-shop-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-shop-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.product-shop-name:hover {
    color: var(--primary);
}

.product-shop-rating {
    font-size: .88rem;
    color: var(--text-light);
    margin-top: .1rem;
}

.product-shop-rating .fa-star {
    color: #f5a623;
}

.product-shop-address {
    font-size: .82rem;
    color: var(--muted-color);
    margin-top: .1rem;
}

.outline-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: #fff;
    border-radius: 50rem;
    font-weight: 600;
    font-size: .88rem;
    padding: .5rem 1.1rem;
    text-decoration: none;
    transition: background .15s ease-in-out, color .15s ease-in-out;
}

.outline-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* Description + related */
.product-desc-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-desc-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 .8rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border-color);
}

.product-desc-body {
    color: var(--text-light);
    line-height: 1.9;
    white-space: normal;
    word-wrap: break-word;
}

.related-products {
    margin-top: 1rem;
}

/* ============================================================
   RESPONSIVE: SHOP + PRODUCT DETAIL (Phase 3D)
   ============================================================ */
@media (max-width: 767.98px) {
    .shop-detail-cover {
        min-height: 100px;
    }

    .shop-detail-head {
        margin-top: -40px;
    }

    .shop-detail-logo {
        width: 80px;
        height: 80px;
        font-size: 1.9rem;
    }

    .shop-detail-title {
        padding-top: 1.1rem;
    }

    .shop-detail-badges {
        padding-top: .4rem;
    }

    .product-info-name {
        font-size: 1.3rem;
    }

    .product-info-price-current {
        font-size: 1.6rem;
    }

    .product-info-meta {
        grid-template-columns: 1fr;
    }

    .product-card-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================================
   SEARCH PAGE (Phase 3C)
   ============================================================ */
.search-page {
    padding-top: 1.5rem;
}

/* ---- Empty-query hero ---- */
.search-hero {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.search-hero-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.7rem;
}

.search-hero-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: .35rem;
}

.search-hero-text {
    color: var(--text-light);
    font-size: .98rem;
    margin-bottom: 1.25rem;
}

.search-hero-form {
    max-width: 560px;
    margin: 0 auto;
}

.search-hero-form .category-search {
    max-width: none;
}

/* ---- Results header ---- */
.search-head {
    margin-bottom: .25rem;
}

.search-head-title {
    font-size: clamp(1.3rem, 3.5vw, 1.9rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: .2rem;
}

.search-head-sub {
    color: var(--text-light);
    font-size: .95rem;
    word-break: break-word;
}

/* ---- Results row ---- */
.search-results-row {
    margin-top: 1.25rem;
}

/* ---- Filters sidebar ---- */
.search-filters {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1.15rem;
}

.search-filters-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 .4rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--border-color);
}

.search-filter-group {
    margin-top: 1.05rem;
}

.search-filter-title {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--text-light);
    margin-bottom: .45rem;
}

.search-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-filter-list li + li {
    margin-top: .15rem;
}

.search-filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .42rem .55rem;
    border-radius: .5rem;
    color: var(--text-color);
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.search-filter-link:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.search-filter-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.search-filter-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.search-filter-name i {
    width: 16px;
    text-align: center;
    color: var(--primary);
    flex-shrink: 0;
}

.search-filter-count {
    flex-shrink: 0;
    font-size: .78rem;
    color: var(--muted-color);
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 50rem;
    padding: .05rem .55rem;
    min-width: 1.8rem;
    text-align: center;
}

.search-filter-link.active .search-filter-count {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---- Active filter chips ---- */
.search-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.search-active-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border: 1px solid rgba(13, 110, 75, .25);
    border-radius: 50rem;
    padding: .3rem .65rem;
    font-size: .82rem;
    font-weight: 600;
}

.search-active-chip a {
    color: var(--primary);
    display: inline-grid;
    place-items: center;
    text-decoration: none;
    opacity: .7;
}

.search-active-chip a:hover {
    opacity: 1;
}

/* ---- Price + stock filter form ---- */
.search-filter-form {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.search-price-inputs {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.search-price-inputs .form-control {
    flex: 1 1 0;
    min-width: 0;
    font-size: .88rem;
    border-color: var(--border-color);
}

.search-price-sep {
    color: var(--muted-color);
    flex-shrink: 0;
}

.search-checkbox {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .88rem;
    color: var(--text-color);
    cursor: pointer;
}

.search-checkbox input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--primary);
}

.search-filter-btn {
    background: var(--primary);
    border: none;
    color: #fff;
    border-radius: 50rem;
    font-weight: 600;
    font-size: .9rem;
    padding: .5rem 1rem;
}

.search-filter-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ---- Result sections ---- */
.search-section .section-title {
    font-size: clamp(1.1rem, 2.8vw, 1.35rem);
}

.search-noresult-hint {
    font-size: .88rem;
    color: var(--muted-color);
    margin-top: .35rem;
}

.search-suggest {
    padding-top: 2.25rem;
}

/* ---- Brand chips ---- */
.brand-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: .9rem;
}

.brand-chip {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: .9rem 1.1rem;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.brand-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.brand-chip-name {
    font-weight: 700;
    color: var(--text-color);
}

.brand-chip-count {
    font-size: .8rem;
    color: var(--muted-color);
}

/* ---- Search page responsive ---- */
@media (max-width: 575.98px) {
    .search-hero {
        padding: 1.5rem .5rem 1rem;
    }

    .search-filters {
        padding: .95rem .9rem;
    }

    .brand-chip-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ------------------------------------------------------------
   20a. SEARCH PAGE: COMPACT PRODUCT-FIRST LAYOUT (mobile/tablet)
   ------------------------------------------------------------ */
/* Compact "ফিল্টার" toggle shown only below lg. */
.search-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: .88rem;
    padding: .5rem 1rem;
    min-height: 42px;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.search-filter-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.search-filter-toggle[aria-expanded="true"] {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.search-filter-toggle-count {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .35rem;
    border-radius: 50rem;
    background: var(--primary);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
}

/* Product-first: when the filter panel is expanded on mobile/tablet it sits
   below the results, so give it breathing room above. On desktop (>=lg) the
   collapse is force-shown and remains a static sidebar, so the margin is
   removed there. The margin lives on the collapse wrapper (not the column) so
   no empty gap is rendered while the panel is hidden. */
@media (max-width: 991.98px) {
    .search-filters-col #searchFiltersCollapse {
        margin-top: 1.25rem;
    }

    .search-page .search-head-title {
        font-size: 1.35rem;
    }

    .search-page .search-head-sub {
        font-size: .9rem;
    }
}

@media (max-width: 575.98px) {
    .search-page .search-head-title {
        font-size: 1.2rem;
    }

    .search-filter-toggle {
        align-self: flex-start;
    }
}

/* ------------------------------------------------------------
   21. CART PAGE (Phase 4A)
   ------------------------------------------------------------ */
.cart-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.cart-shop-row {
    display: flex;
    align-items: center;
    font-weight: 600;
    padding: .25rem .25rem 0;
}

.cart-shop-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--text-color);
    text-decoration: none;
}

.cart-shop-link:hover {
    color: var(--primary);
}

.cart-item {
    position: relative;
    display: grid;
    grid-template-columns: 96px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.1rem 1rem;
}

.cart-item-media {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f2f6f3;
    display: grid;
    place-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-img-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 1.7rem;
    color: var(--muted-color);
}

.cart-item-body {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cart-item-name:hover {
    color: var(--primary);
}

.cart-item-unit {
    font-size: .82rem;
    color: var(--muted-color);
}

.cart-item-price {
    font-size: .95rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.cart-item-regular {
    color: var(--muted-color);
    font-weight: 400;
    font-size: .82rem;
}

.cart-item-warning {
    display: inline-flex;
    align-items: flex-start;
    gap: .35rem;
    font-size: .82rem;
    color: #c0392b;
    font-weight: 600;
}

.cart-item-unavailable {
    opacity: .8;
}

.cart-item-unavailable-label {
    font-size: .82rem;
    color: var(--muted-color);
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.cart-qty-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
}

.cart-update-btn {
    font-size: .82rem;
    padding: .28rem .8rem;
    border-color: var(--border-color);
    color: var(--text-color);
    white-space: nowrap;
}

.cart-update-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.cart-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .2rem;
    min-width: 96px;
}

.cart-item-total-label {
    font-size: .8rem;
    color: var(--muted-color);
}

.cart-item-total-amount {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-color);
}

.cart-item-remove {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 2;
}

.cart-remove-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted-color);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s ease, color .15s ease;
}

.cart-remove-btn:hover {
    background: #fdecea;
    color: #c0392b;
}

.cart-summary {
    position: sticky;
    top: 90px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

.cart-summary-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .45rem 0;
    font-size: .95rem;
}

.cart-summary-total {
    border-top: 1px dashed var(--border-color);
    margin-top: .35rem;
    padding-top: .75rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.cart-summary-note {
    font-size: .8rem;
    color: var(--muted-color);
    margin: .75rem 0 1rem;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 50px;
    background: #e03131;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    border: 2px solid #fff;
}

.mobile-link .cart-badge {
    position: static;
    margin-left: auto;
    flex-shrink: 0;
}

/* ---- Cart page responsive ---- */
@media (max-width: 991.98px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: .75rem;
        padding: 1rem .75rem;
    }

    .cart-item-media {
        width: 80px;
        height: 80px;
    }

    .cart-item-actions,
    .cart-item-total {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        min-width: 0;
    }

    .cart-qty-form {
        flex-direction: row;
    }
}

/* ============================================================
   CHECKOUT, ORDER SUCCESS, ORDERS (Phase 4A)
   ============================================================ */

.checkout-page {
    padding: 1.25rem 0 2.5rem;
}

.checkout-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.checkout-panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.checkout-panel-title i {
    color: var(--primary);
}

.checkout-hint {
    font-size: .8rem;
    color: var(--muted-color);
    margin-top: .5rem;
    margin-bottom: 0;
}

/* Payment method radio list */
.pay-method-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.pay-method:hover {
    border-color: var(--primary);
}

.pay-method-selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.pay-method-radio {
    flex-shrink: 0;
}

.pay-method-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pay-method-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pay-method-name {
    font-weight: 600;
    font-size: .95rem;
}

.pay-method-desc {
    font-size: .78rem;
    color: var(--muted-color);
}

/* Order summary on checkout */
.checkout-summary .checkout-shop-block {
    margin-bottom: 1rem;
}

.checkout-shop-block {
    padding: .75rem 0;
    border-bottom: 1px dashed var(--border-color);
}

.checkout-shop-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    margin-bottom: .5rem;
    color: var(--text-color);
}

.checkout-shop-head i {
    color: var(--primary);
}

.checkout-shop-head a {
    color: inherit;
}

.checkout-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: .3rem 0;
    font-size: .9rem;
}

.checkout-line-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.checkout-line-name {
    color: var(--text-color);
}

.checkout-line-meta {
    font-size: .78rem;
    color: var(--muted-color);
}

.checkout-line-amount {
    font-weight: 600;
    white-space: nowrap;
}

.checkout-line-sub {
    border-top: 1px dashed var(--border-color);
    margin-top: .35rem;
    padding-top: .5rem;
    font-weight: 600;
}

.checkout-line-total {
    font-weight: 700;
    padding-top: .35rem;
}

.checkout-place-btn {
    font-size: 1rem;
}

.cart-summary-discount {
    color: var(--primary);
    font-weight: 600;
}

/* Success page */
.order-success-page {
    padding: 2rem 0 3rem;
}

.order-success-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2.25rem 1.5rem;
}

.order-success-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}

.order-success-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: .5rem;
}

.order-success-sub {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.order-success-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    background: var(--bg-body);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.order-success-meta > div {
    display: flex;
    flex-direction: column;
}

.order-success-meta .meta-label {
    font-size: .75rem;
    color: var(--muted-color);
}

.order-success-meta .meta-value {
    font-weight: 700;
}

.order-success-actions {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Delivery info / meta rows */
.delivery-info > div {
    display: flex;
    gap: .5rem;
    padding: .35rem 0;
    font-size: .92rem;
}

.delivery-info .meta-label {
    color: var(--muted-color);
    flex-shrink: 0;
    min-width: 84px;
}

/* Status timeline */
.status-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.status-timeline li {
    display: flex;
    gap: .75rem;
    padding: .25rem 0 .5rem;
    position: relative;
}

.status-timeline li:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 18px;
    bottom: -4px;
    width: 2px;
    background: var(--border-color);
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 5px;
    border: 2px solid var(--bg-white);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.timeline-status {
    font-weight: 600;
    font-size: .92rem;
}

.timeline-note {
    font-size: .82rem;
    color: var(--text-light);
}

.timeline-date {
    font-size: .75rem;
    color: var(--muted-color);
}

/* Orders list */
.account-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.orders-page .cart-page-title,
.order-detail-page .cart-page-title {
    margin-bottom: 0;
}

.orders-table th {
    font-size: .82rem;
    font-weight: 600;
    text-transform: none;
    color: var(--muted-color);
    border-bottom-width: 1px;
}

.order-status {
    font-size: .78rem;
    padding: .35rem .7rem;
    border-radius: 50px;
    font-weight: 600;
}

.order-status-pending {
    background: #fff3cd;
    color: #856404;
}

.order-status-processing {
    background: #cfe2ff;
    color: #084298;
}

.order-status-shipped {
    background: #d1e7dd;
    color: #0f5132;
}

.order-status-delivered {
    background: var(--primary-soft);
    color: var(--primary);
}

.order-status-cancelled,
.order-status-returned {
    background: #fdecea;
    color: #c0392b;
}

.order-detail-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.25rem;
}

.order-detail-meta > div {
    display: flex;
    flex-direction: column;
}

.order-detail-meta span {
    font-size: .75rem;
    color: var(--muted-color);
}

.order-detail-meta strong {
    font-weight: 700;
}

/* Customer account dashboard */
.account-meta {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.account-meta .meta-label {
    font-size: .75rem;
    color: var(--muted-color);
}

.account-meta strong {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.account-stat {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.account-stat-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: .35rem;
}

.account-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.account-stat-label {
    font-size: .78rem;
    color: var(--muted-color);
}

/* ============================================================
   WISHLIST (পছন্দের তালিকা)
   ============================================================ */

/* Heart button below image in info row */
.product-wishlist-form {
    margin-left: auto;
}

.product-wishlist-label { display: none; }

.product-wishlist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: #fff0f3;
    color: #e11d48;
    border: 1px solid rgba(225, 29, 72, 0.18);
    box-shadow: none;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.product-wishlist-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    border-color: transparent;
}

.product-wishlist-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    border-color: transparent;
}

.product-card-info-row .product-wishlist-label {
    display: none;
}

/* Heart button on the product detail page */
.product-detail-wishlist-form {
    margin-top: .85rem;
}

.product-detail-wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--primary-soft);
    border: 1px solid var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 50rem;
    font-weight: 600;
    font-size: .9rem;
    padding: .55rem 1.15rem;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.product-detail-wishlist-btn:hover {
    background: #fdecea;
    border-color: #f5b5b5;
    color: #c0392b;
}

.product-detail-wishlist-btn.active {
    background: #fdecea;
    border-color: #f5b5b5;
    color: #c0392b;
}

/* Wishlist count badge in the navbar (reuses .cart-badge look) */
.wishlist-badge {
    background: #e03131;
}

/* Wishlist page */
.wishlist-list {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    max-width: 780px;
}

.cart-item-shop {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .84rem;
    font-weight: 600;
    color: var(--muted-color);
    text-decoration: none;
}

.cart-item-shop:hover {
    color: var(--primary);
}

.wishlist-item-actions {
    display: flex;
    align-items: center;
}

.wishlist-add-cart {
    width: auto;
    white-space: nowrap;
    font-size: .85rem;
    padding: .5rem .95rem;
}

.wishlist-item-actions .add-cart-btn:disabled {
    background: #b7c4bd;
    border-color: #b7c4bd;
}

/* Responsive */
@media (max-width: 575.98px) {
    .pay-method-list {
        grid-template-columns: 1fr;
    }

    .order-detail-meta {
        gap: 1rem;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: .75rem;
        padding: 1rem .75rem;
    }

    .wishlist-item-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

/* ============================================================
   27. UI POLISH (Phase 5 — visual redesign, CSS-only)
   All colors come from the :root tokens at the top. These rules
   restyle existing markup; no HTML changes were required.
   ============================================================ */

/* ---- Bootstrap button palette aligned to the brand ---- */
.btn {
    --bs-btn-border-radius: .5rem;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-darker);
    --bs-btn-active-border-color: var(--primary-darker);
    --bs-btn-disabled-bg: #b7c4bd;
    --bs-btn-disabled-border-color: #b7c4bd;
    --bs-btn-focus-shadow-rgb: 13, 110, 75;
}

.btn-success {
    --bs-btn-bg: var(--success-color);
    --bs-btn-border-color: var(--success-color);
    --bs-btn-hover-bg: #14643e;
    --bs-btn-hover-border-color: #14643e;
    --bs-btn-active-bg: #125636;
    --bs-btn-active-border-color: #125636;
}

.btn-danger {
    --bs-btn-bg: var(--danger-color);
    --bs-btn-border-color: var(--danger-color);
    --bs-btn-hover-bg: #a93226;
    --bs-btn-hover-border-color: #a93226;
    --bs-btn-active-bg: #972b20;
    --bs-btn-active-border-color: #972b20;
}

.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
}

.btn-outline-secondary {
    --bs-btn-color: var(--secondary);
    --bs-btn-border-color: var(--secondary);
    --bs-btn-hover-bg: var(--secondary);
    --bs-btn-hover-border-color: var(--secondary);
    --bs-btn-active-bg: var(--secondary-dark);
    --bs-btn-active-border-color: var(--secondary-dark);
}

.btn-outline-success {
    --bs-btn-color: var(--success-color);
    --bs-btn-border-color: var(--success-color);
    --bs-btn-hover-bg: var(--success-color);
    --bs-btn-hover-border-color: var(--success-color);
    --bs-btn-active-bg: #14643e;
    --bs-btn-active-border-color: #14643e;
}

/* ---- Forms: consistent brand focus + accent controls ---- */
.form-control,
.form-select {
    border-radius: .5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(13, 110, 75, .15);
}

.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(13, 110, 75, .15);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---- Alerts: softer, rounded, color-coded left edge ---- */
.alert {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.alert-success { border-left: 4px solid var(--success-color); }
.alert-danger  { border-left: 4px solid var(--danger-color); }
.alert-warning { border-left: 4px solid var(--warning-color); }
.alert-info    { border-left: 4px solid var(--info); }

/* ---- Navbar / category bar ---- */
.brand-logo {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 55%, var(--primary-dark) 100%);
}

.catbar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.cat-btn {
    box-shadow: 0 1px 3px rgba(6, 66, 40, .25);
}

.cat-btn:hover,
.cat-btn.show {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.cat-menu .dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.cat-menu .dropdown-item:hover i {
    color: var(--accent-dark);
}

/* ---- Hero / category head gradients (warm accent corner) ---- */
.hero-card {
    background: linear-gradient(150deg, #ffffff 0%, #eef7f2 55%, #fdf3e3 100%);
}

.category-head {
    background: linear-gradient(150deg, #ffffff 0%, #eef7f2 55%, #fdf3e3 100%);
}

.shop-card-media {
    background: #ffffff;
}

.shop-detail-cover {
    background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
}

/* ---- Product cards: rounded, hover lift + media zoom ---- */
.product-card {
    border-radius: 1rem;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.product-card:hover {
    border-color: rgba(15, 118, 110, .35);
    box-shadow: 0 14px 34px rgba(9, 86, 56, .14);
    transform: translateY(-4px);
}

.product-card-media img {
    transition: transform .35s ease;
}

.product-card:hover .product-card-media img {
    transform: scale(1.06);
}

.product-badge.discount {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

.product-info-discount {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 2px 8px rgba(217, 119, 6, .35);
}

/* ---- Customer dashboard stat cards (colorful) ---- */
.account-stat {
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.account-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.account-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.row.g-3.mb-4 > div:nth-child(1) .account-stat::before { background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.row.g-3.mb-4 > div:nth-child(2) .account-stat::before { background: linear-gradient(90deg, #1d4ed8, var(--info)); }
.row.g-3.mb-4 > div:nth-child(3) .account-stat::before { background: linear-gradient(90deg, var(--secondary), var(--info)); }
.row.g-3.mb-4 > div:nth-child(4) .account-stat::before { background: linear-gradient(90deg, var(--danger-color), var(--accent)); }
.row.g-3.mb-4 > div:nth-child(5) .account-stat::before { background: linear-gradient(90deg, var(--accent), var(--accent-dark)); }

.row.g-3.mb-4 > div:nth-child(1) .account-stat-icon { background: var(--success-soft); color: var(--success-color); }
.row.g-3.mb-4 > div:nth-child(2) .account-stat-icon { background: var(--info-soft); color: #1d4ed8; }
.row.g-3.mb-4 > div:nth-child(3) .account-stat-icon { background: var(--secondary-soft); color: var(--secondary); }
.row.g-3.mb-4 > div:nth-child(4) .account-stat-icon { background: var(--danger-soft); color: var(--danger-color); }
.row.g-3.mb-4 > div:nth-child(5) .account-stat-icon { background: var(--warning-soft); color: var(--accent-dark); }

/* ---- Footer: gradient accent strip + social hover ---- */
.site-footer::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 45%, var(--accent) 100%);
}

.footer-social a:hover {
    background: var(--accent-dark);
}

/* ============================================================
   28. UI REFINEMENT (Phase 6 — premium polish, CSS-only)
   Second pass on the Phase 5 redesign: typography hierarchy,
   consistent buttons/forms, premium product cards, cleaner
   homepage, dashboard/checkout/orders hierarchy, subtle motion
   and accessibility. Reuses the :root tokens at the top.
   ============================================================ */

/* ---- Selection tint ---- */
::selection {
    background: var(--primary-soft);
    color: var(--primary-darker);
}

/* ------------------------------------------------------------
   28.1 TYPOGRAPHY HIERARCHY
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
}

.cart-page-title {
    font-size: 1.55rem;
    color: var(--heading-color);
}

.hero-title {
    color: var(--heading-color);
}

.section-title {
    color: var(--heading-color);
}

.section-sub {
    color: var(--text-light);
}

/* Price + order-number prominence (tabular alignment) */
.product-price,
.product-info-price-current,
.cart-item-total-amount,
.cart-summary-total span:last-child,
.order-detail-meta strong,
.vstat-value,
.monospace-number {
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------
   28.2 BUTTONS — consistent, aligned, with clear states
   ------------------------------------------------------------ */
.btn:not(.btn-close):not(.qty-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

.btn {
    letter-spacing: 0;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out,
                color .15s ease-in-out, box-shadow .15s ease-in-out, transform .15s ease;
}

.btn:active:not(.btn-close):not(:disabled):not(.disabled) {
    transform: translateY(1px);
}

.btn:disabled,
.btn.disabled {
    cursor: not-allowed;
}

.btn-lg {
    padding: .65rem 1.35rem;
    border-radius: .6rem;
}

.btn-sm {
    padding: .4rem .85rem;
    border-radius: .5rem;
}

.btn-primary {
    font-weight: 600;
}

/* Secondary actions stay quieter than the primary CTA */
.btn-outline-secondary {
    --bs-btn-color: var(--text-light);
    --bs-btn-border-color: var(--border-color);
    --bs-btn-hover-bg: #eef1f0;
    --bs-btn-hover-border-color: #c9d4cd;
    --bs-btn-hover-color: var(--text-color);
    --bs-btn-active-bg: #e2e8e4;
    --bs-btn-active-border-color: #c9d4cd;
    --bs-btn-active-color: var(--text-color);
}

/* ------------------------------------------------------------
   28.3 PRODUCT CARDS — premium e-commerce details
   ------------------------------------------------------------ */
.product-card,
.shop-card {
    height: 100%;
}

.product-name {
    font-weight: 600;
    line-height: 1.5;
}

.product-price {
    font-size: 1.18rem;
    color: var(--primary);
}

.product-price-old {
    font-size: .85rem;
}

.product-rating .fa-star {
    color: var(--accent);
}

/* Media hover zoom (subtle, shared with shop cards) */
.shop-card-media img,
.shop-card-cover {
    transition: transform .25s ease;
}

.shop-card:hover .shop-card-media img {
    transform: none;
}

/* Card actions: primary CTA dominant, details quieter */
.card-details-btn {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-light);
    font-weight: 600;
}

.card-details-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* Discount badge: attractive, not oversized */
.product-badge.discount {
    font-size: .78rem;
    padding: .28rem .6rem;
}

/* ------------------------------------------------------------
   28.4 HOMEPAGE — cleaner hero + category/shop cards
   ------------------------------------------------------------ */
.hero {
    padding: 3rem 0 1.25rem;
}

.hero-card {
    box-shadow: var(--shadow-md);
}

.hero-btn-primary {
    box-shadow: 0 6px 18px rgba(9, 86, 56, .22);
}

.hero-btn-primary:hover {
    box-shadow: 0 8px 22px rgba(9, 86, 56, .28);
    transform: translateY(-1px);
}

.home-section {
    padding: 3rem 0 1.25rem;
}

.section-head {
    margin-bottom: 1.75rem;
}

.cat-chip-count {
    color: var(--text-light);
}

.cat-chip:hover .cat-chip-icon {
    background: var(--primary);
    color: #ffffff;
}

.shop-card-body {
    padding: 1.1rem 1.1rem 1.25rem;
}

.shop-category {
    font-size: .75rem;
}

/* ------------------------------------------------------------
   28.5 FORMS — modern, consistent, clear states
   ------------------------------------------------------------ */
.form-label {
    color: var(--text-color);
}

.form-control,
.form-select {
    border-color: #d5e0db;
    padding: .55rem .9rem;
}

.form-control:not(textarea),
.form-select {
    min-height: 46px;
}

textarea.form-control {
    min-height: 0;
    padding: .55rem .9rem;
}

.form-control::placeholder,
.form-select::placeholder {
    color: #98a59e;
    opacity: 1;
}

.input-group-text {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: #d5e0db;
}

.form-check-label {
    color: var(--text-light);
}

.invalid-feedback {
    font-weight: 600;
    font-size: .82rem;
}

/* ------------------------------------------------------------
   28.6 CUSTOMER DASHBOARD — profile, stats, orders
   ------------------------------------------------------------ */
.account-meta strong {
    color: var(--text-color);
}

.account-stat {
    padding: 1.1rem;
}

.account-stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
    border-radius: .7rem;
}

.account-stat-value {
    color: var(--heading-color);
}

.account-stat-label {
    font-size: .8rem;
    color: var(--text-light);
}

.orders-table th {
    font-size: .78rem;
    color: var(--text-light);
    text-transform: none;
}

.orders-table td {
    vertical-align: middle;
}

.orders-table tbody tr {
    transition: background-color .15s ease;
}

.orders-table tbody tr:hover {
    background: #f8faf9;
}

.orders-table td:first-child a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.orders-table td:first-child a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Friendly empty states */
.empty-state {
    padding: 3.25rem 1.5rem;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    font-size: 1.7rem;
}

.empty-state h2 {
    font-size: 1.15rem;
    color: var(--heading-color);
}

/* ------------------------------------------------------------
   28.7 CHECKOUT + ORDERS — clear sections, prominent total
   ------------------------------------------------------------ */
.checkout-panel {
    padding: 1.5rem;
}

.checkout-panel-title {
    font-size: 1.08rem;
    color: var(--heading-color);
}

.checkout-panel-title i {
    color: var(--primary);
}

.checkout-shop-head {
    color: var(--heading-color);
}

.checkout-shop-head a:hover {
    color: var(--primary);
}

.checkout-line-total,
.checkout-line-total span {
    color: var(--heading-color);
}

.cart-summary-title {
    color: var(--heading-color);
}

.cart-summary-total {
    font-size: 1.1rem;
    color: var(--heading-color);
}

.cart-summary-total span:last-child {
    font-size: 1.3rem;
    color: var(--primary-dark);
}

.cart-summary-discount {
    color: var(--success-color);
}

.checkout-place-btn {
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(9, 86, 56, .22);
}

/* Payment methods: clearer selected state */
.pay-method {
    padding: 1rem 1.1rem;
    border-width: 1.5px;
    border-color: #dfe8e3;
}

.pay-method-selected {
    border-color: var(--primary);
    border-width: 2px;
    background: var(--primary-soft);
    box-shadow: 0 0 0 3px rgba(13, 110, 75, .08);
}

.pay-method-selected .pay-method-name {
    color: var(--primary-dark);
}

.pay-method-selected .pay-method-icon {
    background: var(--primary);
    color: #ffffff;
}

/* Order status badges — semantic, consistent */
.order-status {
    font-weight: 600;
}

.order-status-pending {
    background: var(--warning-soft);
    color: var(--warning-color);
}

.order-status-processing {
    background: var(--info-soft);
    color: #0369a1;
}

.order-status-confirmed {
    background: var(--info-soft);
    color: #0369a1;
}

.order-status-packed {
    background: #f1ecfc;
    color: #6d28d9;
}

.order-status-shipped,
.order-status-out_for_delivery {
    background: var(--secondary-soft);
    color: var(--secondary-dark);
}

.order-status-delivered,
.order-status-refunded {
    background: var(--success-soft);
    color: var(--success-color);
}

.order-status-cancelled,
.order-status-returned {
    background: var(--danger-soft);
    color: var(--danger-color);
}

/* Order detail meta + timeline */
.order-detail-meta {
    padding: 1.1rem 1.35rem;
}

.order-detail-meta strong {
    color: var(--text-color);
}

.delivery-info .meta-label {
    color: var(--muted-color);
}

.status-timeline li {
    padding: .3rem 0 .55rem;
}

/* ------------------------------------------------------------
   28.8 NAVBAR — badges, brand, focus
   ------------------------------------------------------------ */
.brand-name {
    color: var(--text-color);
}

.icon-btn {
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
}

.cart-badge {
    transition: transform .15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}

.icon-btn:hover .cart-badge {
    transform: scale(1.08);
}

.account-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.cat-btn {
    font-weight: 700;
}

/* ------------------------------------------------------------
   28.9 ACCESSIBILITY — focus visibility + reduced motion
   ------------------------------------------------------------ */
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------
   28.10 MOBILE-FIRST POLISH (390px class)
   ------------------------------------------------------------ */
@media (max-width: 575.98px) {
    .home-section {
        padding: 2.25rem 0 1rem;
    }

    .section-head {
        margin-bottom: 1.35rem;
    }

    .hero {
        padding-top: 2.25rem;
    }

    .hero-card {
        padding: .75rem;
    }

    .product-card-body {
        padding: .85rem;
        gap: .3rem;
    }

    .product-card-actions {
        padding: 0 .85rem .85rem;
    }

    .add-cart-btn,
    .card-details-btn {
        font-size: .85rem;
        padding: .5rem .75rem;
    }

    .cart-page-title {
        font-size: 1.3rem;
    }

    .account-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .order-detail-meta {
        gap: 1rem;
    }

    .cart-summary,
    .checkout-panel {
        padding: 1.1rem;
    }

    .pay-method-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   29. PREMIUM COLORFUL REFRESH (Phase 7 — vibrant redesign)
   Third pass: richer color identity (emerald/teal + amber),
   gradient CTAs, tinted sections, colorful chips/badges/stat
   cards. Reuses the :root tokens; wins over phases 5/6 by order.
   ============================================================ */

/* ------------------------------------------------------------
   29.1 HEADER — brand, icons, search
   ------------------------------------------------------------ */
.site-header {
    position: relative;
    box-shadow: 0 6px 24px rgba(9, 86, 56, .1);
}

.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 45%, var(--accent) 100%);
    z-index: 2;
}

.brand-logo {
    box-shadow: 0 5px 14px rgba(9, 86, 56, .28);
}

.brand-name {
    font-weight: 800;
}

.icon-btn {
    transition: background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.icon-btn:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(9, 86, 56, .14);
}

.icon-btn:hover i {
    color: var(--primary-dark);
}

.account-btn {
    font-weight: 600;
}

.account-btn:hover,
.account-btn.show {
    background: var(--primary-soft);
}

.search-btn {
    background: var(--grad-amber);
    color: #ffffff;
}

.search-btn:hover {
    background: var(--accent-dark);
    color: #ffffff;
}

.search-form .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .22rem rgba(245, 158, 11, .18);
}

/* ------------------------------------------------------------
   29.2 CATEGORY BAR (desktop) — deep green/teal, amber accent
   ------------------------------------------------------------ */
.catbar {
    background: linear-gradient(90deg, #064e3b 0%, #0d6e4b 45%, #115e59 100%);
    box-shadow: 0 4px 14px rgba(9, 86, 56, .16);
}

.cat-btn {
    background: #ffffff;
    color: var(--primary-darker);
    border-radius: .5rem;
    box-shadow: 0 2px 8px rgba(6, 66, 40, .3);
}

.cat-btn i {
    color: var(--accent-dark);
}

.cat-btn:hover,
.cat-btn.show {
    background: var(--grad-amber);
    color: #201600;
    border-color: transparent;
}

.cat-btn:hover i,
.cat-btn.show i {
    color: #201600;
}

.catbar-msg {
    color: rgba(255, 255, 255, .92);
    font-weight: 600;
}

.cat-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.cat-menu .dropdown-item {
    font-weight: 600;
}

.cat-menu .dropdown-item:hover,
.cat-menu .dropdown-item:hover i {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

/* ------------------------------------------------------------
   29.3 MOBILE OFF-CANVAS MENU — branded header, colored sections
   ------------------------------------------------------------ */
.mobile-menu .offcanvas-header {
    background: var(--grad-brand);
}

.mobile-menu .offcanvas-header .brand-logo {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(6, 66, 40, .35);
}

.mobile-menu .offcanvas-header .brand-name {
    color: #ffffff;
    font-weight: 800;
}

.mobile-menu .offcanvas-header .btn-close {
    filter: invert(1);
}

.mobile-section-title {
    color: var(--primary-dark);
    font-weight: 700;
    border-left: 4px solid var(--accent);
    padding-left: .6rem;
    line-height: 1.3;
}

.mobile-link {
    transition: background-color .15s ease, color .15s ease;
}

.mobile-link:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* ------------------------------------------------------------
   29.4 HERO — soft brand wash, decorative blobs, gradient CTAs
   ------------------------------------------------------------ */
.hero {
    background: var(--grad-hero);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--accent);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(150deg, #ffffff 0%, #f1faf5 48%, #e4f3ec 100%);
}

.hero-card::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -90px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 118, 110, .16), transparent 65%);
    pointer-events: none;
}

.hero-card::after {
    content: "";
    position: absolute;
    bottom: -140px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, .14), transparent 65%);
    pointer-events: none;
}

.hero-card > * {
    position: relative;
    z-index: 1;
}

.hero-icon {
    width: 72px;
    height: 72px;
    display: inline-grid;
    place-items: center;
    border-radius: 1.15rem;
    background: var(--grad-brand);
    color: #ffffff;
    font-size: 1.9rem;
    box-shadow: 0 10px 26px rgba(9, 86, 56, .28);
}

.hero-title {
    color: var(--heading-color);
    font-weight: 800;
}

.hero-btn-primary {
    background: var(--grad-brand);
    border-color: transparent;
    box-shadow: 0 8px 22px rgba(9, 86, 56, .26);
}

.hero-btn-primary:hover {
    background: linear-gradient(135deg, #115e59 0%, #095638 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(9, 86, 56, .32);
}

.hero-btn-outline {
    background: #ffffff;
    border-color: var(--primary);
    color: var(--primary-dark);
}

.hero-btn-outline:hover {
    background: var(--primary-soft);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   29.5 HOME SECTIONS — tinted bands + gradient title underline.
   Tints fade out at BOTH edges so the band blends seamlessly into
   the neighbouring white sections (no hard color seam where the
   previous band ends at full strength)
   ------------------------------------------------------------ */
#shop-categories.home-section {
    background: linear-gradient(180deg, #ffffff 0%, var(--tint-green) 22%, var(--tint-green) 78%, #ffffff 100%);
}

#featured-products.home-section {
    background: #ffffff;
}

#featured-shops.home-section {
    /* Last band fades back to the page-canvas tone (not pure white)
        so it dissolves into the body background above the footer */
    background: linear-gradient(180deg, #ffffff 0%, var(--tint-blue) 22%, var(--tint-blue) 78%, var(--theme-body-bg-bottom, #f2f8f5) 100%);
}

.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: .2rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 54px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

/* ------------------------------------------------------------
   29.6 CATEGORY CHIPS — colorful icon chips per position
   ------------------------------------------------------------ */
.cat-chip {
    border-radius: 1rem;
}

.cat-chip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 118, 110, .4);
}

.cat-grid .cat-chip:nth-child(6n+1) .cat-chip-icon { background: var(--success-soft); color: var(--success-color); }
.cat-grid .cat-chip:nth-child(6n+2) .cat-chip-icon { background: var(--secondary-soft); color: var(--secondary-dark); }
.cat-grid .cat-chip:nth-child(6n+3) .cat-chip-icon { background: var(--tint-amber); color: var(--accent-dark); }
.cat-grid .cat-chip:nth-child(6n+4) .cat-chip-icon { background: var(--blue-soft); color: var(--blue-dark); }
.cat-grid .cat-chip:nth-child(6n+5) .cat-chip-icon { background: var(--purple-soft); color: var(--purple-dark); }
.cat-grid .cat-chip:nth-child(6n+6) .cat-chip-icon { background: var(--rose-soft); color: var(--rose-dark); }

/* ------------------------------------------------------------
   29.7 PRODUCT CARDS — richer price, CTA
   ------------------------------------------------------------ */
.product-card {
    position: relative;
    border-radius: 1.1rem;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 38px rgba(9, 86, 56, .18);
}

.product-img-placeholder {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--secondary-soft) 100%);
}

.product-name {
    font-weight: 700;
    line-height: 1.5;
}

.product-price {
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.product-badge.discount,
.product-info-discount {
    color: #3f2d08;
    font-weight: 800;
}

.add-cart-btn {
    background: var(--grad-brand);
    border-color: transparent;
    box-shadow: 0 5px 14px rgba(9, 86, 56, .22);
    font-weight: 700;
}

.add-cart-btn:hover {
    background: linear-gradient(135deg, #115e59 0%, #095638 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(9, 86, 56, .28);
}

/* ------------------------------------------------------------
   29.8 SHOP CARDS — premium media, lift on hover
   ------------------------------------------------------------ */
.shop-card {
    position: relative;
    border-radius: 1.1rem;
}

.shop-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #ddd;
}

.shop-img-placeholder {
    color: var(--secondary);
}

.shop-name {
    font-weight: 800;
    color: var(--heading-color);
}

.shop-view-btn {
    background: var(--grad-brand);
    border-color: transparent;
    color: #ffffff;
    font-weight: 600;
}

.shop-view-btn:hover {
    background: linear-gradient(135deg, #115e59 0%, #095638 100%);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(9, 86, 56, .28);
}

/* ------------------------------------------------------------
   29.9 BUTTONS — gradient primary, amber shopping CTA
   ------------------------------------------------------------ */
.btn-primary {
    background-image: var(--grad-brand);
    box-shadow: 0 4px 14px rgba(9, 86, 56, .22);
    font-weight: 700;
}

.btn-primary:hover:not(:disabled):not(.disabled) {
    background-image: linear-gradient(135deg, #115e59 0%, #095638 100%);
    box-shadow: 0 8px 20px rgba(9, 86, 56, .28);
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-image: none;
}

.btn-shopping {
    --bs-btn-color: #3f2d08;
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #3f2d08;
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-active-color: #3f2d08;
    --bs-btn-active-border-color: var(--accent-dark);
    --bs-btn-disabled-color: #6b5630;
    --bs-btn-disabled-bg: #f0d9a8;
    --bs-btn-disabled-border-color: #e5c684;
    background-image: var(--grad-amber);
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(217, 119, 6, .3);
}

.btn-shopping:hover:not(:disabled):not(.disabled) {
    background-image: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #201600;
    box-shadow: 0 9px 22px rgba(217, 119, 6, .36);
    transform: translateY(-1px);
}

.btn-shopping:disabled,
.btn-shopping.disabled {
    background-image: none;
}

/* ------------------------------------------------------------
   29.10 FORMS — smoother focus transitions
   ------------------------------------------------------------ */
.form-control,
.form-select,
.form-check-input {
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

/* ------------------------------------------------------------
   29.11 CUSTOMER DASHBOARD — gradient stat icon chips, profile
   ------------------------------------------------------------ */
.account-stat {
    border-radius: 1rem;
}

.account-stat-icon {
    transition: transform .18s ease, box-shadow .18s ease;
}

.account-stat:hover .account-stat-icon {
    transform: scale(1.06);
}

.row.g-3.mb-4 > div:nth-child(1) .account-stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #0d6e4b 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(13, 110, 75, .3);
}

.row.g-3.mb-4 > div:nth-child(2) .account-stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(29, 78, 216, .3);
}

.row.g-3.mb-4 > div:nth-child(3) .account-stat-icon {
    background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 118, 110, .3);
}

.row.g-3.mb-4 > div:nth-child(4) .account-stat-icon {
    background: linear-gradient(135deg, #f43f5e 0%, #c0392b 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(192, 57, 43, .3);
}

.row.g-3.mb-4 > div:nth-child(5) .account-stat-icon {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(217, 119, 6, .3);
}

.account-profile-panel {
    border-top: 4px solid var(--accent);
    background: linear-gradient(180deg, #ffffff 0%, #f8fcf9 100%);
}

/* ------------------------------------------------------------
   29.12 CART — summary accent, item hover, qty controls
   ------------------------------------------------------------ */
.cart-summary {
    position: relative;
    border-radius: 1rem;
}

.cart-summary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 1rem 1rem 0 0;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 50%, var(--accent) 100%);
}

.cart-summary-title {
    font-weight: 800;
}

.cart-item {
    border-radius: .9rem;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.cart-item:hover {
    border-color: rgba(15, 118, 110, .35);
    box-shadow: var(--shadow-sm);
}

.cart-item-media {
    border-radius: .7rem;
}

.qty-btn:hover {
    background: var(--secondary);
    color: #ffffff;
}

/* ------------------------------------------------------------
   29.13 CHECKOUT — colored panel chips, amber place-order
   ------------------------------------------------------------ */
.checkout-panel-title {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.checkout-panel-title i {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .6rem;
    font-size: .95rem;
    background: var(--secondary-soft);
    color: var(--secondary-dark);
}

.checkout-page .col-lg-7 .checkout-panel:nth-of-type(1) .checkout-panel-title i {
    background: var(--blue-soft);
    color: var(--blue-dark);
}

.checkout-page .col-lg-7 .checkout-panel:nth-of-type(2) .checkout-panel-title i {
    background: var(--secondary-soft);
    color: var(--secondary-dark);
}

.checkout-page .col-lg-7 .checkout-panel:nth-of-type(3) .checkout-panel-title i {
    background: var(--tint-amber);
    color: var(--accent-dark);
}

.checkout-shop-head i {
    color: var(--primary);
}

.checkout-place-btn {
    color: #3f2d08;
}

/* ------------------------------------------------------------
   29.14 STATUS BADGES — failed added, amber warning stays AA
   ------------------------------------------------------------ */
.order-status-failed {
    background: #fde2e4;
    color: #9b1c1c;
    font-weight: 600;
}

.status-failed {
    background: #fde2e4;
    color: #9b1c1c;
    font-weight: 600;
}

/* ------------------------------------------------------------
   29.15 MOBILE TWEAKS (Phase 7)
   ------------------------------------------------------------ */
@media (max-width: 575.98px) {
    .hero {
        padding-top: 2rem;
    }

    .hero-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .section-title::after {
        width: 44px;
    }
}

/* ------------------------------------------------------------
   29.16 SHOP DETAIL — PREMIUM HERO COMPOSITION (Phase 7)
   ------------------------------------------------------------ */
.shop-detail-card {
    border-radius: var(--radius-lg);
    border-color: #dfe9e4;
    box-shadow: 0 16px 44px rgba(9, 86, 56, .13);
    margin-bottom: 3rem;
}

.shop-detail-cover {
    min-height: 120px;
    background: linear-gradient(125deg, #0d6e4b 0%, #0f766e 52%, #1668b8 100%);
}

.shop-detail-cover-icon {
    color: rgba(255, 255, 255, .78);
    font-size: 4.6rem;
    text-shadow: 0 10px 34px rgba(6, 42, 28, .38);
}

.shop-detail-logo {
    width: 104px;
    height: 104px;
    border-radius: 1.25rem;
    border: 5px solid #ffffff;
    box-shadow: none;
}

.shop-detail-name {
    font-size: 1.8rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--primary-darker);
    gap: .6rem;
}

.shop-verified-badge {
    font-size: .8rem;
    font-weight: 700;
    color: #0d6e4b;
    background: linear-gradient(135deg, #e9f8f0 0%, #d2eedf 100%);
    border: 1px solid rgba(13, 110, 75, .28);
    box-shadow: 0 2px 8px rgba(9, 86, 56, .12);
    padding: .32rem .78rem;
    gap: .38rem;
}

.shop-verified-badge i {
    color: #0d6e4b;
    font-size: .88rem;
}

.shop-detail-category {
    background: var(--tint-blue);
    color: var(--blue-dark);
    border: 1px solid rgba(37, 99, 235, .22);
    box-shadow: 0 2px 8px rgba(37, 99, 235, .10);
    padding: .36rem .9rem;
}

.shop-detail-category:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-color: transparent;
    color: #ffffff;
}

.shop-detail-badges {
    gap: .55rem;
}

.shop-detail-badges .shop-detail-rating {
    font-weight: 800;
    color: var(--text-color);
    background: var(--tint-amber);
    border: 1px solid rgba(245, 158, 11, .28);
    box-shadow: 0 2px 8px rgba(245, 158, 11, .14);
}

.shop-detail-rating .fa-star {
    color: #c46a04;
}

.shop-rating-count {
    color: var(--muted-color);
    font-weight: 600;
}

.shop-detail-count {
    color: var(--text-light);
    font-weight: 600;
    background: var(--tint-green);
    border: 1px solid rgba(13, 110, 75, .16);
    box-shadow: 0 2px 8px rgba(9, 86, 56, .08);
}

.shop-detail-count i {
    color: var(--primary);
}

.shop-detail-desc {
    color: var(--text-light);
    padding: 1.6rem 1.5rem 0;
    max-width: 820px;
}

.shop-detail-info {
    gap: .55rem .9rem;
    padding: 1.25rem 1.5rem 1.7rem;
}

.shop-detail-info li {
    background: #f6f9f7;
    border: 1px solid var(--border-color);
    border-radius: 50rem;
    padding: .4rem .95rem;
    font-size: .88rem;
    color: var(--text-light);
}

.shop-detail-info li a {
    color: var(--primary);
    font-weight: 600;
}

.shop-detail-info li a:hover {
    text-decoration: underline;
}

/* ---- Product listing polish ---- */
.shop-products .section-head {
    margin-bottom: 1.5rem;
}

.shop-products .section-title {
    font-size: 1.45rem;
}

.shop-products .results-count {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--tint-green);
    border: 1px solid rgba(13, 110, 75, .14);
    border-radius: 50rem;
    padding: .4rem 1rem;
    margin-bottom: 1.25rem;
}

.card-grid {
    gap: 1.4rem;
}

.product-img-placeholder {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--secondary-soft) 100%);
}

.product-img-placeholder i {
    color: var(--primary);
    font-size: 2rem;
}

/* ------------------------------------------------------------
   29.16b SHOP DETAIL — MOBILE HERO COMPOSITION (Phase 7)
   ------------------------------------------------------------ */
@media (max-width: 767.98px) {
    .shop-detail-cover {
        min-height: 100px;
    }

    .shop-detail-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .shop-detail-title {
        flex: 0 0 auto;
        min-width: 0;
        padding-top: 1.1rem;
    }

    .shop-detail-logo {
        width: 84px;
        height: 84px;
        border-width: 4px;
    }

    .shop-detail-name {
        font-size: 1.5rem;
        justify-content: center;
    }

    .shop-detail-badges {
        justify-content: center;
        padding-top: .6rem;
    }

    .shop-detail-desc {
        text-align: center;
        padding-top: 1.25rem;
    }

    .shop-detail-info {
        justify-content: center;
    }

    .shop-detail-info li {
        text-align: left;
    }
}

/* ------------------------------------------------------------
   29.17 SHOP SUB-CATEGORY NAVIGATION (Sub-category Feature)
   ------------------------------------------------------------ */
.shop-subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.shop-subcat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.shop-subcat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    text-decoration: none;
}

.shop-subcat-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.05rem;
}

.shop-subcat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.shop-subcat-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1rem;
}

.shop-subcat-count {
    font-size: 0.82rem;
    color: var(--muted-color);
}

.shop-all-products-link .btn {
    padding: 0.5rem 1.4rem;
}

.shop-detail-name-link {
    color: inherit;
    text-decoration: none;
}

.shop-detail-name-link:hover {
    text-decoration: none;
    color: var(--primary);
}

.shop-subcat-current {
    font-size: 0.9em;
    color: var(--muted-color);
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .shop-subcat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .shop-subcat-card {
        padding: 0.8rem 0.9rem;
    }

    .shop-subcat-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 379.98px) {
    .shop-subcat-grid {
        grid-template-columns: 1fr;
    }
}
