/* ==========================================================================
   2BFox.com — Frontend Stylesheet
   Fox Color Palette: Light (Red Fox) & Dark (Black / Silver Fox)
   ========================================================================== */

:root,
html[data-theme="light"] {
    --bg-main: #FAF6F0;
    --bg-alt: #F2EAE0;
    --bg-card: #FFFFFF;
    --bg-header: rgba(250, 246, 240, 0.92);
    --fox-orange: #E86A17;
    --fox-orange-hover: #C9560B;
    --fox-orange-soft: rgba(232, 106, 23, 0.12);
    --fox-brown: #6E3B1A;
    --fox-charcoal: #1E1B18;
    --text-main: #1E1B18;
    --text-muted: #695D53;
    --border-color: #E5DBD0;
    --shadow-sm: 0 2px 8px rgba(30, 27, 24, 0.06);
    --shadow-md: 0 8px 24px rgba(30, 27, 24, 0.10);
    --radius-md: 12px;
    --radius-lg: 18px;
}

html[data-theme="dark"] {
    --bg-main: #111317;
    --bg-alt: #171A21;
    --bg-card: #1C2029;
    --bg-header: rgba(17, 19, 23, 0.92);
    --fox-orange: #F58220;
    --fox-orange-hover: #FB923C;
    --fox-orange-soft: rgba(245, 130, 32, 0.16);
    --fox-brown: #CBD5E1;
    --fox-charcoal: #F8FAFC;
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --border-color: #2B313E;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.50);
}

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

body {
    margin: 0;
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.68;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand-name, .nav-item, .btn {
    font-family: 'Anuphan', sans-serif;
}

a {
    color: var(--fox-orange);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--fox-orange-hover);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.container-full {
    width: 100%;
    padding: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.58rem 1.15rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.94rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    text-decoration: none;
}
.btn-sm {
    padding: 0.38rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 8px;
}
.btn-lg {
    padding: 0.78rem 1.5rem;
    font-size: 1.02rem;
}
.btn-block {
    display: flex;
    width: 100%;
}
.btn-primary {
    background: var(--fox-orange);
    color: #FFFFFF !important;
    box-shadow: 0 3px 10px var(--fox-orange-soft);
}
.btn-primary:hover {
    background: var(--fox-orange-hover);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main) !important;
}
.btn-outline:hover {
    border-color: var(--fox-orange);
    color: var(--fox-orange) !important;
}
.btn-light {
    background: #FFFFFF;
    color: #1E1B18 !important;
    font-weight: 600;
}
.btn-light:hover {
    background: var(--bg-alt);
    transform: translateY(-1px);
}
.btn-light-outline {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.5);
    color: #FFFFFF !important;
    backdrop-filter: blur(4px);
}
.btn-light-outline:hover {
    background: rgba(255, 255, 255, 0.25);
}
.btn-ghost {
    background: transparent;
    color: var(--text-muted) !important;
}
.btn-ghost:hover {
    background: var(--fox-orange-soft);
    color: var(--fox-orange) !important;
}

/* Header & Desktop Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 1rem;
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-main) !important;
}
.brand-logo img {
    border-radius: 10px;
    border: 2px solid var(--fox-orange);
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.brand-name {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-item {
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-item:hover,
.nav-item.active {
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.icon-btn:hover {
    border-color: var(--fox-orange);
    color: var(--fox-orange);
}
html[data-theme="light"] .theme-icon-dark { display: inline; }
html[data-theme="light"] .theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-light { display: inline; }
html[data-theme="dark"] .theme-icon-dark { display: none; }

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.7rem 0.25rem 0.3rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main) !important;
    font-size: 0.88rem;
    font-weight: 500;
}
.user-pill img {
    border-radius: 50%;
    object-fit: cover;
}

/* Mobile Hamburger & Right Drawer */
.mobile-only {
    display: none !important;
}
.hamburger-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}
.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.2s ease;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(310px, 85vw);
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    padding: 1.15rem;
    overflow-y: auto;
}
.mobile-drawer.open {
    transform: translateX(0);
}
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-size: 1rem;
    cursor: pointer;
}
.drawer-search {
    display: flex;
    gap: 0.4rem;
    margin: 1rem 0;
}
.drawer-search input {
    flex: 1;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
}
.drawer-search button {
    padding: 0 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--fox-orange);
    color: #fff;
    cursor: pointer;
}
.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: auto;
}
.drawer-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.68rem 0.85rem;
    border-radius: 10px;
    color: var(--text-main) !important;
    font-weight: 500;
}
.drawer-link.active,
.drawer-link:hover {
    background: var(--fox-orange-soft);
    color: var(--fox-orange) !important;
}
.drawer-link-icon {
    display: inline-flex;
    color: var(--fox-orange);
}
.drawer-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.drawer-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.drawer-user-card img {
    border-radius: 50%;
}
.drawer-user-card div {
    display: flex;
    flex-direction: column;
}
.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Main & Page Sections */
.site-main {
    flex: 1;
}
.page-section {
    padding: 3.25rem 0;
}
.page-section.bg-alt {
    background-color: var(--bg-alt);
}
.page-section.bg-card {
    background-color: var(--bg-card);
}
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.section-header.centered {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.section-title {
    margin: 0;
    font-size: 1.75rem;
    color: var(--text-main);
}
.section-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}
.section-badge {
    display: inline-block;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.6rem;
}

/* Section Type: Banner / Carousel */
.fox-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.carousel-slide {
    display: none;
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    padding: 3.5rem 2.5rem;
    align-items: center;
}
.carousel-slide.active {
    display: flex;
}
.carousel-overlay {
    position: absolute;
    inset: 0;
}
.carousel-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    color: #FFFFFF;
}
.hero-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: var(--fox-orange);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.9rem;
}
.hero-title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.75rem, 3.5vw, 2.6rem);
    line-height: 1.22;
}
.hero-subtitle {
    margin: 0 0 1.6rem;
    font-size: 1.06rem;
    color: rgba(255, 255, 255, 0.9);
}
.hero-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}
.carousel-arrow.prev { left: 1rem; }
.carousel-arrow.next { right: 1rem; }
.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 0.45rem;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
}
.carousel-dot.active {
    background: var(--fox-orange);
    width: 24px;
    border-radius: 999px;
}

/* Section Type: Feature Cards */
.feature-grid {
    display: grid;
    gap: 1.35rem;
}
.feature-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.feature-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--fox-orange);
}
.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    color: var(--fox-orange);
}
.feature-icon img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.18rem;
}
.feature-card p {
    margin: 0 0 0.85rem;
    color: var(--text-muted);
}
.feature-link {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Section Type: Image + Text Split */
.split-block {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2.5rem;
    align-items: center;
}
.split-block.img-right {
    grid-template-columns: 1.15fr 1fr;
}
.split-block.img-right .split-media {
    order: 2;
}
.split-media img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    object-fit: cover;
}
.split-text h2 {
    margin: 0 0 1rem;
    font-size: 1.85rem;
}

