
/* =========================================================
   KAVIYAVIN THARIGAI
   PREMIUM WOOCOMMERCE CATEGORY / SHOP PAGE
   Maroon • Gold • Cream
   File: kt-category-page.css
   ========================================================= */

/* ---------- BRAND VARIABLES ---------- */

:root {
    --kt-cat-maroon: #2B0713;
    --kt-cat-dark: #24050F;
    --kt-cat-gold: #D7AE68;
    --kt-cat-cream: #FFF8EF;
    --kt-cat-soft: #F5E9D5;
    --kt-cat-text: #49352F;
    --kt-cat-muted: #8A7770;
    --kt-cat-border: rgba(43, 7, 19, 0.12);
}

/* ---------- CATEGORY PAGE BASE ---------- */

body.tax-product_cat,
body.post-type-archive-product {
    background: var(--kt-cat-cream);
    color: var(--kt-cat-text);
    font-family: "Montserrat", Arial, sans-serif;
}

body.tax-product_cat .site-content,
body.post-type-archive-product .site-content {
    background: var(--kt-cat-cream);
}

body.tax-product_cat .site-content > .container,
body.post-type-archive-product .site-content > .container {
    max-width: 1440px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 35px;
    padding-right: 35px;
}

/* ---------- BREADCRUMBS ---------- */

