/* ── Product Category Archive — Minecraft Club design system ── */

/* Prevent horizontal overflow */
body.woocommerce-page.term-crates,
body.woocommerce-page.tax-product_cat,
body.post-type-archive-product.woocommerce-page { overflow-x: hidden; }
body.woocommerce-page.term-crates *,
body.woocommerce-page.tax-product_cat *,
body.post-type-archive-product.woocommerce-page * { box-sizing: border-box; }

/* Page chrome — nuke *every* intermediate container to zero */
body.woocommerce-page.tax-product_cat #page,
body.woocommerce-page.term-crates #page,
body.post-type-archive-product.woocommerce-page #page {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden;
    background: #f4f1e7;
    display: block !important;
}
body.woocommerce-page.tax-product_cat #page > .site-content,
body.woocommerce-page.term-crates #page > .site-content,
body.post-type-archive-product.woocommerce-page #page > .site-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    flex: none !important;
    overflow-x: hidden;
}
body.woocommerce-page.tax-product_cat .content-area,
body.woocommerce-page.term-crates .content-area,
body.post-type-archive-product.woocommerce-page .content-area {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    order: unset !important;
}
body.woocommerce-page.tax-product_cat .site-main,
body.woocommerce-page.term-crates .site-main,
body.post-type-archive-product.woocommerce-page .site-main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
body.woocommerce-page.tax-product_cat .woocommerce-archive-wrapper,
body.woocommerce-page.term-crates .woocommerce-archive-wrapper,
body.post-type-archive-product.woocommerce-page .woocommerce-archive-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
body.woocommerce-page.tax-product_cat .inside-article,
body.woocommerce-page.term-crates .inside-article,
body.post-type-archive-product.woocommerce-page .inside-article {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
    width: 100% !important;
    max-width: 100% !important;
}
body.woocommerce-page.tax-product_cat .entry-content,
body.woocommerce-page.term-crates .entry-content,
body.post-type-archive-product.woocommerce-page .entry-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Hide sidebars, post headers, WooCommerce headers */
body.woocommerce-page.tax-product_cat .entry-header,
body.woocommerce-page.term-crates .entry-header,
body.post-type-archive-product.woocommerce-page .entry-header,
body.woocommerce-page.tax-product_cat .widget-area,
body.woocommerce-page.term-crates .widget-area,
body.post-type-archive-product.woocommerce-page .widget-area,
body.woocommerce-page.tax-product_cat .page-header,
body.woocommerce-page.term-crates .page-header,
body.post-type-archive-product.woocommerce-page .page-header { display: none !important; }

/* Hide default WooCommerce products header (we have our own mc-cat-header) */
body.woocommerce-page.tax-product_cat .woocommerce-products-header,
body.woocommerce-page.term-crates .woocommerce-products-header,
body.post-type-archive-product.woocommerce-page .woocommerce-products-header { display: none !important; }

/* ---------- Category header ---------- */
.mc-cat-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 70px 24px;
    color: #263c2c;
    background: #eadfbd;
    border-top: 8px solid #69b84a;
    border-bottom: 8px solid #765438;
    box-sizing: border-box;
    text-align: center;
}
.mc-cat-header__inner {
    width: min(1440px, 100%);
    margin: 0 auto;
}
.mc-cat-header__eyebrow {
    width: fit-content;
    margin: 0 auto 18px !important;
    padding: 9px 11px;
    color: #fffdf3;
    background: #2f6b3f;
    border: 2px solid #173c27;
    border-radius: 3px;
    box-shadow: 4px 4px 0 #765438;
    font: 400 10px/1.4 "Press Start 2P", monospace;
    text-transform: uppercase;
}
.mc-cat-header h1 {
    max-width: 760px;
    margin: 0 auto 14px;
    color: #214a30;
    font: 400 clamp(28px, 3.55vw, 48px)/1.18 "Press Start 2P", monospace;
    letter-spacing: -.045em;
    text-transform: uppercase;
}
.mc-cat-header__desc {
    max-width: 680px;
    margin: 0 auto !important;
    color: #40543f;
    font-size: clamp(16px, 1.4vw, 19px);
    font-weight: 700;
    line-height: 1.7;
}

/* ---------- Products grid wrapper ---------- */
.mc-cat-products {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 60px 24px 88px;
    box-sizing: border-box;
}
.mc-cat-products__inner {
    width: min(1440px, 100%);
    margin: 0 auto;
}

/* Override WooCommerce default list */
.mc-cat-products ul.products {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    clear: both;
}
.mc-cat-products ul.products::before,
.mc-cat-products ul.products::after { display: none; }
.mc-cat-products ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
    position: static !important;
}

/* ---------- Product card ---------- */
.mc-cat-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff8df;
    border: 3px solid #173c27;
    border-radius: 5px;
    box-shadow: 8px 8px 0 #8a633e;
    transition: transform 140ms ease, box-shadow 140ms ease;
}
.mc-cat-card:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 #8a633e; }

.mc-cat-card__image {
    position: relative;
    aspect-ratio: 3 / 2;
    display: block;
    overflow: hidden;
    background: #173c27;
    border-bottom: 3px solid #173c27;
}
.mc-cat-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .18s ease;
}
.mc-cat-card:hover .mc-cat-card__image img { transform: scale(1.025); }
.mc-cat-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #fffdf3;
    background: #2f6b3f;
    border: 2px solid #173c27;
    border-radius: 3px;
    font: 400 9px/1.4 "Press Start 2P", monospace;
    text-transform: uppercase;
}

