/**
 * Category Templates Styles
 *
 * Custom styles for WooCommerce category pages
 * 
 * @package Pursue_Life_Outdoors
 */

/* --------------------------------- */
/* Force Template Visibility         */
/* --------------------------------- */
body.tax-product_cat .woocommerce-products-header,
body.term-fogscapes .woocommerce-products-header,
body.product-category .woocommerce-products-header,
body.plo-product-category-template .woocommerce-products-header,
body.plo-custom-category-page .woocommerce-products-header {
    display: none !important;
}

body.tax-product_cat .woocommerce > .term-description,
body.term-fogscapes .woocommerce > .term-description,
body.product-category .woocommerce > .term-description,
body.plo-product-category-template .woocommerce > .term-description,
body.plo-custom-category-page .woocommerce > .term-description {
    display: none !important;
}

/* Remove default category elements */
body.tax-product_cat .woocommerce > ul.products,
body.product-category .woocommerce > ul.products {
    display: none !important;
}

body.tax-product_cat .right-sidebar .content-area,
body.product-category .right-sidebar .content-area {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
}

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

/* --------------------------------- */
/* Container Layout                  */
/* --------------------------------- */
.plo-category-container {
    display: block !important;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Make sure container styles don't conflict with category container */
.container .plo-category-container {
    max-width: 100%;
    padding: 0 var(--spacing-md, 1rem);
}

/* --------------------------------- */
/* Category Hero Section             */
/* --------------------------------- */
.plo-category-hero {
    position: relative;
    width: 100%;
    height: 17.5vh;
    min-height: 125px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plo-category-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    background-image: linear-gradient(135deg, rgba(16, 73, 17, 0.7) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.plo-category-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1rem;
    max-width: 800px;
}

.plo-category-title {
    color: #fff;
    font-size: 4rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.7), 0 0 10px rgba(249, 166, 32, 0.5);
    font-family: 'Playfair Display', serif;
    position: relative;
    display: inline-block;
}

.plo-category-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 80px;
    height: 4px;
    background-color: #f9a620;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(249, 166, 32, 0.8);
}

.plo-category-hero-simple {
    background-color: #104911;
    background-image: linear-gradient(135deg, #104911 0%, #072709 100%);
    padding: 1.75rem 0;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.plo-category-hero-simple::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.8;
    pointer-events: none;
}

.plo-category-hero-simple .plo-category-title {
    color: #fff;
    font-size: 3.5rem;
    font-weight: 700;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6), 0 0 10px rgba(249, 166, 32, 0.5);
    position: relative;
    z-index: 5;
}

.plo-category-hero-simple .plo-category-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 80px;
    height: 4px;
    background-color: #f9a620;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(249, 166, 32, 0.8);
}

/* --------------------------------- */
/* Category Description              */
/* --------------------------------- */
.plo-category-description {
    padding: 0 2rem;
    margin-bottom: 3rem;
    text-align: center;
    width: 100%;
}

.plo-category-description-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.plo-category-description-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #104911;
    margin-bottom: 1rem;
}

.plo-category-description-content p {
    margin-bottom: 1.5rem;
}

/* --------------------------------- */
/* Main Content Area with Sidebar    */
/* --------------------------------- */
.plo-category-main {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 var(--spacing-md, 1rem);
    width: 100%;
    box-sizing: border-box;
}

.plo-category-sidebar {
    flex: 0 0 280px;
    margin-right: 2rem;
}

.plo-category-content {
    flex: 1;
    min-width: 0; /* Fix for flexbox overflow */
}

.plo-category-filter-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.plo-filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #104911;
    border-bottom: 2px solid #f9a620;
    padding-bottom: 0.5rem;
}

/* Category list in sidebar */
.plo-category-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.plo-category-list li {
    margin-bottom: 0.5rem;
    padding: 0.3rem 0;
}

