/* =============================================
   Lichu Template — lichu.borbila.net style
   HTML: index.html  |  CSS: css/style.css
   ============================================= */

:root {
    --primary: #df2d4d;
    --primary-dark: #b82a34;
    --primary-light: #f06b82;
    --primary-rgb: 223, 45, 77;
    --secondary: #198754;
    --footer-bg: #222222;
    --copyright-bg: #111111;
    --border: #dedfde;
    --text: #111311;
    --muted: #666;
    --white: #fff;
    --container: 1240px;
    --notice-height: 38px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Hind Siliguri', 'Roboto', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    width: min(var(--container), 94%);
    margin: 0 auto;
}

/* ---------- Scrolling Notice Topbar ---------- */
.notice-ticker {
    display: flex;
    align-items: center;
    background: var(--primary);
    color: var(--white);
    height: var(--notice-height);
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 260;
}

.notice-ticker.is-hidden {
    display: none;
}

body.notice-closed {
    --notice-height: 0px;
}

.notice-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    height: 100%;
    padding: 0 18px 0 12px;
    background: var(--secondary);
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.notice-badge i {
    font-size: 12px;
    color: var(--white);
}

.notice-track-wrap {
    flex: 1;
    overflow: hidden;
    min-width: 0;
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 8px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 8px), transparent 100%);
}

.notice-track {
    display: flex;
    width: max-content;
    animation: notice-scroll 28s linear infinite;
}

.notice-track:hover {
    animation-play-state: paused;
}

.notice-text {
    flex-shrink: 0;
    padding-right: 60px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.notice-close {
    flex-shrink: 0;
    width: 38px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: background 0.2s, opacity 0.2s;
}

.notice-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

@keyframes notice-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .notice-track {
        animation: none;
    }
}

/* ---------- Top Bar (legacy) ---------- */
.top-bar {
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    padding: 9px 0;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.top-bar a {
    color: var(--white);
    font-weight: 600;
}

.top-bar a i {
    margin-right: 4px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: var(--notice-height);
    z-index: 200;
    overflow: visible;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    position: relative;
}

.logo img {
    height: 52px;
    width: auto;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
    overflow: visible;
}

.main-nav a {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary);
}

.main-nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cart-wrap {
    position: relative;
}

.cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
}

/* ---------- Mini Cart Dropdown ---------- */
.cart-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 340px;
    max-width: 92vw;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    z-index: 600;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    overflow: hidden;
}

.cart-dropdown::before {
    content: "";
    position: absolute;
    top: -14px;
    right: 0;
    left: 0;
    height: 14px;
}

.cart-dropdown::after {
    content: "";
    position: absolute;
    top: -7px;
    right: 22px;
    width: 14px;
    height: 14px;
    background: var(--white);
    transform: rotate(45deg);
    box-shadow: -3px -3px 8px rgba(0, 0, 0, 0.06);
}

.cart-wrap:hover .cart-dropdown,
.cart-wrap.open .cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-dropdown-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.cart-dropdown-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: #fdf0f2;
    padding: 3px 10px;
    border-radius: 20px;
}

.cart-dropdown-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}

.cart-dropdown-body::-webkit-scrollbar {
    width: 6px;
}

.cart-dropdown-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 6px;
}

.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}

.mini-cart-item:hover {
    background: #fafafa;
}

.mini-cart-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
    background: #fff;
}

.mini-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-cart-info {
    flex: 1;
    min-width: 0;
}

.mini-cart-name {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
    line-height: 1.35;
    margin-bottom: 3px;
}

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

.mini-cart-meta {
    font-size: 12px;
    color: #888;
}

.mini-cart-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.mini-cart-line {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.mini-cart-remove {
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.mini-cart-remove:hover {
    color: #e53935;
}

.mini-cart-empty {
    text-align: center;
    padding: 34px 16px;
    color: #999;
}

.mini-cart-empty i {
    font-size: 34px;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.mini-cart-empty p {
    font-size: 14px;
    margin: 0;
}

.cart-dropdown-foot {
    padding: 14px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fcfcfc;
}

.mini-cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.mini-cart-total-amt {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
}

.mini-cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mini-cart-view,
.mini-cart-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.18s;
}

.mini-cart-view {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.mini-cart-view:hover {
    background: #fdf0f2;
}

.mini-cart-checkout {
    background: var(--primary);
    color: var(--white);
    border: 1.5px solid var(--primary);
}

.mini-cart-checkout:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

@media (max-width: 900px) {
    .cart-dropdown {
        display: none;
    }
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #fff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 17px;
    transition: background 0.2s;
}

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

.btn-track {
    background: var(--primary);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--primary);
    cursor: pointer;
    padding: 4px;
}

/* Mobile search — hidden on desktop */
.mobile-search {
    display: none;
    position: relative;
}

/* Live search results dropdown */
.mobile-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 620;
}

.mobile-search-results.show {
    display: block;
}

.mobile-search-results .search_product ul {
    list-style: none;
    margin: 0;
    padding: 6px;
}

.mobile-search-results .search_product a {
    display: block;
    border-radius: 8px;
    transition: background 0.15s;
}

.mobile-search-results .search_product a:hover {
    background: #fafafa;
}

.mobile-search-results .search_product li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-search-results .search_product a:last-child li {
    border-bottom: none;
}

.mobile-search-results .search_img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    background: #fff;
}

.mobile-search-results .search_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-search-results .search_content {
    flex: 1;
    min-width: 0;
}

.mobile-search-results .search_content .name {
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
    margin: 0 0 3px;
    line-height: 1.35;
}

.mobile-search-results .search_content .price {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.mobile-search-results .search_content .price del {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    margin-left: 6px;
}

.mobile-search-state {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.drawer-head {
    display: none;
}

.drawer-links {
    display: contents;
}

.drawer-links a > i {
    display: none;
}

.drawer-links a.drawer-only {
    display: none;
}

/* Dynamic category navigation */
.nav-cat-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: center;
    justify-content: center;
}

.nav-cat-link {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    transition: color 0.2s;
}

.nav-cat-link:hover,
.nav-cat-link.active {
    color: var(--primary);
}

.nav-cat-link.active {
    font-weight: 600;
}

.nav-cat-item {
    position: relative;
}

.nav-cat-item.has-children > .nav-cat-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-cat-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    color: var(--primary);
    opacity: 1;
    transition: transform 0.2s;
}

.nav-cat-chevron i {
    display: inline-block;
}

.nav-cat-item.has-children:hover .nav-cat-chevron,
.nav-cat-item.has-children:focus-within .nav-cat-chevron {
    transform: rotate(180deg);
}

.nav-sub-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    min-width: 210px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 500;
}

.nav-sub-dropdown::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-cat-item.has-children:hover .nav-sub-dropdown,
.nav-cat-item.has-children:focus-within .nav-sub-dropdown {
    display: block;
}

