/* ==========================================================================
   Modern Theme Overrides
   Layered on top of the existing theme.css/style.css — only adds/upgrades,
   never removes the base theme, so nothing else on the site is affected.
   ========================================================================== */

:root {
    --mt-radius: 14px;
    --mt-radius-sm: 8px;
    --mt-shadow: 0 4px 20px rgba(17, 20, 24, 0.08);
    --mt-shadow-hover: 0 12px 32px rgba(17, 20, 24, 0.14);
    --mt-accent: #ff6b6b;
    --mt-success: #17c990;
    --mt-dark: #111418;
    --mt-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: #f4f6f9;
}

.header.header-10.header-intro-clearance {
    position: sticky;
    top: 0;
    z-index: 1550;
    background: #fff;
    box-shadow: 0 2px 12px rgba(17, 20, 24, 0.08);
}

.header.header-10.header-intro-clearance .header-top,
.header.header-10.header-intro-clearance .header-middle {
    background: #fff;
}

.header.header-10.header-intro-clearance .header-bottom {
    background: #2f2f2f;
}

.header.header-10.header-intro-clearance .header-dropdown-link {
    align-items: center;
    justify-content: flex-end;
}

.site-header-cart,
.site-header-cart:hover,
.site-header-cart:focus {
    position: relative;
    min-width: 54px;
    height: 58px;
    padding: 6px 8px;
    color: #e30613;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.site-header-cart-icon {
    width: 26px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
}

.site-header-cart-count.cart-count {
    position: absolute !important;
    top: 6px !important;
    right: 8px !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    border-radius: 999px !important;
    background: #e30613 !important;
    color: #fff !important;
    font-size: 11px !important;
    line-height: 18px !important;
    font-weight: 800 !important;
    text-align: center !important;
}

.site-header-cart-text {
    margin-top: 3px;
    color: #555;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
}

.main {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
}

.home-section {
    padding-top: 18px;
    padding-bottom: 18px;
}

.home-products-section {
    background: transparent !important;
}

.home-products-section .furniture {
    background: #fff;
    border: 1px solid #edf0f3;
    border-radius: 10px;
    padding-top: 16px;
    padding-bottom: 16px;
    box-shadow: 0 8px 28px rgba(17, 20, 24, 0.05);
}

.home-products-section .row {
    align-items: stretch;
}

.home-products-section .col-5th {
    padding: 8px;
}

.home-products-section .heading {
    margin-left: 4px;
    margin-right: 4px;
}

.home-products-section .title,
.home-category-section .title {
    color: #17202a;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 900;
}

.cat-block {
    background: #fff;
    border: 1px solid #edf0f3;
    border-radius: 8px;
    padding: 14px 8px 12px;
    box-shadow: 0 4px 16px rgba(17, 20, 24, 0.04);
    transition: transform var(--mt-transition), box-shadow var(--mt-transition), border-color var(--mt-transition);
}

.cat-block:hover {
    transform: translateY(-3px);
    border-color: #ffd400;
    box-shadow: 0 12px 30px rgba(17, 20, 24, 0.09);
}

.cat-block figure span {
    background: #f7f8fa;
}

/* ---------- Product Cards ---------- */

.product {
    height: 100%;
    border: 1px solid #edf0f3;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(17, 20, 24, 0.06);
    transition: transform var(--mt-transition), box-shadow var(--mt-transition), border-color var(--mt-transition);
    display: flex;
    flex-direction: column;
}

.product:hover {
    transform: translateY(-3px);
    border-color: rgba(227, 6, 19, 0.18);
    box-shadow: 0 14px 36px rgba(17, 20, 24, 0.12);
}

.product .product-media {
    aspect-ratio: 1 / 1;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #fff;
    margin-bottom: 0;
}

.product .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.5s ease;
}

.product:hover .product-image {
    transform: scale(1.06);
}

.product-label {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    z-index: 2;
}

.product-label.label-sale {
    background: #e30613;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 15px;
    top: 12px;
    left: 12px;
}

.product-label.label-in-cart {
    background: var(--mt-success);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    top: auto;
    bottom: 12px;
    left: 12px;
    right: auto;
    position: absolute;
    padding: 4px 10px;
    font-size: 11px;
    color: #fff;
}

