:root {
    --ink: #202124;
    --muted: #6b7280;
    --line: #d8dee6;
    --surface: #ffffff;
    --accent: #ffc107;
}

body {
    color: var(--ink);
    background: #f7f8fa;
}

.search-box {
    min-width: min(100%, 520px);
}

.site-header {
    background: #ffc107;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
}

/* Ensure navbar items (username, cart) are vertically centered */
.site-header .navbar-nav {
    display: flex;
    align-items: center;
}

/* Make bulk-order-marquee compact inside header */
.site-header .bulk-order-marquee {
    background: #1f2933;
    color: #fff;
    padding: .35rem .8rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    max-height: 44px;
    overflow: hidden;
}
.site-header .bulk-order-marquee a { color: inherit; text-decoration: none; }
.site-header .bulk-order-marquee span { display: inline-block; white-space: nowrap; }

/* Full width marquee placed below header */
.bulk-order-marquee.full-width {
    background: #1f2933;
    color: #fff;
    padding: .45rem 0;
}
.bulk-order-marquee.full-width .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
}
.bulk-order-marquee.full-width a { color: inherit; text-decoration: none; display: block; }
.bulk-order-marquee.full-width span { display: block; max-width: 100%; text-align: center; font-weight: 700; }

.site-header .navbar-toggler {
    border-color: rgba(0, 0, 0, .35);
}

.site-header .navbar-toggler-icon {
    filter: invert(1);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #1f2933;
    font-weight: 800;
}

.site-brand:hover,
.site-nav-link,
.site-header .nav-link {
    color: #1f2933;
}

.site-nav-link {
    font-weight: 700;
    text-decoration: none;
}

.brand-logo-img {
    width: 58px;
    height: 42px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
}

.brand-name {
    font-size: 1.05rem;
    white-space: nowrap;
}

.site-header .dropdown-menu {
    border-color: rgba(0, 0, 0, .12);
}

@media (min-width: 992px) {
    .site-header .dropdown:hover .dropdown-menu {
        display: block;
    }
}

.header-search-form {
    display: flex;
    align-items: center;
    flex: 0 1 430px;
    gap: .5rem;
    width: min(100%, 430px);
}
.site-header .navbar,
.site-header .container {
    align-items: center;
}

/* make collapse area use flex so elements align well */
.site-header .collapse.navbar-collapse {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* ensure search sits centered and user/cart align to the right */
.site-header .header-search-form {
    margin-left: .5rem;
    margin-right: .5rem;
}

/* tighten logo spacing and header height */
.site-header .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding-top: .15rem;
    padding-bottom: .15rem;
}

.site-header .nav-link {
    padding-top: .25rem;
    padding-bottom: .25rem;
}

.header-search-form .form-control {
    min-width: 0;
}

.hero-slider img,
.store-hero img,
.placeholder-slide {
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #263238, #59666d);
}

.placeholder-slide {
    display: grid;
    place-items: center;
    color: #fff;
    padding: 2rem;
}

.carousel-caption {
    bottom: 3rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

.store-hero {
    margin-left: 0;
    margin-right: 0;
}
.store-hero .carousel {
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    height: clamp(220px, 32vw, 420px);
    background: #fff;
}

.store-hero .carousel-inner,
.store-hero .carousel-item {
    height: 100%;
}

.store-hero .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
    filter: brightness(1.12) saturate(1.18) contrast(1.03);
    background: #fff;
}

.store-hero .carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

.store-hero .carousel-caption,
.store-hero .placeholder-slide .container {
    z-index: 1;
    position: relative;
}

.store-hero-copy {
    max-width: 560px;
    font-size: 1.1rem;
}