/* Section Type: FAQ Accordion */
.faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    padding: 1.1rem 1.35rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: 'Anuphan', sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.faq-toggle-icon {
    color: var(--fox-orange);
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}
.faq-item.open .faq-toggle-icon {
    transform: rotate(45deg);
}
.faq-answer {
    display: none;
    padding: 0 1.35rem 1.15rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}
.faq-item.open .faq-answer {
    display: block;
    padding-top: 0.9rem;
}

/* Section Type: Gallery Grid & Lightbox */
.gallery-grid {
    display: grid;
    gap: 1.15rem;
}
.gallery-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.gallery-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gallery-grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.gallery-item {
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
}
.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.gallery-item:hover img {
    transform: scale(1.04);
}
.gallery-item figcaption {
    padding: 0.6rem 0.85rem;
    font-size: 0.86rem;
    color: var(--text-muted);
    text-align: center;
}

.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 300;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.lightbox-modal.open {
    display: flex;
}
.lightbox-modal img {
    max-width: 92vw;
    max-height: 80vh;
    border-radius: 10px;
}
.lightbox-caption {
    color: #fff;
    margin-top: 0.75rem;
}
.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Section Type: Call to Action */
.cta-banner {
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #FFFFFF;
}
.cta-fox {
    background: linear-gradient(135deg, var(--fox-orange) 0%, var(--fox-orange-hover) 100%);
}
.cta-dark {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}
.cta-text {
    max-width: 680px;
}
.cta-text h2 {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
}
.cta-text p {
    margin: 0;
    opacity: 0.92;
}

/* Blog / Post Cards & Directory */
.post-filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}
.filter-search {
    flex: 1;
    min-width: 220px;
}
.filter-search input,
.filter-selects select {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
}
.filter-selects {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.filter-selects select {
    width: auto;
}

.active-filter-tags {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: -0.25rem;
    margin-bottom: 1.85rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}
.active-filter-tags .tag-chip.active {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: var(--fox-orange-soft);
    border: 1px solid var(--fox-orange);
    color: var(--fox-orange) !important;
    font-weight: 500;
}
.active-filter-tags .tag-chip.active a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--fox-orange-soft);
    color: var(--fox-orange) !important;
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1;
    margin-left: 0.2rem;
    transition: background 0.15s ease, transform 0.15s ease;
}
.active-filter-tags .tag-chip.active a:hover {
    background: var(--fox-orange);
    color: #fff !important;
    transform: scale(1.1);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.5rem;
}
.post-list-view {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}
.post-list-view .post-card {
    flex-direction: row;
}
.post-list-view .post-card-thumb {
    width: 260px;
    flex-shrink: 0;
}
@media (min-width: 769px) {
    .post-list-view .post-card-body {
        min-width: 0;
    }
    .post-list-view .post-card-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .post-list-view .post-card-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--fox-orange);
}
.post-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-alt);
}
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.post-card:hover .post-card-thumb img {
    transform: scale(1.04);
}
.badge-pinned {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: var(--fox-orange);
    color: #fff;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
}
.post-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}
.post-cat-badge {
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
}
.post-card-title {
    margin: 0 0 0.55rem;
    font-size: 1.15rem;
    line-height: 1.38;
}
.post-card-title a {
    color: var(--text-main);
}
.post-card-title a:hover {
    color: var(--fox-orange);
}
.post-card-excerpt {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}
.tag-mini {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.post-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Single Post Reading View (/post/{slug}/) */
.post-single-container {
    max-width: 860px;
    padding-top: 2rem;
    padding-bottom: 3.5rem;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.post-single-header {
    margin-bottom: 1.75rem;
}
.post-single-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.badge-pinned-inline {
    background: var(--fox-orange);
    color: #fff;
    padding: 0.18rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}
.post-single-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    line-height: 1.28;
}
.post-single-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0 0 1.15rem;
}
.post-single-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    color: var(--text-muted);
}
.meta-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.post-single-cover {
    margin: 0 0 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.post-single-cover img {
    width: 100%;
    display: block;
}

.post-toc {
    background: var(--bg-alt);
    border-left: 4px solid var(--fox-orange);
    border-radius: 10px;
    padding: 1rem 1.35rem;
    margin-bottom: 2rem;
}
.post-toc-title {
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.post-toc ul {
    margin: 0;
    padding-left: 1.25rem;
}
.post-toc li {
    margin: 0.25rem 0;
}

.rich-content {
    font-size: 1.08rem;
    line-height: 1.82;
}
.rich-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--fox-orange-soft);
    padding-bottom: 0.35rem;
}
.rich-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}
.rich-content p {
    margin: 0 0 1.2rem;
}
.rich-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.35rem;
    border-left: 4px solid var(--fox-orange);
    background: var(--bg-alt);
    border-radius: 0 10px 10px 0;
    font-style: italic;
}
.rich-content pre, .rich-content code {
    font-family: monospace;
    background: var(--bg-alt);
    border-radius: 6px;
}
.rich-content pre {
    padding: 1rem;
    overflow-x: auto;
}
.rich-content img {
    border-radius: 10px;
    margin: 1rem 0;
}

/* Rich Content Enhancements */
.compare-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 1.75rem;
}
.compare-card {
    padding: 1.15rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-alt);
    font-size: 0.96rem;
    line-height: 1.65;
}
.compare-card.client-side {
    border-top: 3px solid #3b82f6;
}
.compare-card.dev-side {
    border-top: 3px solid var(--fox-orange);
}
.compare-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}
.compare-badge.client {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}
.compare-badge.dev {
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
}

.script-dialogue {
    margin: 1rem 0 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg-alt);
    border-radius: 10px;
    border-left: 3px solid #10b981;
    font-size: 0.98rem;
    line-height: 1.65;
}
.script-dialogue-tag {
    color: #059669;
    font-weight: 700;
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
}

.callout-box {
    margin: 1.5rem 0;
    padding: 1.15rem 1.35rem;
    border-radius: 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--fox-orange);
}
.callout-box.warn {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}
.callout-box-title {
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.post-single-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.post-tags-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    font-size: 0.86rem;
}
.tag-chip:hover, .tag-chip.active {
    border-color: var(--fox-orange);
    color: var(--fox-orange) !important;
}