.product-label.label-in-cart i {
    font-size: 11px;
}

.product-body-align {
    padding: 14px 16px 0;
    flex: none;
    display: flex;
    flex-direction: column;
}

.product .ajax-cart-form,
.product form[action*="addcart"] {
    flex: none;
    display: flex;
    flex-direction: column;
}

.product-body-align .product-body {
    flex: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 !important;
}

.product-title a {
    min-height: 40px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 800;
    transition: color var(--mt-transition);
}

.product-title {
    margin-bottom: 6px;
}

.product-cat {
    min-height: 16px;
    margin-bottom: 2px;
    color: #7b8794;
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    min-height: 26px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    text-align: center;
}

.product-price .new-price {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 900;
    color: #e30613;
    white-space: nowrap;
}

.product-price .old-price {
    color: #9aa3ad;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.product .product-action {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 10px 16px 14px;
    background: #fff;
}

/* Add to cart button: idle / loading / added states */
.btn-cart.js-cart-btn {
    position: relative;
    width: 100%;
    min-height: 42px;
    border-radius: 7px;
    background: #e30613;
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--mt-transition), color var(--mt-transition), transform var(--mt-transition);
}

@media (max-width: 767px) {
    .home-products-section .col-5th {
        padding: 5px;
    }

    .product-body-align {
        padding: 10px 10px 0;
    }

    .product-title a {
        min-height: 36px;
        font-size: 12px;
        line-height: 1.25;
    }

    .product-price .new-price {
        font-size: 15px;
    }

    .product .product-action {
        padding: 8px 10px 10px;
    }

    .btn-cart.js-cart-btn {
        min-height: 36px;
        font-size: 11px;
    }
}

.btn-cart.js-cart-btn:hover,
.btn-cart.js-cart-btn:focus {
    background: #bf0410;
    color: #fff;
}

.btn-cart.js-cart-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-cart.js-cart-btn.is-loading .js-cart-btn-label::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: mt-spin 0.6s linear infinite;
}

.btn-cart.js-cart-btn.is-added {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}

@keyframes mt-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Cart Drawer ---------- */

.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 20, 24, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--mt-transition);
    z-index: 1998;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    max-width: 410px;
    background: #fff;
    z-index: 1999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--mt-transition);
    box-shadow: -12px 0 34px rgba(17, 20, 24, 0.18);
}

body.cart-drawer-active .cart-drawer {
    transform: translateX(0);
}

body.cart-drawer-active .cart-drawer-overlay {
    opacity: 1;
    visibility: visible;
}

body.cart-drawer-active {
    overflow: hidden;
}

.cart-drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f3;
    flex: none;
}

.cart-drawer-header h4 {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 800;
    color: #222;
}

.cart-drawer-count {
    display: block;
    margin-top: 2px;
    color: #666;
    font-weight: 500;
    font-size: 12px;
}

.cart-drawer-close {
    border: none;
    background: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #222;
    font-size: 18px;
    transition: background var(--mt-transition), color var(--mt-transition);
}

.cart-drawer-close:hover {
    background: #f3f4f6;
    color: #e30613;
}

.cart-drawer-back {
    margin-right: -4px;
}

.cart-drawer-savings {
    flex: none;
    margin: 10px 16px 0;
    padding: 9px 11px;
    border-radius: 5px;
    background: #fff7d6;
    border: 1px solid #ffe38a;
    color: #332600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
}

.cart-drawer-savings strong {
    color: #e30613;
    white-space: nowrap;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px;
    min-height: 120px;
    background: #f6f7f9;
}

.cart-drawer-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 9px;
    margin-bottom: 10px;
    border: 1px solid #eceff3;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(17, 20, 24, 0.04);
}

.cart-drawer-item-image {
    width: 54px;
    height: 66px;
    flex: none;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fb;
    display: block;
}

.cart-drawer-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-drawer-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-drawer-item-title {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.35;
    color: #333;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-drawer-item-variant {
    font-size: 12px;
    color: #777;
}