.store-eyebrow {
    color: #9b6114;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

.store-search-band {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 1.25rem 0;
}

.bulk-order-marquee {
    background: #1f2933;
    border-bottom: 1px solid rgba(0, 0, 0, .14);
    overflow: hidden;
    white-space: nowrap;
}

/* Category band below header */
.category-band {
    background: #1f2933;
    border-top: 1px solid rgba(255,255,255,0.02);
}
.category-band .category-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .45rem 0;
    overflow-x: auto;
}
.category-band .category-link {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    padding: .2rem .45rem;
}
.category-band .category-link:hover { text-decoration: underline; opacity: .95; }

/* (reverted mega-menu styles) */

.bulk-order-marquee a {
    color: #fff;
    display: block;
    font-weight: 700;
    padding: .65rem 0;
    text-decoration: none;
}

.bulk-order-marquee span {
    display: inline-block;
    min-width: 100%;
    padding-left: 100%;
    animation: marquee-slide 22s linear infinite;
}

.bulk-order-marquee a:hover span {
    animation-play-state: paused;
}

.portal-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    padding: 0.75rem 0;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
}

.enquiry-status-chip,
.enquiry-status-badge,
.enquiry-account-badge {
    border: 1px solid transparent;
    font-weight: 700;
}

.enquiry-status-chip {
    color: #111827;
}

.enquiry-status-chip.active {
    box-shadow: inset 0 0 0 2px rgba(17, 24, 39, 0.25);
}

.status-pending {
    background: #fff3cd;
    border-color: #ffda6a;
    color: #664d03;
}

.status-quoted {
    background: #cff4fc;
    border-color: #6edff6;
    color: #055160;
}

.status-customer-submitted {
    background: #e0cffc;
    border-color: #b197fc;
    color: #3d0a91;
}

.status-processing {
    background: #cfe2ff;
    border-color: #9ec5fe;
    color: #052c65;
}

.status-completed {
    background: #d1e7dd;
    border-color: #75b798;
    color: #0f5132;
}

.status-closed {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #343a40;
}

.status-cancelled {
    background: #f8d7da;
    border-color: #ea868f;
    color: #842029;
}

.account-retail {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.account-library {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}

.account-filter-chip {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.35);
    color: #111827;
    font-weight: 700;
}

.account-filter-chip.account-retail {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.account-filter-chip.account-library {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}

.account-filter-chip.active {
    box-shadow: inset 0 0 0 2px rgba(17, 24, 39, 0.35);
}

@keyframes marquee-slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.store-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 1rem;
    align-items: end;
}

.store-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.store-section-head h2 {
    margin: 0;
}

.store-section-head a {
    color: var(--ink);
    font-weight: 600;
}

.store-book-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: .75rem;
}

.store-book-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 6.75rem) / 4);
    gap: .75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: .75rem;
}

.store-book-scroll::-webkit-scrollbar {
    display: none;
}

.store-book-scroll .store-book-image,
.store-book-scroll .store-book-image img,
.store-book-scroll .store-book-image .book-placeholder {
    aspect-ratio: 4 / 5;
}

.store-book-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    scroll-snap-align: start;
}

.store-book-image {
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    background: #e8edf2;
    color: #53616f;
    text-decoration: none;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.store-book-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: 100%;
    object-fit: fill;
    display: block;
}

.store-book-image .book-placeholder {
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    width: 100%;
    font-size: 4rem;
    font-weight: 700;
}

.discount-badge {
    position: absolute;
    top: .55rem;
    left: .55rem;
    z-index: 2;
    background: #dc3545;
    color: #fff;
    border-radius: 6px;
    padding: .28rem .45rem;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}

.store-book-body {
    padding: .55rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex: 1;
}

