:root {
    --primary: #0F2114;
    --primary-hover: #14351F;
    --primary-dark: #07130D;
    --secondary: #E85D04;
    --secondary-hover: #C94D00;
    --primary-50: #F1F6F2;
    --primary-100: #DCE9DF;
    --primary-500: #3F7650;
    --primary-700: #1B4428;
    --secondary-50: #FFF5ED;
    --secondary-100: #FFE8D5;
    --secondary-300: #FFB17A;
    --secondary-400: #FF8A45;
    --background: #F7F4F1;
    --surface: #FFFFFF;
    --surface-soft: #FCFAF8;
    --surface-muted: #F4F1ED;
    --cream: #F8EBE1;
    --text: #272519;
    --text-secondary: #57534E;
    --muted: #78716C;
    --border: #E2DBD3;
    --border-light: #EEE9E4;
    --success: #16803C;
    --danger: #DC2626;
    --rating: #E8A317;
    --shadow-sm: 0 2px 8px rgba(15, 33, 20, .06);
    --shadow-md: 0 8px 22px rgba(15, 33, 20, .09);
    --shadow-lg: 0 14px 40px rgba(15, 33, 20, .12);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --t-fast: 150ms ease;
    --t: 250ms ease;
    --t-slow: 350ms ease;
}

* {
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
}

/* =========================================================
   TOP BAR
========================================================= */
.topbar {
    background: var(--primary-dark);
    color: #fff;
    font-size: .78rem;
    padding: .6rem 0;
}

.topbar .accent {
    color: var(--secondary-300);
}

.topbar a {
    color: rgba(255, 255, 255, .85);
    transition: var(--t-fast);
}

.topbar a:hover {
    color: var(--secondary-300);
}

.topbar .sep {
    color: rgba(255, 255, 255, .2);
}

/* =========================================================
   HEADER
========================================================= */
.main-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--t);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.main-header .container-fluid {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media(min-width:992px) {
    .main-header .container-fluid {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

.brand {
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--primary);
    font-size: 1.4rem;
    line-height: 1;
}

.brand small {
    display: block;
    /* font-size: .5rem; */
    font-size: .22rem;
    letter-spacing: .16em;
    font-weight: 600;
    color: var(--muted);
    margin-top: 4px;
    text-transform: uppercase;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    color: var(--secondary-300);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

@media(max-width:575.98px) {
    .brand {
        font-size: 1.15rem;
    }

    .brand small {
        font-size: .42rem;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

.search-box {
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    transition: border-color var(--t), box-shadow var(--t);
}

.search-box:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(63, 118, 80, .1);
}

.search-box input,
.search-box select {
    border: 0;
    box-shadow: none !important;
    font-size: .85rem;
    padding: .65rem .9rem;
    outline: 0;
    background: transparent;
}

.search-box input {
    flex: 1;
    min-width: 0;
}

.search-box select {
    max-width: 150px;
    border-left: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: none;
}

@media(min-width:576px) {
    .search-box select {
        display: block;
    }
}

.search-button {
    background: var(--secondary);
    color: #fff;
    border: 0;
    width: 48px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background var(--t-fast);
    flex-shrink: 0;
}

.search-button:hover {
    background: var(--secondary-hover);
}

.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: .4rem;
    z-index: 2000;
    max-height: 340px;
    overflow-y: auto;
    display: none;
}

.search-suggest.show {
    display: block;
}

.search-suggest .item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--t-fast);
}

.search-suggest .item:hover,
.search-suggest .item.highlight {
    background: var(--surface-muted);
}

.search-suggest .item img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-suggest .item .t {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.search-suggest .item .p {
    font-size: .72rem;
    color: var(--muted);
    margin-top: 2px;
}

.search-suggest .empty {
    padding: 1rem;
    text-align: center;
    color: var(--muted);
    font-size: .82rem;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    justify-content: flex-end;
}

@media(max-width:575.98px) {
    .nav-icons {
        gap: .85rem;
    }
}

.icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    color: var(--text);
    font-size: .72rem;
    font-weight: 500;
    transition: color var(--t-fast);
    position: relative;
    cursor: pointer;
    padding: .2rem;
}

.icon-link i {
    font-size: 1.3rem;
    color: var(--primary);
    transition: color var(--t-fast), transform var(--t-fast);
}

.icon-link:hover i {
    color: var(--secondary);
    transform: translateY(-2px);
}

.icon-link .badge-num {
    position: absolute;
    top: -2px;
    right: -4px;
    background: var(--secondary);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    transition: transform var(--t-fast);
}

.icon-link .badge-num.pop {
    animation: badgePop .4s ease;
}

@keyframes badgePop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.35);
    }

    100% {
        transform: scale(1);
    }
}

.icon-link .label {
    display: none;
}

@media(min-width:992px) {
    .icon-link .label {
        display: block;
    }
}

.nav-main-row {
    border-top: 1px solid var(--border-light);
    padding: .6rem 0;
    background: #fff;
}

.category-btn {
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 11px;
    padding: .6rem 1rem;
    font-size: .8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: background var(--t-fast);
    cursor: pointer;
}

.category-btn:hover {
    background: var(--primary-hover);
    color: #fff;
}

.nav-main {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0;
    scrollbar-width: none;
    justify-content: center;
}

.nav-main::-webkit-scrollbar {
    display: none;
}

@media(max-width:991.98px) {
    .nav-main {
        justify-content: flex-start;
    }
}

.nav-main .nav-link {
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    padding: .75rem .8rem;
    white-space: nowrap;
    transition: color var(--t-fast);
    position: relative;
}