.mc-cat-card__body {
    padding: 24px;
    display: flex;
    flex: 1;
    flex-direction: column;
}
.mc-cat-card__body h2,
.mc-cat-card__body .woocommerce-loop-product__title {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #214a30 !important;
    font: 400 15px/1.45 "Press Start 2P", monospace !important;
    text-transform: uppercase;
}
.mc-cat-card__body h2 a,
.mc-cat-card__body .woocommerce-loop-product__title a {
    color: inherit;
    text-decoration: none;
}
.mc-cat-card__body .woocommerce-product-details__short-description,
.mc-cat-card__body p:not(.mc-cat-card__price):not(.star-rating) {
    margin: 0 0 20px !important;
    flex: 1;
    color: #52634f;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.65;
}
.mc-cat-card__body .star-rating { display: none; }

.mc-cat-card__footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 2px solid #e0d6b8;
}
.mc-cat-card__price {
    margin: 0;
    color: #214a30;
    font: 400 14px/1 "Press Start 2P", monospace;
}
.mc-cat-card__price del {
    display: block;
    color: #a08b6b;
    font-size: 10px;
    text-decoration: line-through;
}
.mc-cat-card__price ins { text-decoration: none; }
.mc-cat-card__price .woocommerce-Price-amount { font: inherit; color: inherit; }
.mc-cat-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    color: #214a30 !important;
    background: #f4c451;
    border: 2px solid #9a6f1e;
    border-radius: 4px;
    box-shadow: 3px 3px 0 #173c27;
    font: 400 9px/1.4 "Press Start 2P", monospace !important;
    text-decoration: none !important;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: none;
}
.mc-cat-card__button:hover,
.mc-cat-card__button:focus-visible {
    color: #fffdf3 !important;
    background: #2f6b3f;
    border-color: #173c27;
}
.mc-cat-card__button:focus-visible { outline: 3px solid #173c27; outline-offset: 3px; }

/* sold individually / out of stock */
.mc-cat-card__button.disabled,
.mc-cat-card__button[disabled] {
    opacity: .55;
    pointer-events: none;
}

/* ---------- No products ---------- */
.mc-cat-products .woocommerce-info,
.mc-cat-products .woocommerce-no-products-found {
    grid-column: 1 / -1;
    padding: 28px 22px;
    color: #40543f;
    background: #fff8df;
    border: 3px solid #765438;
    border-radius: 5px;
    box-shadow: 6px 6px 0 #8a633e;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

/* ---------- Pagination ---------- */
.mc-cat-products .woocommerce-pagination {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}
.mc-cat-products .woocommerce-pagination ul.page-numbers {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    border: none;
}
.mc-cat-products .woocommerce-pagination ul.page-numbers li {
    border: none;
    float: none;
}
.mc-cat-products .woocommerce-pagination ul.page-numbers li .page-numbers {
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #214a30;
    background: #fff8df;
    border: 2px solid #765438;
    border-radius: 4px;
    box-shadow: 3px 3px 0 #8a633e;
    font: 400 11px/1.2 "Press Start 2P", monospace;
    text-decoration: none;
    box-sizing: border-box;
}
.mc-cat-products .woocommerce-pagination ul.page-numbers li .page-numbers.current {
    color: #214a30;
    background: #f4c451;
    border-color: #9a6f1e;
}
.mc-cat-products .woocommerce-pagination ul.page-numbers li .page-numbers:hover {
    color: #fffdf3;
    background: #2f6b3f;
    border-color: #173c27;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .mc-cat-products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
    .mc-cat-header { padding: 56px 12px 48px; border-top-width: 6px; border-bottom-width: 6px; }
    .mc-cat-header h1 { font-size: clamp(24px, 9vw, 36px); }
    .mc-cat-header__eyebrow { font-size: 8px; }
    .mc-cat-header__desc { font-size: 15px; }
    .mc-cat-products { padding: 48px 12px 64px; }
    .mc-cat-products ul.products { grid-template-columns: 1fr; gap: 24px; }
    .mc-cat-card { display: grid; grid-template-columns: minmax(240px, .85fr) minmax(0, 1.15fr); }
    .mc-cat-card__image { height: 100%; aspect-ratio: auto; border-right: 3px solid #173c27; border-bottom: 0; }
}
@media (max-width: 580px) {
    .mc-cat-card { display: flex; }
    .mc-cat-card__image { height: auto; aspect-ratio: 3 / 2; border-right: 0; border-bottom: 3px solid #173c27; }
    .mc-cat-card__body { padding: 20px; }
    .mc-cat-card__body h2,
    .mc-cat-card__body .woocommerce-loop-product__title { font-size: 13px; }
    .mc-cat-card__footer { flex-direction: column; align-items: flex-start; }
    .mc-cat-card__button { width: 100%; box-sizing: border-box; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .mc-cat-card,
    .mc-cat-card__image img { transition: none; }
    .mc-cat-card:hover { transform: none; }
    .mc-cat-card:hover .mc-cat-card__image img { transform: none; }
}