.store-book-meta {
    color: var(--muted);
    font-size: .72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.store-book-card h3 {
    font-size: .82rem;
    line-height: 1.35;
    margin: 0;
    min-height: 2.25rem;
}

.store-book-card h3 a {
    color: var(--ink);
    text-decoration: none;
}

.store-book-price {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.store-book-price span {
    color: var(--muted);
    font-size: .76rem;
    text-decoration: line-through;
}

.store-book-actions {
    display: flex;
    gap: .35rem;
    margin-top: auto;
}

.store-book-actions {
    display: flex;
    gap: .5rem;
    margin-top: auto;
}

.store-book-actions .btn {
    flex: 0 0 auto;
    font-size: .85rem;
    padding: .5rem .8rem;
    min-width: 78px;
    border-radius: 8px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.store-book-actions .btn.btn-outline-dark {
    background: #fff;
    color: var(--ink);
    border: 1px solid rgba(17,24,39,0.12);
}

.store-book-actions .btn.btn-outline-dark:hover {
    background: #f8fafc;
}

.store-book-actions .btn.btn-warning {
    background: var(--accent);
    border-color: transparent;
    color: #111827;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(255,193,7,0.12);
}

.store-book-actions .btn:disabled {
    opacity: .6;
}

/* Adjust action widths: View expands, Add to Cart is fixed width */
.store-book-actions { width: 100%; }
.store-book-actions .btn.btn-outline-dark { flex: 1 1 auto; }
.store-book-actions .btn.btn-warning { flex: 0 0 110px; }

@media (max-width: 575px) {
    .store-book-actions { gap: .35rem; }
    .store-book-actions .btn.btn-warning { flex: 1 1 auto; }
}

.store-deals {
    background: #fff;
    border-block: 1px solid var(--line);
}

.store-feature-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 2rem;
    align-items: center;
    background: #25313a;
    color: #fff;
    border-radius: 8px;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.store-feature-band .store-eyebrow {
    color: var(--accent);
}

.store-mini-list {
    display: grid;
    gap: .65rem;
}

.store-mini-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--ink);
    background: #fff;
    border-radius: 8px;
    padding: .85rem;
    text-decoration: none;
}

.gallery-row-block {
    margin-bottom: 2.5rem;
}

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

/* hide prev/next controls for grid-style gallery rows */
.gallery-row-block .btn-group { display: none; }

@media (max-width: 991px) {
    .gallery-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575px) {
    .gallery-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Products listing grid: 5 columns on desktop */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}
.products-grid .product-item { width: 100%; }

@media (max-width: 991px) {
    .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.gallery-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    scroll-snap-align: start;
}

.gallery-card a {
    color: var(--ink);
    display: block;
    text-decoration: none;
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: fill;
    display: block;
}

.gallery-card h3 {
    font-size: .9rem;
    padding: .65rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-gallery {
    grid-column: span 8;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 2rem;
    color: var(--muted);
    background: #fff;
}

.admin-shell {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #f3f6f8 0, #f7f8fa 280px),
        #f7f8fa;
}

.admin-sidebar {
    background: #1d2730;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 10px 0 30px rgba(31, 41, 51, .08);
}

.admin-sidebar a {
    color: #e5edf5;
    text-decoration: none;
    display: block;
    padding: .65rem .8rem;
    border-radius: 6px;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255, 193, 7, .16);
    color: #fff;
    transform: translateX(2px);
}

.admin-shell main > h1 {
    color: #17212b;
    font-weight: 800;
}

.admin-shell main > .card,
.admin-shell main .row > [class*="col"] > .card {
    background:
        linear-gradient(135deg, rgba(230 178 7 / 98%), rgba(247, 250, 252, .94)),
        #fff;
    border: 1px solid rgba(29, 39, 48, .08) !important;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(31, 41, 51, .09) !important;
}

.admin-shell main > .card {
    overflow: hidden;
}

.admin-shell main .row > [class*="col"] > .card {
    background:
        linear-gradient(135deg, rgba(230, 178, 7, .98), rgba(255, 255, 255, .96)),
        #fff;
    position: relative;
}

.admin-shell main .row > [class*="col"]:nth-child(2n) > .card {
    background:
        linear-gradient(135deg, rgba(36, 223, 135, .98), rgba(255, 255, 255, .96)),
        #fff;
}

.admin-shell main .row > [class*="col"]:nth-child(3n) > .card {
    background:
        linear-gradient(135deg, rgba(0, 97, 221, .98), rgba(255, 255, 255, .96)),
        #fff;
}

.admin-shell main .row > [class*="col"]:nth-child(4n) > .card {
    background:
        linear-gradient(135deg, rgba(223, 0, 16, .98), rgba(255, 255, 255, .96)),
        #fff;
}

.admin-shell main .row > [class*="col"] > .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #ffc107;
}