.nav-main .nav-link:hover,
.nav-main .nav-link.active {
    color: var(--secondary);
}

.nav-main .nav-link.active::after {
    content: '';
    position: absolute;
    left: .8rem;
    right: .8rem;
    bottom: .35rem;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    border: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
}

@media(max-width:991.98px) {
    .menu-toggle {
        display: inline-flex;
    }
}

/* =========================================================
   BREADCRUMB
========================================================= */
.breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    padding: .85rem 0;
    font-size: .8rem;
}

.breadcrumb-bar .crumb {
    color: var(--muted);
    transition: color var(--t-fast);
}

.breadcrumb-bar .crumb:hover {
    color: var(--secondary);
}

.breadcrumb-bar .crumb.current {
    color: var(--text);
    font-weight: 600;
}

.breadcrumb-bar .sep {
    color: var(--border-dark);
    margin: 0 .55rem;
}


/* =========================================================
   FOOTER
========================================================= */
.footer {
    background: var(--primary-dark);
    color: #d9e1db;
    padding-top: 3.5rem;
}

.footer-title {
    color: #fff;
    font-weight: 800;
    font-size: .85rem;
    margin-bottom: 1rem;
    letter-spacing: .02em;
}

.footer a {
    color: #b8c3bb;
    font-size: .8rem;
    display: block;
    margin-bottom: .5rem;
    transition: color var(--t-fast);
}

.footer a:hover {
    color: var(--secondary-300);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #9eaaa1;
    font-size: .75rem;
    padding: 1.25rem 0;
}

.footer .brand {
    color: #fff;
}

.footer .brand small {
    color: rgba(255, 255, 255, .5);
}

.footer .social a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    align-items: center;
    justify-content: center;
    margin-right: .5rem;
    margin-bottom: 0;
    transition: all var(--t-fast);
}

.footer .social a:hover {
    background: var(--secondary);
    color: #fff;
}

/* =========================================================
   DRAWERS
========================================================= */
.drawer-backdrop,
.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 19, 13, .5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), visibility var(--t);
    backdrop-filter: blur(2px);
}

.drawer-backdrop.open,
.cart-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: #fff;
    z-index: 1060;
    transform: translateX(-100%);
    transition: transform var(--t-slow) cubic-bezier(.2, .7, .3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.drawer.open {
    transform: translateX(0);
}

.drawer-head {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .9rem;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
    transition: background var(--t-fast);
}

.drawer-link:hover {
    background: var(--surface-muted);
    color: var(--secondary);
}

.drawer-link i {
    font-size: 1.1rem;
    color: var(--primary);
}

.drawer-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 92vw);
    background: #fff;
    z-index: 1060;
    transform: translateX(100%);
    transition: transform var(--t-slow) cubic-bezier(.2, .7, .3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-head {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-head h5 {
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: .85rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item .info {
    flex: 1;
    min-width: 0;
}

.cart-item .t {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: .25rem;
}

.cart-item .p {
    font-size: .85rem;
    font-weight: 800;
    color: var(--primary);
}

.cart-item .qty {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .35rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .15rem .3rem;
}

.cart-item .qty button {
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    border-radius: 5px;
    display: grid;
    place-items: center;
}

.cart-item .qty button:hover {
    background: var(--surface-muted);
}

.cart-item .qty span {
    font-size: .78rem;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

.cart-item .remove {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    padding: .2rem;
    transition: color var(--t-fast);
    align-self: flex-start;
}

.cart-item .remove:hover {
    color: var(--danger);
}

.cart-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--muted);
}

.cart-empty i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: .75rem;
    display: block;
}

.cart-foot {
    padding: 1.1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: .9rem;
    font-weight: 700;
    font-size: .95rem;
}

.cart-total .amount {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 800;
}

/* =========================================================
   QUICK VIEW MODAL
========================================================= */
.quick-view-modal .modal-content {
    border: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.quick-view-modal .modal-body {
    padding: 0;
}

.qv-img {
    aspect-ratio: 1/1;
    background: var(--surface-muted);
}

.qv-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qv-body {
    padding: 2rem 1.75rem;
}

@media(max-width:767.98px) {
    .qv-body {
        padding: 1.25rem;
    }
}

.qv-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: .5rem;
    color: var(--primary);
}

.qv-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin: .75rem 0 1rem;
}

.qv-price .old {
    font-size: 1rem;
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 500;
    margin-left: .5rem;
}

.qv-desc {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.qv-feature {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .82rem;
    color: var(--text-secondary);
    padding: .35rem 0;
}

.qv-feature i {
    color: var(--success);
    font-size: 1rem;
}

/* =========================================================
   TOAST
========================================================= */
.toast-wrap {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    pointer-events: none;
}

@media(max-width:575.98px) {
    .toast-wrap {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

.toast-el {
    background: var(--primary-dark);
    color: #fff;
    padding: .85rem 1.1rem;
    border-radius: 12px;
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .6rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn .3s ease forwards;
    pointer-events: auto;
    max-width: 340px;
}

.toast-el i {
    color: var(--secondary-400);
    font-size: 1.15rem;
}

.toast-el.out {
    animation: toastOut .3s ease forwards;
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    to {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* =========================================================
   BACK TO TOP
========================================================= */
.back-top {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: 0;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--t);
    z-index: 1040;
    box-shadow: var(--shadow-md);
}

.back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-top:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

@media(max-width:575.98px) {
    .back-top {
        bottom: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* =========================================================
   SCROLL REVEAL
========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   UTILITIES
========================================================= */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}