/**
 * Shop / Category Archive Styling — Orevea Theme
 * Matches the official approved template mockup 1 & 2.
 *
 * @package Orevea
 */

/* ================================================================
   SHOP ARCHIVE CONTAINER & MAIN LAYOUT (FLEXBOX)
   ================================================================ */
body.woocommerce-shop .orevea-main,
body.tax-product_cat .orevea-main,
body.tax-product_tag .orevea-main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 24px 64px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
    box-sizing: border-box;
}

body.woocommerce-shop #primary,
body.tax-product_cat #primary,
body.tax-product_tag #primary {
    flex: 1;
    min-width: 0;
    width: auto;
    float: none;
    order: 2;
}

body.woocommerce-shop .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb,
body.tax-product_tag .woocommerce-breadcrumb {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 12px;
    font-size: 12.5px;
    color: #6d5d54;
}

body.woocommerce-shop .woocommerce-breadcrumb a,
body.tax-product_cat .woocommerce-breadcrumb a,
body.tax-product_tag .woocommerce-breadcrumb a {
    color: #241411;
    text-decoration: none;
}

/* ================================================================
   CATEGORY HERO BANNER
   ================================================================ */
.orevea-shop-hero {
    background: #fbf9f5;
    border: 1px solid rgba(58, 36, 32, .08);
    border-radius: 16px;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(58, 36, 32, .02);
}

.orevea-shop-hero__text {
    flex: 1;
    min-width: 0;
}

.orevea-shop-hero__text h1 {
    font-family: var(--orevea-font-display, 'Outfit', sans-serif);
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 700;
    color: #241411;
    margin: 0 0 8px;
    line-height: 1.2;
}

.orevea-shop-hero__desc {
    color: #6d5d54;
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 100%;
    overflow-wrap: break-word;
}

.orevea-shop-hero__desc p {
    margin: 0 0 6px;
}

.orevea-shop-hero__desc p:last-child {
    margin-bottom: 0;
}

.orevea-shop-hero__desc table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
}

.orevea-shop-hero__desc td,
.orevea-shop-hero__desc th {
    padding: 6px 10px;
    border: 1px solid rgba(58, 36, 32, .1);
    font-size: 12.5px;
}

.orevea-shop-hero__img {
    width: 180px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(58, 36, 32, .06);
    border: 1px solid rgba(58, 36, 32, .06);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orevea-shop-hero__img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform .4s ease;
}

.orevea-shop-hero__img:hover img {
    transform: scale(1.06);
}

/* ================================================================
   TOP TOOLBAR CONTROLS
   ================================================================ */
.orevea-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fbf9f5;
    border: 1px solid rgba(58, 36, 32, .08);
    border-radius: 12px;
    padding: 10px 18px;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.orevea-shop-toolbar__left,
.orevea-shop-toolbar__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.orevea-btn-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid rgba(58, 36, 32, .15);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #241411;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.orevea-btn-filter-toggle:hover {
    background: #241411;
    color: #ffffff;
    border-color: #241411;
}

.orevea-toolbar-label {
    font-size: 12.5px;
    color: #6d5d54;
    font-weight: 500;
    margin-right: 4px;
}

.orevea-toolbar-ordering .woocommerce-ordering {
    float: none;
    margin: 0;
}

.orevea-toolbar-ordering select.orderby,
.orevea-perpage-select {
    appearance: none;
    background: #ffffff;
    border: 1px solid rgba(58, 36, 32, .15);
    border-radius: 8px;
    padding: 7px 28px 7px 12px;
    font-size: 12.5px;
    font-family: var(--orevea-font-body, inherit);
    color: #241411;
    background-image: linear-gradient(45deg, transparent 50%, #6d5d54 50%), linear-gradient(135deg, #6d5d54 50%, transparent 50%);
    background-position: calc(100% - 14px) center, calc(100% - 10px) center;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
    cursor: pointer;
    outline: none;
}

.orevea-toolbar-view {
    display: flex;
    align-items: center;
    gap: 6px;
}

.orevea-view-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(58, 36, 32, .15);
    border-radius: 6px;
    background: #ffffff;
    color: #6d5d54;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.orevea-view-btn:hover,
.orevea-view-btn.is-active {
    background: #241411;
    color: #ffffff;
    border-color: #241411;
}

/* ================================================================
   SIDEBAR FILTERS
   ================================================================ */
body.woocommerce-shop .orevea-shop-sidebar,
body.tax-product_cat .orevea-shop-sidebar,
body.tax-product_tag .orevea-shop-sidebar {
    width: 250px;
    flex-shrink: 0;
    float: none;
    order: 1;
}

.orevea-shop-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-self: flex-start;
}

