/* ==========================================================================
   Navbar active states
   ========================================================================== */
.main-nav .menu li.active>a,
.main-nav .menu li.submenu-active>a,
.main-nav .menu li.child-active>a {
    color: #B18228 !important;
}

/* ==========================================================================
   Logout button
   ========================================================================== */
.logout-btn {
    background: none;
    border: none;
    padding: 0;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
}

.logout-btn:hover {
    color: #B18228 !important;
    transition: color 0.15s ease-in-out;
}

/* ==========================================================================
   Cart Offcanvas Panel
   ========================================================================== */

/* Override theme — full viewport height, flex column */
.cart-dropdown.cart-offcanvas .dropdown-box {
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* --- Header --- */
.cart-panel-header {
    flex: 0 0 auto;
    padding: clamp(1.2rem, 2vw, 2rem) clamp(1.4rem, 2.5vw, 2.4rem);
    border-bottom: 1px solid #efefef;
    background: #0D1B2B;
}

.cart-panel-header .cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.cart-panel-header .cart-header span {
    font-size: clamp(1.3rem, 1.8vw, 1.6rem);
    font-weight: 700;
    color: #fff;
    padding-top: 2px;
}

.cart-panel-header .cart-header a {
    font-size: clamp(1.4rem, 1.6vw, 1.6rem);
    color: #fff;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

/* .cart-panel-header .cart-header a:hover {
    color: #333;
} */

/* .cart-item-count {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    font-weight: 400;
    color: #999;
    margin-left: 0.4rem;
} */

/* --- Scrollable body --- */
.cart-panel-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.4rem clamp(1.4rem, 2.5vw, 2.4rem);
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.cart-panel-body::-webkit-scrollbar {
    width: 3px;
}

.cart-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.cart-panel-body::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 2px;
}

.cart-panel-body::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Reset theme's .products defaults */
.cart-dropdown.cart-offcanvas .dropdown-box .products {
    max-height: none !important;
    border: none !important;
    padding-bottom: 0 !important;
}

/* --- Footer --- */
.cart-panel-footer {
    flex: 0 0 auto;
    padding: clamp(1.2rem, 1.8vw, 1.6rem) clamp(1.4rem, 2.5vw, 2.4rem) clamp(1.4rem, 2vw, 2rem);
    border-top: 1px solid #efefef;
    background: #fff;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Cart Item Card
   ========================================================================== */
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: clamp(1rem, 1.4vw, 1.4rem);
    padding: clamp(1.2rem, 1.6vw, 1.6rem) 0;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.15s;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Left column: thumb + remove */
.cart-item-left {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

/* Thumbnail */
.cart-item-thumb {
    width: clamp(6.4rem, 7.5vw, 7.5rem);
    height: clamp(6.4rem, 7.5vw, 7.5rem);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #efefef;
    display: block;
    background: #fafafa;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

.cart-item-thumb:hover img {
    transform: scale(1.06);
}

/* Content column */
.cart-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.2rem;
}

/* Product name */
.cart-item-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2;
    overflow: hidden !important;
    font-size: clamp(1.2rem, 1.5vw, 1.4rem);
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    white-space: normal !important;
    word-break: break-word;
}

/* Variant options */
.cart-item-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.1rem;
}

.cart-variant-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    background: #f4f6f9;
    border: 1px solid #e4e8ee;
    border-radius: 4px;
    padding: 0.2rem 0.65rem 0.2rem 0.5rem;
    line-height: 1.6;
}

.cart-variant-label {
    color: #999;
    font-weight: 500;
    font-size: 0.9em;
}

.cart-variant-value {
    color: #333;
    font-weight: 600;
}

/* Qty + price */
.cart-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cart-item-qty {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: #999;
    font-weight: 500;
    min-width: 2rem;
}

.cart-item-unit-price {
    font-size: clamp(1.2rem, 1.4vw, 1.4rem);
    font-weight: 700;
    color: #0D1B2B;
    letter-spacing: -0.01em;
}

.cart-item-total-price {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    color: #aaa;
    font-weight: 500;
}

.cart-item-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cart-item-qty {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    color: #777;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 0.2rem 0.7rem;
    font-weight: 500;
    line-height: 1.6;
}

.cart-item-price {
    font-size: clamp(1.3rem, 1.5vw, 1.5rem);
    font-weight: 700;
    color: #0D1B2B;
    letter-spacing: -0.01em;
}

/* Remove button — sits under thumbnail */
.cart-item-remove {
    width: clamp(6.4rem, 7.5vw, 7.5rem);
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    font-size: 1.2rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: #e53935;
    border-color: #e53935;
    color: #fff;
    transform: scale(1.08);
}

/* Empty state */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0 4rem;
    gap: 1.2rem;
}

.cart-empty-state i {
    font-size: 4.5rem;
    color: #ddd;
}