.post-interaction-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}
.btn-like {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main) !important;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-like.liked {
    border-color: #E11D48;
    background: rgba(225, 29, 72, 0.1);
    color: #E11D48 !important;
}
.like-count {
    background: var(--bg-card);
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

/* Related Posts & Comments */
.related-posts-section,
.post-comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.comment-form-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}
.comment-form-user img {
    border-radius: 50%;
}
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.96rem;
}
.comment-login-prompt {
    background: var(--bg-alt);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-item {
    display: flex;
    gap: 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}
.comment-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-body {
    flex: 1;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}
.comment-meta small {
    color: var(--text-muted);
}
.comment-text {
    margin: 0;
}
.btn-link-danger {
    background: none;
    border: none;
    color: #DC2626;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Pagination, Alerts, Error Box */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 2.25rem;
}
.page-num {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.page-num.active {
    background: var(--fox-orange);
    border-color: var(--fox-orange);
    color: #fff;
}

.alert {
    padding: 0.85rem 1.15rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-weight: 500;
}
.alert-success {
    background: rgba(22, 163, 74, 0.14);
    color: #15803D;
    border: 1px solid rgba(22, 163, 74, 0.3);
}
.alert-error {
    background: rgba(220, 38, 38, 0.14);
    color: #B91C1C;
    border: 1px solid rgba(220, 38, 38, 0.3);
}
.empty-box, .error-box {
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* Site Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}
.footer-intro {
    color: var(--text-muted);
    margin: 0.85rem 0 0.5rem;
    max-width: 540px;
}
.footer-outro {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
}
/* Footer Social & Contact System */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.85rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-contact-item i {
    color: var(--fox-orange);
    font-size: 0.95rem;
}
.footer-contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
.footer-contact-item a:hover {
    color: var(--fox-orange);
}
.footer-social-links {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 1.15rem;
}
.social-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt, #F1F5F9);
    border: 1px solid var(--border-color, #E2E8F0);
    color: var(--text-main);
    font-size: 1.05rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
}
.social-icon-btn:hover {
    background: var(--fox-orange);
    color: #FFFFFF !important;
    border-color: var(--fox-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--fox-orange-soft);
}
.footer-links-col h4,
.footer-links-col .footer-col-title {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Anuphan', sans-serif;
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.94rem;
}
.footer-links a:hover {
    color: var(--fox-orange);
}
.footer-bottom {
    padding-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.86rem;
    color: var(--text-muted);
}
.footer-meta-links {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.86rem;
}
.footer-meta-links a,
.footer-meta-links button,
.footer-meta-links span {
    color: var(--fox-orange);
    text-decoration: none !important;
}
.footer-meta-links a:hover,
.footer-meta-links button:hover {
    color: var(--fox-orange-hover);
    text-decoration: none !important;
}

/* Mobile Responsive & Bottom Navigation Bar */
@media (max-width: 768px) {
    .desktop-nav,
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: inline-flex !important;
    }
    body {
        padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(64px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--bg-header);
        backdrop-filter: blur(14px);
        border-top: 1px solid var(--border-color);
        z-index: 150;
        display: flex !important;
        justify-content: space-around;
        align-items: center;
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--text-muted) !important;
        font-size: 0.72rem;
        font-family: 'Prompt', sans-serif;
        font-weight: 500;
        height: 100%;
    }
    .bottom-nav-item.active {
        color: var(--fox-orange) !important;
    }
    .bottom-nav-icon {
        display: inline-flex;
    }

    .split-block,
    .split-block.img-right,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .split-block.img-right .split-media {
        order: 0;
    }
    .carousel-slide {
        padding: 2.25rem 1.35rem;
        min-height: 320px;
    }
    .post-list-view .post-card {
        flex-direction: column;
    }
    .post-list-view .post-card-thumb {
        width: 100%;
    }
}

/* ==========================================================================
   Cookie Consent Banner & Preferences Modal (PDPA / GDPR Compliant)
   ========================================================================== */
.footer-cookie-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--fox-orange);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none !important;
    line-height: inherit;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s ease;
}
.footer-cookie-btn:hover {
    color: var(--fox-orange-hover);
    text-decoration: none !important;
}

.cookie-banner {
    position: fixed;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 350;
    max-width: 980px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 45px rgba(0,0,0,0.22);
    padding: 1.15rem 1.35rem;
    animation: cookieSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.cookie-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.cookie-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 280px;
}
.cookie-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.cookie-banner-text strong {
    display: block;
    font-size: 0.98rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}
.cookie-banner-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.48;
}
.cookie-banner-text a {
    color: var(--fox-orange);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Cookie Modal */
.cookie-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 400;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: cookieFadeIn 0.2s ease;
}
@keyframes cookieFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.cookie-modal-card {
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: cookieZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cookieZoom {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
.cookie-modal-header {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cookie-modal-title-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.cookie-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}
.cookie-modal-close:hover {
    color: var(--text-main);
    border-color: var(--fox-orange);
}
.cookie-modal-body {
    padding: 1.25rem 1.35rem;
    overflow-y: auto;
    flex: 1;
}
.cookie-pref-item {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    margin-bottom: 0.85rem;
}
.cookie-pref-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}
.cookie-pref-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #16A34A;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.2rem;
}
.cookie-pref-sub {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.15rem;
}
.cookie-pref-desc {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 25px;
    flex-shrink: 0;
}
.cookie-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #CBD5E1;
    transition: 0.2s ease;
    border-radius: 25px;
}
.cookie-toggle-switch input:checked + .cookie-toggle-slider {
    background-color: var(--fox-orange);
}
.cookie-toggle-slider::before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: #FFFFFF;
    transition: 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.cookie-toggle-switch input:checked + .cookie-toggle-slider::before {
    transform: translateX(21px);
}

.cookie-modal-footer {
    padding: 1rem 1.35rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    background: var(--bg-card);
    flex-wrap: wrap;
}

/* Mobile responsive for Cookie Banner */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        left: 0.75rem;
        right: 0.75rem;
        padding: 1rem;
    }
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }
    .cookie-banner-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    .cookie-banner-actions .btn {
        width: 100%;
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
        text-align: center;
        justify-content: center;
    }
}

/* ==========================================================================
   Floating Toast Notifications (Bottom-Left — Non-Intrusive)
   ========================================================================== */
.toast-toast-wrapper {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 450;
    max-width: 440px;
    pointer-events: none;
    animation: toastPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastPopIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.15rem;
    border-radius: 12px;
    background: var(--bg-card, #FFFFFF);
    color: var(--text-main, #1E293B);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #E2E8F0);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
}
html[data-theme="dark"] .toast-item {
    background: #1E222A;
    color: #F1F5F9;
    border-color: #334155;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.toast-item.toast-success {
    border-left: 4px solid #16A34A;
}
.toast-item.toast-success .toast-icon {
    color: #16A34A;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.toast-item.toast-error {
    border-left: 4px solid #DC2626;
}
.toast-item.toast-error .toast-icon {
    color: #DC2626;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.toast-content {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted, #64748B);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.toast-close:hover {
    color: var(--text-main, #1E293B);
    background: rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
}

@media (max-width: 768px) {
    .toast-toast-wrapper {
        left: 1rem;
        right: 1rem;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        max-width: none;
    }
}



/* ==========================================================================
   Fox Shop & E-commerce System Styles (Phase 2)
   ========================================================================== */

/* Cart Header Button & Counter Badge */
.cart-header-btn {
    position: relative;
    text-decoration: none;
}
.cart-badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--fox-orange);
    color: #FFF;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 5px var(--fox-orange-soft);
    pointer-events: none;
}
.cart-badge-count.hidden {
    display: none;
}

/* Shop Header Banner */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.shop-header-text {
    max-width: 680px;
}
.shop-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}
.trust-pill i {
    color: var(--fox-orange);
}

