/* Product Filter Styles */
.custom-product-filter-container {
    font-family: Poppins, sans-serif;
}

/* Header Section */
.filter-header {
    margin-bottom: 30px;
}

/* New Filter Controls */
.filter-controls-new {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-buttons-new {
    width: 50%;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 300;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-dropdown-btn svg {
    transition: transform 0.2s ease;
}

.filter-dropdown-btn.active svg {
    transform: rotate(180deg);
}

.products-info-new {
    width: 47%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

.product-count {
    font-size: 16px;
    font-weight: 300;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 16px 16px 0;
    border-right: 1px solid #D1D1D1;
}

.sort-controls {
    width: 56%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 300;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-controls img {
    max-width: 28px !important;
    width: 100%;
}

.sort-dropdown-new {
    width: 228px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.sort-dropdown-new:hover {
    border-color: #333;
    background: #fafafa;
}

.sort-controls-txt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 130px;
}

.sort-selected {
    font-size: 16px;
    font-weight: 300;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-dropdown-new select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sort-dropdown-new svg {
    transition: transform 0.2s ease;
}

/* Legacy filter controls - hide them */
.filter-controls {
    display: none !important;
}

/* Active Filters */
.active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-tag,
.filter-tag:hover,
.filter-tag:focus {
    display: flex;
    align-items: center;
    background: #000;
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 300;
    text-transform: uppercase;
    border-radius: 100px;
}

.filter-tag .remove-filter {
    padding-left: 10px;
    font-size: 22px;
}

.clear-filters,
.clear-filters:hover {
    background: transparent;
    border: none;
    color: #000;
    font-size: 16px;
    font-weight: 300;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: underline;
}

/* Products Grid */
.custom-products-grid,
.custom-products-grid.diy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0;
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
}

/* DIY Grid - Single Product with Navigation */
/* .custom-products-grid.diy-grid {
    display: flex;
    align-items: center;
    position: relative;
} */

/* .diy-grid .custom-product-item {
    border: none;
    max-width: 400px;
    text-align: center;
} */

.custom-products-grid:has(.no-products) {
    border: none;
}

.custom-product-item {
    display: flex;
    flex-direction: column;
    position: relative;
    background: white;
    transition: transform 0.3s ease;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px;
}

.custom-product-item:nth-child(4n) {
    border-right: none;
}

.custom-product-item:hover {
    transform: translateY(-5px);
}

.custom-product-image {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
}

.custom-product-image img {
    object-fit: contain;
    transition: transform 0.3s ease;
}

.custom-product-item:hover .custom-product-image img {
    transform: scale(1.02);
}

.custom-product-item .badge {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
    display: flex;
    padding: 4px 8px;
    justify-content: center;
    align-items: center;
    border-radius: 0);
    background: #F6F6F6;
    color: #5B5964;
    font-family: Poppins;
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
}

.custom-product-badge {
    position: absolute;
    top: 15px;
    left: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 0;
    border: none;
    letter-spacing: 0.5px;
}

.custom-product-badge.best-seller {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.custom-product-badge.new-arrival {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.custom-product-badge.out-of-stock {
    background: rgba(255, 255, 255, 0.9);
    color: #999;
}

.custom-product-badge.diy-products {
    position: absolute;
    top: 0;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    background: #fff !important;
    color: #C4A300 !important;
    font-size: 14px;
    font-weight: 400;
    padding: 4px 8px !important;
    border-radius: 40px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #C4A300;
	z-index: 5;
}

/* Custom Badge Styles */
.custom-image-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.custom-image-badge img {
    max-width: 60px !important;
    max-height: 60px !important;
    padding: 0 !important;
    width: auto;
    height: auto;
    display: block;
}

.custom-text-badge {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333 !important;
    font-weight: 600;
    font-size: 11px;
    padding: 8px 12px !important;
    border-radius: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-product-info {
    text-align: left;
    padding: 16px 0 0 0;
}

.custom-product-title {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: 12px;
    color: #5B5964;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

/* Price and Cart Button Row */
.custom-price-cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.custom-product-price {
    font-size: 20px;
    font-weight: 400;
    color: #C4A300;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    margin-bottom: 0;
    flex-shrink: 0;
}

.custom-product-price.price-updating {
    transform: scale(1.05);
    opacity: 0.8;
}

.custom-add-to-cart-btn {
    background: transparent;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0;
    letter-spacing: 0.5px;
    color: #000;
    border-radius: 0;
    white-space: nowrap;
    text-decoration: underline;
    flex-shrink: 0;
}

.custom-add-to-cart-btn:hover {
    color: #000;
    background: transparent;
    box-shadow: none !important;
}

/* Color Swatches */
.custom-product-color-swatches {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    outline: 1px solid #fff;
}

.color-swatch:hover {
    transform: scale(1.05);
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-swatch.selected {
    border-width: 4px;
    border-color: #fff;
    outline: 1px solid #000000;
}

.color-swatch.selected:hover {
    transform: scale(1.2);
}

.color-swatch.color-pattern {
    background: linear-gradient(45deg, #ccc 25%, transparent 25%),
                linear-gradient(-45deg, #ccc 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, #ccc 75%),
                linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 6px 6px;
    background-position: 0 0, 0 3px, 3px -3px, -3px 0px;
}

/* White color swatch special styling */
.color-swatch[style*="background-color: #ffffff"],
.color-swatch[style*="background-color: white"] {
    border-color: #ccc !important;
}

.color-swatch[style*="background-color: #ffffff"]:hover,
.color-swatch[style*="background-color: white"]:hover {
    border-color: #333 !important;
}

.custom-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.custom-product-rating .stars {
    color: #333;
    font-size: 14px;
}

.custom-product-rating .rating-text {
    color: #666;
    font-size: 12px;
    font-weight: 400;
}

.custom-product-rating.no-rating {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    margin-top: 40px;
}

.load-more-section p {
    font-size: 16px;
    color: #777582;
    font-weight: 300;
    margin-bottom: 20px;
}

.load-more-btn {
    background: transparent;
    border: 1px solid #333;
    padding: 12px 100px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
	color: #000;
	font-weight: 300;
	line-height: 24px;
	border-radius: 0;
}

.load-more-btn:hover {
    background: #333;
    color: white;
}

/* Filter Sidebar */
.filter-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -420px !important;
    width: 420px !important;
    height: 100vh !important;
    background: #fff !important;
    z-index: 9999 !important;
    transition: right 0.35s ease !important;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.2) !important;
    overflow-y: auto !important;
    display: block !important;
}

.filter-sidebar.active {
    right: 0 !important;
}

.filter-sidebar-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid #d9d9d9;
}

.filter-sidebar-header h3 {
    font-size: 16px;
    letter-spacing: 0.18em;
    font-weight: 300;
    text-transform: uppercase;
    margin: 0;
    color: #000;
}

.close-sidebar {
    background: #F6F6F6;
    color: #1C1B1F;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.close-sidebar:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #000;
}

.filter-section {
    padding-bottom: 18px;
    border-bottom: 1px solid #ededed;
}

.filter-section h4 {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #000;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-section.active h4 {
    margin-bottom: 24px;
}

.filter-section h4::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 1px solid #111;
    border-bottom: 1px solid #111;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.filter-section h4.collapsed::after {
    transform: rotate(-135deg);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 300;
    color: #000;
    position: relative;
    padding-left: 28px;
    line-height: 1.4;
    text-transform: uppercase;
}

.filter-section p {
    font-size: 14px;
    font-weight: 300;
    color: #000;
}

.filter-checkbox input,
.filter-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark,
.radiomark {
    position: absolute;
    left: 0;
    top: 0;
    height: 18px;
    width: 18px;
    border: 1px solid #1C1B1F;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.radiomark {
    border-radius: 50%;
}

.filter-checkbox:hover input ~ .checkmark,
.filter-radio:hover input ~ .radiomark {
    border-color: #111;
}

.filter-checkbox input:checked ~ .checkmark,
.filter-radio input:checked ~ .radiomark {
    background-color: #ffffff;
    border-color: #000000;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.checkmark:after,
.radiomark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-checkbox input:checked ~ .checkmark:after {
    display: block;
    left: 6px;
    top: 3px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-radio input:checked ~ .radiomark:after {
display: block;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000000;
}

/* Filter Actions */
.filter-actions {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid #dcdcdc;
    display: flex;
    gap: 16px;
}

.clear-all-btn,
.view-items-btn {
    flex: 1;
    border-radius: 999px;
    padding: 13px 0;
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
}

.clear-all-btn {
    background: transparent;
    border: 1px solid #888;
    color: #000;
}

.clear-all-btn:hover {
    background: #000;
    color: #fff;
}

.view-items-btn {
    background: #000;
    border: 1px solid #000;
    color: #fff;
}

.view-items-btn:hover {
    color: #000;
    background: transparent;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    display: none !important;
}

.sidebar-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}


@media screen and (max-width: 1024px) {
	.filter-controls-new {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.filter-buttons-new {
		width: 100%;
		justify-content: flex-start;
	}

	.products-info-new {
		width: 100%;
		justify-content: flex-start;
	}
}

/* Responsive Design */
@media (max-width: 768px) {
    /* New filter controls responsive */
    .filter-controls-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filter-buttons-new {
        display: none;
    }

    .filter-buttons-new {
        width: 100%;
        justify-content: flex-start;
    }

    .products-info-new {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .sort-controls {
        width: 10%;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }

    /* Legacy filter controls responsive */
    .filter-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .custom-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 0;
    }

    .custom-product-item:nth-child(4n) {
        border-right: 1px solid #e0e0e0;
    }

    .custom-product-item:nth-child(2n) {
        border-right: none;
    }

    .filter-sidebar {
        width: 100% !important;
        right: -100% !important;
    }

    .filter-sidebar.active {
        right: 0 !important;
    }

    .filter-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .products-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .custom-product-image {
        display: flex;
        justify-content: center;
    }

    .custom-products-grid.diy-grid {
        display: grid;
    }

    .product-count {
        border-right: 1px solid transparent;
        font-size: 12px;
        padding: 0;
    }

    .sort-dropdown-new,
    .sort-controls-txt span {
        display: none;
    }

    .sort-controls-txt {
        width: 24px;
        cursor: pointer;
    }
 
}

/* Force hide sidebar when not active */
.filter-sidebar:not(.active) {
    display: none !important;
}

.filter-sidebar.active {
    display: block !important;
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Animation for product items */
.custom-product-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.custom-product-item:nth-child(1) { animation-delay: 0.1s; }
.custom-product-item:nth-child(2) { animation-delay: 0.2s; }
.custom-product-item:nth-child(3) { animation-delay: 0.3s; }
.custom-product-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.no-image-placeholder {
    width: 100%;
    height: 350px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* Product Link Styling */
.custom-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.custom-product-link:hover {
    text-decoration: none;
    color: inherit;
}

.custom-product-link:focus {
    outline: none;
}

/* Ensure title links don't break styling */
.custom-product-info .custom-product-link {
    display: inline-block;
    width: 100%;
}

.custom-product-info .custom-product-link:hover .custom-product-title {
    color: #C4A300;
    transition: color 0.3s ease;
}

/* Make entire product item appear interactive */
.custom-product-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Special hover state for DIY grid items */
.diy-grid .custom-product-item {
    cursor: pointer;
}

/* Navigation Arrows for DIY Products */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 60px;
    color: #ccc;
    cursor: pointer;
    width: 50px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.nav-arrow:hover {
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow-left {
    left: 10px;
}

.nav-arrow-right {
    right: 10px;
}

/* Hide navigation arrows if only one product */
.diy-grid:has(.custom-product-item:only-child) .nav-arrow {
    display: none;
}