/* ==========================================================================
   PlantMyst — Custom Shop Page Styles
   ========================================================================== */

/* Full width override */
.pm-shop-page {
    width: 100%;
}

body.post-type-archive-product .site-content,
body.tax-product_cat .site-content {
    display: block !important;
}

body.post-type-archive-product #primary,
body.tax-product_cat #primary {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.post-type-archive-product .inside-article,
body.tax-product_cat .inside-article {
    padding: 0 !important;
    max-width: 100% !important;
}

body.post-type-archive-product #secondary,
body.tax-product_cat #secondary {
    display: none !important;
}

/* ==========================================================================
   Shop Header Banner
   ========================================================================== */

.pm-shop-header {
    background-color: var(--pm-cream);
    padding: 50px 0 40px;
    text-align: center;
}

.pm-shop-header .woocommerce-breadcrumb {
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--pm-gray);
}

.pm-shop-header .woocommerce-breadcrumb a {
    color: var(--pm-green) !important;
}

.pm-shop-header__title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--pm-green-dark);
    margin-bottom: 10px;
}

.pm-shop-header__subtitle {
    font-size: 1rem;
    color: var(--pm-gray);
    max-width: 500px;
    margin: 0 auto;
}

/* ==========================================================================
   Category Filter Pills
   ========================================================================== */

.pm-shop-filters {
    background-color: var(--pm-white);
    padding: 20px 0;
    border-bottom: 1px solid var(--pm-gray-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.pm-shop-filters .pm-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.pm-category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pm-pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--pm-font) !important;
    text-decoration: none !important;
    border: 2px solid var(--pm-gray-light);
    color: var(--pm-dark) !important;
    background-color: var(--pm-white);
    transition: all 0.3s ease;
}

.pm-pill:hover {
    border-color: var(--pm-green);
    color: var(--pm-green) !important;
}

.pm-pill--active {
    background-color: var(--pm-green) !important;
    border-color: var(--pm-green);
    color: var(--pm-white) !important;
}

.pm-pill--active:hover {
    background-color: var(--pm-green-dark) !important;
    color: var(--pm-white) !important;
}

/* Shop meta (result count + ordering) */
.pm-shop-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pm-shop-meta .woocommerce-result-count {
    margin: 0;
    font-size: 0.85rem;
    color: var(--pm-gray);
}

.pm-shop-meta .woocommerce-ordering select {
    border: 2px solid var(--pm-gray-light) !important;
    border-radius: var(--pm-radius) !important;
    padding: 8px 12px !important;
    font-size: 0.85rem;
    font-family: var(--pm-font) !important;
}

/* ==========================================================================
   Shop Layout (Sidebar + Products)
   ========================================================================== */

.pm-shop-content {
    padding: 40px 0 60px;
}

.pm-shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
}

/* Sidebar */
.pm-shop-sidebar {
    padding-top: 10px;
}

.pm-shop-sidebar .widget {
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--pm-cream);
    border-radius: var(--pm-radius);
}

.pm-shop-sidebar .widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pm-green-dark);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--pm-sage);
}

.pm-shop-sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pm-shop-sidebar .widget ul li {
    padding: 6px 0;
    font-size: 0.9rem;
}

.pm-shop-sidebar .widget ul li a {
    color: var(--pm-dark) !important;
    text-decoration: none;
}

.pm-shop-sidebar .widget ul li a:hover {
    color: var(--pm-green) !important;
}

/* Hide duplicate WooCommerce widget headings */
.pm-shop-sidebar .widget .woocommerce-widget-layered-nav-dropdown__title,
.pm-shop-sidebar .widget_price_filter .price_label,
.pm-shop-sidebar .widget h2:not(.widget-title) {
    display: none !important;
}

/* Price filter slider — match brand colors */
.pm-shop-sidebar .widget_price_filter .ui-slider {
    background-color: var(--pm-gray-light) !important;
    border: none !important;
    height: 6px !important;
    border-radius: 3px !important;
}

.pm-shop-sidebar .widget_price_filter .ui-slider .ui-slider-range {
    background-color: var(--pm-green) !important;
}

.pm-shop-sidebar .widget_price_filter .ui-slider .ui-slider-handle {
    background-color: var(--pm-green) !important;
    border: 3px solid var(--pm-white) !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    top: -7px !important;
    box-shadow: 0 2px 6px rgba(45, 90, 61, 0.3) !important;
    cursor: pointer;
}

.pm-shop-sidebar .widget_price_filter .price_slider_amount {
    font-size: 0.85rem;
    color: var(--pm-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pm-shop-sidebar .widget_price_filter .price_slider_amount .button {
    padding: 8px 18px !important;
    font-size: 0.75rem !important;
}

/* Product categories widget — hide duplicate title */
.pm-shop-sidebar .widget_product_categories > h2 {
    display: none !important;
}

/* Products grid */
.pm-shop-products .products,
.pm-shop-products ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    list-style: none !important;
    padding: 0 !important;
}

.pm-shop-products .products::before,
.pm-shop-products .products::after {
    display: none !important;
    content: none !important;
}

.pm-shop-products .products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Product images — fill card width */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    display: block !important;
}

/* Product card content padding */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 12px 16px 4px !important;
    font-size: 1rem !important;
}

.woocommerce ul.products li.product .price {
    padding: 0 16px 8px !important;
}

.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.add_to_cart_button {
    margin: 0 16px 16px !important;
    display: inline-block !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .pm-shop-products .products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .pm-shop-layout {
        grid-template-columns: 1fr;
    }

    .pm-shop-sidebar {
        display: none;
    }

    .pm-shop-filters .pm-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .pm-category-pills {
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        padding-bottom: 8px;
    }

    .pm-shop-header__title {
        font-size: 1.6rem;
    }

    .pm-shop-products .products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

@media (max-width: 480px) {
    .pm-shop-products .products {
        grid-template-columns: 1fr !important;
    }
}