.orevea-filter-accordion {
    background: #ffffff;
    border: 1px solid rgba(58, 36, 32, .08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(58, 36, 32, .02);
}

.orevea-filter-accordion__toggle {
    width: 100%;
    background: #ffffff;
    border: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--orevea-font-body, inherit);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #241411;
    cursor: pointer;
    transition: background .2s ease;
}

.orevea-filter-accordion__toggle:hover {
    background: #fbf9f5;
}

.orevea-filter-accordion__icon {
    font-size: 15px;
    color: #8b7355;
    font-weight: 700;
}

.orevea-filter-accordion__content {
    display: none;
    padding: 0 16px 14px;
    border-top: 1px solid rgba(58, 36, 32, .04);
}

.orevea-filter-accordion.is-open .orevea-filter-accordion__content {
    display: block;
}

.orevea-filter-list {
    list-style: none;
    margin: 0;
    padding: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}

.orevea-filter-list::-webkit-scrollbar {
    width: 4px;
}
.orevea-filter-list::-webkit-scrollbar-thumb {
    background: rgba(58, 36, 32, .15);
    border-radius: 4px;
}

.orevea-filter-list__item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: #55483f;
    text-decoration: none;
    padding: 3px 0;
    transition: color .2s ease;
}

.orevea-filter-list__bullet {
    margin-right: 6px;
    color: #8b7355;
    font-size: 13px;
}

.orevea-filter-list__name {
    flex: 1;
}

.orevea-filter-list__count {
    color: #8c827a;
    font-size: 11px;
}

.orevea-filter-list__item a:hover,
.orevea-filter-list__item.is-active a {
    color: #6b2e2a;
    font-weight: 600;
}

/* Price range form */
.orevea-price-filter-form {
    padding-top: 12px;
}

.orevea-slider-range {
    width: 100%;
    accent-color: #8b7355;
    cursor: pointer;
}

.orevea-price-slider__labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #241411;
    margin: 8px 0 12px;
}

.orevea-btn-filter {
    width: 100%;
    padding: 8px 0;
    background: #241411;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background .2s ease;
}

.orevea-btn-filter:hover {
    background: #6b2e2a;
}

/* ================================================================
   PRODUCT GRID & LIST VIEWS (5 TO 6 COLUMNS RESPONSIVE)
   ================================================================ */
ul.products {
    clear: both;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 16px !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.products li.product {
    margin: 0 !important;
    width: 100% !important;
    float: none !important;
    display: flex;
}

ul.products li.product .orevea-product-card {
    width: 100%;
}

@media (min-width: 1560px) {
    ul.products {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1280px) {
    ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
}

@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* List view support */
ul.products.orevea-list-view {
    grid-template-columns: 1fr !important;
}

ul.products.orevea-list-view li.product .orevea-product-card {
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

ul.products.orevea-list-view li.product .orevea-product-card__img-wrap {
    width: 130px;
    height: 130px;
    margin-bottom: 0;
    flex: none;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.woocommerce-pagination {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(58, 36, 32, .08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.woocommerce-pagination ul.page-numbers {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #55483f;
    text-decoration: none;
    border: 1px solid rgba(58, 36, 32, .1);
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.woocommerce-pagination .page-numbers.current,
.woocommerce-pagination a.page-numbers:hover {
    background: #241411;
    color: #ffffff;
    border-color: #241411;
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */
@media (max-width: 900px) {
    body.woocommerce-shop .orevea-main,
    body.tax-product_cat .orevea-main,
    body.tax-product_tag .orevea-main {
        flex-direction: column;
        padding: 12px 16px 48px;
        gap: 16px;
    }

    body.woocommerce-shop .orevea-shop-sidebar,
    body.tax-product_cat .orevea-shop-sidebar,
    body.tax-product_tag .orevea-shop-sidebar {
        width: 100%;
        position: static;
        display: none;
    }

    .orevea-shop-sidebar.is-open {
        display: flex;
    }

    .orevea-shop-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .orevea-shop-hero__img {
        width: 100%;
        height: 120px;
    }

    ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}
