/*
Theme Name: MKShop Storefront Child
Theme URI: https://mkshop.vn/
Description: Giao diện WooCommerce nhẹ dành riêng cho MKShop, kế thừa Storefront và tối ưu cho sản phẩm bàn phím cơ, linh kiện và hàng 2nd.
Author: MKShop
Author URI: https://mkshop.vn/
Template: storefront
Version: 0.6.8
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: mkshop-storefront-child
*/

:root {
    --mk-red: #e31e24;
    --mk-red-dark: #b91318;
    --mk-black: #171717;
    --mk-text: #242424;
    --mk-muted: #6b7280;
    --mk-border: #e5e7eb;
    --mk-soft: #f7f7f8;
    --mk-white: #ffffff;
    --mk-radius: 14px;
    --mk-shadow: 0 10px 30px rgba(17, 24, 39, 0.07);
    --mk-container: 1240px;
}

html { scroll-behavior: smooth; }
body {
    color: var(--mk-text);
    background: var(--mk-white);
    font-family: 'Quicksand', sans-serif;
}

body, button, input, textarea, select { font-size: 15px; }
a { color: var(--mk-black); }
a:hover, a:focus { color: var(--mk-red); }

.site { overflow: clip; }
.col-full {
    max-width: var(--mk-container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* Header */
.mk-topbar {
    background: var(--mk-black);
    color: #fff;
    font-size: 13px;
}
.mk-topbar__inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.mk-topbar a { color: #fff; }
.mk-topbar__links { display: flex; gap: 18px; flex-wrap: wrap; }

.mk-header {
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--mk-border);
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(12px);
}
.admin-bar .mk-header { top: 32px; }
.mk-header__main {
    min-height: 76px;
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    align-items: center;
    gap: 24px;
}
.mk-brand { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.mk-brand .custom-logo { max-height: 160px; width: auto; }
.mk-brand__text {
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -1px;
    color: var(--mk-black);
}
.mk-brand__text span { color: var(--mk-red); }

.mk-search-form { position: relative; width: 100%; }
.mk-search-form input[type="search"] {
    width: 100%;
    height: 48px;
    border: 1px solid var(--mk-border);
    border-radius: 999px;
    background: var(--mk-soft);
    padding: 0 112px 0 18px;
    box-shadow: none;
}
.mk-search-form input[type="search"]:focus {
    border-color: var(--mk-red);
    background: #fff;
    outline: 0;
}
.mk-search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    background: var(--mk-red);
    color: #fff;
    font-weight: 700;
}
.mk-search-form button:hover { background: var(--mk-red-dark); }

.mk-header-actions { display: flex; align-items: center; gap: 10px; }
.mk-header-action {
    min-width: 44px;
    height: 44px;
    font-size: 15px;
    border: 1px solid var(--mk-border);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--mk-black);
    position: relative;
    text-decoration: none;
}
.mk-header-action:hover { border-color: var(--mk-red); color: var(--mk-red); }
.mk-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 32px;
    height: 32px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--mk-red);
    color: #fff;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.mk-nav { border-top: 1px solid var(--mk-border); background: #fff; }
.mk-nav__inner { min-height: 48px; display: flex; align-items: center; }
.mk-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mk-nav li { margin: 0; }
.mk-nav a {
    display: block;
    padding: 13px 14px;
    font-weight: 700;
    font-size: 24px;
    color: var(--mk-black);
    text-decoration: none;
}
.mk-nav .current-menu-item > a,
.mk-nav a:hover { color: var(--mk-red); }
.mk-menu-toggle { display: none; }

/* Site Banner */
.mkshop-site-banner {
    background: #fff;
    padding-top: 16px;
}
.mkshop-site-banner__link {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    line-height: 0;
}
.mkshop-site-banner__img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Main */
.site-content { padding-top: 28px; }
.home .site-content { padding-top: 0; }
.content-area, .widget-area { margin-bottom: 0; }