.admin-shell main .row > [class*="col"]:nth-child(2n) > .card::before {
    background: #0f766e;
}

.admin-shell main .row > [class*="col"]:nth-child(3n) > .card::before {
    background: #2563eb;
}

/* Filter tree: show a right-arrow for nested (sub) items */
.filter-tree ul ul li a {
    position: relative;
    padding-left: 0;
}
.filter-tree ul ul li a::before {
    content: "›";
    display: inline-block;
    width: 1em;
    margin-right: .35rem;
    color: var(--muted);
    font-weight: 700;
}
.filter-tree ul ul li a:hover::before,
.filter-tree ul ul li a.fw-bold::before {
    color: var(--ink);
}

/* Toggle row styling for filter tree */
.filter-tree .cat-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: default;
    user-select: none;
}
.filter-tree .cat-row .caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.05rem;
    color: var(--muted);
    font-weight: 800;
    transform-origin: center;
    transition: transform .18s ease, color .12s ease;
    cursor: pointer;
}
.filter-tree li:not(.collapsed) > .cat-row .caret {
    transform: rotate(90deg);
    color: var(--ink);
}
.filter-tree .children {
    margin-left: 1.2rem;
    display: none;
}
.filter-tree li:not(.collapsed) > .children {
    display: block;
}

/* Mobile filter overlay and toggle */
.filter-toggle {
    display: none;
}
@media (max-width: 767px) {
    .filter-toggle { display: inline-block; }
    aside.col-md-3 {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 84%;
        max-width: 320px;
        background: #fff;
        z-index: 1050;
        transform: translateX(-110%);
        transition: transform .22s ease;
        box-shadow: 4px 0 28px rgba(0,0,0,.16);
        padding: 1rem;
        overflow: auto;
    }
    body.filters-open aside.col-md-3 {
        transform: translateX(0);
    }
    .filter-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 1040;
    }
    body.filters-open .filter-backdrop { display: block; }
}

/* Mobile: single-category view inside filters */
.filter-panel-inner { display: none; }
.filter-panel-inner.active { display: block; }
.filter-panel-inner .panel-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}
.filter-panel-inner .panel-head .back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #e9eef3;
    color: var(--ink);
    text-decoration: none;
}
.filter-panel-inner h6 { margin: 0; font-size: 1rem; }

.admin-shell .card-body {
    padding: 1.15rem;
}

.admin-shell .display-6 {
    color: #17212b;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1;
}

.admin-shell .table {
    margin-bottom: 0;
}

.admin-shell .table thead th {
    background: #f3f6f8;
    border-bottom-color: #d4dce4;
    color: #4b5563;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-shell .table tbody tr:hover {
    background: #fbfcfd;
}

.admin-shell .form-control,
.admin-shell .form-select {
    border-color: #cfd8e3;
    border-radius: 7px;
}

.admin-shell .form-control:focus,
.admin-shell .form-select:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 .2rem rgba(15, 118, 110, .12);
}

.admin-shell .btn {
    border-radius: 7px;
    font-weight: 700;
}

.admin-card-toggle-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin: -1.15rem -1.15rem 1rem;
    padding: .95rem 1.15rem;
    background:
        linear-gradient(135deg, #000000, #0087ff);
    border-bottom: 1px solid rgba(29, 39, 48, .08);
    color: #fff;
}

.admin-card-toggle-head .text-muted,
.admin-card-toggle-head h2 {
    color: #fff !important;
}

.admin-card-toggle-head h2 {
    margin-bottom: 0;
}

.admin-card-title {
    font-weight: 700;
}