.plo-category-list li a {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.plo-category-list li a:hover {
    color: #f9a620;
    background-color: rgba(249, 166, 32, 0.1);
}

.plo-category-list li.active a {
    color: #104911;
    font-weight: 600;
    background-color: rgba(16, 73, 17, 0.1);
}

/* Widget styling */
.plo-category-widgets .widget {
    margin-bottom: 2rem;
}

.plo-category-widgets .widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* --------------------------------- */
/* Products Grid - Theme Integration */
/* --------------------------------- */
.plo-category-content .products.plo-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

/* Use the same card styling as front page */
.plo-category-content .products li.product {
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    width: 100% !important;
    margin: 0 0 1rem 0 !important;
    padding: 0 !important;
    float: none !important;
    display: flex;
    flex-direction: column;
}

/* Match front page hover effect */
.plo-category-content .products li.product:hover {
    transform: translateY(-5px);
}

/* Image styling to match front page */
.plo-category-content .products li.product a.woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.plo-category-content .products li.product .product-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.plo-category-content .products li.product img {
    display: block;
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    margin: 0 !important;
    transition: transform 0.5s ease;
    border-radius: 8px 8px 0 0;
}

.plo-category-content .products li.product:hover img {
    transform: scale(1.05);
}

/* Title styling to match front page */
.plo-category-content .products li.product .woocommerce-loop-product__title {
    padding: 1rem 1rem 0.5rem !important;
    margin: 0;
    font-size: 1.5rem !important;
    color: #333 !important;
    font-weight: 600;
    font-family: serif;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Price styling to match front page */
.plo-category-content .products li.product .price {
    padding: 0 1rem 1rem;
    margin: 0;
    color: #2a7d2e !important;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sale badge */
.plo-category-content .products li.product .onsale {
    position: absolute;
    top: 1rem;
    right: 1rem;
    margin: 0;
    padding: 0.5em 1em;
    min-height: auto;
    min-width: auto;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    background-color: #2a7d2e;
    border-radius: 4px;
    z-index: 1;
}

/* Add to cart button styling to match front page */
.plo-category-content .products li.product .button {
    margin: 0 1rem 1rem !important;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    border: 1px solid #2a7d2e;
    color: #2a7d2e;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    text-transform: none;
}

.plo-category-content .products li.product:hover .button {
    display: inline-block;
}

.plo-category-content .products li.product .button:hover {
    background-color: #2a7d2e;
    color: #fff;
}

/* Pagination - moved to navigation.css */
/* Reference styles in navigation.css with .pagination class */

/* No products message */
.plo-no-products {
    text-align: center;
    padding: 3rem 0;
}

.plo-no-products p {
    font-size: 1.2rem;
    color: #666;
}

/* --------------------------------- */
/* Responsive Adjustments            */
/* --------------------------------- */
@media (max-width: 1024px) {
    .plo-category-title {
        font-size: 3.5rem;
    }
    
    .plo-category-sidebar {
        flex: 0 0 240px;
        margin-right: 1.5rem;
    }
}

@media (max-width: 992px) {
    .plo-category-content .products.plo-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .plo-category-title {
        font-size: 3.2rem;
    }
    
    .plo-category-description-content {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .plo-category-hero {
        height: 15vh;
        min-height: 100px;
    }
    
    .plo-category-title {
        font-size: 2.8rem;
        letter-spacing: 1.5px;
    }
    
    .plo-category-main {
        flex-direction: column;
        padding: 0 var(--spacing-md, 1rem);
    }
    
    .plo-category-sidebar {
        flex: 0 0 100%;
        margin-right: 0;
        margin-bottom: 2rem;
        order: 2;
    }
    
    .plo-category-content {
        order: 1;
    }
    
    .container .plo-category-container {
        padding: 0;
    }
    
    .plo-category-content .products.plo-products-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .plo-category-hero {
        height: 12.5vh;
        min-height: 90px;
    }
    
    .plo-category-hero-simple {
        padding: 1rem 0;
    }
    
    .plo-category-hero-content {
        padding: 0.75rem;
    }
    
    .plo-category-title {
        font-size: 2.4rem;
        letter-spacing: 1px;
    }
    
    .plo-category-title::after,
    .plo-category-hero-simple .plo-category-title::after {
        width: 60px;
        height: 3px;
        bottom: -8px;
    }
    
    .plo-category-description-content {
        font-size: 1rem;
    }
    
    .container .plo-category-container {
        padding: 0;
    }
    
    .plo-category-content .products li.product .woocommerce-loop-product__title {
        font-size: 1.2rem !important;
    }
} 