/* Homepage deal module */
.mk-home { background: #fff; }
.mk-deal-hero {
    background: linear-gradient(135deg, #101010 0%, #252525 60%, #5a1113 100%);
    color: #fff;
    padding: 46px 0 52px;
    position: relative;
    overflow: hidden;
}
.mk-deal-hero::after {
    content: "";
    width: 430px;
    height: 430px;
    border-radius: 50%;
    background: rgba(227,30,36,.18);
    filter: blur(32px);
    position: absolute;
    right: -90px;
    top: -180px;
}
.mk-deal-hero__inner { position: relative; z-index: 1; }
.mk-deal-hero__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}
.mk-deal-hero__eyebrow {
    color: #ff8588;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 13px;
}
.mk-deal-hero h1 {
    color: #fff;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.05;
    letter-spacing: -1.8px;
    margin: 8px 0 8px;
}
.mk-deal-hero p { color: #dedede; font-size: 17px; margin: 0; }
.mk-deal-hero__products ul.products { position: relative; z-index: 1; }
.mk-deal-hero__products ul.products li.product {
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 16px 34px rgba(0,0,0,.18);
}
.mk-deal-hero__products ul.products li.product:hover {
    border-color: rgba(255,255,255,.34);
    box-shadow: 0 18px 38px rgba(0,0,0,.28);
}
.mk-deal-hero__empty {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 26px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
}
.mk-deal-hero__empty strong { color: #fff; font-size: 20px; }
.mk-deal-hero__empty span { color: #d1d5db; }
.mk-button {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
}
.mk-button--primary { background: var(--mk-red); color: #fff; }
.mk-button--primary:hover { background: var(--mk-red-dark); color: #fff; }
.mk-button--ghost { color: #fff; border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.05); }
.mk-button--ghost:hover { color: #fff; border-color: #fff; }

.mk-benefits { margin-top: -24px; position: relative; z-index: 5; }
.mk-benefits__grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
    background: #fff;
    border: 1px solid var(--mk-border);
    border-radius: 18px;
    box-shadow: var(--mk-shadow);
    padding: 12px;
}
.mk-benefit { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; }
.mk-benefit__icon { width: 42px; height: 42px; border-radius: 12px; background: #fff0f0; color: var(--mk-red); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.mk-benefit strong { display: block; font-size: 14px; }
.mk-benefit span { color: var(--mk-muted); font-size: 13px; }

.mk-section { padding: 52px 0 0; }
.mk-section:last-child { padding-bottom: 64px; }
.mk-section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.mk-section__head h2 { margin: 0; font-size: 30px; letter-spacing: -1px; color: var(--mk-black); }
.mk-section__head p { color: var(--mk-muted); margin: 6px 0 0; }
.mk-section__link { font-weight: 800; color: var(--mk-red); text-decoration: none; white-space: nowrap; }

.mk-category-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 14px; }
.mk-category-card {
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius);
    background: #fff;
    padding: 0;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 16px rgba(17,24,39,.04);
    text-decoration: none;
    transition: .2s ease;
    display: flex;
    flex-direction: column;
}
.mk-category-card:hover { transform: translateY(-3px); border-color: #f4b9bb; box-shadow: var(--mk-shadow); }
.mk-category-card__icon { width: 56px; height: 56px; margin: 18px auto 12px; border-radius: 16px; background: var(--mk-soft); display: flex; align-items: center; justify-content: center; color: var(--mk-red); font-size: 24px; font-weight: 900; }
.mk-category-card__image { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; margin: 0; display: block; border-bottom: 1px solid var(--mk-border); }
.mk-category-card__info { padding: 14px 12px; }
.mk-category-card strong { font-size: 14px; display: block; margin-bottom: 4px; }
.mk-category-card span { color: var(--mk-muted); font-size: 12px; }

/* Woo product cards */
ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0 !important; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 0 16px !important;
    border: 1px solid var(--mk-border);
    border-radius: var(--mk-radius);
    overflow: hidden;
    background: #fff;
    position: relative;
    text-align: left !important;
    transition: .2s ease;
}
ul.products li.product:hover { transform: translateY(-3px); box-shadow: var(--mk-shadow); border-color: #f0c2c4; }
ul.products li.product a.woocommerce-LoopProduct-link { display: block; text-decoration: none; }
/* Keep catalogue cards uniform without cropping the uploaded cover image. */
ul.products li.product img {
    display: block;
    width: 100% !important;
    aspect-ratio: 4 / 3;
    object-fit: contain !important;
    object-position: center center;
    margin: 0 0 14px !important;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid var(--mk-border);
}
ul.products li.product .woocommerce-loop-product__title { font-size: 15px !important; line-height: 1.45; min-height: 44px; padding: 0 14px !important; margin: 0 0 8px !important; color: var(--mk-black); font-weight: 800; }
ul.products li.product .price { padding: 0 14px; font-size: 17px !important; color: var(--mk-red) !important; font-weight: 900 !important; margin-bottom: 10px !important; }
ul.products li.product .price del { color: #9ca3af !important; font-size: 13px; margin-right: 6px; opacity: 1; }
ul.products li.product .button { margin: 4px 14px 0 !important; width: calc(100% - 28px); min-height: 42px; border-radius: 10px; background: var(--mk-black); color: #fff; text-align: center; padding: 11px 10px; }
ul.products li.product .button:hover { background: var(--mk-red); }
.mk-loop-brand { padding: 0 14px; color: var(--mk-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; margin-bottom: 6px; }
.mk-loop-stock { padding: 0 14px; color: #15803d; font-size: 12px; font-weight: 700; margin: 2px 0 4px; }
.mk-loop-stock.is-out { color: #b91c1c; }
.mk-sale-badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--mk-red); color: #fff; border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 900; }
.onsale { display: none !important; }

/* Archive */
.storefront-breadcrumb { margin: 0 0 18px !important; padding: 0 !important; }
.woocommerce-products-header { margin-bottom: 22px; }
.woocommerce-products-header__title.page-title { font-size: 34px; letter-spacing: -1px; }
.term-description { color: var(--mk-muted); max-width: 900px; }
.storefront-sorting { background: var(--mk-soft); border-radius: 12px; padding: 12px; margin-bottom: 18px; }
.woocommerce-ordering select { border-radius: 10px; border: 1px solid var(--mk-border); }

/* Product detail */
.single-product div.product { margin-top: 10px; }
.single-product div.product .woocommerce-product-gallery,
.single-product div.product .summary { margin-bottom: 40px; }
.single-product div.product .woocommerce-product-gallery img { border-radius: 14px; background: var(--mk-soft); }
.single-product div.product .summary { border: 1px solid var(--mk-border); border-radius: 18px; padding: 26px; box-sizing: border-box; }
.single-product div.product .product_title { font-size: 32px; line-height: 1.2; letter-spacing: -1px; margin-bottom: 12px; }
.single-product div.product .price { color: var(--mk-red); font-size: 28px; font-weight: 900; }
.single-product div.product .price del { color: #9ca3af; font-size: 18px; }
.single-product div.product form.cart .button { min-height: 50px; border-radius: 10px; background: var(--mk-red); }
.single-product div.product form.cart .button:hover { background: var(--mk-red-dark); }
.product_meta { background: var(--mk-soft); border-radius: 12px; padding: 14px; font-size: 14px; }
.woocommerce-tabs { border-top: 1px solid var(--mk-border); padding-top: 20px; }
.woocommerce-tabs ul.tabs li a { font-weight: 800; }
.woocommerce-Tabs-panel { max-width: 980px; }
.woocommerce-Tabs-panel img { border-radius: 12px; height: auto; }

/* Cart and checkout */
.woocommerce-cart-form, .cart-collaterals, .woocommerce-checkout-review-order, .woocommerce-billing-fields, .woocommerce-additional-fields, .woocommerce-form-coupon-toggle, .woocommerce-form-login-toggle {
    background: #fff;
    border: 1px solid var(--mk-border);
    border-radius: 14px;
}
.woocommerce-cart-form, .cart-collaterals, .woocommerce-checkout-review-order, .woocommerce-billing-fields, .woocommerce-additional-fields { padding: 18px; }
input.input-text, textarea, select { border: 1px solid var(--mk-border); border-radius: 9px; background: #fff; }
button.button, a.button, input.button { border-radius: 9px; }
.checkout-button, #place_order { background: var(--mk-red) !important; color: #fff !important; }

/* Footer */
.mk-footer { margin-top: 70px; background: #111; color: #d1d5db; }
.mk-footer__grid { display: grid; grid-template-columns: 1.2fr repeat(3,1fr); gap: 32px; padding: 52px 20px 36px; }
.mk-footer h3 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.mk-footer a { color: #d1d5db; text-decoration: none; }
.mk-footer a:hover { color: #fff; }
.mk-footer ul { list-style: none; margin: 0; padding: 0; }
.mk-footer li { margin-bottom: 8px; }
.mk-footer__brand { color: #fff; font-weight: 900; font-size: 28px; margin-bottom: 12px; }
.mk-footer__brand span { color: var(--mk-red); }
.mk-footer__bottom { border-top: 1px solid #2d2d2d; padding: 18px 20px; font-size: 13px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Mobile bottom bar */
.mk-mobile-bar { display: none; }

/* Responsive */
@media (max-width: 1024px) {
    .mk-header__main { grid-template-columns: auto 1fr auto; gap: 14px; }
    .mk-brand { min-width: 110px; }
    .mk-category-grid { grid-template-columns: repeat(3,1fr); }
    ul.products { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .mk-benefits__grid { grid-template-columns: repeat(2,1fr); }
    .mk-footer__grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 782px) {
    .admin-bar .mk-header { top: 46px; }
    .mk-topbar { display: none; }
    .mk-header__main { grid-template-columns: auto 1fr auto; min-height: 64px; gap: 10px; }
    .mk-brand__text { font-size: 22px; }
    .mk-brand .custom-logo { max-height: 120px; }
    .mk-search-wrap { grid-column: 1 / -1; padding-bottom: 12px; display: none; }
    .mk-search-wrap.is-open { display: block; }
    .mk-search-form input[type="search"] { height: 44px; }
    .mk-header-action--account { display: none; }
    .mk-menu-toggle { display: inline-flex; }
    
    .mk-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s ease;
    }
    .mk-nav-overlay.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .mk-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        background: #fff;
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    .mk-nav.is-open {
        transform: translateX(0);
    }
    .mk-nav__inner { display: block; padding: 20px 0; }
    .mk-nav ul { display: block; padding: 0; }
    .mk-nav a { border-bottom: 1px solid var(--mk-border); padding: 14px 20px; font-size: 16px; }
    .mk-deal-hero { padding: 36px 0 44px; }
    .mk-deal-hero__head { align-items: flex-start; }
    .mk-deal-hero h1 { font-size: 38px; }
    .mk-benefits { margin-top: -18px; }
    .mk-benefits__grid { grid-template-columns: 1fr 1fr; }
    .mk-benefit { padding: 10px; }
    .mk-category-grid { grid-template-columns: repeat(2,1fr); }
    ul.products { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .mk-section { padding-top: 38px; }
    .mk-section__head { align-items: flex-start; }
    .mk-section__head h2 { font-size: 25px; }
    .single-product div.product .summary { padding: 18px; }
    .single-product div.product .product_title { font-size: 26px; }
    .mk-footer { margin-bottom: 62px; }
    .mk-footer__grid { grid-template-columns: 1fr; }
    .mk-mobile-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        display: grid;
        grid-template-columns: repeat(4,1fr);
        background: #fff;
        border-top: 1px solid var(--mk-border);
        min-height: 60px;
        box-shadow: 0 -8px 25px rgba(0,0,0,.08);
    }
    .mk-mobile-bar a, .mk-mobile-bar button { border: 0; background: transparent; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; font-size: 11px; color: var(--mk-black); text-decoration: none; }
    .mk-mobile-bar a:hover, .mk-mobile-bar button:hover { color: var(--mk-red); }
}

@media (max-width: 520px) {
    .mk-deal-hero__head { flex-direction: column; gap: 14px; margin-bottom: 18px; }
    .mk-deal-hero__head .mk-button { min-height: 42px; }
    .col-full { padding-left: 14px; padding-right: 14px; }
    .mk-benefits__grid { grid-template-columns: 1fr; }
    .mk-benefit:nth-child(n+3) { display: none; }
    .mk-category-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
    .mk-category-card { padding: 14px 8px; }
    ul.products { gap: 10px; }
    ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; padding: 0 10px !important; min-height: 58px; }
    ul.products li.product .price, .mk-loop-brand, .mk-loop-stock { padding-left: 10px; padding-right: 10px; }
    ul.products li.product .button { margin-left: 10px !important; margin-right: 10px !important; width: calc(100% - 20px); font-size: 12px; }
    .mk-section__link { display: none; }
    .mk-footer__bottom { padding-left: 14px; padding-right: 14px; }
}


/* Articles */
.mk-articles-hero {
    background: linear-gradient(135deg, #151515 0%, #292929 100%);
    color: #fff;
    padding: 58px 0;
}
.mk-articles-hero__eyebrow { color: #fca5a5; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.mk-articles-hero h1 { color: #fff; font-size: 44px; margin: 8px 0 10px; letter-spacing: -1.5px; }
.mk-articles-hero p { color: #d1d5db; max-width: 720px; margin: 0; }
.mk-article-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.mk-article-card { border: 1px solid var(--mk-border); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 18px rgba(17,24,39,.04); transition: .2s ease; }
.mk-article-card:hover { transform: translateY(-3px); box-shadow: var(--mk-shadow); }
.mk-article-card__image { display: flex; width: 100%; aspect-ratio: 16 / 9; background: #181818; align-items: center; justify-content: center; text-decoration: none; overflow: hidden; }
.mk-article-card__image img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
.mk-article-card__image span { color: #fff; font-size: 26px; font-weight: 900; }
.mk-article-card__body { padding: 18px; }
.mk-article-card__meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--mk-muted); font-size: 12px; margin-bottom: 9px; }
.mk-article-card h2 { font-size: 20px; line-height: 1.35; margin: 0 0 10px; }
.mk-article-card h2 a { text-decoration: none; }
.mk-article-card p { color: var(--mk-muted); margin-bottom: 14px; }
.mk-article-card__link { color: var(--mk-red); font-weight: 800; text-decoration: none; }
.mk-articles-pagination { display: flex; justify-content: center; gap: 7px; margin-top: 34px; }
.mk-articles-pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mk-border); border-radius: 9px; text-decoration: none; }
.mk-articles-pagination .current { background: var(--mk-red); border-color: var(--mk-red); color: #fff; }
.mk-empty-state { padding: 50px 20px; border: 1px dashed var(--mk-border); border-radius: 16px; text-align: center; }

@media (max-width: 900px) {
    .mk-article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
    .mk-articles-hero { padding: 42px 0; }
    .mk-articles-hero h1 { font-size: 34px; }
    .mk-article-grid { grid-template-columns: 1fr; }
}


/* Combined search */
.mk-search-hero {
    background: linear-gradient(135deg, #151515 0%, #292929 100%);
    color: #fff;
    padding: 52px 0;
}
.mk-search-hero__eyebrow { color: #fca5a5; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.mk-search-hero h1 { color: #fff; margin: 8px 0 10px; font-size: 42px; letter-spacing: -1.4px; }
.mk-search-hero p { color: #d1d5db; max-width: 800px; margin: 0; }
.mk-search-page__form { max-width: 760px; margin-top: 22px; }
.mk-search-page__form .mk-search-form { background: #fff; border-radius: 12px; padding: 4px; }
.mk-search-pagination { display: flex; justify-content: center; gap: 7px; margin-top: 30px; flex-wrap: wrap; }
.mk-search-pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mk-border); border-radius: 9px; text-decoration: none; background: #fff; }
.mk-search-pagination .page-numbers.current { background: var(--mk-red); border-color: var(--mk-red); color: #fff; }
.mk-search-articles { padding-bottom: 24px; }

@media (max-width: 600px) {
    .mk-search-hero { padding: 38px 0; }
    .mk-search-hero h1 { font-size: 32px; }
}

/* Filter Bar */
.mkshop-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--mk-soft);
    border-radius: var(--mk-radius);
    border: 1px solid var(--mk-border);
}
.mkshop-filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.mkshop-filter-label {
    font-weight: 700;
    color: var(--mk-text);
    font-size: 15px;
}
.mkshop-filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.mkshop-filter-pills::-webkit-scrollbar {
    display: none;
}
.mkshop-filter-pill {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--mk-border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--mk-text);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.mkshop-filter-pill:hover {
    border-color: var(--mk-red);
    color: var(--mk-red);
}
.mkshop-filter-pill.active {
    background: var(--mk-red);
    border-color: var(--mk-red);
    color: #fff;
    box-shadow: 0 4px 12px rgba(227,30,36,0.2);
}
.site-main {
    transition: opacity 0.3s ease;
}

/* Chat Balloon */
.mkshop-chat-balloon-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.mkshop-chat-balloon-panel {
    background: #fff;
    width: 280px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid var(--mk-border);
    margin-bottom: 16px;
    overflow: hidden;
    transform-origin: bottom right;
}
.mkshop-chat-balloon-header {
    background: var(--mk-red);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mkshop-chat-balloon-header strong {
    font-size: 15px;
}
.mkshop-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}
.mkshop-chat-close:hover {
    opacity: 1;
}
.mkshop-chat-balloon-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mkshop-chat-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s ease;
}
.mkshop-chat-btn:hover, .mkshop-chat-btn:focus {
    color: inherit;
}
.mkshop-chat-messenger {
    background: #eef2ff;
    color: #0084ff;
}
.mkshop-chat-messenger:hover {
    background: #0084ff;
    color: #fff;
}
.mkshop-chat-zalo {
    background: #e8f4fd;
    color: #0068ff;
}
.mkshop-chat-zalo:hover {
    background: #0068ff;
    color: #fff;
}
.mkshop-chat-phone {
    background: #e6f4ea;
    color: #137333;
}
.mkshop-chat-phone:hover {
    background: #137333;
    color: #fff;
}
.zalo-icon-text {
    font-weight: 900;
    font-size: 14px;
    letter-spacing: -0.5px;
    background: currentColor;
    color: #fff;
    padding: 2px 6px;
    border-radius: 6px;
}
.mkshop-chat-zalo:hover .zalo-icon-text {
    background: #fff;
    color: #0068ff;
}
.mkshop-chat-balloon-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--mk-border);
    text-align: center;
    color: var(--mk-muted);
    font-size: 12px;
}
.mkshop-chat-balloon-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--mk-red);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(227,30,36,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: 0.3s ease;
}
.mkshop-chat-balloon-toggle:hover {
    transform: scale(1.05);
    background: var(--mk-red-dark);
}
.mkshop-chat-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: #ff3b30;
    border: 2px solid #fff;
    border-radius: 50%;
}
.mkshop-chat-tooltip {
    position: absolute;
    right: 76px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: #fff;
    color: var(--mk-text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    border: 1px solid var(--mk-border);
}
.mkshop-chat-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid #fff;
}
.mkshop-chat-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
@media (max-width: 782px) {
    .mkshop-chat-balloon-wrapper {
        bottom: 80px;
        right: 16px;
    }
}

/* Single Product Enhancements */
.mkshop-sticky-add-to-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 999;
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 10px 0;
    border-top: 1px solid var(--mk-border);
}
.mkshop-sticky-add-to-cart.is-visible {
    transform: translateY(0);
}
.mkshop-sticky-atc__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.mkshop-sticky-atc__product {
    display: flex;
    align-items: center;
    gap: 15px;
}
.mkshop-sticky-atc__product img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}
.mkshop-sticky-atc__info {
    display: flex;
    flex-direction: column;
}
.mkshop-sticky-atc__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--mk-black);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mkshop-sticky-atc__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--mk-red);
}
.mkshop-sticky-atc__price del {
    color: var(--mk-muted);
    font-weight: 400;
    font-size: 12px;
    margin-right: 5px;
}
.mkshop-sticky-atc__action .button {
    margin: 0 !important;
    min-height: 40px !important;
    padding: 0 24px !important;
    border-radius: 8px !important;
    background: var(--mk-red) !important;
    color: #fff !important;
    font-weight: 700 !important;
}
.mkshop-sticky-atc__action .button:hover {
    background: var(--mk-red-dark) !important;
}
@media (max-width: 782px) {
    .mkshop-sticky-add-to-cart {
        bottom: 60px;
    }
    .mkshop-sticky-atc__product {
        display: none;
    }
    .mkshop-sticky-atc__inner {
        justify-content: center;
    }
    .mkshop-sticky-atc__action {
        width: 100%;
    }
    .mkshop-sticky-atc__action .button {
        width: 100%;
        min-height: 44px !important;
    }
}

/* PLP AJAX Filters & Load More */
.products.is-loading, #secondary.is-loading {
    opacity: 0.5;
    pointer-events: none;
}
.mkshop-load-more-wrap {
    text-align: center;
    padding: 30px 0;
    clear: both;
}
.mkshop-load-more {
    background: var(--mk-red);
    color: #fff;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 700;
    border: none;
    transition: background 0.3s;
}
.mkshop-load-more:hover {
    background: var(--mk-red-dark);
}
.mkshop-load-more.is-loading {
    opacity: 0.7;
    pointer-events: none;
}


.mkshop-loop-swatches {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
}
.mkshop-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #ddd;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: transform 0.2s, border-color 0.2s;
}
.mkshop-swatch:hover, .mkshop-swatch.active {
    transform: scale(1.15);
    border-color: var(--mk-red);
}
.mkshop-swatch-more {
    font-size: 12px;
    color: var(--mk-muted);
    line-height: 20px;
}

/* ==========================================================================
   MKShop UI Hotfix 0.6.4
   ========================================================================== */

/* --------------------------------------------------------------------------
   HEADER DESKTOP
   - Tăng logo rõ rệt
   - Giữ header gọn, không chiếm quá nhiều chiều cao
   -------------------------------------------------------------------------- */
@media (min-width: 783px) {
    body:not(.mkshop-modern-checkout) .mk-header__main {
        display: grid !important;
        grid-template-columns: auto minmax(320px, 1fr) auto !important;
        grid-template-areas: "brand search actions" !important;
        align-items: center !important;
        column-gap: 18px !important;
        row-gap: 0 !important;
        min-height: 78px !important;
    }

    body:not(.mkshop-modern-checkout)
    .mk-header__main > .mk-menu-toggle {
        display: none !important;
        grid-area: none !important;
    }

    body:not(.mkshop-modern-checkout)
    .mk-header__main > .mk-brand {
        grid-area: brand !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body:not(.mkshop-modern-checkout)
    .mk-brand .custom-logo-link {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body:not(.mkshop-modern-checkout)
    .mk-brand img.custom-logo,
    body:not(.mkshop-modern-checkout)
    .mk-header__main img.custom-logo {
        display: block !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        object-position: left center !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body:not(.mkshop-modern-checkout)
    .mk-header__main > .mk-search-wrap {
        grid-area: search !important;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body:not(.mkshop-modern-checkout)
    .mk-header__main .mk-search-form {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    body:not(.mkshop-modern-checkout)
    .mk-header__main > .mk-header-actions {
        grid-area: actions !important;
        display: flex !important;
        align-items: center !important;
        justify-self: end !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        gap: 10px !important;
        margin: 0 !important;
    }
}

/* Desktop nhỏ hơn: thu logo nhẹ */
@media (min-width: 783px) and (max-width: 1080px) {
    body:not(.mkshop-modern-checkout) .mk-header__main {
        grid-template-columns: auto minmax(220px, 1fr) auto !important;
        column-gap: 12px !important;
    }

}

/* --------------------------------------------------------------------------
   SINGLE PRODUCT LAYOUT
   - Căn top 2 cột
   - Dùng grid ổn định
   -------------------------------------------------------------------------- */
body.single-product #primary,
body.single-product .content-area,
body.single-product .site-main {
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    clear: both !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (min-width: 900px) {
    body.single-product
    .site-main div.product.type-product {
        display: grid !important;
        grid-template-columns:
            minmax(0, 1.14fr)
            minmax(390px, 0.86fr) !important;
        column-gap: 34px !important;
        row-gap: 34px !important;
        align-items: start !important;
        width: 100% !important;
        max-width: none !important;
        margin-top: 0 !important;
    }

    body.single-product
    .site-main div.product.type-product
    > .woocommerce-product-gallery {
        grid-column: 1 !important;
        grid-row: 1 !important;
        align-self: start !important;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;
        position: relative !important;
        top: auto !important;
        inset: auto !important;
        transform: none !important;
        margin: 0 !important;
    }

    body.single-product
    .site-main div.product.type-product
    > .summary.entry-summary {
        grid-column: 2 !important;
        grid-row: 1 !important;
        align-self: start !important;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        inset: auto !important;
        transform: none !important;
        margin: 0 !important;
        padding-top: 14px !important;
        box-sizing: border-box !important;
    }

    body.single-product
    .site-main div.product.type-product
    > .woocommerce-tabs,

    body.single-product
    .site-main div.product.type-product
    > section.related,

    body.single-product
    .site-main div.product.type-product
    > section.upsells,

    body.single-product
    .site-main div.product.type-product
    > section.products {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 899px) {
    body.single-product
    .site-main div.product.type-product {
        display: block !important;
        width: 100% !important;
    }

    body.single-product
    .site-main div.product.type-product
    > .woocommerce-product-gallery,

    body.single-product
    .site-main div.product.type-product
    > .summary.entry-summary {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
        position: static !important;
        inset: auto !important;
        transform: none !important;
        margin: 0 0 24px !important;
    }
}

/* --------------------------------------------------------------------------
   CTA BUTTONS
   - Hai nút cùng chiều rộng, cùng chiều cao, cùng bố cục
   - Thêm vào giỏ: secondary
   - Mua ngay: primary
   -------------------------------------------------------------------------- */
body.single-product .summary.entry-summary form.cart {
    display: block !important;
    width: 100% !important;
    margin: 22px 0 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
}

body.single-product .summary.entry-summary form.cart .quantity {
    margin-bottom: 12px !important;
}

body.single-product .summary.entry-summary form.cart .single_add_to_cart_button,
body.single-product .summary.entry-summary form.cart button.single_add_to_cart_button,
body.single-product .summary.entry-summary form.cart .button.single_add_to_cart_button,
body.single-product .summary.entry-summary .mk-buy-now-button,
body.single-product .summary.entry-summary .mkshop-buy-now,
body.single-product .summary.entry-summary .buy-now.button,
body.single-product .summary.entry-summary > a.button:not(.single_add_to_cart_button) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: 58px !important;
    height: 58px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    padding: 0 20px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all .2s ease !important;
}

/* Thêm vào giỏ hàng */
body.single-product .summary.entry-summary form.cart .single_add_to_cart_button,
body.single-product .summary.entry-summary form.cart button.single_add_to_cart_button,
body.single-product .summary.entry-summary form.cart .button.single_add_to_cart_button {
    background: #ffffff !important;
    color: #111827 !important;
    border: 2px solid #d9dde3 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

body.single-product .summary.entry-summary form.cart .single_add_to_cart_button:hover,
body.single-product .summary.entry-summary form.cart button.single_add_to_cart_button:hover,
body.single-product .summary.entry-summary form.cart .button.single_add_to_cart_button:hover {
    background: #f8fafc !important;
    border-color: #cdd3db !important;
    color: #111827 !important;
    transform: translateY(-1px) !important;
}

/* Mua ngay */
body.single-product .summary.entry-summary .mk-buy-now-button,
body.single-product .summary.entry-summary .mkshop-buy-now,
body.single-product .summary.entry-summary .buy-now.button,
body.single-product .summary.entry-summary > a.button:not(.single_add_to_cart_button) {
    background: #ef1c25 !important;
    color: #ffffff !important;
    border: 2px solid #ef1c25 !important;
    box-shadow: 0 10px 24px rgba(239, 28, 37, 0.18) !important;
    margin: 12px 0 0 !important;
}

body.single-product .summary.entry-summary .mk-buy-now-button:hover,
body.single-product .summary.entry-summary .mkshop-buy-now:hover,
body.single-product .summary.entry-summary .buy-now.button:hover,
body.single-product .summary.entry-summary > a.button:not(.single_add_to_cart_button):hover {
    background: #d9161f !important;
    border-color: #d9161f !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Nếu theme bọc link mua ngay trong wrapper riêng */
body.single-product .summary.entry-summary .mk-buy-now-wrap,
body.single-product .summary.entry-summary .mkshop-buy-now-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile */
@media (max-width: 767px) {
    body.single-product .summary.entry-summary form.cart .single_add_to_cart_button,
    body.single-product .summary.entry-summary form.cart button.single_add_to_cart_button,
    body.single-product .summary.entry-summary form.cart .button.single_add_to_cart_button,
    body.single-product .summary.entry-summary .mk-buy-now-button,
    body.single-product .summary.entry-summary .mkshop-buy-now,
    body.single-product .summary.entry-summary .buy-now.button,
    body.single-product .summary.entry-summary > a.button:not(.single_add_to_cart_button) {
        min-height: 52px !important;
        height: 52px !important;
        border-radius: 14px !important;
        font-size: 16px !important;
    }
}