/* Category Quick Tabs */
.shop-cat-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    padding-bottom: 0.45rem;
}
.shop-cat-tabs-scroll::-webkit-scrollbar,
.shop-subcat-tabs-scroll::-webkit-scrollbar {
    height: 4px;
}
.shop-cat-tabs-scroll::-webkit-scrollbar-track,
.shop-subcat-tabs-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.shop-cat-tabs-scroll::-webkit-scrollbar-thumb,
.shop-subcat-tabs-scroll::-webkit-scrollbar-thumb {
    background: rgba(232, 106, 23, 0.35);
    border-radius: 999px;
}
.shop-cat-tabs-scroll::-webkit-scrollbar-thumb:hover,
.shop-subcat-tabs-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--fox-orange);
}
.shop-cat-tabs-scroll,
.shop-subcat-tabs-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(232, 106, 23, 0.35) transparent;
}
.shop-cat-tabs {
    display: flex;
    gap: 0.6rem;
    min-width: max-content;
}
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.cat-tab:hover {
    border-color: var(--fox-orange);
    color: var(--fox-orange);
}
.cat-tab.active {
    background: var(--fox-orange);
    border-color: var(--fox-orange);
    color: #FFF;
}
.cat-tab.active .cat-tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: #FFF;
}
.cat-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--bg-alt);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.cat-tab .subcat-icon {
    font-size: 0.78rem;
    opacity: 0.7;
    margin-left: 2px;
}

/* Subcategory Hierarchy Bar */
.shop-header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.shop-header-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.shop-header-breadcrumb a:hover {
    color: var(--fox-orange);
}
.shop-header-breadcrumb i {
    font-size: 0.7rem;
    opacity: 0.5;
}
.shop-header-breadcrumb span {
    color: var(--fox-orange);
    font-weight: 600;
}

.shop-subcat-wrapper {
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
}
.shop-subcat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.shop-subcat-header strong {
    color: var(--text-main);
}
.shop-subcat-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
}
.shop-subcat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cat-subtab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.cat-subtab:hover {
    border-color: var(--fox-orange);
    color: var(--fox-orange);
}
.cat-subtab.active {
    background: var(--fox-orange-soft);
    border-color: var(--fox-orange);
    color: var(--fox-orange);
    font-weight: 700;
}
.cat-subtab .subtab-arrow {
    color: var(--fox-orange);
    font-weight: bold;
    font-size: 0.95rem;
}
.cat-subtab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}
html[data-theme="dark"] .cat-subtab-count {
    background: rgba(255, 255, 255, 0.08);
}
.cat-subtab.active .cat-subtab-count {
    background: var(--fox-orange);
    color: #FFF;
}

/* ==========================================================================
   Shop Main Layout (Desktop Sidebar vs Mobile Tabs & Accordion)
   ========================================================================== */
.shop-main-layout {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
    width: 100%;
}
.shop-main-layout.no-sidebar .shop-content {
    width: 100%;
}
.shop-content {
    flex: 1;
    min-width: 0;
}

/* Desktop Sidebar */
.shop-sidebar {
    width: 270px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}
.shop-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1rem;
    box-shadow: var(--shadow-sm);
}
.shop-sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.shop-sidebar-title i {
    color: var(--fox-orange);
}

/* Category Vertical Tree Navigation */
.shop-tree-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.shop-tree-nav::-webkit-scrollbar {
    width: 4px;
}
.shop-tree-nav::-webkit-scrollbar-thumb {
    background: rgba(232, 106, 23, 0.25);
    border-radius: 999px;
}
.tree-nav-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
}
.tree-nav-item:hover {
    background: var(--bg-alt);
    color: var(--fox-orange);
}
.tree-nav-item.active {
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    font-weight: 700;
}
.tree-nav-item.branch-active {
    color: var(--fox-orange);
    font-weight: 600;
}
.tree-bullet {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    opacity: 0.7;
    flex-shrink: 0;
}
.tree-nav-item.active .tree-bullet {
    color: var(--fox-orange);
    opacity: 1;
}
.tree-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tree-count {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--text-muted);
}
.tree-nav-item.active .tree-count {
    background: var(--fox-orange);
    color: #FFF;
}

/* Tree Nested Children */
.tree-branch {
    display: flex;
    flex-direction: column;
}
.tree-children {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-left: 0.9rem;
    padding-left: 0.65rem;
    border-left: 1px dashed var(--border-color);
    margin-top: 0.15rem;
    margin-bottom: 0.35rem;
}
.tree-nav-item.tree-child {
    font-size: 0.83rem;
    padding: 0.35rem 0.55rem;
}

/* Mobile Category Drawer / Toggle */
.shop-sidebar-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.shop-sidebar-toggle:hover {
    border-color: var(--fox-orange);
}
.shop-sidebar-toggle .toggle-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.shop-sidebar-toggle .toggle-text i {
    color: var(--fox-orange);
}
.shop-sidebar-toggle .toggle-chevron {
    transition: transform 0.2s ease;
}
.shop-sidebar-toggle.open .toggle-chevron {
    transform: rotate(180deg);
}

/* Option 2: Top Quick Tabs Layout */
.shop-tabs-layout-top {
    margin-bottom: 0.5rem;
}