.nav-sub-dropdown a,
.nav-sub-link {
    display: block;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.nav-sub-dropdown a:hover,
.nav-sub-link:hover {
    background: #fdf0f2;
    color: var(--primary);
}

.nav-sub-item {
    position: relative;
}

.nav-sub-item.has-children > .nav-sub-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.drawer-links a > i.nav-sub-arrow {
    display: inline-block;
}

.nav-sub-arrow {
    font-size: 12px;
    color: var(--primary);
    margin-left: auto;
}

.nav-child-dropdown {
    display: none;
    position: absolute;
    top: -8px;
    left: 100%;
    min-width: 190px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    z-index: 510;
}

.nav-sub-item.has-children:hover > .nav-child-dropdown,
.nav-sub-item.has-children:focus-within > .nav-child-dropdown {
    display: block;
}

.nav-child-dropdown a {
    display: block;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #444;
    white-space: nowrap;
}

.nav-child-dropdown a:hover {
    background: #fdf0f2;
    color: var(--primary);
}

.nav-cat-mobile,
.drawer-only-block {
    display: none;
}

.side-cat-icon {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ---------- Hero Banner ---------- */
.hero-banner {
    margin-top: 16px;
    margin-bottom: 4px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: #f8f8f8;
    transition: height 0.35s ease;
}

.hero-track {
    display: flex;
    align-items: flex-start;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: block;
}

.hero-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 3px;
    object-fit: contain;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
    vertical-align: top;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.25s, background 0.2s;
    z-index: 2;
}

.hero-slider:hover .hero-nav,
.hero-slider:focus-within .hero-nav {
    opacity: 1;
}

.hero-nav:hover {
    background: var(--white);
}

.hero-prev {
    left: 10px;
}

.hero-next {
    right: 10px;
}

.hero-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s, background 0.25s, border-radius 0.25s;
}

.hero-dot.active {
    width: 22px;
    border-radius: 4px;
    background: var(--white);
}

/* ---------- Category Menu ---------- */
.category-menu-section {
    padding: 18px 0 6px;
}

.category-menu-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.category-menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 116px;
    padding: 16px 10px;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 14px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-menu-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.category-menu-thumb {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-menu-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category-menu-thumb i {
    font-size: 30px;
    color: var(--primary);
}

.category-menu-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.category-menu-card:hover .category-menu-name {
    color: var(--primary);
}

@media (max-width: 900px) {
    .category-menu-section {
        padding: 12px 0 4px;
    }

    .category-menu-scroll {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .category-menu-scroll::-webkit-scrollbar {
        display: none;
    }

    .category-menu-card {
        width: 92px;
        flex-shrink: 0;
        padding: 12px 8px;
        gap: 8px;
        border-radius: 12px;
    }

    .category-menu-thumb {
        width: 52px;
        height: 52px;
    }

    .category-menu-name {
        font-size: 12.5px;
    }
}

/* ---------- Hot Deal Section ---------- */
.hot-deal-section {
    padding: 22px 0 14px;
    margin: 10px 0;
}

.hot-deal-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark, #a11733) 100%);
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 22px rgba(var(--primary-rgb), 0.22);
}

.hot-deal-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.hot-deal-flame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffd54a;
    font-size: 22px;
    animation: flamePulse 1.4s ease-in-out infinite;
}

@keyframes flamePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); }
}

.hot-deal-heading-text h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--white);
    line-height: 1.1;
}

.hot-deal-heading-text p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    margin: 2px 0 0;
}

.deal-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
}

.deal-countdown .timer-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    margin-right: 4px;
}

.deal-countdown .timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    border-radius: 8px;
    min-width: 44px;
    padding: 5px 4px;
    line-height: 1;
}

.deal-countdown .timer-box b {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.deal-countdown .timer-box small {
    font-size: 9.5px;
    color: #888;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.deal-countdown .timer-colon {
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
    align-self: flex-start;
    margin-top: 4px;
}

.hot-deal-viewall {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 8px;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hot-deal-viewall:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    color: var(--primary);
}

@media (max-width: 900px) {
    .hot-deal-head {
        gap: 12px;
        padding: 12px 14px;
    }

    .hot-deal-heading {
        margin-right: 0;
        width: 100%;
    }

    .hot-deal-flame {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    .hot-deal-heading-text h2 {
        font-size: 19px;
    }

    .deal-countdown {
        order: 3;
        gap: 5px;
    }

    .deal-countdown .timer-label {
        display: none;
    }

    .deal-countdown .timer-box {
        min-width: 40px;
    }

    .hot-deal-viewall {
        margin-left: auto;
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ---------- Flash Sale Section ---------- */
.flash-sale-section {
    padding: 22px 0 14px;
    margin: 10px 0;
}

.flash-sale-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #1f2937 0%, #b3122f 55%, var(--primary) 100%);
    border-radius: 16px;
    padding: 16px 22px;
    margin-bottom: 22px;
    box-shadow: 0 10px 26px rgba(31, 41, 55, 0.28);
}

.flash-sale-head::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -20%;
    width: 60%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transform: skewX(-20deg);
    animation: flashShine 3.4s ease-in-out infinite;
}

@keyframes flashShine {
    0% { left: -30%; }
    55%, 100% { left: 130%; }
}

.flash-sale-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.flash-sale-bolt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffd54a, #ff9800);
    color: #7a3b00;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    animation: boltFlash 1.6s steps(1) infinite;
}

@keyframes boltFlash {
    0%, 45%, 55%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.flash-sale-heading-text h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 23px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
    line-height: 1.1;
}

.flash-sale-heading-text p {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    margin: 3px 0 0;
}

.flash-sale-timer {
    position: relative;
    z-index: 1;
}

.flash-sale-timer .timer-box b {
    color: #b3122f;
}

.flash-sale-viewall {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    position: relative;
    z-index: 1;
    background: #ffd54a;
    color: #7a3b00;
    font-size: 14px;
    font-weight: 800;
    padding: 9px 18px;
    border-radius: 8px;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.flash-sale-viewall:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    color: #7a3b00;
}

.flash-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ff9800, #f4511e);
}

.flash-progress {
    height: 7px;
    background: #f0e0e4;
    border-radius: 20px;
    overflow: hidden;
    margin: 2px 0 5px;
}

.flash-progress-bar {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #ff9800, var(--primary));
    transition: width 0.4s ease;
}

.flash-sold-text {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #777;
    margin-bottom: 8px;
}

.flash-sold-text i {
    color: #ff6d00;
    margin-right: 2px;
}

@media (max-width: 900px) {
    .flash-sale-head {
        gap: 12px;
        padding: 14px;
    }

    .flash-sale-heading {
        margin-right: 0;
        width: 100%;
    }

    .flash-sale-bolt {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .flash-sale-heading-text h2 {
        font-size: 20px;
    }

    .flash-sale-viewall {
        margin-left: auto;
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ---------- Product Section ---------- */
.product-section {
    padding: 20px 0 10px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--primary);
    border-radius: 10px 10px 0 0;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.section-head h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 25px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
}

.btn-view-all {
    background: var(--primary);
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 3px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s;
}

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

.product-thumb {
    display: block;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fafafa;
}

.deal-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    line-height: 1.4;
}

.deal-stockout {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: var(--white);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 15px;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px 5px 0 0;
}

.product-body {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.product-title {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 4px;
    min-height: 36px;
}

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

.product-price {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
}

.btn-order {
    flex: 1;
    background: var(--primary);
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    text-align: center;
    padding: 10px 0;
    border-radius: 5px;
    transition: background 0.2s;
}

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

.btn-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 5px;
    transition: background 0.2s, color 0.2s;
}

.btn-cart:hover {
    background: var(--primary);
    color: var(--white);
}

/* Cart/order forms inside product actions behave as flex items */
.product-actions form {
    display: contents;
}

button.btn-order {
    border: none;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
}

button.btn-cart {
    background: transparent;
    cursor: pointer;
}

.product-price del {
    color: #999;
    font-weight: 500;
    font-size: 13px;
    margin-right: 4px;
}

.section-cta {
    text-align: center;
    margin: 24px 0 10px;
}

.btn-load-more {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 5px;
}

/* ══════════════════════════════════════
   Brand Section
══════════════════════════════════════ */
.brand-section { padding: 20px 0 10px; }

.brand-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.brand-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-3px);
}

