/**
 * Shop Page Styles — رداء Premium
 */

/* === Page Header === */

.shop-page-header {
	margin-block-end: var(--space-8);
	text-align: center;
}

.shop-page-title {
	font-family: var(--font-primary);
	font-size: var(--text-4xl);
	font-weight: var(--font-bold);
	color: var(--color-primary);
	margin-block-end: var(--space-2);
	position: relative;
	display: inline-block;
}

.shop-page-title::after {
	content: '';
	position: absolute;
	inset-block-end: -8px;
	inset-inline-start: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 3px;
	background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
	border-radius: var(--radius-full);
}

/* === Shop Layout === */

.post-type-archive-product .site-main,
.tax-product_cat .site-main,
.tax-product_size .site-main,
.tax-product_color .site-main {
	padding-block: var(--space-8);
}

.shop-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: var(--space-8);
	align-items: start;
}

/* === Filters Sidebar === */

.shop-filters {
	padding: var(--space-6);
	background: var(--color-gray-50);
	border-radius: var(--radius-xl);
	border: 1px solid var(--color-gray-100);
	height: fit-content;
	position: sticky;
	inset-block-start: calc(70px + var(--space-4));
}

.filter-group {
	margin-block-end: var(--space-5);
	padding-block-end: var(--space-5);
	border-block-end: 1px solid var(--color-gray-200);
}

.filter-group:last-child {
	margin-block-end: 0;
	padding-block-end: 0;
	border-block-end: none;
}

.filter-group-title {
	font-family: var(--font-primary);
	font-size: var(--text-sm);
	font-weight: var(--font-bold);
	margin-block-end: var(--space-3);
	color: var(--color-primary);
}

.filter-options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.filter-option {
	padding: var(--space-1) var(--space-3);
	font-family: var(--font-primary);
	font-size: var(--text-xs);
	font-weight: var(--font-medium);
	background: var(--color-white);
	border: 1px solid var(--color-gray-300);
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: all var(--transition-fast);
	color: var(--color-gray-700);
}

.filter-option:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
	background: rgba(91, 32, 115, 0.04);
}

.filter-option.active {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
	box-shadow: 0 2px 8px rgba(91, 32, 115, 0.2);
}

.price-range {
	display: flex;
	gap: var(--space-2);
	align-items: center;
}

.price-range input {
	width: 100%;
	padding: var(--space-2) var(--space-3);
	font-size: var(--text-sm);
	border: 1px solid var(--color-gray-300);
	border-radius: var(--radius-lg);
	background: var(--color-white);
}

.price-range span {
	color: var(--color-gray-400);
	flex-shrink: 0;
}

.filter-actions {
	margin-block-start: var(--space-4);
}

.filter-actions .btn {
	width: 100%;
	padding: var(--space-2) var(--space-4);
	font-size: var(--text-sm);
}

/* === Shop Header Bar === */

.shop-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-block-end: var(--space-6);
	padding-block-end: var(--space-4);
	border-block-end: 1px solid var(--color-gray-100);
}

.shop-result-count {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
}

/* === Product Grid === */

.shop-products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--grid-gap);
}

/* === Product Card (self-contained) === */

.shop-products-grid .product-card,
.products-grid .product-card {
	background: var(--color-surface);
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.shop-products-grid .product-card:hover,
.products-grid .product-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-card-hover);
}

.shop-products-grid .product-card-link,
.products-grid .product-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.shop-products-grid .product-card-media,
.products-grid .product-card-media {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: linear-gradient(135deg, var(--color-gray-50), var(--color-gray-100));
}

.shop-products-grid .product-card-image,
.products-grid .product-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.shop-products-grid .product-card:hover .product-card-image,
.products-grid .product-card:hover .product-card-image {
	transform: scale(1.08);
}

.shop-products-grid .product-card-placeholder,
.products-grid .product-card-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--color-secondary-light) 0%, var(--color-secondary) 50%, var(--color-accent-light) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.shop-products-grid .product-card-placeholder::after,
.products-grid .product-card-placeholder::after {
	content: '';
	width: 48px;
	height: 48px;
	opacity: 0.3;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}

.shop-products-grid .product-badge,
.products-grid .product-badge {
	position: absolute;
	inset-block-start: var(--space-3);
	inset-inline-start: var(--space-3);
	padding: var(--space-1) var(--space-3);
	font-size: var(--text-xs);
	font-weight: var(--font-bold);
	border-radius: var(--radius-full);
}

.shop-products-grid .sale-badge,
.products-grid .sale-badge {
	background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
	color: var(--color-white);
	box-shadow: 0 2px 8px rgba(155, 77, 202, 0.3);
}

.shop-products-grid .product-card-overlay,
.products-grid .product-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(91, 32, 115, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: all var(--transition-base);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.shop-products-grid .product-card:hover .product-card-overlay,
.products-grid .product-card:hover .product-card-overlay {
	opacity: 1;
}

.shop-products-grid .btn-quick-view,
.products-grid .btn-quick-view {
	background: var(--color-white);
	color: var(--color-primary);
	border: none;
	transform: translateY(20px);
	transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.shop-products-grid .btn-quick-view:hover,
.products-grid .btn-quick-view:hover {
	background: var(--color-gold);
	color: var(--color-white);
}

.shop-products-grid .product-card:hover .btn-quick-view,
.products-grid .product-card:hover .btn-quick-view {
	transform: translateY(0);
}

.shop-products-grid .product-card-info,
.products-grid .product-card-info {
	padding: var(--space-4) var(--space-5);
}

.shop-products-grid .product-card-title,
.products-grid .product-card-title {
	font-family: var(--font-primary);
	font-size: var(--text-sm);
	font-weight: var(--font-medium);
	color: var(--color-text);
	margin-block-end: var(--space-2);
	line-height: var(--leading-normal);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.shop-products-grid .product-card-price,
.products-grid .product-card-price {
	font-size: var(--text-base);
	font-weight: var(--font-bold);
	color: var(--color-primary);
}

.shop-products-grid .product-card-price del,
.products-grid .product-card-price del {
	color: var(--color-text-muted);
	font-weight: var(--font-regular);
	font-size: var(--text-sm);
	margin-inline-end: var(--space-2);
}

.shop-products-grid .product-card-price ins,
.products-grid .product-card-price ins {
	text-decoration: none;
	color: var(--color-accent);
}

/* === Pagination === */

.pagination {
	margin-block-start: var(--space-12);
	text-align: center;
}

.pagination .nav-links {
	display: inline-flex;
	gap: var(--space-2);
}

.pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	font-size: var(--text-sm);
	font-weight: var(--font-bold);
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-gray-200);
	color: var(--color-gray-700);
	transition: all var(--transition-fast);
	text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
	box-shadow: 0 2px 8px rgba(91, 32, 115, 0.2);
}

/* === Loading & Empty States === */

.shop-products-grid.loading {
	opacity: 0.5;
	pointer-events: none;
}

.no-products {
	grid-column: 1 / -1;
	text-align: center;
	padding: var(--space-16);
	color: var(--color-text-muted);
	font-size: var(--text-lg);
}

/* === Responsive === */

@media (max-width: 1024px) {
	.shop-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
	.shop-layout { grid-template-columns: 1fr; }
	.shop-filters { position: static; order: 2; }
	.shop-content { order: 1; }
	.shop-products-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
	.shop-page-title { font-size: var(--text-3xl); }
}

@media (max-width: 480px) {
	.shop-products-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
}