.cart-drawer-item-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cart-drawer-item-price strong {
    color: #e30613;
    font-size: 13px;
    font-weight: 800;
}

.cart-drawer-item-price span {
    color: #777;
    font-size: 11px;
}

.cart-drawer-qty-control {
    width: 132px;
    height: 34px;
    border: 1px solid #e3e5e8;
    border-radius: 5px;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    text-align: center;
    background: #fff;
}

.cart-drawer-qty-control button {
    height: 32px;
    border: 0;
    background: #1daa4a;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-drawer-qty-control button:not(:disabled):hover,
.cart-drawer-qty-control button:not(:disabled):focus {
    background: #168a3d;
}

.cart-drawer-qty-control button:disabled {
    background: #d7dde3;
    cursor: not-allowed;
}

.cart-drawer-qty-control span {
    color: #333;
    font-weight: 700;
    font-size: 13px;
}

.cart-drawer-item-remove {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #777;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--mt-transition), color var(--mt-transition);
}

.cart-drawer-item-remove:hover {
    background: #fff1f1;
    color: #e30613;
}

.cart-drawer-empty {
    text-align: center;
    padding: 80px 20px;
    color: #777;
}

.cart-drawer-empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

.cart-drawer-footer {
    flex: none;
    padding: 10px 16px 0;
    border-top: 1px solid #edf0f3;
    background: #fff;
}

.cart-drawer-coupon {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.cart-drawer-coupon input {
    min-width: 0;
    flex: 1;
    height: 38px;
    border: 1px solid #e3e5e8;
    border-radius: 5px;
    padding: 0 10px;
    font-size: 12px;
}

.cart-drawer-coupon button {
    flex: none;
    height: 38px;
    border: 0;
    border-radius: 5px;
    background: #ff4b4b;
    color: #fff;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
}

.cart-drawer-checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 -16px;
}

.cart-drawer-total,
.cart-drawer-place-order {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.cart-drawer-total {
    gap: 4px;
    background: #ffd400;
    color: #222;
    font-size: 13px;
}

.cart-drawer-total strong {
    color: #222;
    font-size: 13px;
}

.cart-drawer-place-order,
.cart-drawer-place-order:hover,
.cart-drawer-place-order:focus {
    background: #e30613;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.cart-drawer-toggler {
    cursor: pointer;
}

@media (max-width: 767px) {
    .header-middle .header-right .header-dropdown-link {
        display: none;
    }

    .cart-drawer {
        max-width: 100%;
    }
}

.floating-cart-toggler {
    position: fixed;
    right: 18px;
    top: 50%;
    z-index: 1490;
    width: 96px;
    min-width: 0;
    min-height: 96px;
    border-radius: 7px;
    border: 4px solid #ffdf00;
    background: #111418;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    box-shadow: 0 10px 28px rgba(17, 20, 24, .18);
    overflow: hidden;
    transform: translateY(-50%);
    transition: box-shadow var(--mt-transition), filter var(--mt-transition);
}

.floating-cart-toggler:hover,
.floating-cart-toggler:focus {
    color: #fff;
    filter: brightness(1.03);
    box-shadow: 0 18px 42px rgba(227, 6, 19, .24);
}

.floating-cart-top,
.floating-cart-bottom {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.floating-cart-top {
    flex-direction: column;
    gap: 2px;
    background: #e30613;
    color: #fff;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 900;
}

.floating-cart-bottom {
    background: #111418;
    color: #fff;
    gap: 2px;
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
}

.floating-cart-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.floating-cart-count {
    position: static;
    min-width: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-align: inherit;
}

.floating-cart-toggler {
    display: none;
}

/* ---------- Modern Mobile Menu (app-drawer style) ---------- */

@media (max-width: 991px) {
    .mobile-menu-container {
        border-radius: 0 var(--mt-radius) var(--mt-radius) 0;
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
    }

    .mobile-menu-wrapper {
        padding-top: 6px;
    }

    .mobile-menu li > a {
        border-radius: var(--mt-radius-sm);
        transition: background var(--mt-transition);
    }

    .mobile-menu li > a:hover,
    .mobile-menu li > a:active {
        background: #f6f7f9;
    }

    .mobile-menu-close {
        border-radius: 50%;
        background: #f2f3f5;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ---------- Product Detail Page Polish ---------- */

@media (min-width: 992px) {
    .product-details {
        position: sticky;
        top: 90px;
    }
}

.product-details .product-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.product-nav-dots label.color-label span {
    border-radius: 50%;
    box-shadow: 0 0 0 1px #ddd;
}

.details-filter-row .wrap {
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e3e6;
}

.details-filter-row .wrap .quantity {
    border: none;
    background: transparent;
}

.details-filter-row .wrap .count {
    border: none;
    text-align: center;
    width: 44px;
}

.exzoom_img_ul {
    border-radius: var(--mt-radius);
    overflow: hidden;
}

/* Sticky "Add to Cart" action bar on small screens, so the buy buttons
   are always reachable without scrolling back up on long product pages. */
@media (max-width: 767px) {
    .product-details:not(.product-detail-panel) form {
        padding-bottom: 76px;
    }

    .product-details:not(.product-detail-panel) .details-filter-row:last-of-type,
    .product-details:not(.product-detail-panel) form > div:last-child {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        z-index: 100;
        padding: 10px 14px;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
        display: flex;
        gap: 8px;
    }

    .product-details form > div:last-child .btn {
        flex: 1;
        margin: 0 !important;
    }
}

/* ---------- General modern touches ---------- */

.btn,
.btn-product {
    border-radius: var(--mt-radius-sm);
}

.header-search-wrapper {
    border-radius: 999px;
    overflow: hidden;
}

/* ---------- Mobile Bottom Nav (app-style) ---------- */

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1500;
    display: flex;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 2px 8px;
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    position: relative;
    transition: color var(--mt-transition);
}

.mobile-bottom-nav-item i {
    font-size: 19px;
    line-height: 1;
}

.mobile-bottom-nav-item.active,
.mobile-bottom-nav-item:active {
    color: var(--mt-dark);
}

.mobile-bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 26%;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--mt-accent);
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}

/* Reserve space at the bottom of the viewport so page content (and the
   footer) never sits underneath the fixed nav bar. */
@media (max-width: 991px) {
    body {
        padding-bottom: 58px;
    }
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* ---------- Mobile Search Overlay ---------- */

.mobile-search-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 20, 24, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--mt-transition);
    z-index: 1600;
}

.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1601;
    background: #fff;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform var(--mt-transition);
}