.cart-empty-state p {
    font-size: clamp(1.2rem, 1.5vw, 1.4rem);
    color: #bbb;
    margin: 0;
    font-weight: 500;
}

/* ==========================================================================
   Coupon
   ========================================================================== */
.cart-coupon-wrap {
    margin-bottom: clamp(1rem, 1.4vw, 1.4rem);
}

.coupon-input-row {
    display: flex;
    gap: clamp(0.6rem, 0.8vw, 0.8rem);
    align-items: stretch;
}

.coupon-input {
    flex: 1;
    min-height: clamp(3rem, 4vw, 3.8rem);
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    padding: 0 clamp(0.8rem, 1vw, 1.2rem);
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #333;
    background: #fafafa;
}

.coupon-input:focus {
    border-color: #00568d;
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 141, 0.25);
}

.coupon-apply-btn {
    min-height: clamp(3.0rem, 4vw, 3.8rem);
    padding: 0 clamp(1.4rem, 1.8vw, 2rem);
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    white-space: nowrap;
    border-radius: 3px;
    line-height: 1;
    font-weight: 600;
}

.coupon-msg {
    display: none;
    margin: 0.6rem 0 0;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.4;
}

.coupon-msg.success {
    color: #2e7d32;
}

.coupon-msg.error {
    color: #c62828;
}

.coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f7ff;
    border: 1.5px dashed #336699;
    border-radius: 6px;
    padding: clamp(0.8rem, 1vw, 1rem) clamp(1rem, 1.2vw, 1.2rem);
}

.coupon-applied-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    color: #336699;
    font-weight: 600;
}

.coupon-applied-badge i {
    font-size: 1em;
}

.coupon-applied-badge em {
    font-style: normal;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    font-weight: 400;
    color: #555;
}

.coupon-remove-btn {
    background: none;
    border: none;
    padding: 0.3rem;
    cursor: pointer;
    color: #aaa;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1;
    transition: color 0.2s;
}

.coupon-remove-btn:hover {
    color: #e53935;
}

/* ==========================================================================
   Price summary
   ========================================================================== */
.cart-price-summary {
    margin-bottom: 0;
}

/* base row — layout + font shared by all rows */
.cart-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: clamp(0.3rem, 0.5vw, 0.5rem) 0;
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
}

.cart-price-row>span:first-child {
    color: #777;
}

.cart-price-row>span:last-child {
    color: #444;
    font-weight: 600;
}

/* discount modifier */
.cart-discount-row>span:first-child {
    color: #2e7d32;
}

.cart-discount-row>span:first-child em {
    font-style: normal;
    font-size: 0.9em;
    color: #5a9e5a;
    margin-left: 0.3rem;
}

.cart-discount-row>span:last-child {
    color: #2e7d32;
}

/* divider */
.cart-price-divider {
    height: 1px;
    background: #efefef;
    margin: clamp(0.6rem, 0.8vw, 0.8rem) 0;
}

/* total modifier */
.cart-total-row>span:first-child {
    font-size: clamp(1.3rem, 1.6vw, 1.6rem);
    font-weight: 700;
    color: #333;
}