/* Desktop vs Mobile Media Queries */
@media (min-width: 992px) {
    .shop-mobile-quicktabs {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .shop-main-layout {
        flex-direction: column;
        gap: 1rem;
    }
    .shop-sidebar {
        width: 100%;
        position: static;
    }
    .shop-sidebar-toggle {
        display: flex;
    }
    .shop-sidebar-card {
        display: none;
        margin-bottom: 1rem;
    }
    .shop-sidebar-card.show {
        display: block;
        animation: fadeIn 0.2s ease;
    }
    .shop-mobile-quicktabs {
        display: block;
    }
}

/* Shop Filter Bar */
.shop-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}
.shop-filter-search {
    position: relative;
    flex: 1;
    min-width: 240px;
}
.shop-filter-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.shop-filter-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}
.shop-filter-search input:focus {
    border-color: var(--fox-orange);
}
.shop-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}
.shop-select {
    padding: 0.6rem 2rem 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23695D53' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
html[data-theme="dark"] .shop-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
.shop-filter-btn {
    padding: 0.6rem 1.25rem;
}
.shop-reset-btn {
    padding: 0.6rem 1rem;
}

/* Product Grid & Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--shadow-sm);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--fox-orange);
}
.product-card.out-of-stock {
    opacity: 0.85;
}
.product-card-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* 3:2 Aspect ratio */
    background: var(--bg-alt);
    overflow: hidden;
}
.product-card-thumb {
    position: absolute;
    inset: 0;
    display: block;
}
.product-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-card-thumb img {
    transform: scale(1.05);
}
.product-badges-corner {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    z-index: 2;
    pointer-events: none;
}
.badge-condition {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}
.badge-condition.condition-new {
    background: rgba(16, 185, 129, 0.92);
    color: #FFF;
}
.badge-condition.condition-like-new {
    background: rgba(2, 132, 199, 0.92);
    color: #FFF;
}
.badge-condition.condition-used-good {
    background: var(--fox-orange);
    color: #FFF;
}
.badge-condition.condition-used-fair {
    background: rgba(100, 116, 139, 0.92);
    color: #FFF;
}
.badge-condition.condition-refurbished {
    background: rgba(139, 92, 246, 0.92);
    color: #FFF;
}
.badge-discount {
    align-self: flex-start;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #E11D48;
    color: #FFF;
    font-size: 0.72rem;
    font-weight: 800;
}
.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.out-of-stock-overlay span {
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    background: #DC2626;
    color: #FFF;
    font-weight: 700;
    font-size: 0.85rem;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.15rem;
}
.product-card-cat a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fox-orange);
    text-decoration: none;
    text-transform: uppercase;
}
.product-card-title {
    margin: 0.35rem 0 0.5rem 0;
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 700;
}
.product-card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}
.product-card-title a:hover {
    color: var(--fox-orange);
}
.product-card-warranty {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card-warranty i {
    color: #10B981;
}
.product-card-specs {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.spec-chip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.spec-chip strong {
    color: var(--text-main);
}
.product-card-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
}
.product-card-price {
    display: flex;
    flex-direction: column;
}
.price-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--fox-orange);
    line-height: 1.2;
}
.compare-price-val {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.stock-status-pill.out {
    font-size: 0.8rem;
    color: #DC2626;
    font-weight: 600;
}

/* Product Detail Page */
.breadcrumb-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}
.breadcrumb-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb-nav a:hover {
    color: var(--fox-orange);
}
.breadcrumb-nav .sep {
    color: var(--border-color);
}
.breadcrumb-nav .current {
    color: var(--text-main);
    font-weight: 600;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 900px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}
.product-main-image-box {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding-top: 75%; /* 4:3 Aspect */
}
.main-product-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-alt);
    padding: 0.75rem;
}
.product-thumb-strip {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.gallery-thumb-btn {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    padding: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}
.gallery-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.gallery-thumb-btn:hover {
    border-color: var(--fox-orange-hover);
}
.gallery-thumb-btn.active {
    border-color: var(--fox-orange);
    box-shadow: 0 0 0 2px var(--fox-orange-soft);
}
.shop-trust-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.25rem;
    margin-top: 1.25rem;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.trust-icon {
    font-size: 1.35rem;
    color: var(--fox-orange);
    flex-shrink: 0;
}
.trust-item strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text-main);
}
.trust-item small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.product-info-container {
    display: flex;
    flex-direction: column;
}
.product-meta-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.product-cat-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}
.product-sku-code {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.product-page-title {
    font-size: 1.75rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 1.25rem 0;
}
.product-page-excerpt {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: -0.65rem 0 1.25rem 0;
}
.condition-callout-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}
.condition-callout-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.condition-callout-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}
.condition-callout-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.warranty-callout-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}
.warranty-callout-icon {
    font-size: 1.5rem;
    color: #10B981;
    flex-shrink: 0;
}
.warranty-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}
.warranty-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-price-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.price-main {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--fox-orange);
    line-height: 1;
}
.price-compare {
    font-size: 1.15rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.price-savings {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(225, 29, 72, 0.1);
    color: #E11D48;
    font-size: 0.85rem;
    font-weight: 700;
}
.stock-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
}
.stock-status-indicator.in-stock {
    color: #10B981;
}
.stock-status-indicator.out-of-stock {
    color: #DC2626;
}

.product-actions-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.qty-stepper-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    overflow: hidden;
}
.stepper-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.stepper-btn:hover {
    background: var(--bg-alt);
}
.qty-stepper input {
    width: 48px;
    height: 38px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    outline: none;
}
.purchase-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}
.btn-line-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background: #06C755;
    color: #FFF;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn-line-chat:hover {
    background: #05B34C;
    transform: translateY(-2px);
    color: #FFF;
}

.product-details-content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}
.section-subheading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--fox-orange);
}
.specs-table-wrapper {
    overflow-x: auto;
    margin-bottom: 2rem;
}
.specs-table {
    width: 100%;
    border-collapse: collapse;
}
.specs-table tr {
    border-bottom: 1px solid var(--border-color);
}
.specs-table tr:last-child {
    border-bottom: none;
}
.spec-label {
    width: 30%;
    padding: 0.75rem 1rem 0.75rem 0;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.spec-value {
    padding: 0.75rem 0;
    color: var(--text-main);
    font-size: 0.95rem;
}
.product-rich-description {
    line-height: 1.7;
    font-size: 1rem;
    color: var(--text-main);
}

/* Cart & Free Shipping Meter */
.free-shipping-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.free-shipping-card.achieved {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.06);
}
.free-shipping-text {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}
.free-shipping-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    background: var(--fox-orange);
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 700;
}
.free-shipping-card.achieved .free-shipping-badge {
    background: #10B981;
}
.free-shipping-progress {
    height: 8px;
    border-radius: 4px;
    background: var(--bg-alt);
    overflow: hidden;
}
.free-shipping-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--fox-orange), #10B981);
    transition: width 0.4s ease;
}

.cart-layout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .cart-layout-grid {
        grid-template-columns: 1fr;
    }
}

.cart-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}
.cart-table {
    width: 100%;
    border-collapse: collapse;
}
.cart-table th {
    padding: 1rem 1.25rem;
    background: var(--bg-alt);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.cart-table td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.cart-item-product {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 240px;
}
.cart-item-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-alt);
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.35;
}
.cart-item-title:hover {
    color: var(--fox-orange);
}
.cart-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
}
.cart-item-sku {
    color: var(--text-muted);
}
.badge-condition-mini {
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}
.badge-condition-mini.condition-new { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.badge-condition-mini.condition-like-new { background: rgba(2, 132, 199, 0.15); color: #0284C7; }
.badge-condition-mini.condition-used-good { background: var(--fox-orange-soft); color: var(--fox-orange); }

.cart-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    overflow: hidden;
}
.cart-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-qty-btn:hover {
    background: var(--bg-alt);
}
.cart-qty-val {
    width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.cart-stock-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.cart-remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    transition: color 0.15s ease;
}
.cart-remove-btn:hover {
    color: #DC2626;
}
.cart-actions-row {
    margin-top: 1.25rem;
}

.cart-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}
.summary-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}
.free-shipping-text-green {
    color: #10B981;
    font-weight: 700;
}
.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}
.grand-total-row {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}
.grand-total-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--fox-orange);
}
.summary-actions {
    margin-top: 1.25rem;
}
.summary-guarantees {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.summary-guarantees i {
    color: var(--fox-orange);
}

/* Checkout Page */
.checkout-layout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: flex-start;
}
@media (max-width: 900px) {
    .checkout-layout-grid {
        grid-template-columns: 1fr;
    }
}
.checkout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.checkout-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
}
.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fox-orange);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.88rem;
}
.checkout-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}
.checkout-card-body {
    padding: 1.5rem;
}

