/* 
═══════════════════════════════════════════════════════════════════
PRODUCTS LISTING PAGE - IMPROVEMENTS CSS
═══════════════════════════════════════════════════════════════════
File: assets/css/products-page.css
Purpose: Modern, filterable products listing page
═══════════════════════════════════════════════════════════════════
*/

/* ══════════════════════════════════════════════
   🎯 PAGE HEADER
   ══════════════════════════════════════════════ */
.products-header {
	background: linear-gradient(135deg, #f5f7fa 0%, #e2d0c3 100%);
	padding: 40px 0 30px 0;
	margin-bottom: 40px;
}

.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
}

.page-title {
	font-size: 36px;
	font-weight: 800;
	margin: 0 0 10px 0;
	color: #1a1a1a;
}

.page-title i {
	color: #fc6e1d;
	margin-right: 10px;
}

.page-subtitle {
	font-size: 16px;
	color: #666;
	margin: 0;
}

.btn-filter-toggle {
	background: #fc6e1d;
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 15px rgba(252, 110, 29, 0.3);
}

.btn-filter-toggle:hover {
	background: #e55d0a;
	transform: translateY(-2px);
}

/* ══════════════════════════════════════════════
   🔍 SEARCH BAR
   ══════════════════════════════════════════════ */
.products-search-wrapper {
	max-width: 600px;
	margin: 0 auto;
	position: relative;
}

.search-icon {
	position: absolute;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	color: #999;
	font-size: 18px;
	z-index: 2;
}

.products-search-bar {
	width: 100%;
	padding: 14px 20px 14px 50px;
	border: 2px solid #e0e0e0;
	border-radius: 50px;
	font-size: 15px;
	transition: all 0.3s ease;
	background: white;
}

.products-search-bar:focus {
	outline: none;
	border-color: #fc6e1d;
	box-shadow: 0 4px 20px rgba(252, 110, 29, 0.15);
}

.search-suggestion-box {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border-radius: 15px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
	margin-top: 10px;
	max-height: 400px;
	overflow-y: auto;
	z-index: 1000;
	display: none;
}

.search-item {
	padding: 12px 20px;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	transition: background 0.2s ease;
}

.search-item:hover {
	background: #f8f8f8;
}

.search-item:last-child {
	border-bottom: none;
}

/* ══════════════════════════════════════════════
   📊 LAYOUT
   ══════════════════════════════════════════════ */
.products-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 40px;
	margin-bottom: 60px;
}

/* ══════════════════════════════════════════════
   🔍 FILTER SIDEBAR
   ══════════════════════════════════════════════ */
.filters-sidebar {
	background: white;
	border-radius: 15px;
	padding: 25px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
	height: fit-content;
	position: sticky;
	top: 20px;
}

.filters-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 2px solid #f0f0f0;
}

.filters-header h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	color: #1a1a1a;
}

.filters-header i {
	color: #fc6e1d;
	margin-right: 8px;
}

.btn-clear-filters {
	background: none;
	border: none;
	color: #fc6e1d;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

.btn-clear-filters:hover {
	color: #e55d0a;
}

.filter-group {
	margin-bottom: 30px;
	padding-bottom: 25px;
	border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-child {
	border-bottom: none;
}

.filter-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 15px 0;
	color: #333;
	display: flex;
	align-items: center;
	gap: 8px;
}

.filter-title i {
	color: #fc6e1d;
	font-size: 14px;
}

/* Price Range Filter */

/* 
.price-range-inputs {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.price-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
}

.price-input:focus {
	outline: none;
	border-color: #fc6e1d;
}
 */




.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
  
}