.admin-card-toggle {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 74px;
    background: #fff;
    border-color: rgba(255, 255, 255, .65);
    color: #17212b;
    position: relative;
    z-index: 2;
}

.admin-card-toggle:hover {
    background: #ffc107;
    border-color: #ffc107;
    color: #17212b;
}

.admin-card-collapse[hidden] {
    display: none !important;
}

.admin-seller-head {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    align-items: start;
    justify-content: space-between;
}

.admin-seller-identity {
    flex: 1 1 260px;
    min-width: 220px;
}

.admin-seller-status-form {
    flex: 0 1 340px;
    min-width: 240px;
}

.admin-seller-status-form .form-select {
    min-width: 0;
}

.admin-seller-status-form .btn {
    flex: 0 0 auto;
}

.admin-seller-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    flex: 1 1 360px;
    text-align: right;
}

.admin-seller-stats > div {
    min-width: 0;
}

@media (max-width: 767px) {
    .admin-seller-head {
        flex-wrap: wrap;
    }

    .admin-seller-stats {
        text-align: left;
    }
}

@media (max-width: 575px) {
    .admin-seller-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.thumb {
    width: 88px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}

/* Filters sidebar styles */
aside .card {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(31,41,51,0.04);
    border: none;
    background: #fff;
}

aside .card-body {
    padding: .9rem;
}

aside .card-title {
    margin-bottom: .6rem;
    font-size: .95rem;
    font-weight: 800;
}

aside .list-unstyled a {
    color: var(--ink);
    text-decoration: none;
    font-size: .92rem;
}

aside .list-unstyled a:hover {
    text-decoration: underline;
}

/* Filter list separators and spacing */
.filter-tree .list-unstyled li + li {
    border-top: 1px solid rgba(17,24,39,0.04);
    margin-top: .45rem;
    padding-top: .45rem;
}

.filter-tree .card-title {
    font-size: .95rem;
    font-weight: 800;
    color: #111827;
}

.filter-tree .list-unstyled a { color: #374151; }

.filter-tree { background: transparent; }

/* Make filters sticky on larger screens */
@media (min-width: 992px) {
    aside { position: relative; }
    aside .card { position: sticky; top: 96px; }
}

/* Reduce horizontal blank space for main content */
.container-fluid.px-tight { padding-left: 1rem; padding-right: 1rem; }

/* Filter tree view */
.filter-tree ul { list-style: none; margin: 0; padding: 0; }
.filter-tree li { margin: .35rem 0; }
.filter-tree .cat-row { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.filter-tree .cat-row .caret { width: 1rem; height: 1rem; display: inline-block; transform: rotate(0); transition: transform .15s ease; }
.filter-tree .cat-row.collapsed .caret { transform: rotate(-90deg); }
.filter-tree .children { margin-left: 1.1rem; padding-left: .25rem; border-left: 1px dashed rgba(17,24,39,0.06); }
.filter-tree .children a { display: block; padding: .15rem 0; }

@media (max-width: 767px) {
    .filter-tree .children { display: none; }
}

.book-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: 100%;
    object-fit: fill;
    display: block;
    background: #e8edf2;
}

.book-card .store-book-image .book-placeholder {
    width: 100%;
    height: 100%;
}

.book-card .p-3 {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: .55rem !important;
}

.book-card h2 {
    font-size: .82rem;
    min-height: 2.25rem;
}

.book-card .small {
    font-size: .72rem;
}

.book-card .btn {
    font-size: .76rem;
    padding: .25rem .45rem;
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 620px;
    object-fit: fill;
    border-radius: 8px;
    background: #e8edf2;
}

.product-placeholder {
    display: grid;
    place-items: center;
    color: #53616f;
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 800;
}

.product-image-wrap {
    position: relative;
}

.qty-input {
    max-width: 110px;
}

.order-item-list {
    display: grid;
    gap: .75rem;
}

.order-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
}

.order-item-image {
    width: 58px;
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: #e8edf2;
    color: #53616f;
    font-weight: 800;
    text-decoration: none;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.site-footer {
    background: #1f2933;
    color: #e5edf5;
    padding: 2.5rem 0 1rem;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.site-footer h2 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: .85rem;
}

.site-footer p {
    color: #cbd5df;
    margin-bottom: .75rem;
}

.site-footer a {
    color: #cbd5df;
    display: block;
    margin-bottom: .45rem;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffc107;
}

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .14);
    color: #cbd5df;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.whatsapp-chatbot {
    bottom: 1.1rem;
    position: fixed;
    right: 1.1rem;
    z-index: 1050;
}

