/* custom-product-page.css */

/* General Layout */
.custom-product-page {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.filters-sidebar {
    width: 25%;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    position: sticky;
    top: 150px;                        /* updated as per your latest change */
    align-self: flex-start;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.product-grid {
    width: 70%;
    padding: 20px 0;
}
.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    background: white;
    text-align: center;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.product-card img {
    width: 100%;
    height: 245px;
    object-fit: cover;
    display: block;
    border-radius: 15px 15px 0 0;
}
.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 14px 12px 8px;
    line-height: 1.3;
    color: #222;
}
span.woocommerce-Price-amount.amount {
    font-size: 16px;
    font-weight: 600;
    color: #2b2b2b;
    margin: 6px 0 12px;
}
.buy-now {
    display: inline-block;
    background: #3658db;
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 16px;
    transition: background 0.2s;
}
.buy-now:hover {
    background: #2c4ac2;
    color: white;
}

/* ────────────────────────────────────────────────
   Unified Toggle Icons (+ / −) – only react to own <details>
───────────────────────────────────────────────── */
.toggle-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #666;
    transition: color 0.2s, transform 0.25s ease;
    flex-shrink: 0;
}

.toggle-icon::before {
    content: "+";
}

/* When THIS <details> is open → show minus */
.filter-accordion[open] > summary .toggle-icon::before,
.category-group[open] > summary .toggle-icon::before,
.size-group[open] > summary .toggle-icon::before {
    content: "−";
    color: #3658db;
}

/* Hover feedback */
.filter-accordion summary:hover .toggle-icon,
.category-group summary:hover .toggle-icon,
.size-group summary:hover .toggle-icon {
    color: #3658db;
}

/* ────────────────────────────────────────────────
   Category Groups (nested inside Categories accordion)
───────────────────────────────────────────────── */
.category-group {
    margin-bottom: 8px;
}
.category-group summary {
    list-style: none !important;
    outline: none;
    cursor: pointer;
    padding: 10px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    width: 100%;
}
.category-group summary::-webkit-details-marker,
.category-group summary::marker {
    display: none !important;
}
.category-group summary {
    -moz-appearance: none;
    appearance: none;
}
.category-group summary:hover {
    background: rgba(54, 88, 219, 0.05);
}
.child-categories {
    padding: 8px 0 12px 32px;
    display: inline-grid !important;
}
.child-categories label {
    display: block;
    margin: 6px 0;
    font-size: 15px;
}
.category-group label input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #3658db;
}
.category-group summary label {
    pointer-events: none;
}
.category-group summary label input[type="checkbox"],
.category-group summary .toggle-icon {
    pointer-events: auto;
}

/* ────────────────────────────────────────────────
   Size Groups (nested inside Sizes accordion)
───────────────────────────────────────────────── */
.size-group {
    margin-bottom: 8px;
}
.size-group summary {
    list-style: none;
    outline: none;
    cursor: pointer;
    padding: 10px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.size-group summary::-webkit-details-marker,
.size-group summary::marker {
    display: none !important;
}
.size-group .group-name {
    flex: 1;
}
.child-sizes label {
    display: block;
    margin: 6px 0;
    font-size: 15px;
}

/* ────────────────────────────────────────────────
   Top-level Accordions (Categories & Sizes)
───────────────────────────────────────────────── */
.filter-accordion {
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.filter-accordion summary {
    list-style: none;
    outline: none;
    cursor: pointer;
    padding: 5px 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.filter-accordion summary::-webkit-details-marker,
.filter-accordion summary::marker {
    display: none !important;
}
.filter-accordion summary h3 {
    margin: 0;
    flex: 1;
	font-size:18px;
}
.accordion-content {
    padding: 0 0 12px 0;
}

/* ────────────────────────────────────────────────
   Other Filter Sections
───────────────────────────────────────────────── */
.filter-section {
    margin-bottom: 24px;
}
.filter-section h3 {
    margin: 20px 0 12px;
    font-size: 17px;
    font-weight: 600;
}
.filter-section:has(#product-search) h3 {
    display: none;
}
#product-search {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    background-color: #F5F5F5 !important;
    border: none !important;
    border-radius: 15px;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: background-color 0.2s;
}
#product-search:focus {
    background-color: #EDEDED !important;
}

/* Price Slider */
#price-slider {
    margin: 12px 0 8px;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 32px 0 20px;
}
.pagination a,
.pagination span {
    margin: 0 6px;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    background: #f0f0f0;
    color: #333;
}
.pagination .current {
    background: #3658db;
    color: white;
}
/* Clear Filters button */
.clear-filters-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    background: #000;                /* red/orange for "reset" feel */
    color: white;
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.clear-filters-btn:hover {
    background: #3b3b3b;
}

.clear-filters-btn:active {
    transform: scale(0.98);
}

/* Close Filters button – mobile only */
.close-filters-btn {
    display: none;                      /* hidden on desktop */
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #333;                   /* dark neutral color */
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.close-filters-btn:hover {
    background: #444;
}

.close-filters-btn:active {
    background: #222;
}

/* Show only on mobile */
@media (max-width: 768px) {
    .close-filters-btn {
        display: block;
    }
}

/* Optional: make search + button flex row on larger screens */
@media (min-width: 769px) {
    .filter-section {
        display: flex;
        gap: 12px;
        align-items: stretch;
        flex-direction: column;
    }
    
    #product-search {
        flex: 1;
        margin: 0;
    }
    
    .clear-filters-btn {
        width: auto;
        margin-top: 0;
        padding: 10px 20px;
    }

}
/* Mobile Responsiveness */
.mobile-filter-btn {
    display: none;
    width: 100%;
    padding: 12px;
    background: #3658db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .custom-product-page {
        flex-direction: column;
    }
    .filters-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: white;
        box-shadow: 2px 0 12px rgba(0,0,0,0.15);
        z-index: 1000;
        overflow-y: auto;
        padding: 20px;
        border-radius: 0 16px 16px 0;
    }
    .filters-sidebar.open {
        display: block;
    }
    .product-grid {
        width: 100%;
        padding: 0 10px;
    }
    .mobile-filter-btn {
        display: block;
    }
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .product-card {
        border-radius: 12px;
    }
    .product-card img {
        border-radius: 12px 12px 0 0;
        height: 170px !important;
    }
		.pagination {
		font-size: 15px!important;
		justify-content: center !important;
	}
}
@media (max-width: 480px) {
    .products {
	grid-template-columns: repeat(2, 1fr) !important;
    }
}