body.mobile-search-active .mobile-search-overlay {
    transform: translateY(0);
}

body.mobile-search-active .mobile-search-overlay-backdrop {
    opacity: 1;
    visibility: visible;
}

.mobile-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f2f3f5;
    border-radius: 999px;
    padding: 6px 8px 6px 16px;
}

.mobile-search-form input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
}

.mobile-search-close {
    border: none;
    background: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

@media (min-width: 992px) {
    .mobile-search-overlay,
    .mobile-search-overlay-backdrop {
        display: none;
    }
}

/* The product-detail sticky action bar (added for the mobile buy
   experience) needs to sit above the bottom nav bar, not underneath it,
   and the page needs enough bottom padding to clear both stacked bars. */
@media (max-width: 767px) {
    .product-details:not(.product-detail-panel) form {
        padding-bottom: 130px;
    }

    .product-details:not(.product-detail-panel) .details-filter-row:last-of-type,
    .product-details:not(.product-detail-panel) form > div:last-child {
        bottom: 58px;
    }
}

@media (max-width: 767px) {
    .floating-cart-toggler {
        top: 50%;
        right: 8px;
        min-width: 0;
        width: 86px;
        min-height: 88px;
        padding: 0;
        border-radius: 7px;
        transform: translateY(-50%);
    }

    .floating-cart-toggler:hover,
    .floating-cart-toggler:focus {
        transform: translateY(-50%);
    }

    .floating-cart-icon {
        width: auto;
        height: auto;
        font-size: 20px;
    }

    .floating-cart-top,
    .floating-cart-bottom {
        min-height: 40px;
    }

    .floating-cart-count {
        position: static;
    }
}
