/* ============================================
   Custom WooCommerce Shop Page Styles
   With 100px Sticky Header Offset + Footer Stop (Smooth)
   ============================================ */

/* Main Container */
.custom-shop-wrapper {
    width: 100%;
    padding: 40px 20px;
}

/* ============================================
   Shop Title Section
   ============================================ */
.shop-title-section {
	width: 100vw;
    position: relative;
    margin-left: -50vw;
    margin-top: -40px;
    left: 50%;
    background: #fafafa;
    padding: 40px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    text-align: center;
}

.shop-main-title {
	font-family: "Poppins", Sans-serif;
    font-size: 28px;
    font-weight: 600;
}

.shop-caption {
font-size: 15px;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    position: relative; /* Added for absolute positioning context */
}

/* ============================================
   Sidebar Filters - Dynamic Sticky with Footer Stop (Smooth)
   ============================================ */
.shop-sidebar {
    width: 280px;
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    /* Removed transition to prevent jitter during state changes */
}

/* Sidebar in normal state */
.shop-sidebar.is-normal {
    position: relative;
}

/* Sidebar when sticky - 100px header + 20px margin */
.shop-sidebar.is-sticky {
    position: fixed;
    top: 120px;
    width: 280px;
    z-index: 98;
    will-change: transform; /* Optimize for smooth transforms */
}

/* Sidebar when at bottom - stops before footer */
.shop-sidebar.is-bottom {
    position: absolute;
    bottom: 0;
    top: auto;
    width: 280px;
}

/* Wrapper for sidebar positioning */
.sidebar-wrapper {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.filter-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.filter-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eeeeee;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-heading {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s ease;
}

.filter-checkbox:hover {
    color: #000;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #2c3e50;
}

.filter-checkbox span {
    user-select: none;
}

/* ============================================
   Main Content Area
   ============================================ */
.shop-main-content {
    flex: 1;
    min-width: 0;
}

/* Selected Filters Bar */
.selected-filters-bar {
    background: #ffffff;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 56px;
}

.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.filter-tag {
    background: #e8f4f8;
    color: #2c3e50;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-tag .remove-filter {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s;
}

.filter-tag .remove-filter:hover {
    color: #e74c3c;
}

.clear-filters-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

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

/* ============================================
   Products Grid
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: #ffffff;
    border-radius: 0px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
	border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 9/16;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: #2c3e50;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.product-price .woocommerce-Price-amount {
    font-weight: 600;
}

/* View Product Button - Larger and clearer */
.view-product-btn {
    background: #2c3e50;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    text-decoration: none;
}

.view-product-btn:hover {
    transform: scale(1.1);
}

.view-product-btn svg {
    width: 24px;
    height: 24px;
}

/* Legacy support for old add-to-cart button class */
.add-to-cart-btn {
    background: #2c3e50;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    border: none;
}

.product-footer a:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.add-to-cart-btn svg {
    width: 24px;
    height: 24px;
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
    grid-column: 1 / -1;
}

/* ============================================
   Pagination
   ============================================ */
.shop-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.shop-pagination a,
.shop-pagination span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop-pagination a:hover {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.shop-pagination .current {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 968px) {
    .shop-container {
        flex-direction: column;
    }

    .sidebar-wrapper {
        width: 100%;
    }

    .shop-sidebar {
        width: 100%;
        position: static !important;
    }

    .filter-section {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 15px;
        align-items: start;
    }

    .filter-heading {
        margin: 0;
        padding-top: 5px;
    }

    .filter-section > label {
        grid-column: 2;
    }
	    /* Adjust title for mobile */
    .shop-main-title {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .shop-caption {
        font-size: 14px;
    }

    .shop-title-section {
        padding: 25px 15px;
        margin-bottom: 20px;
    }
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .selected-filters-bar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .clear-filters-btn {
        width: 100%;
    }

    .custom-shop-wrapper {
        padding: 20px 15px;
    }
	 .shop-main-title {
        font-size: 24px;
    }

    .shop-caption {
        font-size: 13px;
    }
}