.price-input {
	flex: 1;
    width: 100%;
    max-width: 110px;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.price-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.price-separator {
    font-weight: 500;
    color: #6b7280;
    min-width: 16px;
    text-align: center;
}


.btn-apply-price {
	width: 100%;
	background: #fc6e1d;
	color: white;
	border: none;
	padding: 10px;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 10px;
	transition: all 0.3s ease;
}

.btn-apply-price:hover {
	background: #e55d0a;
}

.quick-price-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.quick-price {
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.quick-price:hover,
.quick-price.active {
	background: #fc6e1d;
	color: white;
	border-color: #fc6e1d;
}


/* 
@media (max-width: 480px) {
    .filter-title {
        font-size: 1.05rem;
    }

    .price-range-inputs {
        gap: 0.6rem;
    }

    .price-input {
        max-width: 48%;               
        flex: 1;
        font-size: 0.95rem;
        padding: 0.6rem;
    }

    .price-separator {
        font-size: 1.1rem;
    }

    .quick-price {
        min-width: 48%;
        flex: 1 1 48%;
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
}

@media (max-width: 360px) {
    .price-input {
        max-width: none;
    }

    .price-range-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }

    .price-separator {
        display: none;         
    }

    .quick-price {
        min-width: 100%;
        flex: 1 1 100%;
    }
} */

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

.filter-checkbox {
	display: flex;
	align-items: center;
	cursor: pointer;
	padding: 8px;
	border-radius: 8px;
	transition: background 0.2s ease;
}

.filter-checkbox:hover {
	background: #f8f8f8;
}

.filter-checkbox input[type="checkbox"],
.filter-checkbox input[type="radio"] {
	margin: 0 10px 0 0;
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #fc6e1d;
}

.filter-checkbox span {
	font-size: 14px;
	color: #333;
}

.filter-checkbox .count {
	margin-left: auto;
	font-size: 12px;
	color: #999;
}

.rating-stars {
	color: #ffd700;
	font-size: 14px;
	margin-right: 8px;
}

.rating-label {
	font-size: 13px;
	color: #666;
}

.btn-close-filters {
	width: 100%;
	background: #333;
	color: white;
	border: none;
	padding: 12px;
	border-radius: 8px;
	font-weight: 600;
	margin-top: 20px;
	cursor: pointer;
}







/* ══════════════════════════════════════════════
   📦 PRODUCTS TOOLBAR
   ══════════════════════════════════════════════ */
.products-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 25px;
	padding: 20px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.toolbar-left .products-count {
	margin: 0;
	font-size: 15px;
	color: #666;
}

.toolbar-left strong {
	color: #fc6e1d;
	font-weight: 700;
}

.toolbar-right {
	display: flex;
	align-items: center;
	gap: 20px;
}

.sort-dropdown {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sort-dropdown label {
	margin: 0;
	font-size: 14px;
	color: #666;
	font-weight: 500;
	white-space: nowrap;
}

.sort-select {
	padding: 8px 35px 8px 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	background: white;
	min-width: 180px;
}

.sort-select:focus {
	outline: none;
	border-color: #fc6e1d;
}

.view-toggle {
	display: flex;
	gap: 5px;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 4px;
}

.btn-view {
	width: 40px;
	height: 40px;
	border: none;
	background: transparent;
	cursor: pointer;
	border-radius: 6px;
	color: #666;
	font-size: 16px;
	transition: all 0.3s ease;
}

.btn-view.active {
	background: #fc6e1d;
	color: white;
}

.btn-view:hover:not(.active) {
	background: #f5f5f5;
}

/* Active Filters Display */
.active-filters {
	margin-bottom: 20px;
	padding: 15px;
	background: #f8f8f8;
	border-radius: 10px;
}

.active-filters p {
	margin: 0 0 10px 0;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

.filter-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.filter-tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: white;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 13px;
	border: 1px solid #ddd;
}

.filter-tag .remove {
	cursor: pointer;
	color: #999;
	font-weight: bold;
}

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

/* ══════════════════════════════════════════════
   📦 PRODUCTS GRID
   ══════════════════════════════════════════════ */
.products-grid {
	display: grid;
	gap: 30px;
}

.products-grid.view-grid {
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));

}

.products-grid.view-list {
	grid-template-columns: 1fr;
}

.product-item {
	opacity: 1;
	transform: scale(1);
	transition: all 0.3s ease;
}

.product-item.filtered-out {
	opacity: 0;
	transform: scale(0.8);
	height: 0;
	overflow: hidden;
	margin: 0;
}

/* Product Card */
.pg-pro-card {
	background: white;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	position: relative;
	display: flex;
	flex-direction: column;
}

.pg-pro-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Badges */
.badges-container {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 10;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.product-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-sale {
	background: linear-gradient(135deg, #fc6e1d 0%, #ff8c42 100%);
	color: white;
}

.badge-new {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: white;
}

.badge-featured {
	background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
	color: #1a1a1a;
}

.badge-low-stock {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	color: white;
	animation: pulse 2s infinite;
}

/* Wishlist Button */
.pg-wishlist-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	background: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: #fc6e1d;
	cursor: pointer;
	z-index: 10;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.pg-wishlist-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(252, 110, 29, 0.3);
}

.pg-wishlist-btn.fa-solid {
	color: #fc6e1d;
}

/* Product Image */
.product-image-link {
	display: block;
	overflow: hidden;
}

.pg-pro-image {
	width: 100%;
	height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f8f8;
	overflow: hidden;
}

.pg-pro-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.pg-pro-card:hover .pg-pro-image img {
	transform: scale(1.1);
}

/* Product Info */
.product-info {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.pg-pro-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 12px 0;
	line-height: 1.4;
	min-height: 44px;
}

.pg-pro-title a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 0.3s ease;
}

.pg-pro-title a:hover {
	color: #fc6e1d;
}

/* Rating */
.product-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 14px;
}