body.tax-product_cat .woocommerce-breadcrumb,
body.post-type-archive-product .woocommerce-breadcrumb {
    margin: 22px 0 18px;
    color: var(--kt-cat-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

body.tax-product_cat .woocommerce-breadcrumb a,
body.post-type-archive-product .woocommerce-breadcrumb a {
    color: var(--kt-cat-maroon);
    text-decoration: none;
    transition: color 0.25s ease;
}

body.tax-product_cat .woocommerce-breadcrumb a:hover,
body.post-type-archive-product .woocommerce-breadcrumb a:hover {
    color: #A77732;
}

/* ---------- SHOP / CATEGORY HEADING ---------- */

body.tax-product_cat .woocommerce-page-header,
body.post-type-archive-product .woocommerce-page-header {
    margin-bottom: 28px;
}

body.tax-product_cat .woocommerce-page-title,
body.post-type-archive-product .woocommerce-page-title,
body.tax-product_cat .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title {
    color: var(--kt-cat-maroon);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.6px;
    margin: 0 0 14px;
}

body.tax-product_cat .term-description,
body.tax-product_cat .woocommerce-products-header__description {
    color: var(--kt-cat-muted);
    font-size: 14px;
    line-height: 1.9;
    max-width: 760px;
}

/* ---------- RESULT COUNT + SORTING ---------- */

body.tax-product_cat .woocommerce-result-count,
body.post-type-archive-product .woocommerce-result-count {
    color: var(--kt-cat-muted);
    font-size: 12px;
    margin: 0 0 18px;
}

body.tax-product_cat .woocommerce-ordering,
body.post-type-archive-product .woocommerce-ordering {
    margin: 0 0 18px;
}

body.tax-product_cat .woocommerce-ordering select,
body.post-type-archive-product .woocommerce-ordering select,
body.tax-product_cat .woocommerce-perpage select,
body.post-type-archive-product .woocommerce-perpage select {
    min-height: 42px;
    padding: 8px 34px 8px 13px;
    color: var(--kt-cat-maroon);
    background-color: #fffdf9;
    border: 1px solid var(--kt-cat-border);
    border-radius: 5px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 12px;
    outline: none;
    box-shadow: none;
}

body.tax-product_cat .woocommerce-ordering select:focus,
body.post-type-archive-product .woocommerce-ordering select:focus {
    border-color: var(--kt-cat-gold);
}

/* ---------- PRODUCT GRID ---------- */

body.tax-product_cat ul.products,
body.post-type-archive-product ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 22px;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

body.tax-product_cat ul.products::before,
body.tax-product_cat ul.products::after,
body.post-type-archive-product ul.products::before,
body.post-type-archive-product ul.products::after {
    display: none !important;
    content: none !important;
}

body.tax-product_cat ul.products li.product,
body.post-type-archive-product ul.products li.product {
    float: none !important;
    clear: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 0 17px !important;
    overflow: hidden;
    position: relative;
    background: #fffdf9;
    border: 1px solid rgba(43, 7, 19, 0.07);
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(43, 7, 19, 0.045);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

body.tax-product_cat ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover {
    transform: translateY(-4px);
    border-color: rgba(215, 174, 104, 0.65);
    box-shadow: 0 14px 30px rgba(43, 7, 19, 0.1);
}

/* ---------- PRODUCT IMAGE ---------- */

body.tax-product_cat ul.products li.product a img,
body.post-type-archive-product ul.products li.product a img {
    display: block;
    width: 100% !important;
    aspect-ratio: 3 / 4;
    height: auto !important;
    max-height: none !important;
    margin: 0 0 14px !important;
    object-fit: cover;
    object-position: center top;
    background: var(--kt-cat-soft);
    transition: transform 0.55s ease;
}

body.tax-product_cat ul.products li.product:hover a img,
body.post-type-archive-product ul.products li.product:hover a img {
    transform: scale(1.035);
}

/* Keep image inside its card while hovering */
body.tax-product_cat ul.products li.product,
body.post-type-archive-product ul.products li.product {
    isolation: isolate;
}

body.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link,
body.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link {
    display: block;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

/* ---------- PRODUCT TITLE ---------- */

body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
    padding: 0 15px !important;
    margin: 0 0 9px !important;
    color: var(--kt-cat-maroon);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 21px !important;
    font-weight: 600;
    line-height: 1.25;
    transition: color 0.25s ease;
}

body.tax-product_cat ul.products li.product:hover .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product:hover .woocommerce-loop-product__title {
    color: #93672F;
}

/* ---------- PRODUCT PRICE ---------- */

body.tax-product_cat ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price {
    display: block;
    padding: 0 15px !important;
    margin: 0 0 13px !important;
    color: #8D5F26 !important;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.6;
}

body.tax-product_cat ul.products li.product .price del,
body.post-type-archive-product ul.products li.product .price del {
    color: #9A8A83 !important;
    opacity: 0.75;
    font-size: 12px;
    margin-right: 5px;
}

body.tax-product_cat ul.products li.product .price ins,
body.post-type-archive-product ul.products li.product .price ins {
    color: var(--kt-cat-maroon) !important;
    text-decoration: none;
}

/* ---------- ADD TO CART ---------- */

body.tax-product_cat ul.products li.product .button,
body.post-type-archive-product ul.products li.product .button,
body.tax-product_cat ul.products li.product a.add_to_cart_button,
body.post-type-archive-product ul.products li.product a.add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    max-width: calc(100% - 30px);
    margin: 0 15px !important;
    padding: 10px 16px !important;
    color: var(--kt-cat-cream) !important;
    background: var(--kt-cat-maroon) !important;
    border: 1px solid var(--kt-cat-maroon) !important;
    border-radius: 4px !important;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 10px !important;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.8px;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: none !important;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

body.tax-product_cat ul.products li.product .button:hover,
body.post-type-archive-product ul.products li.product .button:hover {
    color: var(--kt-cat-maroon) !important;
    background: var(--kt-cat-gold) !important;
    border-color: var(--kt-cat-gold) !important;
}

/* ---------- SALE BADGE ---------- */

body.tax-product_cat ul.products li.product .onsale,
body.post-type-archive-product ul.products li.product .onsale {
    position: absolute;
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 30px;
    margin: 0 !important;
    padding: 6px 10px;
    color: var(--kt-cat-cream);
    background: var(--kt-cat-maroon);
    border: 1px solid var(--kt-cat-gold);
    border-radius: 3px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

/* ---------- WISHLIST / PRODUCT ACTIONS ---------- */

body.tax-product_cat ul.products li.product .yith-wcwl-add-to-wishlist,
body.post-type-archive-product ul.products li.product .yith-wcwl-add-to-wishlist {
    z-index: 6;
}

body.tax-product_cat ul.products li.product .yith-wcwl-add-to-wishlist a,
body.post-type-archive-product ul.products li.product .yith-wcwl-add-to-wishlist a {
    color: var(--kt-cat-maroon);
}

body.tax-product_cat ul.products li.product .yith-wcwl-add-to-wishlist a:hover,
body.post-type-archive-product ul.products li.product .yith-wcwl-add-to-wishlist a:hover {
    color: #A77732;
}

/* ---------- SIDEBAR ---------- */

body.tax-product_cat .shop-wrapper.sidebar-left,
body.post-type-archive-product .shop-wrapper.sidebar-left,
body.tax-product_cat .shop-wrapper.sidebar-right,
body.post-type-archive-product .shop-wrapper.sidebar-right {
    align-items: flex-start;
    gap: 25px 0;
}

body.tax-product_cat .sidebar-column,
body.post-type-archive-product .sidebar-column {
    padding-top: 5px;
}

body.tax-product_cat .sidebar-column .widget,
body.post-type-archive-product .sidebar-column .widget {
    margin: 0 0 24px;
    padding: 20px;
    background: #fffdf9;
    border: 1px solid var(--kt-cat-border);
    border-radius: 7px;
}

body.tax-product_cat .sidebar-column .widget-title,
body.post-type-archive-product .sidebar-column .widget-title,
body.tax-product_cat .sidebar-column .widget h2,
body.post-type-archive-product .sidebar-column .widget h2,
body.tax-product_cat .sidebar-column .widget h3,
body.post-type-archive-product .sidebar-column .widget h3 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    color: var(--kt-cat-maroon);
    border-bottom: 1px solid rgba(215, 174, 104, 0.55);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 23px;
    font-weight: 600;
}

body.tax-product_cat .sidebar-column a,
body.post-type-archive-product .sidebar-column a {
    color: var(--kt-cat-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

body.tax-product_cat .sidebar-column a:hover,
body.post-type-archive-product .sidebar-column a:hover {
    color: #A77732;
}

/* ---------- PAGINATION ---------- */

body.tax-product_cat .woocommerce-pagination,
body.post-type-archive-product .woocommerce-pagination {
    margin: 35px 0 45px;
    text-align: center;
}

body.tax-product_cat .woocommerce-pagination ul.page-numbers,
body.post-type-archive-product .woocommerce-pagination ul.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 0 !important;
}

body.tax-product_cat .woocommerce-pagination ul.page-numbers li,
body.post-type-archive-product .woocommerce-pagination ul.page-numbers li {
    border: 0 !important;
}

body.tax-product_cat .woocommerce-pagination .page-numbers a,
body.tax-product_cat .woocommerce-pagination .page-numbers span,
body.post-type-archive-product .woocommerce-pagination .page-numbers a,
body.post-type-archive-product .woocommerce-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--kt-cat-maroon);
    background: #fffdf9;
    border: 1px solid var(--kt-cat-border);
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

body.tax-product_cat .woocommerce-pagination .page-numbers .current,
body.post-type-archive-product .woocommerce-pagination .page-numbers .current {
    color: var(--kt-cat-cream);
    background: var(--kt-cat-maroon);
    border-color: var(--kt-cat-maroon);
}

/* ---------- NOTICES ---------- */

body.tax-product_cat .woocommerce-info,
body.tax-product_cat .woocommerce-message,
body.tax-product_cat .woocommerce-error,
body.post-type-archive-product .woocommerce-info,
body.post-type-archive-product .woocommerce-message,
body.post-type-archive-product .woocommerce-error {
    border-top-color: var(--kt-cat-gold);
    color: var(--kt-cat-text);
    background: #fffdf9;
}

body.tax-product_cat .woocommerce-info::before,
body.tax-product_cat .woocommerce-message::before,
body.post-type-archive-product .woocommerce-info::before,
body.post-type-archive-product .woocommerce-message::before {
    color: var(--kt-cat-maroon);
}

/* ---------- ACCESSIBILITY ---------- */

body.tax-product_cat a:focus-visible,
body.post-type-archive-product a:focus-visible,
body.tax-product_cat button:focus-visible,
body.post-type-archive-product button:focus-visible,
body.tax-product_cat select:focus-visible,
body.post-type-archive-product select:focus-visible {
    outline: 2px solid var(--kt-cat-gold);
    outline-offset: 3px;
}

/* ---------- TABLET ---------- */

@media (max-width: 1024px) {
    body.tax-product_cat .site-content > .container,
    body.post-type-archive-product .site-content > .container {
        padding-left: 24px;
        padding-right: 24px;
    }

    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 16px;
    }

    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
        font-size: 20px !important;
    }
}

/* ---------- MOBILE ---------- */

@media (max-width: 600px) {
    body.tax-product_cat .site-content > .container,
    body.post-type-archive-product .site-content > .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    body.tax-product_cat .woocommerce-breadcrumb,
    body.post-type-archive-product .woocommerce-breadcrumb {
        margin: 16px 0 13px;
        font-size: 11px;
    }

    body.tax-product_cat .woocommerce-page-title,
    body.post-type-archive-product .woocommerce-page-title,
    body.tax-product_cat .woocommerce-products-header__title,
    body.post-type-archive-product .woocommerce-products-header__title {
        font-size: 36px;
    }

    body.tax-product_cat .woocommerce-result-count,
    body.post-type-archive-product .woocommerce-result-count {
        float: none !important;
        width: 100%;
        margin-bottom: 10px;
        font-size: 11px;
    }

    body.tax-product_cat .woocommerce-ordering,
    body.post-type-archive-product .woocommerce-ordering {
        float: none !important;
        width: 100%;
        margin-bottom: 18px;
    }

    body.tax-product_cat .woocommerce-ordering select,
    body.post-type-archive-product .woocommerce-ordering select {
        width: 100%;
    }

    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 10px;
    }

    body.tax-product_cat ul.products li.product,
    body.post-type-archive-product ul.products li.product {
        border-radius: 5px;
        padding-bottom: 12px !important;
    }

    body.tax-product_cat ul.products li.product a img,
    body.post-type-archive-product ul.products li.product a img {
        aspect-ratio: 3 / 4;
        margin-bottom: 10px !important;
    }

    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
        padding: 0 9px !important;
        margin-bottom: 6px !important;
        font-size: 17px !important;
        line-height: 1.25;
    }

    body.tax-product_cat ul.products li.product .price,
    body.post-type-archive-product ul.products li.product .price {
        padding: 0 9px !important;
        margin-bottom: 10px !important;
        font-size: 12px !important;
    }

    body.tax-product_cat ul.products li.product .button,
    body.post-type-archive-product ul.products li.product .button,
    body.tax-product_cat ul.products li.product a.add_to_cart_button,
    body.post-type-archive-product ul.products li.product a.add_to_cart_button {
        min-height: 36px;
        max-width: calc(100% - 18px);
        margin: 0 9px !important;
        padding: 8px 9px !important;
        font-size: 9px !important;
        letter-spacing: 0.4px;
    }

    body.tax-product_cat ul.products li.product .onsale,
    body.post-type-archive-product ul.products li.product .onsale {
        top: 7px !important;
        left: 7px !important;
        min-width: 42px;
        min-height: 25px;
        padding: 4px 7px;
        font-size: 9px;
    }

    body.tax-product_cat .sidebar-column .widget,
    body.post-type-archive-product .sidebar-column .widget {
        padding: 14px;
    }
}

/* ---------- SMALL MOBILE ---------- */

@media (max-width: 360px) {
    body.tax-product_cat ul.products,
    body.post-type-archive-product ul.products {
        gap: 12px 8px;
    }

    body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
    body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title {
        font-size: 15px !important;
    }

    body.tax-product_cat ul.products li.product .button,
    body.post-type-archive-product ul.products li.product .button {
        font-size: 8px !important;
    }
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
    body.tax-product_cat ul.products li.product,
    body.post-type-archive-product ul.products li.product,
    body.tax-product_cat ul.products li.product a img,
    body.post-type-archive-product ul.products li.product a img {
        transition: none !important;
    }
}