/* Checkout Form Fields & Layout */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
@media (max-width: 680px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
}
.form-label.required::after {
    content: " *";
    color: #E11D48;
    font-weight: 700;
}

.form-control {
    width: 100%;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.form-control:focus {
    border-color: var(--fox-orange);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--fox-orange-soft);
}
textarea.form-control {
    min-height: 95px;
    resize: vertical;
}

.form-control-file {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}
.form-control-file:hover {
    border-color: var(--fox-orange);
}

.alert-danger {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid #DC2626;
    color: #DC2626;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.payment-method-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    background: var(--bg-card);
    transition: all 0.2s ease;
}
.payment-method-item:hover {
    border-color: var(--fox-orange-hover);
}
.payment-method-item.selected {
    border-color: var(--fox-orange);
    background: var(--fox-orange-soft);
}
.payment-method-item input[type="radio"] {
    margin-top: 0.35rem;
    accent-color: var(--fox-orange);
}
.payment-method-body {
    flex: 1;
}
.payment-method-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}
.badge-recommended {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: #10B981;
    color: #FFF;
    font-size: 0.72rem;
    font-weight: 700;
}
.badge-stripe {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: #6366F1;
    color: #FFF;
    font-size: 0.72rem;
    font-weight: 700;
}
.payment-method-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.payment-details-panel {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}
.bank-info-box {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.promptpay-qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.promptpay-qr-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 6px;
    background: #FFF;
    padding: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.qr-caption {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.bank-accounts-text {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-main);
}
.slip-upload-group {
    margin-top: 0.75rem;
}

.checkout-items-preview {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    max-height: 260px;
    overflow-y: auto;
}
.checkout-item-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.checkout-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-alt);
}
.checkout-item-details {
    flex: 1;
    min-width: 0;
}
.checkout-item-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.checkout-item-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.checkout-item-subtotal {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Order Success & Order Track */
.order-success-card {
    max-width: 780px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
@media (max-width: 600px) {
    .order-success-card {
        padding: 1.5rem;
    }
}
.success-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.25rem auto;
}
.order-success-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
}
.order-success-sub {
    font-size: 0.98rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem 0;
}
.order-badge-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.order-num-pill, .order-date-pill {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--bg-alt);
    font-size: 0.88rem;
    color: var(--text-main);
}
.order-num-pill strong {
    color: var(--fox-orange);
    letter-spacing: 0.5px;
}
.order-status-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
}
@media (max-width: 600px) {
    .order-status-banner {
        grid-template-columns: 1fr;
    }
}
.status-col .status-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.slip-reupload-box {
    margin-bottom: 2rem;
    text-align: left;
}
.slip-already-uploaded {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid #10B981;
    border-radius: 10px;
    padding: 1rem;
}
.slip-preview-thumb {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.slip-needed-prompt {
    display: flex;
    gap: 1.25rem;
    background: var(--fox-orange-soft);
    border: 1px dashed var(--fox-orange);
    border-radius: 10px;
    padding: 1.25rem;
}
.prompt-icon {
    font-size: 2rem;
    color: var(--fox-orange);
}
.line-order-notify-box {
    margin-bottom: 2rem;
}

.order-items-breakdown {
    text-align: left;
    margin-bottom: 2rem;
}
.breakdown-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}
.order-items-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.order-table {
    width: 100%;
    border-collapse: collapse;
}
.order-table th {
    padding: 0.75rem 1rem;
    background: var(--bg-alt);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.order-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.order-item-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.order-item-img {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
}
.order-table tfoot td {
    background: var(--bg-main);
    font-weight: 600;
}
.grand-total-tr td {
    font-size: 1.05rem;
}
.grand-total-cell {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--fox-orange);
}
.order-shipping-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    text-align: left;
}
@media (max-width: 600px) {
    .order-shipping-info-grid {
        grid-template-columns: 1fr;
    }
}
.info-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
}
.info-card h4 {
    margin: 0 0 0.85rem 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.info-card p {
    margin: 0 0 0.5rem 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.info-card p strong {
    color: var(--text-main);
}

/* Order Tracking Page */
.track-input-group {
    display: flex;
    gap: 0.5rem;
    max-width: 540px;
    margin: 0 auto;
}
.track-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}
.track-input:focus {
    border-color: var(--fox-orange);
}
.track-btn {
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
}
.tracked-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-alt);
}
.order-no-txt {
    color: var(--fox-orange);
    font-size: 1.05rem;
}
.order-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    overflow-x: auto;
}
.order-timeline::before {
    content: '';
    position: absolute;
    top: 2.85rem;
    left: 2.5rem;
    right: 2.5rem;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}
.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 2;
    min-width: 70px;
}
.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.timeline-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}
.timeline-step.completed .timeline-dot {
    background: #10B981;
    border-color: #10B981;
    color: #FFF;
}
.timeline-step.completed .timeline-label {
    color: #10B981;
}
.timeline-step.active .timeline-dot {
    background: var(--fox-orange);
    border-color: var(--fox-orange);
    color: #FFF;
    box-shadow: 0 0 0 4px var(--fox-orange-soft);
}
.timeline-step.active .timeline-label {
    color: var(--fox-orange);
}

.tracking-carrier-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid #0284C7;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 0 1.5rem 1.5rem 1.5rem;
}
.carrier-icon-col {
    font-size: 1.8rem;
    color: #0284C7;
}
.carrier-info-col {
    flex: 1;
}
.carrier-name {
    font-size: 0.88rem;
    color: var(--text-muted);
}
.tracking-number-code {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}
.carrier-track-btn {
    border-radius: 999px;
}
.tracked-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* =========================================================================
   Global Search Page (/search/)
   ========================================================================= */