.brand-card-img {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-card-img img {
    max-height: 56px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter .2s;
}

.brand-card:hover .brand-card-img img { filter: none; }

.brand-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.3;
}

/* ══════════════════════════════════════
   Vendor / Merchant Shop Section
══════════════════════════════════════ */
.vendor-section { padding: 20px 0 16px; }

.vendor-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.vendor-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,.07);
    border: 1.5px solid transparent;
    transition: border-color .25s, box-shadow .25s, transform .25s;
    position: relative;
}

.vendor-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 32px rgba(0,0,0,.13);
    transform: translateY(-5px);
}

/* gradient banner */
.vendor-banner {
    height: 90px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent;
    position: relative;
}

.vendor-banner--no-img {
    background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb,var(--primary) 60%,#000 40%) 100%);
}

.vendor-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.22));
    pointer-events: none;
}

/* verified badge on banner */
.vendor-badge-verified {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 1;
    background: #1877f2;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vendor-body {
    padding: 0 14px 14px;
    text-align: center;
    position: relative;
}

.vendor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.14);
    overflow: hidden;
    margin: -32px auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.vendor-avatar img { width: 100%; height: 100%; object-fit: cover; }

.vendor-avatar-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: var(--primary);
}

.vendor-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.vendor-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-bottom: 10px;
}