.cart-total-row>span:last-child {
    font-size: clamp(1.4rem, 1.8vw, 1.8rem);
    font-weight: 800;
    color: #0D1B2B;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   Action buttons
   ========================================================================== */
.cart-panel-footer .cart-action {
    display: flex;
    gap: clamp(0.8rem, 1vw, 1rem);
    margin-top: clamp(1rem, 1.4vw, 1.4rem);
}

.cart-panel-footer .cart-action .btn {
    flex: 1;
    justify-content: center;
    font-size: clamp(1.2rem, 1.4vw, 1.4rem);
    font-weight: 600;
    padding: clamp(1rem, 1.2vw, 1.2rem) 0;
    border-radius: 3px;
    margin: 0 !important;
    transition: all 0.2s;
}


/* Breadcrumb — single line, show all items, ellipsis when overflow */
.breadcrumb {
    font-size: clamp(12px, 0.8vw + 0.5rem, 13px);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb li {
    display: inline;
}

@media (min-width: 991px) {
    .breadcrumb {
        width: 40%;
    }
}

/* ==========================================================================
   Footer — Dark Professional
   ========================================================================== */

/* ==========================================================================
   Footer — Dark Professional
   ========================================================================== */

.footer.footer-dark {
    background: #fff;
    color: #666;
}

.footer.footer-dark a { color: #666; }
.footer.footer-dark a:hover { color: #0D1B2B; }

.footer.footer-dark .footer-top {
    padding: 50px 0 20px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 18px;
    opacity: 0.9;
    transition: opacity .2s;
}
.footer-logo:hover { opacity: 1; }
.footer-logo img { width: 130px; height: auto; }

.widget-about-desc {
    font-size: 1.3rem;
    /* color: #718096; */
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    /* color: #718096; */
    margin-bottom: 8px;
}

.footer-social-wrap {
    display: flex;
    flex-wrap: wrap;
}

.footer.footer-dark .widget-title {
    color: #333;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding-bottom: 10px;
    position: relative;
}

.footer.footer-dark .widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 2px;
    background: #0D1B2B;
    border-radius: 2px;
}

.footer.footer-dark .widget-body li { margin-bottom: 9px; }

.footer.footer-dark .widget-body li a {
    font-size: 1.3rem;
    /* color: #718096; */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .18s, gap .18s;
}

.footer.footer-dark .widget-body li a::before {
    content: '›';
    font-size: 1.4rem;
    color: #0D1B2B;
    opacity: 0;
    transition: opacity .18s;
}

.footer.footer-dark .widget-body li a:hover { color: #0D1B2B; gap: 8px; }
.footer.footer-dark .widget-body li a:hover::before { opacity: 1; }

.footer.footer-dark .footer-bottom {
    background: #0D1B2B;
    padding: 16px 0;
}

.footer.footer-dark .footer-bottom .copyright {
    /* color: #4a5568; */
    color: #fff;
    font-size: 1.25rem;
    margin: 0;
}

.footer.footer-dark .footer-bottom .copyright strong { color: #B18228; }
.footer.footer-dark .payment-label { color: #fff; font-size: 1.2rem; }

@media (max-width: 991.98px) {
    .footer.footer-dark .footer-top { padding: 36px 0 20px; }

    .footer-logo { display: block; margin: 0 auto 18px; text-align: center;}
    .widget-about-desc { text-align: center; }
    .footer-social-label { text-align: center; }
    .footer-social-wrap { justify-content: center; }

    .footer.footer-dark .widget-title { text-align: center; }
    .footer.footer-dark .widget-title::after { left: 50%; transform: translateX(-50%); }

    .footer-top .widget ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 0;
        padding: 0;
        list-style: none;
    }

    .footer-top .widget ul li {
        padding: 0 12px;
        position: relative;
        list-style: none;
    }

    .footer-top .widget ul li:not(:last-child)::after {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #4a5568;
    }

    .footer.footer-dark .widget-body li a::before { display: none; }

    .footer.footer-dark .footer-bottom .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .footer.footer-dark .footer-bottom .footer-left,
    .footer.footer-dark .footer-bottom .footer-right {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 575.98px) {
    .footer.footer-dark .footer-bottom .copyright { font-size: 1.15rem; }
}

/* ==========================================================================
   Header Search Dropdown
   ========================================================================== */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    /* border-top: none; */
    border-radius: 3px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
}

.search-results-container {
    max-height: 400px;
    overflow-y: auto;
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    font-size: 14px;
    color: #666;
}

.search-loading .spinner-border {
    width: 16px;
    height: 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover,
.search-result-item.selected {
    background-color: #f8f9fa;
    text-decoration: none;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
}

.search-result-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.search-result-price .new-price {
    font-weight: 700;
    color: #0D1B2B;
}

.search-result-price .old-price {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
}

.view-all-results {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.view-all-results .btn {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
}

.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Focus styles for the search input */
/* #header-search-form #search-input:focus + .btn + .search-dropdown {
    display: block !important;
} */

/* Mobile adjustments */
@media (max-width: 991.98px) {
    .search-dropdown {
        left: -16px;
        right: -16px;
        border-radius: 0 0 8px 8px;
    }
}


/* ==========================================================================
   Mobile Search Bar (≤ 991px)
   ========================================================================== */

/* Container — hidden on desktop, slide-down on mobile */
.mobile-search-bar {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.28s ease;
    background: #fff;
    border-top: 1px solid #efefef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 999;
}

.mobile-search-bar.is-open {
    max-height: 500px; /* large enough to fit results */
}

@media (max-width: 991.98px) {
    .mobile-search-bar {
        display: block;
    }
}

/* Inner row: input + search btn + close btn */
.mobile-search-inner {
    display: flex;
    align-items: center;
    padding: 8px;
    position: relative;
}

.mobile-search-inner .form-control {
    flex: 1;
    min-height: 30px;
    font-size: 1.4rem;
    border: 1px solid #eee;
    border-right: none;
    border-radius: 3px 0 0 3px;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    color: #333;
}

.mobile-search-inner .btn-search {
    margin: 0;
    padding: 0;
    min-height: 30px;
    min-width: 30px;
    border-radius: 0 3px 3px 0;
    background: #fff;
    color: #ccc;
    border: 1px solid #eee;
    border-left: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: normal;
    letter-spacing: -0.025em;
    text-transform: none;
}

.mobile-search-inner .btn-search:hover {
    background: #0D1B2B;
    color: #fff;
}

/* Search icon toggle — active state */
.hb-search-icon.is-active {
    color: #B18228;
}

/* Dropdown positioning inside mobile search bar */
.mobile-search-dropdown {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    border-radius: 0;
    margin-top: 0;
    margin-bottom: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    border: 1px solid #eee;
    overflow: hidden;
}