.product-rating .stars i {
	color: #ffd700;
	font-size: 14px;
}

.rating-number {
	color: #666;
	font-size: 13px;
	font-weight: 500;
}

.reviews-count {
	color: #999;
	font-size: 12px;
}

/* Price */
.price-box {
	margin: 12px 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

.new-price {
	font-size: 22px;
	font-weight: 800;
	color: #fc6e1d;
}

.old-price {
	font-size: 16px;
	color: #999;
	text-decoration: line-through;
}

/* Color Swatches */
.pg-color-swatch-box {
	display: flex;
	gap: 8px;
	margin: 12px 0;
}

.pg-color-circle {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid #ddd;
	cursor: pointer;
	transition: all 0.3s ease;
}

.pg-color-circle:hover {
	transform: scale(1.1);
	border-color: #fc6e1d;
}

/* Quantity Swatches */
.pg-qty-swatch-box {
	display: flex;
	gap: 8px;
	margin: 12px 0;
	flex-wrap: wrap;
}

.pg-qty-box {
	padding: 6px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
}

.pg-qty-box:hover,
.pg-qty-box.active {
	border-color: #fc6e1d;
	background: #fc6e1d;
	color: white;
}

/* Action Buttons */
.pg-pro-btns {
	display: flex;
	gap: 10px;
	margin-top: auto;
}

.pg-btn-add,
.pg-btn-buy {
	flex: 1;
	padding: 12px 20px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.pg-btn-add {
	background: white;
	color: #fc6e1d;
	border: 2px solid #fc6e1d;
}

.pg-btn-add:hover {
	background: #fc6e1d;
	color: white;
}

.pg-btn-buy {
	background: linear-gradient(135deg, #fc6e1d 0%, #ff8c42 100%);
	color: white;
}

.pg-btn-buy:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(252, 110, 29, 0.4);
}

/* List View Specific */
.products-grid.view-list .pg-pro-card {
	flex-direction: row;
	align-items: center;
}

.products-grid.view-list .pg-pro-image {
	width: 250px;
	height: 250px;
	flex-shrink: 0;
}

.products-grid.view-list .product-info {
	flex: 1;
	padding: 30px;
}

.products-grid.view-list .pg-pro-btns {
	max-width: 300px;
}

/* ══════════════════════════════════════════════
   ❌ NO PRODUCTS MESSAGE
   ══════════════════════════════════════════════ */
.no-products-message {
	text-align: center;
	padding: 80px 20px;
}

.no-products-message i {
	font-size: 80px;
	color: #ddd;
	margin-bottom: 20px;
}

.no-products-message h3 {
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 10px 0;
	color: #333;
}

.no-products-message p {
	font-size: 16px;
	color: #666;
	margin: 0 0 25px 0;
}

.btn-reset-filters {
	background: #fc6e1d;
	color: white;
	border: none;
	padding: 14px 30px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.3s ease;
}

.btn-reset-filters:hover {
	background: #e55d0a;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(252, 110, 29, 0.3);
}

/* ══════════════════════════════════════════════
   📱 RESPONSIVE DESIGN
   ══════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 991px) {
	.products-layout {
		grid-template-columns: 1fr;
	}

	.filters-sidebar {
		position: fixed;
		top: 0;
		left: -100%;
		width: 320px;
		height: 100vh;
		z-index: 9999;
		overflow-y: auto;
		transition: left 0.3s ease;
	}

	.filters-sidebar.active {
		left: 0;
	}

	.products-grid.view-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	}

	.products-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 15px;
	}

	.toolbar-right {
		flex-direction: column;
		gap: 15px;
	}

	.sort-dropdown {
		flex-direction: column;
		align-items: stretch;
	}

	.sort-select {
		min-width: 100%;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.products-header {
		padding: 25px 0 20px 0;
	}

	.page-title {
		font-size: 28px;
	}

	.header-content {
		flex-direction: column;
		gap: 15px;
		align-items: flex-start;
	}

	.products-grid.view-grid {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		gap: 15px;
	}

	.pg-pro-image {
		height: 200px;
	}

	.pg-pro-title {
		font-size: 14px;
		min-height: auto;
	}

	.new-price {
		font-size: 18px;
	}

	.pg-pro-btns {
		flex-direction: column;
	}

	.products-grid.view-list .pg-pro-card {
		flex-direction: column;
	}

	.products-grid.view-list .pg-pro-image {
		width: 100%;
		height: 200px;
	}
}

/* Small Mobile */
@media (max-width: 576px) {
	.products-grid.view-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.btn-filter-toggle {
		width: 100%;
		justify-content: center;
	}
}

/* ══════════════════════════════════════════════
   🎨 ANIMATIONS
   ══════════════════════════════════════════════ */
@keyframes pulse {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

/* Fade in animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.product-item {
	animation: fadeIn 0.4s ease forwards;
}

/* Stagger animation for grid items */
.product-item:nth-child(1) {
	animation-delay: 0.05s;
}
.product-item:nth-child(2) {
	animation-delay: 0.1s;
}
.product-item:nth-child(3) {
	animation-delay: 0.15s;
}
.product-item:nth-child(4) {
	animation-delay: 0.2s;
}












 .pg-filter-box {
        background: #fff;
        padding: 20px;
        border-radius: 12px;
        border: 1px solid #eee;
        position: sticky;
        top: 100px;
    }

    .filter-heading {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 10px;
        color: #222;
        border-left: 3px solid #ff6a00;
        padding-left: 8px;
    }

    .filter-check {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 0;
        font-size: 14px;
        cursor: pointer;
    }

    .filter-check input {
        cursor: pointer;
    }

    .rating-stars {
        color: #FFD700;
        font-size: 14px;
    }

    .quick-price-btns {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .quick-price {
        font-size: 12px;
        padding: 4px 8px;
        width: 100%;
    }

    .quick-price.active {
        background: #ff6a00;
        color: white;
        border-color: #ff6a00;
    }

    .subcat-list a {
        padding: 8px 18px;
        background: #f3f3f3;
        border-radius: 30px;
        border: 1px solid #ddd;
        transition: .3s;
        text-decoration: none;
        color: #333;
        font-size: 14px;
    }

    .subcat-list a:hover {
        background: #ff6a00;
        color: white;
        border-color: #ff6a00;
    }







	
@media (max-width: 991px) {
    .filters-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 85vw !important;
        max-width: 340px !important;
        height: 100dvh !important;           /* better full height */
        background: white !important;
        z-index: 2000 !important;             /* ← sabse important: 2000 ya 9999 bhi try kar sakte ho */
        overflow-y: auto !important;
        transition: left 0.4s ease !important;
        box-shadow: -10px 0 30px rgba(0,0,0,0.3) !important;
    }

    .filters-sidebar.active {
        left: 0 !important;
    }

    /* Overlay ko sidebar se thoda neeche rakhna taake sidebar upar rahe */
    body.sidebar-open {
        overflow: hidden !important;
        position: relative !important;
    }

    body.sidebar-open::before {
        content: "";
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0,0,0,0.55) !important;
        z-index: 1999 !important;             /* sidebar (2000) se 1 kam */
        opacity: 0;
        transition: opacity 0.4s ease !important;
        pointer-events: none !important;
    }

    body.sidebar-open::before {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Agar header/navbar fixed/sticky hai to unko sidebar ke neeche rakho */
    header, nav, .navbar, .sticky-top, .top-header, .main-header {
        z-index: 1500 !important;             /* sidebar se kam */
    }
}