.whatsapp-chatbot-toggle {
    background: #16a34a;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(22, 163, 74, .34);
    color: #fff;
    font-weight: 800;
    padding: .8rem 1rem;
}

.whatsapp-chatbot-panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
    margin-bottom: .75rem;
    overflow: hidden;
    width: min(320px, calc(100vw - 2rem));
}

.whatsapp-chatbot-head {
    align-items: center;
    background: #075e54;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: .9rem 1rem;
}

.whatsapp-chatbot-head div div {
    color: rgba(255, 255, 255, .82);
    font-size: .8rem;
}

.whatsapp-chatbot-head button {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
}

.whatsapp-chatbot-body {
    display: grid;
    gap: .5rem;
    padding: .85rem;
}

.whatsapp-chatbot-messages {
    display: grid;
    gap: .45rem;
    max-height: 180px;
    overflow-y: auto;
}

.bot-message,
.customer-message {
    border-radius: 8px;
    font-size: .88rem;
    line-height: 1.35;
    padding: .55rem .65rem;
}

.bot-message {
    background: #f1f5f9;
    color: #1f2937;
}

.customer-message {
    background: #dcfce7;
    color: #14532d;
    justify-self: end;
    max-width: 88%;
}

.whatsapp-chatbot-form {
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.whatsapp-chatbot-form input {
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    min-width: 0;
    padding: .58rem .65rem;
}

.whatsapp-chatbot-form button {
    background: #16a34a;
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-weight: 800;
    padding: .58rem .75rem;
}

.whatsapp-chatbot-body a {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    color: #14532d;
    font-weight: 700;
    padding: .7rem .8rem;
    text-decoration: none;
}

.whatsapp-chatbot-body a:hover {
    background: #dcfce7;
    color: #14532d;
}

.dispatch-signature {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.dispatch-signature div {
    border-top: 1px solid #222;
    padding-top: .5rem;
}

.seller-highlight {
    background: #fff3cd;
    border: 1px solid #f2c94c;
    border-radius: 4px;
    color: #4a3410;
    display: inline-block;
    font-weight: 700;
    padding: .18rem .45rem;
}

@media print {
    @page {
        size: 148mm 210mm;
        margin: 8mm;
    }

    .print-hide {
        display: none !important;
    }

    .dispatch-print {
        max-width: none;
        padding: 0 !important;
    }
}

@media (max-width: 991px) {
    .search-box {
        min-width: 100%;
    }

    .store-search-panel,
    .store-feature-band {
        grid-template-columns: 1fr;
    }

    .store-book-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .store-book-scroll {
        grid-auto-columns: calc((100% - 2.25rem) / 4);
    }

    .gallery-strip {
        grid-auto-columns: calc((100% - 1rem) / 2);
    }

    .store-hero .carousel {
        width: calc(100vw - 1.5rem);
    }

    .header-search-form {
        width: 100%;
        margin: .5rem 0;
    }

    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .store-book-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-book-scroll {
        grid-auto-columns: calc((100% - .75rem) / 2);
    }

    .gallery-strip {
        grid-auto-columns: 86%;
    }

    .store-book-actions {
        flex-direction: column;
    }

    .site-footer-grid,
    .site-footer-bottom {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .store-book-scroll {
        grid-auto-columns: calc((100% - 5.25rem) / 8);
    }

    .gallery-strip {
        grid-auto-columns: calc((100% - 3rem) / 4);
    }
}
