/**
 * Single WC product page — Mockup Room overrides on top of catalog-product.css.
 * Load order: catalog-product.css first (shared shell), then this file.
 */

/* ─── Shell wrapper ─────────────────────────────────────── */
.mk-wc-page {
    font-family: var(--mk-font-body, 'Fira Go', sans-serif);
    color: var(--mk-text, #111);
    background: #fff;
}

/* ─── Breadcrumb (WC-rendered) ─────────────────────────── */
.mk-wc-breadcrumb {
    padding: 16px 5%;
    background: var(--mk-gallery-bg, #f8f8f8);
    font-size: 12px;
    color: var(--mk-text-muted, #999);
}
.mk-wc-breadcrumb .woocommerce-breadcrumb {
    margin: 0;
    padding: 0;
    font-size: inherit;
    color: inherit;
}
.mk-wc-breadcrumb a {
    color: var(--mk-text-sec, #666);
    text-decoration: none;
}
.mk-wc-breadcrumb a:hover {
    color: var(--mk-text, #111);
}
.mk-wc-breadcrumb svg {
    width: 12px; height: 12px; opacity: .4; vertical-align: middle; margin: 0 6px;
}

/* ─── Hero (mirrors .mk-product-hero from catalog page) ─── */
.mk-wc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    background: #fff;
}
.mk-wc-hero .mk-product-info {
    padding: 56px 5% 48px;
    overflow: hidden;
}

/* ─── Info column ───────────────────────────────────────── */
.mk-info-head {
    margin-bottom: 18px;
}
.mk-info-brand {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--mk-text-muted, #999);
}
.mk-info-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.5px;
    color: var(--mk-text, #111);
}
.mk-info-sku {
    margin: 0;
    font-size: 11px;
    color: var(--mk-text-muted, #999);
}
.mk-info-sku span {
    color: var(--mk-text-sec, #666);
}

/* ─── Price (initial + variation-updated) ─────────────── */
.mk-wc-price-wrap {
    margin: 18px 0 14px;
}
.mk-wc-price,
.mk-wc-price .price,
.woocommerce-variation-price .price {
    font-size: 26px;
    font-weight: 800;
    color: var(--mk-text, #111);
    line-height: 1.1;
}
.mk-wc-price del,
.woocommerce-variation-price del {
    color: var(--mk-text-muted, #999);
    font-size: 18px;
    font-weight: 500;
    margin-right: 10px;
}
.mk-wc-price ins,
.woocommerce-variation-price ins {
    background: transparent;
    text-decoration: none;
    color: var(--mk-text, #111);
}

/* ─── Short description ─────────────────────────────────── */
.mk-wc-short-desc {
    font-size: 14px;
    line-height: 1.55;
    color: var(--mk-text-sec, #555);
    margin-bottom: 8px;
}
.mk-wc-short-desc p:last-child { margin-bottom: 0; }

/* ─── Divider — already in catalog-product.css as .mk-divider ─── */

/* ─── Variation pills ─────────────────────────────────── */
.mk-wc-attr {
    margin-bottom: 18px;
}
.mk-wc-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-wc-attr__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mk-wc-pill {
    background: #fff;
    border: 1.5px solid var(--mk-border, #e8e5e0);
    border-radius: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--mk-text, #111);
    cursor: pointer;
    transition: all .2s ease;
    line-height: 1;
}
.mk-wc-pill:hover {
    border-color: var(--mk-text, #111);
}
.mk-wc-pill.is-active {
    background: var(--mk-text, #111);
    color: #fff;
    border-color: var(--mk-text, #111);
}

/* Hide WC's native variation table entirely — we render pills above */
.mk-wc-variations-form .variations,
.mk-wc-variations-form table.variations {
    display: none !important;
}
/* Hide the visually-hidden selects (kept in DOM for WC JS) */
.mk-wc-attr__select {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* WC's reset link — we let it show only when a variation is picked */
.mk-wc-variations-form .reset_variations {
    display: inline-block !important;
    margin-top: 6px;
    font-size: 11px;
    color: var(--mk-text-muted, #999);
    text-decoration: underline;
}

/* WC's variation-info slot — show the price and stock that WC injects */
.woocommerce-variation {
    margin: 16px 0;
}
.woocommerce-variation-price {
    margin-bottom: 8px;
}
.woocommerce-variation-availability,
.stock {
    font-size: 13px;
    color: #16a34a;
    margin-bottom: 0;
}
.stock.out-of-stock {
    color: #dc2626;
}

/* ─── Quantity selector + add-to-cart row ───────────────── */
.mk-wc-cart-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.mk-wc-qty {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--mk-border, #e8e5e0);
    border-radius: 10px;
    overflow: hidden;
    height: 50px;
    flex-shrink: 0;
}
.mk-wc-qty-btn {
    width: 40px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: var(--mk-text, #111);
    transition: background .15s;
    line-height: 1;
}
.mk-wc-qty-btn:hover { background: #f5f5f5; }
.mk-wc-qty-input {
    width: 44px;
    border: none;
    border-left: 1.5px solid var(--mk-border, #e8e5e0);
    border-right: 1.5px solid var(--mk-border, #e8e5e0);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--mk-text, #111);
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
}
.mk-wc-qty-input::-webkit-outer-spin-button,
.mk-wc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add-to-cart — match `.mk-btn-cart` from catalog-product.css.
 * Use !important on background because WC's own stylesheet + most themes
 * style `.button.alt` with their accent color, often with !important
 * themselves. We need to win the cascade unconditionally. */
.mk-wc-page .mk-btn-cart,
.mk-wc-page .single_add_to_cart_button,
.mk-wc-page button.single_add_to_cart_button.button.alt {
    flex: 1;
    min-height: 50px;
    height: 50px;
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: .3px !important;
    text-transform: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .2s, transform .15s;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
.mk-wc-page .mk-btn-cart:hover:not(:disabled),
.mk-wc-page .single_add_to_cart_button:hover:not(:disabled),
.mk-wc-page button.single_add_to_cart_button.button.alt:hover:not(:disabled) {
    background: #000 !important;
    background-color: #000 !important;
    color: #fff !important;
    transform: translateY(-1px);
}
.mk-wc-page .mk-btn-cart:disabled,
.mk-wc-page .single_add_to_cart_button:disabled,
.mk-wc-page button.single_add_to_cart_button.button.alt:disabled {
    background: #ccc !important;
    background-color: #ccc !important;
    cursor: not-allowed;
    color: #fff !important;
    transform: none;
}

/* Wishlist button — same pattern as catalog */
.mk-wc-page .mk-btn-wishlist {
    width: 50px;
    height: 50px;
    background: #fff;
    border: 1.5px solid var(--mk-border, #e8e5e0);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mk-text-muted, #999);
    transition: all .2s;
    flex-shrink: 0;
}
.mk-wc-page .mk-btn-wishlist:hover { color: #d63638; border-color: #d63638; }
.mk-wc-page .mk-btn-wishlist.active { color: #d63638; border-color: #d63638; }

/* Stock state for simple products */
.mk-wc-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
}
.mk-wc-stock-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor;
}
.mk-wc-stock--in  { background: rgba(22,163,74,.08); color: #16a34a; }
.mk-wc-stock--out { background: rgba(220,38,38,.08); color: #dc2626; }

/* Categories / tags meta */
.mk-wc-meta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--mk-border, #e8e5e0);
    font-size: 12px;
    color: var(--mk-text-sec, #666);
}
.mk-wc-meta p {
    margin: 0 0 4px;
}
.mk-wc-meta-label {
    font-weight: 600;
    color: var(--mk-text, #111);
    margin-right: 4px;
}

/* ─── Tabs (WC native, restyled) ─────────────────────── */
.mk-wc-tabs-wrap {
    padding: 60px 5%;
    max-width: 1180px;
    margin: 0 auto;
}
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    border: none;
    border-bottom: 1px solid var(--mk-border, #e8e5e0);
}
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs::before { display: none; }
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs li {
    background: none;
    border: none;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    margin: 0;
    padding: 0;
}
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs li::before,
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs li::after { display: none; }
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--mk-text-muted, #999);
    text-transform: none;
    text-decoration: none;
    transition: color .15s;
}
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs li.active {
    border-bottom-color: var(--mk-text, #111);
}
.mk-wc-tabs-wrap .woocommerce-tabs ul.tabs li.active a {
    color: var(--mk-text, #111);
}
.mk-wc-tabs-wrap .woocommerce-Tabs-panel {
    font-size: 14px;
    line-height: 1.7;
    color: var(--mk-text-sec, #444);
}
.mk-wc-tabs-wrap .woocommerce-Tabs-panel h2 {
    display: none; /* WC repeats the tab label as h2 — redundant */
}
.mk-wc-tabs-wrap .woocommerce-Tabs-panel--additional_information table.shop_attributes {
    width: 100%;
    border-collapse: collapse;
}
.mk-wc-tabs-wrap table.shop_attributes th {
    width: 30%;
    padding: 12px 0;
    border-bottom: 1px solid var(--mk-border, #e8e5e0);
    font-size: 12px;
    font-weight: 700;
    color: var(--mk-text, #111);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.mk-wc-tabs-wrap table.shop_attributes td {
    padding: 12px 0;
    border-bottom: 1px solid var(--mk-border, #e8e5e0);
    font-size: 13px;
    color: var(--mk-text-sec, #555);
}

/* ─── Reviews tab ────────────────────────────────────── */
/* WC's reviews tab applies left-floats to the comment list and the
 * "leave a reply" form, which makes them stack on the left of the
 * panel and break the layout. Reset to normal block flow. */
.mk-wc-tabs-wrap #reviews,
.mk-wc-tabs-wrap .woocommerce-Reviews,
.mk-wc-tabs-wrap #comments,
.mk-wc-tabs-wrap #review_form_wrapper,
.mk-wc-tabs-wrap #respond {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    clear: both;
}
.mk-wc-tabs-wrap #reviews .commentlist,
.mk-wc-tabs-wrap ol.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.mk-wc-tabs-wrap ol.commentlist li {
    padding: 16px 0;
    border-bottom: 1px solid var(--mk-border, #e8e5e0);
    list-style: none;
    margin: 0;
}
.mk-wc-tabs-wrap ol.commentlist li img.avatar {
    float: left;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    border: 1px solid var(--mk-border, #e8e5e0);
}
.mk-wc-tabs-wrap .comment-text {
    overflow: hidden;
}
.mk-wc-tabs-wrap .woocommerce-noreviews,
.mk-wc-tabs-wrap p.no-comments {
    padding: 24px;
    background: #fafafa;
    border-radius: 8px;
    color: var(--mk-text-muted, #999);
    text-align: center;
    font-size: 13px;
}

/* Review form */
.mk-wc-tabs-wrap #respond h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--mk-text, #111);
}
.mk-wc-tabs-wrap #commentform {
    max-width: 640px;
}
.mk-wc-tabs-wrap #commentform p {
    margin: 0 0 14px;
}
.mk-wc-tabs-wrap #commentform label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--mk-text, #111);
}
.mk-wc-tabs-wrap #commentform input[type="text"],
.mk-wc-tabs-wrap #commentform input[type="email"],
.mk-wc-tabs-wrap #commentform input[type="url"],
.mk-wc-tabs-wrap #commentform textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--mk-border, #e8e5e0);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
    box-sizing: border-box;
}
.mk-wc-tabs-wrap #commentform textarea {
    min-height: 100px;
    resize: vertical;
}
.mk-wc-tabs-wrap #commentform input[type="submit"] {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}
.mk-wc-tabs-wrap #commentform input[type="submit"]:hover {
    background: #000;
}

/* Star rating selector */
.mk-wc-tabs-wrap .stars {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

/* ─── Related grid (WC) — reuses .mk-related-* from catalog ─── */
.mk-related-card-meta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--mk-text-muted, #999);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
    .mk-wc-hero {
        grid-template-columns: 1fr;
    }
    .mk-wc-hero .mk-product-info {
        padding: 32px 5% 40px;
    }
    .mk-info-title {
        font-size: 22px;
    }
    .mk-wc-tabs-wrap {
        padding: 32px 5%;
    }
    .mk-wc-tabs-wrap .woocommerce-tabs ul.tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mk-wc-tabs-wrap .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 480px) {
    .mk-wc-cart-row {
        flex-wrap: wrap;
    }
    .mk-wc-cart-row .mk-btn-cart {
        flex: 1 1 100%;
        order: 2;
    }
    .mk-wc-qty {
        order: 1;
    }
    .mk-wc-page .mk-btn-wishlist {
        order: 1;
    }
}