.search-hero-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    padding: 2rem 2rem 1.75rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.search-hero-box .directory-title {
    margin: 0.5rem 0 0.4rem;
}
.search-query-text {
    color: var(--fox-orange);
}
.search-hero-box .directory-subtitle {
    margin-bottom: 1.35rem;
}
.global-search-form {
    max-width: 720px;
    margin: 0 auto;
}
.global-search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 999px;
    padding: 0.35rem 0.4rem 0.35rem 1.15rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.global-search-input-wrap:focus-within {
    border-color: var(--fox-orange);
    box-shadow: 0 0 0 4px var(--fox-orange-soft);
}
.global-search-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-right: 0.65rem;
    flex-shrink: 0;
}
.global-search-input-wrap input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    padding: 0.45rem 0.5rem 0.45rem 0;
    outline: none;
    min-width: 0;
}
.global-search-input-wrap input[type="search"]::-webkit-search-cancel-button {
    display: none;
}
.global-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-muted);
    text-decoration: none;
    margin-right: 0.35rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.global-search-clear:hover {
    background: var(--bg-alt);
    color: var(--text-main);
}
.global-search-btn {
    border-radius: 999px !important;
    padding: 0.55rem 1.5rem !important;
    font-weight: 600;
    flex-shrink: 0;
}

.search-terms-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}
.terms-label {
    color: var(--text-muted);
}
.term-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    font-weight: 600;
    font-size: 0.8rem;
}

/* Filter Tabs */
.search-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}
.search-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.search-tab:hover {
    border-color: var(--fox-orange);
    color: var(--fox-orange);
}
.search-tab.active {
    background: var(--fox-orange);
    border-color: var(--fox-orange);
    color: var(--fox-primary-btn-text, #FFFFFF);
}
.search-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--text-main);
    font-size: 0.76rem;
    font-weight: 700;
}
.search-tab.active .search-tab-count {
    background: rgba(255, 255, 255, 0.22);
    color: inherit;
}

/* Search Result Cards */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.search-result-card {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    padding: 1.15rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--fox-orange);
}
.search-result-media {
    width: 170px;
    min-height: 118px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-alt);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.search-result-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.search-result-card:hover .search-result-media img {
    transform: scale(1.04);
}
.search-result-placeholder {
    width: 100%;
    height: 100%;
    min-height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    font-size: 2.1rem;
}
.search-result-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.search-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
}
.search-type-badge.badge-page {
    background: rgba(59, 130, 246, 0.12);
    color: #2563EB;
}
html[data-theme="dark"] .search-type-badge.badge-page {
    background: rgba(96, 165, 250, 0.18);
    color: #60A5FA;
}
.search-type-badge.badge-post {
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
}
.search-type-badge.badge-product {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
html[data-theme="dark"] .search-type-badge.badge-product {
    background: rgba(52, 211, 153, 0.18);
    color: #34D399;
}
.search-meta-cat {
    font-weight: 600;
    color: var(--text-main);
}
.search-result-title {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    line-height: 1.4;
    font-weight: 700;
}
.search-result-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.15s ease;
}
.search-result-title a:hover {
    color: var(--fox-orange);
}
.search-result-snippet {
    margin: 0 0 0.75rem;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
mark.search-highlight {
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
    font-weight: 600;
    padding: 0.05rem 0.28rem;
    border-radius: 4px;
}
.search-result-footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}
.search-result-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 340px;
}
.search-product-price {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.search-result-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--fox-orange);
    text-decoration: none;
    margin-left: auto;
}
.search-result-link:hover {
    text-decoration: underline;
}

/* Search Empty State */
.search-empty-state {
    padding: 3rem 1.5rem;
}
.search-empty-icon {
    font-size: 2.5rem;
    color: var(--fox-orange);
    margin-bottom: 0.65rem;
}
.search-quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.15rem;
}

@media (max-width: 768px) {
    .search-hero-box {
        padding: 1.35rem 1.1rem;
    }
    .global-search-input-wrap {
        padding: 0.25rem 0.3rem 0.25rem 0.9rem;
    }
    .global-search-btn {
        padding: 0.5rem 1.1rem !important;
    }
    .search-result-card {
        flex-direction: column;
        gap: 0.9rem;
    }
    .search-result-media {
        width: 100%;
        height: 175px;
    }
    .search-result-url {
        max-width: 190px;
    }
}

/* =========================================================================
   Modular Header Search Options ('icon' Popover & 'bar' Inline)
   ========================================================================= */
.header-search-pop-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.header-search-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 210;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.header-search-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header-popover-form {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.header-popover-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}
.header-popover-form input[type="search"]:focus {
    border-color: var(--fox-orange);
}
.header-popover-form button {
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.header-search-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    width: 200px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.header-search-bar:focus-within {
    border-color: var(--fox-orange);
    box-shadow: 0 0 0 3px var(--fox-orange-soft);
}
.header-search-bar i {
    color: var(--text-muted);
    font-size: 0.88rem;
}
.header-search-bar input[type="search"] {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.86rem;
    font-family: inherit;
    outline: none;
    padding: 0.15rem 0;
}
.header-search-bar input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

/* =========================================================================
   Modular Header Templates (Two-Tier Nav, Split Topbar, Minimal)
   ========================================================================= */

/* Header 2: Two-Tier Nav (แยก 2 ชั้น — เมนูกลาง) */
.site-header.header-style-centered {
    padding: 0.55rem 0 0;
}
.header-centered-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.65rem;
}
.header-centered-top .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}
.header-centered-top .header-actions {
    justify-content: flex-end;
}
.header-centered-nav {
    justify-content: center;
    border-top: 1px dashed var(--border-color);
    padding: 0.45rem 0;
    gap: 0.5rem;
}

/* Header 3: Top Bar & Split Navigation */
.site-header.header-style-split {
    padding-top: 0;
}
.header-topbar {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0.35rem 0;
}
.header-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
}
.topbar-item i {
    color: var(--fox-orange);
}
.topbar-link:hover {
    color: var(--fox-orange);
}
.header-mini-socials {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.header-mini-socials a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color 0.15s ease;
}
.header-mini-socials a:hover {
    color: var(--fox-orange);
}
.header-split-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

/* Header 4: Minimal Clean */
.site-header.header-style-minimal .header-inner {
    min-height: 58px;
}
.header-minimal-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.site-header.header-style-minimal .brand-logo img {
    border-width: 1.5px;
    border-radius: 8px;
}
.site-header.header-style-minimal .brand-name {
    font-size: 1.12rem;
}

/* =========================================================================
   Modular Footer Templates (Columns, Minimal, Stacked Mobile-First)
   ========================================================================= */

/* Footer 2: Corporate 3-Columns */
.footer-grid-3 {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.1fr;
    gap: 2.25rem;
    padding-bottom: 2rem;
}
.footer-col-links h4,
.footer-col-links .footer-col-title,
.footer-col-contact h4,
.footer-col-contact .footer-col-title {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Anuphan', sans-serif;
}

/* Footer 3: Minimal Slim Bar (2-tier: Line 1 Brand & Nav, Line 2 Copyright & Meta) */
.site-footer.footer-style-minimal {
    padding: 1.25rem 0;
}
.footer-minimal-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-minimal-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.footer-minimal-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.65rem;
}
.footer-minimal-sub-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.footer-minimal-copy {
    font-size: 0.84rem;
    color: var(--text-muted);
}
.footer-minimal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.15rem;
}
.footer-minimal-links a {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}
.footer-minimal-links a:hover {
    color: var(--fox-orange);
}
.footer-minimal-sub-right .footer-social-links {
    margin-top: 0;
}

