/* 
 * WooCommerce Category & Shop Layout Styles
 */

.pr-shop-container {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* Header & Description */
.pr-shop-header {
    text-align: center;
    margin-bottom: 30px;
}
.pr-shop-header .page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--pr-color-primary);
}
.pr-shop-header .term-description p {
    color: var(--pr-color-text-light);
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
}

/* Horizontal Subcategories Slider */
.pr-shop-subcats-wrap {
    margin-bottom: 30px;
    padding-bottom: 10px;
}
.pr-shop-subcats {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: none; /* Firefox */
}
.pr-shop-subcats::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.pr-shop-subcats li a {
    display: inline-block;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--pr-color-border);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--pr-color-text);
    transition: all 0.2s ease;
}

.pr-shop-subcats li a:hover {
    border-color: var(--pr-color-text);
}

.pr-shop-subcats li a.active {
    background: var(--pr-color-primary);
    color: var(--pr-color-white);
    border-color: var(--pr-color-primary);
}

/* Toolbar: Count & Filter */
.pr-shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pr-color-border);
}

.pr-shop-results {
    font-size: 14px;
    color: var(--pr-color-text-light);
}

.pr-filter-trigger {
    background: transparent;
    border: 1px solid var(--pr-color-border);
    padding: 8px 16px;
    border-radius: 4px;
    font-family: var(--pr-font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.pr-filter-trigger:hover {
    background: var(--pr-color-bg);
}

/* Grid Override */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important; /* Remove WC clearfix if using grid */
}
.woocommerce ul.products li.product {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Slide-out Sidebar Panel */
.pr-filter-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90%;
    height: 100vh;
    background: var(--pr-color-white);
    z-index: 10000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.pr-filter-sidebar.open {
    transform: translateX(0);
}

.pr-filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--pr-color-border);
}
.pr-filter-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
}
.pr-filter-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pr-color-text-light);
}

.pr-filter-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Backdrop */
.pr-filter-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.pr-filter-backdrop.open {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    .pr-shop-header .page-title {
        font-size: 26px;
    }
}