.vendor-stars i { font-size: 12px; color: #f5b301; }
.vendor-stars .far.fa-star { color: #e0e0e0; }
.vendor-review-count { font-size: 11px; color: #aaa; margin-left: 4px; }

.vendor-visit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    background: #f7f7f7;
    border-radius: 8px;
    color: #444;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    transition: background .2s, color .2s;
}

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

.vendor-visit-btn i { font-size: 11px; transition: transform .2s; }
.vendor-card:hover .vendor-visit-btn i { transform: translateX(3px); }

/* ══════════════════════════════════════
   Blog Section
══════════════════════════════════════ */
.blog-section { padding: 20px 0 16px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.blog-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    border: 1.5px solid #f0f0f0;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}

.blog-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 36px rgba(0,0,0,.12);
    transform: translateY(-6px);
}

.blog-card-img {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
    display: block;
}

.blog-card:hover .blog-card-img img { transform: scale(1.07); }

.blog-card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.blog-card-body {
    padding: 18px 18px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    font-size: 12px;
    color: #bbb;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.blog-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.blog-card-meta i { color: var(--primary); }

.blog-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a { color: inherit; text-decoration: none; }
.blog-card-title a:hover { color: var(--primary); }

.blog-card-excerpt {
    font-size: 13px;
    color: #777;
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
    margin-top: auto;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 14px;
    border: 1.5px solid var(--primary);
    border-radius: 20px;
    transition: background .2s, color .2s;
}

.blog-read-more:hover {
    background: var(--primary);
    color: #fff;
}

.blog-read-more i { font-size: 11px; }

.blog-read-time {
    font-size: 11px;
    color: #bbb;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .brand-grid  { grid-template-columns: repeat(4, 1fr); }
    .vendor-grid { grid-template-columns: repeat(4, 1fr); }
    .blog-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .brand-grid  { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .vendor-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .blog-grid   { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 480px) {
    .brand-grid  { grid-template-columns: repeat(2, 1fr); }
    .vendor-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Promo Banner ---------- */
.promo-section {
    padding: 15px 0;
}

.promo-banner {
    min-height: 0;
    border-radius: 5px;
    overflow: hidden;
    background: none;
}

.promo-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
    border-radius: 5px;
}

/* ---------- Features Bar ---------- */
.features-bar {
    background: var(--primary);
    color: var(--white);
    padding: 28px 0;
    margin-top: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-item i {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 4px;
    opacity: 0.9;
}

.feature-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 13px;
    opacity: 0.9;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--footer-bg, var(--primary-dark));
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 40px;
    padding: 48px 16px 36px;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 16px;
}

.footer-about p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-grid h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid ul li {
    margin-bottom: 10px;
}

.footer-grid ul a {
    font-size: 14px;
    opacity: 0.9;
}

.footer-grid ul a:hover {
    opacity: 1;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ---------- Footer Newsletter ---------- */
.footer-newsletter p {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
    max-width: 340px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form button {
    border: none;
    cursor: pointer;
    padding: 0 18px;
    background: var(--white);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s;
}

.newsletter-form button:hover {
    background: #ffe9ee;
}

.newsletter-note {
    margin-top: 10px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 18px;
}

.newsletter-note.is-success {
    color: #b7f7c8;
}

.newsletter-note.is-error {
    color: #ffd0d0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    padding: 14px;
    font-size: 13px;
    opacity: 0.9;
    background: var(--copyright-bg, transparent);
}

.footer-bottom a {
    color: var(--white);
    font-weight: 600;
}

/* ---------- Mobile Bottom Menu ---------- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #dbeafe;
    padding: 10px 0;
    z-index: 300;
    justify-content: space-around;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    padding: 0 8px;
}

.mobile-bottom-nav a i {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.mobile-bottom-nav a.active i {
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
        z-index: 100;
    }

    .main-nav.open {
        display: flex;
    }

    /* app-home — left side drawer */
    .app-home .main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        bottom: 0;
        width: min(300px, 88vw);
        height: 100vh;
        height: 100dvh;
        padding: 0;
        background: var(--white);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.15);
        border-top: none;
        z-index: 350;
        transform: translateX(-100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s ease, visibility 0.3s ease;
        overflow: hidden;
    }

    .app-home .main-nav.open {
        display: flex;
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    /* মেনু খোলা থাকলে header + drawer overlay-র উপরে থাকবে */
    .app-home.menu-open .site-header {
        z-index: 360;
    }

    .app-home .drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px;
        background: var(--primary);
        color: var(--white);
        flex-shrink: 0;
    }

    .app-home .drawer-title {
        font-size: 18px;
        font-weight: 700;
    }

    .app-home .drawer-close {
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .app-home .drawer-links {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow-y: auto;
        padding: 8px 0 24px;
    }

    .app-home .drawer-links a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 500;
        color: #222;
        border-bottom: 1px solid #f3f3f3;
    }

    .app-home .drawer-links a i {
        width: 22px;
        color: var(--primary);
        text-align: center;
        font-size: 15px;
    }

    .app-home .drawer-links a:active,
    .app-home .drawer-links a:hover {
        background: #fdf0f2;
        color: var(--primary);
    }

    .app-home .nav-cat-desktop {
        display: none;
    }

    .app-home .nav-cat-mobile {
        display: block;
        width: 100%;
    }

    .app-home .mobile-cat-group {
        border-bottom: 1px solid #f3f3f3;
    }

    .app-home .mobile-cat-row {
        display: flex;
        align-items: stretch;
    }

    .app-home .mobile-cat-parent {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        padding: 14px 12px 14px 20px;
        font-size: 16px;
        font-weight: 600;
        color: #222;
        border-bottom: none;
    }

    .app-home .mobile-cat-parent i {
        width: 22px;
        color: var(--primary);
        text-align: center;
        font-size: 15px;
    }

    .app-home .mobile-sub-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        flex-shrink: 0;
        border: none;
        background: transparent;
        color: var(--primary);
        font-size: 15px;
        cursor: pointer;
    }

    .app-home .mobile-sub-toggle i {
        transition: transform 0.25s ease;
    }

    .app-home .mobile-cat-group.has-children.is-open .mobile-sub-toggle i {
        transform: rotate(180deg);
    }

    .app-home .mobile-cat-group.has-children .drawer-sub-links {
        display: none;
    }

    .app-home .mobile-cat-group.has-children.is-open .drawer-sub-links {
        display: flex;
        flex-direction: column;
        background: #fafafa;
        padding: 4px 0 8px;
    }

    .app-home .drawer-sub-links {
        display: flex;
        flex-direction: column;
        background: #fafafa;
        padding: 4px 0 8px;
    }

    .app-home .drawer-sub-links a {
        display: block;
        padding: 10px 20px 10px 54px;
        font-size: 14px;
        font-weight: 500;
        color: #444;
        border-bottom: none;
    }

    .app-home .drawer-sub-links a:hover {
        background: #fdf0f2;
        color: var(--primary);
    }

    .app-home .drawer-sub-row {
        display: flex;
        align-items: stretch;
    }

    .app-home .drawer-sub-links .drawer-sub-parent {
        flex: 1;
        font-weight: 600;
        color: #333;
    }

    .app-home .drawer-child-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        flex-shrink: 0;
        border: none;
        background: transparent;
        color: var(--primary);
        font-size: 13px;
        cursor: pointer;
    }

    .app-home .drawer-child-toggle i {
        transition: transform 0.25s ease;
    }

    .app-home .drawer-sub-group.has-children.is-open .drawer-child-toggle i {
        transform: rotate(180deg);
    }

    .app-home .drawer-sub-group.has-children .drawer-child-links {
        display: none;
    }

    .app-home .drawer-sub-group.has-children.is-open .drawer-child-links {
        display: flex;
    }

    .app-home .drawer-child-links {
        display: flex;
        flex-direction: column;
    }

    .app-home .drawer-child-links a {
        padding: 8px 20px 8px 74px;
        font-size: 13px;
        font-weight: 500;
        color: #666;
        position: relative;
    }

    .app-home .drawer-child-links a::before {
        content: "\2013";
        position: absolute;
        left: 60px;
        color: var(--primary);
    }

    .app-home .drawer-links .drawer-only-block {
        display: block;
        width: 100%;
    }

    .app-home .mobile-search {
        display: flex;
        align-items: center;
        gap: 8px;
        background: var(--white);
        border: 1.5px solid var(--primary);
        border-radius: 8px;
        padding: 0 12px;
        height: 40px;
        min-width: 0;
    }

    .app-home .mobile-search input {
        flex: 1;
        border: none;
        outline: none;
        background: transparent;
        font-family: inherit;
        font-size: 14px;
        color: var(--text);
        min-width: 0;
        order: 1;
    }

    .app-home .mobile-search .search-icon {
        color: var(--primary);
        font-size: 15px;
        flex-shrink: 0;
        order: 2;
        cursor: pointer;
        padding: 4px;
    }

    .app-home .mobile-search input::placeholder {
        color: #999;
    }

    .app-home .header-inner {
        padding: 8px 14px;
        display: grid;
        grid-template-columns: 40px 1fr auto;
        grid-template-areas:
            "menu logo actions"
            "search search search";
        align-items: center;
        gap: 10px 8px;
    }

    .app-home .menu-toggle {
        grid-area: menu;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fdf0f2;
        border-radius: 10px;
        font-size: 20px;
    }

    .app-home .logo {
        grid-area: logo;
        justify-self: center;
    }

    .app-home .logo img {
        height: 46px;
        width: auto;
        max-width: 180px;
    }

    .app-home .header-actions {
        grid-area: actions;
    }

    .app-home .mobile-search {
        grid-area: search;
    }

    .app-home .header-actions .profile-btn,
    .app-home .header-actions .btn-track {
        display: none;
    }

    .app-home .cart-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .app-home .drawer-links a i {
        display: inline-block;
    }

    .app-home .drawer-links a.drawer-only {
        display: flex;
    }

    .app-home .header-actions {
        gap: 8px;
    }

    .app-home .cart-btn .cart-amount {
        display: none;
    }

    .app-home .cart-btn .fa-shopping-basket {
        margin: 0;
    }

    .app-home .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 340;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .app-home .nav-overlay.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 80px;
    }

    .app-home {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .app-home .site-footer {
        width: 100%;
        max-width: 100%;
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        overflow: visible;
    }

    .app-home .site-footer .footer-grid {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
}

@media (max-width: 767px) {
    .site-footer {
        display: none !important;
    }

    .features-bar {
        display: none !important;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .section-head h2 {
        font-size: 17px;
    }

    .btn-view-all {
        font-size: 13px;
        padding: 5px 8px;
    }

    .product-title {
        font-size: 12px;
        min-height: 28px;
    }

    .product-price {
        font-size: 12px;
    }

    .btn-order {
        font-size: 12px;
        padding: 8px 0;
    }

    .promo-banner {
        min-height: 0;
        height: auto;
        overflow: visible;
        background: none;
    }

    .promo-banner-img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .hero-img {
        max-height: none;
        object-fit: contain;
    }

    .cart-btn .cart-amount {
        display: none;
    }
}

/* ---------- Shop Page (All Products) ---------- */
.shop-page {
    padding: 24px 0 48px;
    background: #f8f8f8;
}

/* Toolbar: breadcrumb + sort + count */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--white);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.shop-breadcrumb a {
    color: var(--muted);
}

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

.shop-breadcrumb strong {
    color: var(--text);
}

.shop-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-count {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.shop-sort select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13px;
    background: var(--white);
    color: var(--text);
    outline: none;
    cursor: pointer;
}

.shop-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Shop layout: sidebar + grid */
.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
    overflow: visible;
}

/* Sidebar */
.shop-sidebar {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    align-self: start;
}

/* JS-driven sticky — class added by script */
.shop-sidebar.is-sticky {
    position: fixed;
    width: 240px;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    z-index: 50;
}
.shop-sidebar::-webkit-scrollbar { width: 4px; }
.shop-sidebar::-webkit-scrollbar-track { background: transparent; }
.shop-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* placeholder to hold space when sidebar is fixed */
.shop-sidebar-placeholder {
    width: 240px;
    flex-shrink: 0;
    display: none;
}
.shop-sidebar-placeholder.is-active {
    display: block;
}

.shop-sidebar-head {
    background: var(--primary);
    color: var(--white);
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-sidebar-close {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.shop-sidebar-section {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px;
}

.shop-sidebar-section:last-child {
    border-bottom: none;
}

.shop-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-sidebar-title i {
    color: var(--primary);
    font-size: 12px;
}

.shop-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shop-cat-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #444;
    padding: 5px 8px;
    border-radius: 6px;
    transition: 0.15s;
}

.shop-cat-list li a:hover,
.shop-cat-list li a.active {
    background: rgba(var(--primary-rgb), 0.07);
    color: var(--primary);
}

.shop-cat-list li a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    transition: background 0.15s;
}

.shop-cat-list li a:hover::before,
.shop-cat-list li a.active::before {
    background: var(--primary);
}

/* Price range */
.shop-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
}

.shop-price-inputs input {
    width: 70px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
    text-align: center;
    background: #f9f9f9;
}

.shop-price-sep {
    color: var(--muted);
    font-size: 11px;
}

.shop-price-slider {
    margin-bottom: 14px;
}

.shop-filter-apply {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.shop-filter-apply:hover {
    background: var(--primary-dark);
}

/* Shop product grid */
.product-grid--shop {
    grid-template-columns: repeat(4, 1fr);
}

/* Pagination */
.shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.shop-pagination .pagination {
    gap: 4px;
    flex-wrap: wrap;
    margin: 0;
}

.shop-pagination .page-link {
    border-radius: 8px !important;
    border-color: var(--border);
    color: var(--text);
    font-size: 14px;
    padding: 6px 14px;
}

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

.shop-pagination .page-link:hover {
    background: rgba(var(--primary-rgb), 0.07);
    color: var(--primary);
    border-color: var(--primary);
}

/* Empty state */
.shop-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.shop-empty i {
    font-size: 48px;
    margin-bottom: 14px;
    color: #ccc;
    display: block;
}

.shop-empty p {
    font-size: 15px;
}

/* Sidebar overlay (mobile) */
.shop-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 199;
}

.shop-sidebar-overlay.is-open {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-grid--shop {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .shop-filter-toggle {
        display: flex;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100dvh;
        z-index: 200;
        overflow-y: auto;
        border-radius: 0;
        transition: left 0.3s;
    }

    .shop-sidebar.is-open {
        left: 0;
    }

    .shop-sidebar-close {
        display: block;
    }

    .product-grid--shop {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Category Page ---------- */
.category-banner {
    background: var(--primary);
    color: var(--white);
    padding: 28px 0;
    margin-bottom: 8px;
}

.category-banner h1 {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    text-align: center;
}

.category-banner h1 span {
    font-weight: 700;
}

.category-page {
    padding: 24px 0 40px;
    background: #f8f8f8;
}

.product-grid--category {
    grid-template-columns: repeat(4, 1fr);
}

.product-rating {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 6px;
}

.product-rating i {
    color: #f5b301;
    font-size: 11px;
}

.product-rating--detail {
    justify-content: flex-start;
    margin-bottom: 12px;
}

.product-rating--detail i {
    font-size: 14px;
}

.product-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding: 0 4px;
}

.product-meta-row .product-price {
    margin-bottom: 0;
    text-align: left;
}

.product-views {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .product-grid--category {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .product-grid--category {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---------- Product Detail Page ---------- */
.product-detail-page {
    padding: 20px 0 40px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span:last-child {
    color: var(--text);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

.product-detail-image {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.product-detail-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.gallery-main {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    position: relative;
    aspect-ratio: 1;
}

.gallery-main img.gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-main img.gallery-media[hidden] {
    display: none;
}

.gallery-disc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    z-index: 2;
    pointer-events: none;
}

.gallery-video-wrap {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
}

.gallery-video-wrap[hidden] {
    display: none;
}

.gallery-video-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.gallery-main img.is-fading {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.gallery-thumbs-wrap {
    width: 100%;
}

.gallery-thumbs-wrap.is-scrollable {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding-bottom: 4px;
}

.gallery-thumbs.is-scrollable {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
    padding-bottom: 6px;
}

.gallery-thumbs.is-scrollable::-webkit-scrollbar {
    display: block;
    height: 5px;
}

.gallery-thumbs.is-scrollable::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 99px;
}

.gallery-thumbs.is-scrollable .gallery-thumb {
    scroll-snap-align: start;
}

.gallery-thumbs-nav {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 13px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s, color 0.2s;
}

.gallery-thumbs-nav:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.gallery-thumbs-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--primary);
}

.gallery-thumb--video {
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
}

.video-thumb-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.video-thumb-inner i {
    font-size: 18px;
    color: #fff;
}

.product-attrs {
    list-style: none;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.product-attrs li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 5px 0;
}

.product-attrs li + li {
    border-top: 1px dashed #eee;
    margin-top: 4px;
    padding-top: 9px;
}

.attr-label {
    color: var(--muted);
    min-width: 72px;
    flex-shrink: 0;
}

.attr-value {
    color: var(--text);
    font-weight: 500;
}

.product-brand {
    color: var(--primary);
    font-weight: 600;
}

.product-brand:hover {
    text-decoration: underline;
}

.in-stock {
    color: #1a8f4c;
    font-weight: 600;
}

.in-stock i {
    margin-right: 4px;
}

.rating-count {
    font-size: 14px;
    color: var(--muted);
    margin-left: 8px;
    font-weight: 400;
}

.product-rating--detail .rating-count {
    font-size: 13px;
}

.product-detail-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-detail-short {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.product-detail-price {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.product-option-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

/* ── Color Swatches ── */
.pro-color { margin-bottom: 16px; }

.color-selector { display: flex; flex-wrap: wrap; gap: 10px; }

.color-swatch-item {
    position: relative;
    display: inline-block;
}

/* hide native radio but keep it accessible & clickable via label */
.color-swatch-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
    margin: 0;
}

.color-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    outline: 2px solid rgba(0,0,0,0.15);
    outline-offset: 0px;
    cursor: pointer;
    transition: transform 0.18s, outline-color 0.18s, outline-width 0.18s;
    user-select: none;
}

.color-swatch:hover {
    transform: scale(1.1);
    outline-color: var(--primary);
    outline-width: 2.5px;
}

.color-swatch-item input[type="radio"]:checked + .color-swatch {
    border-color: #fff;
    outline-color: #222;
    outline-width: 3px;
    transform: scale(1.12);
}

.color-swatch-check {
    display: none;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    pointer-events: none;
}

.color-swatch-item input[type="radio"]:checked + .color-swatch .color-swatch-check {
    display: block;
}

.weight-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.weight-btn {
    padding: 8px 18px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.weight-btn:hover,
.weight-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.btn-clear-option {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    margin-bottom: 20px;
}

.btn-clear-option:hover {
    color: var(--primary);
}

.product-qty-row {
    margin-bottom: 24px;
}

.qty-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #eee;
}

.qty-input {
    width: 50px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-family: inherit;
    font-size: 15px;
    -moz-appearance: textfield;
}

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

.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 14px 24px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.btn-add-cart {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-add-cart:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-buy-now {
    background: var(--primary);
    color: var(--white);
}

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

.product-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    margin-top: 6px;
    flex-wrap: wrap;
}

.product-share h3 {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    white-space: nowrap;
    margin: 0;
}

.share-links {
    display: flex;
    gap: 8px;
}

.share-links a {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.share-links a[aria-label="Facebook"] { background: #1877f2; }
.share-links a[aria-label="Twitter"]  { background: #1da1f2; }
.share-links a[aria-label="WhatsApp"] { background: #25d366; }

.share-links a:hover { opacity: 0.82; color: #fff; }

/* ── Product Description Card ── */
.product-description {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
}

.product-description > h2,
.product-description .pd-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: block;
}

/* Prose – WYSIWYG / Summernote content */
.product-description p,
.pd-content p   { font-size: 14px; color: #555; line-height: 1.8; margin: 0 0 12px; }
.pd-content h1  { font-size: 20px; color: #1a1a2e; font-weight: 700; margin: 0 0 10px; }
.pd-content h2  { font-size: 17px; color: #1a1a2e; font-weight: 700; margin: 0 0 10px; border: none; padding: 0; }
.pd-content h3  { font-size: 15px; color: #1a1a2e; font-weight: 700; margin: 0 0 8px; }
.pd-content h4, .pd-content h5, .pd-content h6 { color: #1a1a2e; font-weight: 700; margin: 0 0 8px; }
.pd-content ul, .pd-content ol { padding-left: 20px; margin: 0 0 12px; color: #555; font-size: 14px; line-height: 1.8; }
.pd-content li  { margin-bottom: 4px; }
.pd-content strong, .pd-content b { font-weight: 700; color: #333; }
.pd-content a   { color: var(--primary); text-decoration: underline; }
.pd-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; display: block; }
.pd-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.pd-content table th,
.pd-content table td { border: 1px solid #e0e0e0; padding: 8px 12px; }
.pd-content table th { background: #f5f5f5; font-weight: 700; }
.pd-content blockquote { border-left: 4px solid var(--primary); margin: 12px 0; padding: 10px 16px; background: #fef9f9; color: #555; font-style: italic; }

/* ── Product Reviews Card ── */
/* Product Reviews */
.product-reviews {
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
}

.reviews-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.reviews-head h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.btn-write-review {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    white-space: nowrap;
    transition: filter 0.2s;
    background: var(--primary);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-write-review:hover {
    filter: brightness(0.9);
    color: #fff;
}

.reviews-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 24px;
    align-items: center;
}

.reviews-score-box {
    text-align: center;
    min-width: 120px;
    flex-shrink: 0;
}

.reviews-score {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
    margin-bottom: 8px;
}

.reviews-score-box .product-rating {
    justify-content: center;
    margin-bottom: 6px;
}

.reviews-total {
    font-size: 13px;
    color: var(--muted);
}

.reviews-bars {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}

.review-bar-row > span {
    width: 28px;
    flex-shrink: 0;
}

.review-bar-row em {
    width: 20px;
    text-align: right;
    font-style: normal;
    font-size: 12px;
}

.review-bar {
    flex: 1;
    height: 8px;
    background: #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}

.review-bar span {
    display: block;
    height: 100%;
    background: #f5b301;
    border-radius: 4px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.review-item {
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: var(--white);
}

.review-item-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.review-author {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.review-date {
    margin-left: auto;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.review-text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
}

.review-form {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
}

.review-form h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.review-star-input {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.star-input-btn {
    border: none;
    background: none;
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
}

.star-input-btn.active,
.star-input-btn:hover {
    color: #f5b301;
}

.star-input-btn:active {
    transform: scale(1.1);
}

.review-input,
.review-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 14px;
    background: var(--white);
}

.review-input:focus,
.review-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.review-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit-review {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: var(--white);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Review Modal Popup */
.review-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.review-modal[hidden] {
    display: none;
}

.review-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.review-modal-box {
    position: relative;
    width: min(480px, 100%);
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.review-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 2;
}

.review-modal-head h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.review-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal-close:hover {
    background: #eee;
    color: var(--primary);
}

.review-form--modal {
    border: none;
    border-radius: 0;
    background: var(--white);
    padding: 18px;
}

.related-products {
    padding-bottom: 20px;
}

.related-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .product-detail-actions {
        flex-direction: column;
    }

    .btn-add-cart,
    .btn-buy-now {
        width: 100%;
    }
}

/* ---------- Search Page ---------- */
.search-page {
    padding: 20px 0 32px;
}

.search-page-head {
    margin-bottom: 16px;
}

.search-page-head h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.search-results-count {
    font-size: 13px;
    color: var(--muted);
}

.search-page-form {
    margin-bottom: 20px;
}

.search-page-input-wrap {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    overflow: hidden;
    height: 46px;
}

.search-page-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 14px;
    font-family: inherit;
    font-size: 15px;
    min-width: 0;
}

.search-page-submit {
    width: 48px;
    height: 100%;
    border: none;
    background: var(--primary);
    color: var(--white);
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.search-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.search-empty i {
    font-size: 36px;
    color: #ccc;
    margin-bottom: 12px;
}

.search-empty p {
    font-size: 14px;
    line-height: 1.6;
}

/* =============================================
   Mobile App UI — index.html (body.app-home)
   ============================================= */
.mobile-category-scroll,
.nav-overlay {
    display: none;
}

@media (max-width: 767px) {
    .app-home {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        overscroll-behavior-y: contain;
        overflow-x: hidden;
        background: #f2f2f7;
    }

    .app-home .container {
        width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }

    /* Notice topbar — compact on mobile */
    .notice-ticker {
        height: 34px;
    }

    body.app-home {
        --notice-height: 34px;
    }

    body.app-home.notice-closed {
        --notice-height: 0px;
    }

    .notice-badge {
        font-size: 9px;
        padding: 0 14px 0 8px;
        gap: 4px;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    }

    .notice-badge i {
        font-size: 10px;
    }

    .notice-text {
        font-size: 11px;
        padding-right: 40px;
    }

    .notice-close {
        width: 32px;
        font-size: 12px;
    }

    /* App header */
    .app-home .site-header {
        position: sticky;
        top: var(--notice-height);
        z-index: 240;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border-bottom: none;
    }

    .app-home .site-header.is-scrolled {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    /* Category chips — horizontal scroll */
    .app-home .mobile-category-scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 14px;
        background: var(--white);
        border-bottom: 1px solid #eee;
        position: sticky;
        top: 86px;
        z-index: 230;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .app-home .mobile-category-scroll::-webkit-scrollbar {
        display: none;
    }

    .app-home .category-chip {
        flex-shrink: 0;
        padding: 8px 16px;
        background: #f2f2f7;
        color: #333;
        font-size: 13px;
        font-weight: 500;
        border-radius: 20px;
        white-space: nowrap;
        transition: background 0.2s, color 0.2s;
    }

    .app-home .category-chip:active,
    .app-home .category-chip.active {
        background: var(--primary);
        color: var(--white);
    }

    /* Main content */
    .app-home .app-main {
        padding-bottom: 8px;
    }

    .app-home .hero-banner {
        margin: 0;
        padding: 0;
    }

    .app-home .hero-banner .container {
        padding: 0;
        width: 100%;
    }

    .app-home .hero-slider {
        border-radius: 0;
        background: #f2f2f7;
    }

    .app-home .hero-img {
        max-height: none;
        border-radius: 0;
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        object-fit: contain;
    }

    .app-home .hero-nav {
        width: 32px;
        height: 32px;
        font-size: 12px;
        opacity: 1;
        background: rgba(255, 255, 255, 0.85);
    }

    .app-home .hero-prev {
        left: 8px;
    }

    .app-home .hero-next {
        right: 8px;
    }

    .app-home .hero-dots {
        bottom: 10px;
    }

    .app-home .hero-dot {
        width: 7px;
        height: 7px;
    }

    .app-home .hero-dot.active {
        width: 18px;
    }

    .app-home .product-section {
        padding: 16px 0;
        background: var(--white);
        margin-bottom: 8px;
        border-radius: 16px 16px 0 0;
    }

    .app-home .product-section + .product-section {
        border-radius: 0;
        margin-top: 8px;
    }

    .app-home .section-head {
        border-bottom: none;
        margin-bottom: 14px;
        padding-bottom: 0;
    }

    .app-home .section-head h2 {
        font-size: 18px;
        text-transform: none;
    }

    .app-home .btn-view-all {
        font-size: 12px;
        padding: 6px 12px;
        border-radius: 20px;
    }

    .app-home .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .app-home .product-card {
        border: none;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .app-home .product-thumb img {
        border-radius: 12px 12px 0 0;
    }

    .app-home .product-body {
        padding: 10px 8px 12px;
    }

    .app-home .product-title {
        font-size: 12px;
        min-height: 32px;
        line-height: 1.35;
    }

    .app-home .product-price {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .app-home .product-actions {
        gap: 6px;
    }

    .app-home .btn-order {
        font-size: 11px;
        padding: 10px 4px;
        border-radius: 8px;
        font-weight: 600;
    }

    .app-home .btn-cart {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .app-home .promo-section {
        padding: 8px 0;
        background: #f2f2f7;
    }

    .app-home .promo-section .container {
        padding: 0 14px;
    }

    .app-home .promo-banner {
        min-height: 0;
        height: auto;
        border-radius: 14px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        overflow: visible;
        background: none;
    }

    .app-home .promo-banner-img {
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 14px;
    }

    .app-home .section-cta {
        margin: 16px 0 4px;
    }

    .app-home .btn-load-more {
        width: 100%;
        padding: 12px;
        border-radius: 10px;
        font-size: 14px;
    }

    /* Features — compact horizontal cards */
    .app-home .features-bar {
        margin-top: 0;
        padding: 16px 0;
        border-radius: 16px 16px 0 0;
    }

    .app-home .features-grid {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding: 0 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .app-home .features-grid::-webkit-scrollbar {
        display: none;
    }

    .app-home .feature-item {
        flex: 0 0 200px;
        background: rgba(255, 255, 255, 0.12);
        padding: 12px;
        border-radius: 12px;
        gap: 10px;
    }

    .app-home .feature-item i {
        font-size: 22px;
        margin-top: 0;
    }

    .app-home .feature-item h4 {
        font-size: 14px;
    }

    .app-home .feature-item p {
        font-size: 11px;
    }

    /* Footer — minimal app style */
    .app-home .site-footer {
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
        margin-left: 0;
        margin-right: 0;
        border-radius: 16px 16px 0 0;
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        overflow: visible;
    }

    .app-home .site-footer .footer-grid {
        width: 100%;
        max-width: 100%;
        padding: 28px 16px 24px;
        gap: 24px;
        box-sizing: border-box;
    }

    .app-home .footer-about p {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .app-home .footer-logo {
        height: 48px;
    }

    .app-home .footer-grid h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .app-home .footer-grid ul a {
        font-size: 13px;
        display: block;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .app-home .footer-grid ul li {
        margin-bottom: 12px;
    }

    .app-home .footer-bottom {
        font-size: 11px;
        padding: 14px 16px;
        line-height: 1.5;
    }

    /* Bottom tab bar — native app feel */
    .app-home .mobile-bottom-nav {
        display: flex;
        max-width: none;
        border-radius: 0;
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -1px 0 #e5e5ea, 0 -4px 24px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        background: rgba(255, 255, 255, 0.95);
    }

    .app-home .mobile-bottom-nav a {
        flex: 1;
        font-size: 10px;
        gap: 3px;
        color: #8e8e93;
        position: relative;
    }

    .app-home .mobile-bottom-nav a i {
        width: auto;
        height: auto;
        background: none;
        border-radius: 0;
        font-size: 22px;
        color: inherit;
        box-shadow: none;
    }

    .app-home .mobile-bottom-nav a.active {
        color: var(--primary);
        font-weight: 600;
    }

    .app-home .mobile-bottom-nav a.active i {
        box-shadow: none;
    }

    .app-home .nav-badge {
        position: absolute;
        top: -2px;
        right: calc(50% - 22px);
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        background: var(--primary);
        color: var(--white);
        font-size: 9px;
        font-style: normal;
        font-weight: 700;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--white);
    }

    /* Category, Search & Product Detail — app pages */
    .app-home .category-banner {
        padding: 18px 0;
        margin-bottom: 8px;
    }

    .app-home .category-banner h1 {
        font-size: 16px;
    }

    .app-home .category-page {
        padding: 16px 0 24px;
        background: var(--white);
        margin-bottom: 8px;
        border-radius: 16px 16px 0 0;
    }

    .app-home .category-page .product-rating {
        margin-bottom: 4px;
    }

    .app-home .category-page .product-rating i {
        font-size: 9px;
    }

    .app-home .category-page .product-meta-row {
        margin-bottom: 8px;
    }

    .app-home .category-page .product-views {
        font-size: 10px;
    }

    .app-home .product-detail-page {
        padding: 16px 0 32px;
        background: #f5f5f5;
        margin-bottom: 0;
        border-radius: 0;
    }

    .app-home .breadcrumb {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .app-home .product-detail-title {
        font-size: 20px;
    }

    .app-home .product-detail-short {
        font-size: 14px;
    }

    .app-home .product-detail-price {
        font-size: 20px;
    }

    .app-home .product-detail-image {
        border-radius: 12px;
        border: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .app-home .product-attrs {
        padding: 10px 12px;
        margin-bottom: 14px;
        border-radius: 10px;
    }

    .app-home .product-attrs li {
        font-size: 13px;
    }

    .app-home .review-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .app-home .review-modal-box {
        border-radius: 16px 16px 0 0;
        max-height: 85dvh;
    }

    .app-home .review-form {
        display: none;
    }

    .app-home .review-form--modal {
        display: block;
    }

    .app-home .gallery-main {
        border: none;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .app-home .gallery-thumb {
        width: 64px;
        height: 64px;
        border-radius: 10px;
    }

    .app-home .gallery-thumbs-nav {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }

    .app-home .product-reviews {
        background: #fff;
        border-radius: 14px;
        padding: 22px;
        margin-bottom: 20px;
        border-top: none;
    }

    .app-home .reviews-head h2 {
        font-size: 16px;
        color: #1a1a2e;
    }

    .app-home .reviews-summary {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 18px;
        gap: 20px;
    }

    .app-home .reviews-score {
        font-size: 36px;
    }

    .app-home .review-item {
        padding: 14px;
        border-radius: 12px;
    }

    .app-home .review-item-head {
        flex-wrap: wrap;
    }

    .app-home .review-date {
        width: 100%;
        margin-left: 52px;
        margin-top: -4px;
    }

    .app-home .review-form {
        border-radius: 12px;
        padding: 16px;
    }

    .app-home .review-form h3 {
        font-size: 15px;
    }

    .app-home .related-title {
        font-size: 16px;
        text-transform: none;
    }

    .app-home .product-description {
        background: #fff;
        border-radius: 14px;
        padding: 22px;
        margin-bottom: 20px;
        border-top: none;
    }

    .app-home .product-description > h2,
    .app-home .product-description .pd-section-title {
        font-size: 16px;
        border-bottom-width: 2px;
    }

    .app-home .product-description p {
        font-size: 14px;
    }

    .app-home .search-page {
        padding: 16px 0 24px;
        background: var(--white);
        border-radius: 16px 16px 0 0;
    }

    .app-home .search-page-head h1 {
        font-size: 17px;
    }

    .app-home .mobile-category-scroll {
        top: calc(var(--notice-height) + 52px);
    }

    .app-home {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

/* Tablet: show bottom nav but keep desktop header */
@media (min-width: 768px) and (max-width: 900px) {
    .app-home .mobile-category-scroll {
        display: none;
    }
}

/* =============================================
   Auth Pages — login.html & register.html
   ============================================= */
.auth-page,
.service-page {
    background: #f2f2f7;
}

.auth-page .mobile-category-scroll,
.service-page .mobile-category-scroll {
    display: none !important;
}

.auth-main {
    padding: 24px 16px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-shell {
    width: min(440px, 100%);
    margin: 0 auto;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.auth-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fdf0f2;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.auth-banner {
    display: none !important;
}

.auth-card-head {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card-head h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-card-head p {
    font-size: 14px;
    color: var(--muted);
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.auth-field label em {
    font-style: normal;
    font-weight: 400;
    color: var(--muted);
    font-size: 12px;
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    height: 48px;
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.auth-input-wrap > i {
    color: #aaa;
    font-size: 15px;
    flex-shrink: 0;
}

.auth-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    background: transparent;
    min-width: 0;
}

.auth-input-wrap input.is-invalid {
    color: var(--text);
}

.auth-toggle-pass {
    border: none;
    background: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.auth-toggle-pass:hover {
    color: var(--primary);
}

.auth-error {
    display: block;
    font-size: 12px;
    color: #d32f2f;
    margin-top: 5px;
    min-height: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.auth-error.is-visible {
    opacity: 1;
    min-height: 16px;
}

.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.auth-check-block {
    margin-bottom: 4px;
}

.auth-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.auth-check a {
    color: var(--primary);
    font-weight: 500;
}

.auth-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

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

.auth-submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.auth-submit:hover {
    background: var(--primary-dark);
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #aaa;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

.auth-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.auth-social-btn:hover {
    border-color: #ccc;
    background: #fafafa;
}

.auth-social-google i {
    color: #ea4335;
}

.auth-social-fb i {
    color: #1877f2;
}

.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: var(--muted);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .auth-main {
        padding: 16px 14px 24px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .auth-card-head h1 {
        font-size: 20px;
    }
}

/* =============================================
   Service Pages — order-tracking & complaint
   ============================================= */
.page-hero {
    background: var(--primary);
    color: var(--white);
    padding: 28px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.page-hero p {
    font-size: 14px;
    opacity: 0.92;
}

.service-page-section {
    padding: 24px 0 32px;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    max-width: 520px;
    margin: 0 auto;
}

.service-form .auth-submit i {
    margin-right: 8px;
}

.auth-select-wrap select {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    min-width: 0;
}

.service-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--white);
    border-radius: 12px;
    font-size: 14px;
    color: var(--muted);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.service-help i {
    color: var(--primary);
    font-size: 18px;
}

.service-help a {
    color: var(--primary);
    font-weight: 600;
}

/* Order Tracking Result */
.track-result {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.track-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.track-label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 2px;
}

.track-result-head strong {
    font-size: 18px;
    color: var(--text);
}

.track-status-badge {
    background: #fdf0f2;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.track-product {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
}

.track-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.track-step {
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
    position: relative;
}

.track-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 22px;
    bottom: 0;
    width: 2px;
    background: #e8e8e8;
}

.track-step.done:not(:last-child)::before {
    background: var(--primary);
}

.track-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: var(--white);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.track-step.done .track-dot {
    border-color: var(--primary);
    background: var(--primary);
}

.track-step.active .track-dot {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: inset 0 0 0 4px var(--primary);
}

.track-step strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.track-step small {
    font-size: 12px;
    color: var(--muted);
}

.track-empty {
    text-align: center;
    padding: 32px 16px;
    margin-top: 20px;
    color: var(--muted);
}

.track-empty i {
    font-size: 40px;
    color: #ccc;
    margin-bottom: 12px;
}

.track-empty p {
    font-size: 14px;
    line-height: 1.6;
}

.service-card-wide {
    max-width: 720px;
}

.track-order-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    margin-bottom: 20px;
}

.track-order-card:last-child {
    margin-bottom: 0;
}

.track-order-head {
    background: var(--primary);
    color: var(--white);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.track-order-id {
    font-size: 17px;
    font-weight: 700;
}

.track-order-date {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.track-order-body {
    padding: 20px;
}

.track-order-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.track-meta-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.track-meta-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

.track-meta-item h6 {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.4px;
}

.track-meta-item p {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
}

.track-meta-item small {
    font-size: 13px;
    color: var(--muted);
}

.track-items-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.track-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f3f3;
}

.track-item-row:last-child {
    border-bottom: none;
}

.track-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.track-item-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8f8f8;
    flex-shrink: 0;
}

.track-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.track-item-meta span {
    font-size: 11px;
    color: var(--muted);
    background: #f3f3f3;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

.track-item-price {
    text-align: right;
    flex-shrink: 0;
}

.track-item-price strong {
    display: block;
    font-size: 15px;
    color: var(--text);
}

.track-item-price small {
    font-size: 12px;
    color: var(--muted);
}

.track-order-summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.track-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.track-summary-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    border-top: 1px solid #eee;
    padding-top: 12px;
    margin-top: 8px;
    margin-bottom: 0;
}

.track-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.track-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.track-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.track-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
}

.track-btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.track-cancelled {
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 576px) {
    .track-order-head {
        flex-direction: column;
    }

    .track-order-meta {
        grid-template-columns: 1fr;
    }

    .track-item-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .track-item-price {
        text-align: left;
        padding-left: 60px;
    }
}

@media print {
    .site-header,
    .site-footer,
    .page-hero,
    .track-actions,
    .service-help,
    .notice-ticker,
    .track-screen-only {
        display: none !important;
    }

    .track-print-only {
        display: block !important;
    }
}

/* Complaint Success */
.complaint-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 56px;
    color: #1a8f4c;
    margin-bottom: 16px;
}

.complaint-success h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.complaint-success p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.complaint-success .success-note {
    margin-bottom: 20px;
}

.success-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    max-width: 240px;
    margin: 0 auto;
}

@media (max-width: 767px) {
    .page-hero {
        padding: 22px 0;
    }

    .page-hero h1 {
        font-size: 18px;
    }

    .service-card {
        padding: 20px 16px;
        border-radius: 14px;
    }
}

@media (min-width: 768px) {
    .auth-page .auth-header-inner {
        width: min(var(--container), 94%);
        margin: 0 auto;
    }
}