/* Footer 4: Mobile-First Stacked (บน: โลโก้ | กลาง1: เมนู,โซเชียล | กลาง2: คำโปรย | ล่าง: ลิขสิทธิ์) */
.site-footer.footer-style-stacked {
    padding: 2.5rem 0 1.75rem;
    text-align: center;
}
.footer-stacked-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.35rem;
    width: 100%;
    margin: 0 auto;
}
.footer-stacked-top .brand-logo {
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}
.footer-stacked-top .brand-name {
    font-size: 1.35rem;
}
.footer-stacked-mid1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1.1rem 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}
.footer-stacked-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.15rem;
}
.footer-stacked-links a {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.footer-stacked-links a:hover {
    background: var(--fox-orange-soft);
    color: var(--fox-orange);
}
.footer-stacked-connect {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.footer-stacked-connect .footer-social-links {
    margin-top: 0;
    justify-content: center;
}
.footer-stacked-contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}
.stacked-contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
}
.stacked-contact-pill i {
    color: var(--fox-orange);
}
.stacked-contact-pill:hover {
    border-color: var(--fox-orange);
    color: var(--fox-orange);
}
.footer-stacked-mid2 {
    max-width: 560px;
}
.footer-stacked-mid2 .footer-intro {
    margin: 0 0 0.45rem;
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.6;
}
.footer-stacked-mid2 .footer-outro {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.footer-stacked-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .header-centered-top {
        display: flex;
        justify-content: space-between;
        padding-bottom: 0.5rem;
    }
    .header-centered-nav {
        display: none;
    }
    .footer-grid-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-minimal-bar {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .footer-minimal-brand,
    .footer-minimal-links,
    .footer-minimal-right {
        justify-content: center;
    }
}

/* ==========================================================================
   Section Builder: Category List Grid / Strip (Shop & Blog)
   ========================================================================== */
.category-section-header {
    margin-bottom: 1.75rem;
}
.category-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--fox-orange);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
}
.category-view-all:hover {
    color: var(--fox-orange-hover);
    background: var(--fox-orange-soft);
    transform: translateX(3px);
}

/* Style: Horizontal Box (Card Box - Image/Icon Left, Text Right) */
.category-grid-row.style-card_h {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.15rem;
}
.category-card-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card-box:hover {
    border-color: var(--fox-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 106, 23, 0.14);
}
.category-box-media {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
}
.category-box-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.category-card-box:hover .category-box-media img {
    transform: scale(1.08);
}
.category-box-media i {
    font-size: 1.65rem;
    color: var(--fox-orange);
    transition: transform 0.3s ease;
}
.category-card-box:hover .category-box-media {
    border-color: var(--fox-orange);
    background: var(--fox-orange-soft);
}
.category-card-box:hover .category-box-media i {
    transform: scale(1.12);
}
.category-box-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.category-box-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}
.category-card-box:hover .category-box-title {
    color: var(--fox-orange);
}
.category-box-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Style: Circle Icon & Rounded Card (Vertical) */
.category-grid-row.style-circle,
.category-grid-row.style-rounded {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 1.25rem;
    text-align: center;
}
.category-grid-row.align-center {
    justify-content: center;
}
.category-grid-row.align-left {
    justify-content: flex-start;
}
.category-grid-row.style-circle .category-card-item,
.category-grid-row.style-rounded .category-card-item {
    width: 108px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem 0.25rem;
    border-radius: var(--radius-md);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card-item:hover {
    transform: translateY(-4px);
}
.category-img-wrap {
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
    overflow: hidden;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-img-wrap.shape-circle {
    border-radius: 50%;
}
.category-img-wrap.shape-rounded {
    border-radius: var(--radius-md);
}
.category-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.category-card-item:hover .category-img-wrap img {
    transform: scale(1.08);
}
.category-img-wrap i {
    font-size: 2.1rem;
    color: var(--fox-orange);
    transition: transform 0.3s ease;
}
.category-card-item:hover .category-img-wrap {
    border-color: var(--fox-orange);
    box-shadow: 0 8px 22px rgba(232, 106, 23, 0.2);
}
.category-card-item:hover .category-img-wrap i {
    transform: scale(1.12);
}
.category-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    transition: color 0.2s ease;
}
.category-card-item:hover .category-name {
    color: var(--fox-orange);
}
.category-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .category-grid-row.style-card_h {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .category-grid-row.style-circle,
    .category-grid-row.style-rounded {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.85rem;
        padding-bottom: 0.75rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    .category-grid-row::-webkit-scrollbar {
        height: 4px;
    }
    .category-grid-row::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }
    .category-grid-row.style-circle .category-card-item,
    .category-grid-row.style-rounded .category-card-item {
        flex: 0 0 90px;
        width: 90px;
        scroll-snap-align: start;
    }
    .category-img-wrap {
        width: 68px;
        height: 68px;
    }
    .category-img-wrap i {
        font-size: 1.8rem;
    }
}

/* Style: Brand / Partner Logo Box (Responsive grid, white canvas, object-fit contain) */
.category-grid-row.style-brand_box {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}
.category-grid-row.style-brand_box.align-center {
    justify-content: center;
}
.category-grid-row.style-brand_box.align-left {
    justify-content: flex-start;
}
.category-grid-row.style-brand_box .category-card-brand {
    display: flex;
    flex-direction: column;
    flex: 0 1 calc(25% - 0.95rem);
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card-brand:hover {
    border-color: var(--fox-orange);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.category-brand-logo-wrap {
    height: 110px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.category-brand-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}
.category-card-brand:hover .category-brand-logo-wrap img {
    transform: scale(1.06);
}
.category-brand-logo-wrap i {
    font-size: 2.5rem;
    color: var(--text-muted);
    opacity: 0.7;
    transition: all 0.2s ease;
}
.category-card-brand:hover .category-brand-logo-wrap i {
    color: var(--fox-orange);
    transform: scale(1.1);
}
.category-brand-info {
    padding: 0.85rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--bg-card);
}
.category-brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}
.category-card-brand:hover .category-brand-title {
    color: var(--fox-orange);
}
.category-brand-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .category-grid-row.style-brand_box .category-card-brand {
        flex: 0 1 calc(33.333% - 0.75rem);
    }
}
@media (max-width: 640px) {
    .category-grid-row.style-brand_box {
        gap: 0.75rem;
    }
    .category-grid-row.style-brand_box .category-card-brand {
        flex: 0 1 calc(50% - 0.4rem);
        min-width: 135px;
    }
    .category-brand-logo-wrap {
        height: 90px;
        padding: 0.75rem;
    }
}



