/* =============================================================================
   SHOP / ARCHIVE — Fixar Suprimentos design system
   ============================================================================= */

/* ---------- Page header ---------- */
.fx-shop-page-header {
    background: var(--fx-navy);
    padding: 1.75rem 0 1.5rem;
}

.fx-shop-page-title {
    font-size: clamp(1.375rem, 3vw, 1.875rem);
    font-weight: 800;
    color: var(--fx-white);
    margin: 0.5rem 0 0;
    line-height: 1.2;
}

.fx-shop-cat-desc {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    margin: 0.625rem 0 0;
    max-width: 680px;
}

/* Breadcrumb in navy header */
.fx-shop-page-header .fx-breadcrumb,
.fx-shop-page-header .woocommerce-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 0.375rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
    padding: 0;
    list-style: none;
}

.fx-shop-page-header .fx-breadcrumb a,
.fx-shop-page-header .woocommerce-breadcrumb a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.fx-shop-page-header .fx-breadcrumb a:hover,
.fx-shop-page-header .woocommerce-breadcrumb a:hover {
    color: var(--fx-orange);
}

.fx-breadcrumb-sep {
    color: rgba(255,255,255,0.35);
}

/* ---------- Shop layout ---------- */
.fx-shop-wrap {
    padding: 2rem 0 3.5rem;
}

.fx-shop-inner {
    display: block;
}

.fx-shop-inner--has-sidebar {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ---------- Sidebar ---------- */
.fx-shop-sidebar {
    display: block;
}

.fx-shop-sidebar-sticky {
    position: sticky;
    top: 100px;
}

.fx-shop-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--fx-navy);
}

.fx-shop-filter-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-navy);
}

.fx-shop-filter-clear {
    font-size: 0.75rem;
    color: var(--fx-orange);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

.fx-shop-filter-clear:hover {
    color: #e55a0b;
}

/* YITH filter overrides within sidebar */
.fx-shop-sidebar .yith-wcan-filters {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.fx-shop-sidebar .yith-wcan-filter {
    border-bottom: 1px solid var(--fx-gray-200);
    padding: 1rem 0;
}

.fx-shop-sidebar .yith-wcan-filter:last-child {
    border-bottom: none;
}

.fx-shop-sidebar .yith-wcan-filter .filter-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fx-navy);
    margin-bottom: 0.625rem;
}

/* ---------- Toolbar ---------- */
.fx-shop-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--fx-gray-200);
}

.fx-shop-toolbar .woocommerce-result-count {
    margin: 0;
    font-size: 0.875rem;
    color: var(--fx-gray-600);
    flex: 1;
}

.fx-shop-toolbar .woocommerce-ordering {
    margin: 0;
}

.fx-shop-toolbar .woocommerce-ordering select {
    border: 1px solid var(--fx-gray-300);
    border-radius: var(--fx-radius);
    padding: 0.5rem 2rem 0.5rem 0.875rem;
    font-size: 0.875rem;
    color: var(--fx-navy);
    background: var(--fx-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%23062d62' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    transition: border-color 0.2s;
}

.fx-shop-toolbar .woocommerce-ordering select:focus {
    outline: none;
    border-color: var(--fx-orange);
}

/* Mobile filter toggle */
.fx-shop-filter-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--fx-navy);
    border-radius: var(--fx-radius);
    background: var(--fx-white);
    color: var(--fx-navy);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.fx-shop-filter-toggle:hover {
    background: var(--fx-navy);
    color: var(--fx-white);
}

/* ---------- Product grid (WC loop) ---------- */
.fx-shop-main .products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
    width: 100% !important;
}

.fx-shop-inner--has-sidebar .fx-shop-main .products {
    grid-template-columns: repeat(3, 1fr) !important;
}

.fx-shop-main ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
    border: 1px solid var(--fx-gray-200);
    border-radius: var(--fx-radius-lg);
    overflow: hidden;
    background: var(--fx-white);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
}

.fx-shop-main ul.products li.product:hover {
    box-shadow: var(--fx-shadow-md);
    transform: translateY(-3px);
    border-color: var(--fx-orange);
}

/* Product image */
.fx-shop-main ul.products li.product a img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.fx-shop-main ul.products li.product:hover a img {
    transform: scale(1.05);
}

