/**
 * Catalog Product Page — Frontend Styles
 * Based on Ardesia 3 Columns prototype design.
 */

:root {
    --mk-yellow: #F2EC19;
    --mk-dark: #1a1a1a;
    --mk-ease: cubic-bezier(.25,.8,.25,1);
    --mk-bg: #f5f3ef;
    --mk-text: #111;
    --mk-text-sec: #666;
    --mk-text-muted: #999;
    --mk-border: #e8e5e0;
    --mk-gallery-bg: #f8f8f8;
}

/* ── Breadcrumb ──────────────────────────────────── */

.mk-breadcrumb {
    padding: 16px 5%;
    font-size: 12px;
    color: var(--mk-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--mk-gallery-bg);
    flex-wrap: wrap;
}
.mk-breadcrumb a { color: var(--mk-text-sec); text-decoration: none; transition: color .2s; }
.mk-breadcrumb a:hover { color: var(--mk-text); }
.mk-breadcrumb svg { width: 12px; height: 12px; opacity: .4; flex-shrink: 0; }
.mk-breadcrumb .current { color: var(--mk-text); font-weight: 600; }

/* ── Product Hero ────────────────────────────────── */

.mk-product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: calc(100vh - 48px);
}

/* ── Gallery ─────────────────────────────────────── */

.mk-product-gallery {
    background: var(--mk-gallery-bg);
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Was `height: 100vh; position: sticky` — that made the gallery feel
     * like a full-screen panel. Normal block flow keeps it 100% of its
     * column instead. */
}
.mk-gallery-main {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mk-gallery-main img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.08));
    transition: opacity .3s ease, transform .6s var(--mk-ease);
}
.mk-gallery-main:hover img { transform: scale(1.02); }

/* Cover mode (single-image products with the per-product "Cover" toggle on)
 * fills the gallery section edge-to-edge with the featured image. */