/* Product title */
.fx-shop-main ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.9375rem !important;
    font-weight: 600;
    color: var(--fx-navy);
    padding: 0.875rem 1rem 0.25rem;
    line-height: 1.35;
}

/* Price */
.fx-shop-main ul.products li.product .price {
    padding: 0 1rem;
    font-size: 1rem;
    color: var(--fx-navy);
    font-weight: 700;
}

.fx-shop-main ul.products li.product .price del {
    color: var(--fx-gray-500);
    font-weight: 400;
}

.fx-shop-main ul.products li.product .price ins {
    color: var(--fx-orange);
    text-decoration: none;
}

/* Add to cart */
.fx-shop-main ul.products li.product .button {
    display: block;
    margin: 0.75rem 1rem 1rem;
    padding: 0.625rem 1rem;
    background: var(--fx-navy);
    color: var(--fx-white) !important;
    border: 2px solid var(--fx-navy);
    border-radius: var(--fx-radius);
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    margin-top: auto;
}

.fx-shop-main ul.products li.product .button:hover,
.fx-shop-main ul.products li.product .button.loading {
    background: var(--fx-orange);
    border-color: var(--fx-orange);
    color: var(--fx-white) !important;
}

/* Sale badge */
.fx-shop-main ul.products li.product .onsale {
    background: var(--fx-orange);
    color: var(--fx-white);
    border-radius: var(--fx-radius);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    top: 0.75rem;
    left: 0.75rem;
    min-height: auto;
    min-width: auto;
    line-height: 1.4;
}

/* Pagination */
.fx-shop-main .woocommerce-pagination {
    margin-top: 2.5rem;
    text-align: center;
}

.fx-shop-main .woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.fx-shop-main .woocommerce-pagination .page-numbers li {}

.fx-shop-main .woocommerce-pagination .page-numbers li a,
.fx-shop-main .woocommerce-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--fx-radius);
    border: 1px solid var(--fx-gray-200);
    color: var(--fx-navy);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.fx-shop-main .woocommerce-pagination .page-numbers li a:hover {
    background: var(--fx-navy);
    color: var(--fx-white);
    border-color: var(--fx-navy);
}

.fx-shop-main .woocommerce-pagination .page-numbers li .current {
    background: var(--fx-orange);
    color: var(--fx-white);
    border-color: var(--fx-orange);
}

/* ---------- Mobile sidebar overlay ---------- */
.fx-sidebar-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9000;
    align-items: flex-end;
}

.fx-sidebar-mobile-overlay.is-open {
    display: flex;
}

.fx-sidebar-mobile-panel {
    background: var(--fx-white);
    width: 100%;
    max-height: 85vh;
    border-radius: 1rem 1rem 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fx-slide-up 0.3s ease;
}

@keyframes fx-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.fx-sidebar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--fx-gray-200);
    font-size: 1rem;
    font-weight: 700;
    color: var(--fx-navy);
}

.fx-sidebar-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--fx-gray-100);
    border-radius: 50%;
    cursor: pointer;
    color: var(--fx-navy);
    transition: background 0.2s;
}

.fx-sidebar-mobile-close:hover {
    background: var(--fx-gray-200);
}

.fx-sidebar-mobile-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.fx-sidebar-mobile-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--fx-gray-200);
}

.fx-sidebar-mobile-footer .fx-btn {
    width: 100%;
    justify-content: center;
}

/* =============================================================================
   RESPONSIVE — Shop
   ============================================================================= */
@media (max-width: 1023px) {
    .fx-shop-inner--has-sidebar {
        grid-template-columns: 220px 1fr;
    }
    .fx-shop-main .products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .fx-shop-inner--has-sidebar .fx-shop-main .products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .fx-shop-inner--has-sidebar {
        grid-template-columns: 1fr;
    }
    .fx-shop-sidebar {
        display: none;
    }
    .fx-shop-filter-toggle {
        display: inline-flex;
    }
    .fx-shop-main .products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .fx-shop-main ul.products li.product a img {
        height: 180px;
    }
}

@media (max-width: 479px) {
    .fx-shop-main .products {
        grid-template-columns: 1fr !important;
    }
    .fx-shop-main ul.products li.product a img {
        height: 240px;
    }
}