.mk-gallery-main[data-fit="cover"] {
    width: 100%;
    max-width: none;
    height: 100%;
    align-self: stretch;
}
.mk-gallery-main[data-fit="cover"] img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    filter: none;
}
.mk-gallery-thumbs { display: flex; gap: 12px; margin-top: 24px; }
.mk-gallery-thumb {
    width: 68px; height: 68px; background: #fff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 2px solid transparent; transition: all .3s;
    overflow: hidden; padding: 6px;
}
.mk-gallery-thumb:hover, .mk-gallery-thumb.active {
    border-color: var(--mk-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.mk-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* ── Product Info ────────────────────────────────── */

.mk-product-info { padding: 40px 50px 120px 40px; overflow-y: auto; }
.mk-product-brand {
    font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
    color: var(--mk-text-muted); font-weight: 700; margin-bottom: 10px;
}
.mk-product-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 38px; font-weight: 800; line-height: 1.15;
    letter-spacing: -1px; margin-bottom: 6px;
}
.mk-product-subtitle { font-size: 14px; color: var(--mk-text-sec); line-height: 1.6; margin-bottom: 20px; }
.mk-product-badges { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.mk-badge {
    padding: 5px 12px; border-radius: 100px; font-size: 10px;
    font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.mk-badge-order { background: #fff3e0; color: #e65100; }
.mk-badge-stock { background: #e8f5e9; color: #2e7d32; }
.mk-badge-warranty { background: #fff8e1; color: #f57f17; }
.mk-badge-eco { background: #e3f2fd; color: #1565c0; }
.mk-badge-custom { background: #f3e5f5; color: #7b1fa2; }
.mk-divider { height: 1px; background: var(--mk-border); margin: 22px 0; }

/* ── Configurator ────────────────────────────────── */

.mk-config-block { margin-bottom: 20px; }
.mk-config-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--mk-text-muted); margin-bottom: 10px;
}
.mk-variation-options { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-var-pill {
    padding: 8px 16px; border: 1.5px solid var(--mk-border); border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
    background: #fff; color: var(--mk-text-sec); font-family: inherit;
}
.mk-var-pill:hover { border-color: #bbb; }
.mk-var-pill.active { border-color: var(--mk-dark); background: var(--mk-dark); color: #fff; }
.mk-var-pill small { font-size: 9px; font-weight: 400; opacity: .6; }

.mk-section-row { display: flex; align-items: center; gap: 14px; }
.mk-section-selector {
    display: flex; align-items: center; background: #fff;
    border: 1.5px solid var(--mk-border); border-radius: 10px; overflow: hidden;
}
.mk-sec-btn, .mk-qty-btn {
    width: 38px; height: 38px; border: none; background: transparent;
    font-size: 18px; cursor: pointer; color: var(--mk-text-sec);
    transition: all .15s; display: flex; align-items: center; justify-content: center;
    font-family: inherit;
}
.mk-sec-btn:hover, .mk-qty-btn:hover { background: #f5f5f5; }
.mk-sec-btn:active, .mk-qty-btn:active { background: var(--mk-yellow); color: #000; }
.mk-sec-count, .mk-qty-count {
    width: 48px; text-align: center; font-size: 16px; font-weight: 800;
    border-left: 1px solid var(--mk-border); border-right: 1px solid var(--mk-border);
    height: 38px; display: flex; align-items: center; justify-content: center;
}
.mk-section-hint { font-size: 11px; color: var(--mk-text-muted); }

/* ── Colors ──────────────────────────────────────── */

.mk-color-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mk-color-palette { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ─── Color groups (one row per group when product has >1) ─── */
.mk-color-groups { display: flex; flex-direction: column; gap: 14px; }
.mk-color-group { display: flex; flex-direction: column; gap: 6px; }
.mk-color-group__title {
    font-size: 11px;
    font-weight: 700;
    color: var(--mk-text-muted);
    letter-spacing: .04em;
    text-transform: none;
}

/* +N indicator when a group has more colors than the inline cap */
.mk-color-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    background: #f5f5f5;
    color: var(--mk-text-sec);
    font-size: 12px;
    font-weight: 600;
    border: 1.5px dashed #d0d0d0;
}

/* Texture swatch — square tile showing the uploaded image.
 * Background is solid white so PNG textures with transparent or pale areas
 * don't go grey from a tinted fallback bleeding through. A subtle 1px
 * border keeps very-pale swatches visually defined against the white card. */
.mk-color-swatch {
    width: 38px; height: 38px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    padding: 0;
    background: #fff center / cover no-repeat;
    background-image: var(--swatch-img, none);
}
.mk-color-swatch:hover {
    transform: scale(1.08);
    border-color: rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

/* Active state — dark frame + inset white "double border" effect */
.mk-color-swatch.active {
    border-color: var(--mk-dark);
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.12);
}
.mk-color-swatch.active::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px #fff;
    pointer-events: none;
}

/* Hover tooltip — large preview of the texture (reuses the same
 * --swatch-img custom property the swatch itself uses, so there's
 * no duplication of the image URL anywhere). */
.mk-color-swatch::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 140px;
    height: 140px;
    background: #fff var(--swatch-img, none) center / cover no-repeat;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .22s ease;
    z-index: 100;
}
.mk-color-swatch:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Hide the hover preview on touch devices — tap-triggered :hover would
 * leave a 140px tile floating until the user taps elsewhere, which is
 * confusing on small screens. */
@media (hover: none) {
    .mk-color-swatch::after { display: none; }
}

.mk-color-name { font-size: 12px; font-weight: 600; }
.mk-color-catalog-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; color: var(--mk-dark);
    background: none; border: 1.5px solid var(--mk-border);
    padding: 7px 16px; border-radius: 100px; cursor: pointer;
    transition: all .2s; margin-top: 10px; text-transform: uppercase;
    letter-spacing: .5px; font-family: inherit;
}
.mk-color-catalog-btn:hover { border-color: var(--mk-dark); background: #fff; }

/* ── Purchase Block ──────────────────────────────── */

.mk-purchase {
    background: #fff; border: 2px solid var(--mk-dark); border-radius: 16px;
    padding: 22px 24px; position: relative;
}
.mk-purchase-accent {
    position: absolute; top: -2px; left: 24px; right: 24px;
    height: 3px; background: var(--mk-yellow); border-radius: 0 0 4px 4px;
}
.mk-purchase-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.mk-price-per { font-size: 12px; color: var(--mk-text-muted); }
.mk-price-per strong { color: var(--mk-text); }
.mk-currency-toggle { display: flex; gap: 4px; }
.mk-cur-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--mk-border);
    background: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: all .2s; display: flex; align-items: center; justify-content: center;
    font-family: inherit; color: var(--mk-text-sec);
}
.mk-cur-btn:hover { border-color: #bbb; }
.mk-cur-btn.active { background: var(--mk-dark); color: #fff; border-color: var(--mk-dark); }
.mk-price-total { font-size: 34px; font-weight: 900; letter-spacing: -1px; }
.mk-price-rate { font-size: 11px; color: var(--mk-text-muted); margin-bottom: 16px; }
.mk-cart-row { display: flex; gap: 10px; }
.mk-btn-cart {
    flex: 1; height: 52px; background: var(--mk-dark); color: #fff; border: none;
    border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer;
    transition: all .3s var(--mk-ease); display: flex; align-items: center;
    justify-content: center; gap: 10px; font-family: inherit; letter-spacing: .3px;
}
.mk-btn-cart:hover {
    background: #000; transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.mk-btn-cart.added { background: #27ae60; }
.mk-btn-wishlist {
    width: 52px; height: 52px; background: #fff; border: 1.5px solid var(--mk-border);
    border-radius: 12px; cursor: pointer; transition: all .3s;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    padding: 0;
}
.mk-btn-wishlist:hover { border-color: #ff4d6d; }
.mk-btn-wishlist:hover svg { color: #ff4d6d; }
.mk-btn-wishlist svg { color: #ccc; transition: color .2s; }
.mk-btn-wishlist.active svg { color: #ff4d6d; fill: #ff4d6d; }

/* ── Features Bar ────────────────────────────────── */

.mk-features-bar { display: grid; grid-template-columns: repeat(4,1fr); background: var(--mk-dark); }
.mk-feature-item {
    padding: 32px 20px; text-align: center; color: #fff;
    border-right: 1px solid rgba(255,255,255,.08);
}
.mk-feature-item:last-child { border-right: none; }
.mk-feature-icon {
    width: 40px; height: 40px; background: rgba(242,236,25,.1); border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.mk-feature-icon svg { color: var(--mk-yellow); }
.mk-feature-item h4 { font-size: 13px; font-weight: 700; margin: 0 0 3px; }
.mk-feature-item p { font-size: 11px; color: rgba(255,255,255,.45); margin: 0; }

/* ── Detail Tabs ─────────────────────────────────── */

.mk-details-section { max-width: 1400px; margin: 0 auto; padding: 40px 5% 80px; }
.mk-tabs-nav { display: flex; border-bottom: 2px solid var(--mk-border); margin-bottom: 40px; }
.mk-tab-btn {
    padding: 14px 28px; font-size: 13px; font-weight: 600; color: var(--mk-text-muted);
    background: none; border: none; cursor: pointer; position: relative;
    transition: color .3s; font-family: inherit;
}
.mk-tab-btn:hover { color: var(--mk-text); }
.mk-tab-btn.active { color: var(--mk-text); font-weight: 700; }
.mk-tab-btn.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 100%;
    height: 3px; background: var(--mk-yellow); border-radius: 2px 2px 0 0;
}
.mk-tab-content { display: none; }
.mk-tab-content.active { display: block; animation: mkFadeUp .35s ease; }
@keyframes mkFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.mk-spec-table { width: 100%; border-collapse: collapse; }
.mk-spec-table tr { border-bottom: 1px solid var(--mk-border); }
.mk-spec-table td { padding: 14px 16px; font-size: 13px; }
.mk-spec-label { font-weight: 600; color: var(--mk-text-sec); width: 220px; }
.mk-desc-content { max-width: 760px; line-height: 1.8; color: var(--mk-text-sec); font-size: 14px; }
.mk-desc-content strong { color: var(--mk-text); }
.mk-dl-link { color: var(--mk-dark); font-weight: 700; text-decoration: underline; }

/* ── Related Products ────────────────────────────── */

.mk-related-section { padding: 0 5% 80px; max-width: 1400px; margin: 0 auto; }
.mk-section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.mk-section-title { font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 0; }
.mk-section-link {
    font-size: 12px; font-weight: 700; color: var(--mk-text); text-decoration: none;
    display: flex; align-items: center; gap: 6px; transition: gap .3s; white-space: nowrap;
}
.mk-section-link:hover { gap: 12px; }
/* Related-products grid — 5 cols desktop, horizontal scroll mobile.
 * Cards inside use the .mk-card markup from class-archive-ajax.php and
 * inherit all their styling from catalog-archive.css (5px radius, square
 * image, hover lift, sale badge, wishlist heart, etc.) — so this rule
 * only governs layout. */
.mk-related-wrap { padding: 0 5%; }
.mk-related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

/* Mobile: horizontal scroll strip, snap-aligned, hidden scrollbar */
@media (max-width: 768px) {
    .mk-related-wrap {
        padding: 0;
    }
    .mk-related-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding: 4px 5% 14px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .mk-related-grid::-webkit-scrollbar { display: none; }
    .mk-related-grid > .mk-card {
        flex: 0 0 70%;
        max-width: 240px;
        min-width: 180px;
        scroll-snap-align: start;
    }
}

/* ── Upsell Section ──────────────────────────────── */

.mk-upsell-section { margin-top: 28px; }
.mk-upsell-section .mk-section-title { font-size: 20px; }
.mk-upsell-row {
    display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
}
.mk-upsell-row::-webkit-scrollbar { display: none; }
.mk-upsell-card {
    flex: 0 0 260px; scroll-snap-align: start; background: #fff; border-radius: 14px;
    overflow: hidden; border: 1px solid var(--mk-border); transition: all .35s var(--mk-ease);
    display: flex; flex-direction: row; height: 110px; position: relative;
}
.mk-upsell-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.07); }
.mk-upsell-card-img {
    width: 95px; flex-shrink: 0; background: var(--mk-bg);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.mk-upsell-card-img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.mk-upsell-card-body {
    padding: 12px 14px; display: flex; flex-direction: column; justify-content: center;
    flex: 1; min-width: 0;
}
.mk-upsell-card-body h4 { font-size: 12px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.mk-upsell-card-body h4 a { color: inherit; text-decoration: none; }
.mk-upsell-card-body p {
    font-size: 10px; color: var(--mk-text-muted); line-height: 1.4; margin: 0 0 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-upsell-price { font-size: 14px; font-weight: 800; }
.mk-upsell-add-btn {
    position: absolute; bottom: 10px; right: 10px; width: 28px; height: 28px;
    background: var(--mk-dark); border: none; border-radius: 6px; color: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .3s; padding: 0;
}
.mk-upsell-add-btn:hover { background: var(--mk-yellow); color: #000; }

/* ── Sticky Bottom Bar ───────────────────────────── */

.mk-sticky-bar {
    position: fixed; bottom: 0; left: 0; width: 100%; z-index: 500;
    background: #fff; border-top: 1px solid var(--mk-border);
    box-shadow: 0 -4px 30px rgba(0,0,0,.08); padding: 12px 5%;
    display: flex; align-items: center; gap: 20px;
    transform: translateY(100%); transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.mk-sticky-bar.visible { transform: translateY(0); }
.mk-sb-product { display: flex; align-items: center; gap: 14px; flex-shrink: 0; min-width: 180px; }
.mk-sb-img {
    width: 44px; height: 44px; background: var(--mk-gallery-bg); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.mk-sb-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mk-sb-title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.mk-sb-subtitle { font-size: 11px; color: var(--mk-text-muted); }
.mk-sb-sep { width: 1px; height: 32px; background: var(--mk-border); flex-shrink: 0; }
.mk-sb-controls { display: flex; align-items: center; gap: 14px; flex: 1; justify-content: flex-end; }
.mk-sb-variations { display: flex; gap: 3px; }
.mk-sb-var-pill {
    padding: 4px 8px; border: 1.5px solid var(--mk-border); border-radius: 5px;
    font-size: 10px; font-weight: 600; cursor: pointer; background: #fff;
    color: var(--mk-text-sec); transition: all .2s; font-family: inherit;
}
.mk-sb-var-pill:hover { border-color: #bbb; }
.mk-sb-var-pill.active { background: var(--mk-dark); color: #fff; border-color: var(--mk-dark); }
.mk-sb-sections {
    display: flex; align-items: center; border: 1.5px solid var(--mk-border);
    border-radius: 7px; overflow: hidden; background: #fff;
}
.mk-sb-sec-btn {
    width: 28px; height: 30px; border: none; background: transparent;
    font-size: 15px; cursor: pointer; color: var(--mk-text-sec);
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; transition: background .15s;
}
.mk-sb-sec-btn:hover { background: #f0f0f0; }
.mk-sb-sec-count {
    width: 32px; text-align: center; font-size: 12px; font-weight: 800;
    border-left: 1px solid var(--mk-border); border-right: 1px solid var(--mk-border);
    height: 30px; display: flex; align-items: center; justify-content: center;
}
.mk-sb-price { font-size: 20px; font-weight: 900; letter-spacing: -.5px; white-space: nowrap; min-width: 80px; text-align: right; }
.mk-sb-cart-btn {
    height: 40px; padding: 0 24px; background: var(--mk-dark); color: #fff; border: none;
    border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer;
    transition: all .3s; font-family: inherit; display: flex; align-items: center;
    gap: 8px; white-space: nowrap;
}
.mk-sb-cart-btn:hover { background: #000; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* ── Color Catalog Modal ─────────────────────────── */

.mk-catalog-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.6); z-index: 9998; opacity: 0; pointer-events: none;
    transition: opacity .3s; backdrop-filter: blur(6px);
}
.mk-catalog-overlay.open { opacity: 1; pointer-events: auto; }
.mk-catalog-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(.92);
    z-index: 9999; background: #fff; border-radius: 20px; width: 92%; max-width: 840px;
    max-height: 85vh; box-shadow: 0 40px 100px rgba(0,0,0,.25);
    opacity: 0; pointer-events: none; transition: all .4s cubic-bezier(.16,1,.3,1);
    display: flex; flex-direction: column;
}
.mk-catalog-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.mk-catalog-header {
    padding: 24px 28px 18px; border-bottom: 1px solid var(--mk-border);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.mk-catalog-header h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 800; margin: 0; }
.mk-catalog-close {
    width: 36px; height: 36px; border-radius: 50%; border: none; background: #f0f0f0;
    cursor: pointer; font-size: 18px; color: #666; display: flex; align-items: center;
    justify-content: center; transition: background .2s;
}
.mk-catalog-close:hover { background: #e0e0e0; }
.mk-catalog-search { margin: 0 28px; padding: 18px 0 14px; flex-shrink: 0; }
.mk-catalog-search input {
    width: 100%; height: 40px; padding: 0 14px; border: 1.5px solid var(--mk-border);
    border-radius: 10px; font-size: 13px; font-family: inherit; outline: none;
    transition: border-color .2s;
}
.mk-catalog-search input:focus { border-color: var(--mk-dark); }
.mk-catalog-body { padding: 0 28px 20px; overflow-y: auto; flex: 1; }
.mk-catalog-group-title {
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px;
    color: var(--mk-text-muted); margin: 18px 0 10px; padding-bottom: 6px;
    border-bottom: 1px solid var(--mk-border);
}
.mk-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 8px; }
.mk-catalog-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
    cursor: pointer; border: 1.5px solid transparent; transition: all .2s;
}
.mk-catalog-item:hover { background: #fafafa; border-color: var(--mk-border); }
.mk-catalog-item.selected { border-color: var(--mk-dark); background: #f8f8f6; }
.mk-catalog-dot {
    width: 32px; height: 32px; border-radius: 6px; flex-shrink: 0;
    background: #f5f5f5 center / cover no-repeat;
    box-shadow: 0 1px 4px rgba(0,0,0,.08); border: 1px solid rgba(0,0,0,.06);
}
.mk-catalog-item-name { font-size: 11px; font-weight: 600; line-height: 1.3; }
.mk-catalog-item-code { font-size: 9px; color: var(--mk-text-muted); }
.mk-catalog-preview {
    margin: 0 28px; padding: 16px 0; border-top: 1px solid var(--mk-border);
    display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}
.mk-catalog-preview-swatch {
    width: 52px; height: 52px; border-radius: 8px;
    background: #f5f5f5 center / cover no-repeat;
    box-shadow: 0 2px 8px rgba(0,0,0,.1); border: 1px solid rgba(0,0,0,.06);
    flex-shrink: 0;
}
.mk-catalog-preview-info h4 { font-size: 15px; font-weight: 700; margin: 0 0 2px; }
.mk-catalog-preview-info p { font-size: 12px; color: var(--mk-text-muted); margin: 0; }
.mk-catalog-apply-btn {
    margin-left: auto; padding: 10px 28px; background: var(--mk-dark); color: #fff;
    border: none; border-radius: 10px; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit; transition: all .2s;
}
.mk-catalog-apply-btn:hover { background: #000; }

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 1100px) {
    .mk-product-hero { grid-template-columns: 1fr; }
    .mk-product-gallery { position: relative; height: auto; min-height: 50vh; padding: 30px; }
    .mk-product-info { padding: 30px 5% 120px; }
    .mk-related-grid { grid-template-columns: repeat(2, 1fr); }
    .mk-features-bar { grid-template-columns: repeat(2, 1fr); }
    .mk-sb-variations { display: none; }
}

@media (max-width: 768px) {
    .mk-product-title { font-size: 28px; }
    .mk-features-bar { grid-template-columns: 1fr 1fr; }
    .mk-related-grid { grid-template-columns: 1fr 1fr; }
    .mk-tabs-nav { overflow-x: auto; }
    .mk-section-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .mk-sb-price { font-size: 18px; }
    .mk-sb-product .mk-sb-subtitle { display: none; }
    .mk-catalog-modal { width: 96%; max-height: 90vh; }
    .mk-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* ═══════════════════════════════════════════════════════
   Inline upsell list (under add-to-cart button)
   ═══════════════════════════════════════════════════════ */
.mk-upsell-inline {
    margin-top: 18px;
    padding: 14px 0 0;
    border-top: 1px solid var(--mk-border, #e8e5e0);
}
.mk-upsell-inline__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--mk-text-muted, #999);
    margin: 0 0 10px;
}
.mk-upsell-inline__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mk-upsell-inline__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #fafafa;
    border: 1px solid var(--mk-border, #e8e5e0);
    border-radius: 8px;
    transition: background .15s;
}
.mk-upsell-inline__item:hover { background: #fff; }
.mk-upsell-inline__media {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mk-upsell-inline__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    box-sizing: border-box;
}
.mk-upsell-inline__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mk-upsell-inline__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--mk-text, #111);
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mk-upsell-inline__name:hover { color: #000; }
.mk-upsell-inline__price {
    font-size: 12px;
    font-weight: 700;
    color: var(--mk-text-sec, #555);
}
.mk-upsell-inline__add {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.mk-upsell-inline__add:hover:not(:disabled) {
    background: #000;
    transform: scale(1.05);
}
.mk-upsell-inline__add:disabled {
    background: #16a34a;
    cursor: default;
}

/* ═══════════════════════════════════════════════════════
   Upsell variant-picker modal
   ═══════════════════════════════════════════════════════ */
.mk-up-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99998;
    backdrop-filter: blur(4px);
}
.mk-up-modal {
    position: fixed;
    z-index: 99999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 480px;
    max-height: 88vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* HTML5 [hidden] normally = display:none, but our explicit `display: flex`
 * + `position: fixed` win the cascade tie. Force-hide when the JS toggles
 * the `hidden` attribute on. Same bug pattern as the phone dropdown. */
.mk-up-modal[hidden],
.mk-up-modal-overlay[hidden] { display: none !important; }
.mk-up-modal__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--mk-border, #e8e5e0);
    flex-shrink: 0;
}
.mk-up-modal__thumb {
    width: 52px;
    height: 52px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 8px;
    padding: 4px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.mk-up-modal__title-wrap { flex: 1; min-width: 0; }
.mk-up-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--mk-text, #111);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mk-up-modal__close {
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}
.mk-up-modal__close:hover { background: #e0e0e0; }
.mk-up-modal__body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.mk-up-modal__loading {
    text-align: center;
    color: var(--mk-text-muted, #999);
    padding: 40px 0;
}
.mk-up-modal__attr { margin-bottom: 18px; }
.mk-up-modal__attr-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--mk-text-sec, #555);
    margin-bottom: 8px;
}
.mk-up-modal__attr-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mk-up-pill {
    padding: 8px 14px;
    background: #fff;
    border: 1.5px solid var(--mk-border, #e8e5e0);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--mk-text, #111);
    cursor: pointer;
    transition: all .15s;
}
.mk-up-pill:hover { border-color: var(--mk-text, #111); }
.mk-up-pill.is-active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.mk-up-modal__colors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mk-up-color {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: #fff center / cover no-repeat;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all .15s;
    padding: 0;
}
.mk-up-color:hover { transform: scale(1.08); border-color: rgba(0, 0, 0, 0.3); }
.mk-up-color.is-active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.15), inset 0 0 0 2px #fff;
}
.mk-up-modal__sections {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--mk-border, #e8e5e0);
    border-radius: 8px;
    overflow: hidden;
}
.mk-up-sec-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    color: var(--mk-text, #111);
}
.mk-up-sec-btn:hover { background: #f5f5f5; }
.mk-up-sec-val {
    min-width: 50px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    border-left: 1.5px solid var(--mk-border, #e8e5e0);
    border-right: 1.5px solid var(--mk-border, #e8e5e0);
    padding: 0 14px;
    line-height: 38px;
}
.mk-up-modal__footer {
    padding: 14px 20px;
    border-top: 1px solid var(--mk-border, #e8e5e0);
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
    flex-shrink: 0;
}
.mk-up-modal__qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--mk-border, #e8e5e0);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
}
.mk-up-modal__qty-btn {
    width: 36px;
    height: 42px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
}
.mk-up-modal__qty-btn:hover { background: #f5f5f5; }
.mk-up-modal__qty-val {
    min-width: 36px;
    line-height: 42px;
    text-align: center;
    font-weight: 700;
    border-left: 1.5px solid var(--mk-border, #e8e5e0);
    border-right: 1.5px solid var(--mk-border, #e8e5e0);
}
.mk-up-modal__add {
    flex: 1;
    height: 44px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s;
}
.mk-up-modal__add:hover:not(:disabled) { background: #000; }
.mk-up-modal__add:disabled { background: #ccc; cursor: not-allowed; }
