/**
 * Amiri Gold — Shop Page & Product Cards
 * Matches reference: modern dark-theme gold e-commerce
 */

/* ============================================================
   COMMON CONTAINER
   ============================================================ */
.ag-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ============================================================
   HIDE DEFAULT WOOCOMMERCE TOOLBAR (our filter bar replaces it)
   ============================================================ */
.woocommerce-result-count {
	display: none;
}
.woocommerce-ordering {
	display: none;
}
.ag-filter-bar__sort .woocommerce-ordering {
	display: block;
}

/* Hide default WooCommerce wrappers for our pages */
.woocommerce .woocommerce-notices-wrapper {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ============================================================
   SHOP HERO
   ============================================================ */
.ag-shop-hero {
	position: relative;
	padding: 80px 0 60px;
	overflow: hidden;
}
.ag-shop-hero__bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0d0d0d 100%);
	z-index: 0;
}
.ag-shop-hero__content {
	position: relative;
	z-index: 1;
	text-align: center;
}
.ag-shop-hero__title {
	font-family: 'Vazirmatn', sans-serif;
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 800;
	color: #fff;
	margin: 0 0 16px;
	background: linear-gradient(135deg, #f3d37a 0%, #d4af37 50%, #b8860b 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.ag-shop-hero__subtitle {
	font-size: 1.05rem;
	color: rgba(255,255,255,0.6);
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.8;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.ag-filter-bar {
	background: #141414;
	border-bottom: 1px solid rgba(255,255,255,0.06);
	position: sticky;
	top: 0;
	z-index: 50;
	padding: 16px 0;
}
.ag-filter-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

/* Category filter pills */
.ag-filter-bar__cats {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}
.ag-filter-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 20px;
	border-radius: 999px;
	font-family: 'Vazirmatn', sans-serif;
	font-size: 0.88rem;
	font-weight: 500;
	color: rgba(255,255,255,0.65);
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.08);
	text-decoration: none;
	transition: all 0.25s ease;
	white-space: nowrap;
}
.ag-filter-btn:hover {
	color: #fff;
	background: rgba(255,255,255,0.1);
	border-color: rgba(255,255,255,0.15);
}
.ag-filter-btn.is-active {
	color: #1a1a1a;
	background: linear-gradient(135deg, #d4af37, #f3d37a);
	border-color: transparent;
	font-weight: 600;
}

/* Sort + View actions */
.ag-filter-bar__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}
.ag-filter-bar__sort select,
.ag-filter-bar__sort .woocommerce-ordering select,
.ag-filter-bar__sort .orderby {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.1);
	color: #fff;
	padding: 8px 14px;
	border-radius: 10px;
	font-family: 'Vazirmatn', sans-serif;
	font-size: 0.85rem;
	cursor: pointer;
	outline: none;
}
.ag-filter-bar__sort select option {
	background: #1a1a1a;
	color: #fff;
}
.ag-filter-bar__view {
	display: flex;
	gap: 4px;
}
.ag-view-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border: 1px solid rgba(255,255,255,0.08);
	background: transparent;
	color: rgba(255,255,255,0.5);
	cursor: pointer;
	transition: all 0.2s ease;
}
.ag-view-btn:hover {
	color: #fff;
	background: rgba(255,255,255,0.06);
}
.ag-view-btn.is-active {
	color: #d4af37;
	border-color: rgba(212,175,55,0.3);
	background: rgba(212,175,55,0.08);
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.ag-shop-grid {
	background: #111;
	padding: 40px 0 80px;
}
.ag-shop-grid__count {
	font-size: 0.88rem;
	color: rgba(255,255,255,0.45);
	margin-bottom: 24px;
}

/* WooCommerce product loop */
.ag-shop-grid .products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	list-style: none;
	padding: 0;
	margin: 0;
}
.ag-shop-grid .products[data-columns="4"] {
	grid-template-columns: repeat(4, 1fr);
}
.ag-shop-grid .products[data-columns="2"] {
	grid-template-columns: repeat(2, 1fr);
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.ag-product-card {
	background: #1a1a1a;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid rgba(255,255,255,0.06);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}
.ag-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* Card media */
.ag-product-card__media {
	position: relative;
	display: block;
	text-decoration: none;
}
.ag-product-card__img-wrap {
	aspect-ratio: 1;
	overflow: hidden;
	background: #222;
}
.ag-product-card__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ag-product-card:hover .ag-product-card__img-wrap img {
	transform: scale(1.06);
}

/* Badges */
.ag-product-card__badges {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ag-product-card__badge {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 600;
}
.ag-product-card__badge--sale {
	background: linear-gradient(135deg, #d4af37, #f3d37a);
	color: #1a1a1a;
}

/* Quick action buttons */
.ag-product-card__actions {
	position: absolute;
	bottom: 12px;
	left: 12px;
	display: flex;
	gap: 8px;
	opacity: 0;
	transform: translateY(8px);
	transition: all 0.3s ease;
}
.ag-product-card:hover .ag-product-card__actions {
	opacity: 1;
	transform: translateY(0);
}
.ag-product-card__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(26,26,26,0.85);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,0.1);
	color: #fff;
	text-decoration: none;
	transition: all 0.2s ease;
}
.ag-product-card__action:hover {
	background: #d4af37;
	color: #1a1a1a;
	border-color: #d4af37;
}

/* Card body */
.ag-product-card__body {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.ag-product-card__cat {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: rgba(212,175,55,0.7);
}
.ag-product-card__rating {
	display: flex;
	align-items: center;
	gap: 6px;
}
.ag-product-card__stars {
	display: flex;
	gap: 2px;
}
.ag-product-card__rating-num {
	font-size: 0.82rem;
	color: rgba(255,255,255,0.5);
}
.ag-product-card__title {
	font-family: 'Vazirmatn', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.5;
}
.ag-product-card__title a {
	color: #fff;
	text-decoration: none;
	transition: color 0.2s ease;
}
.ag-product-card__title a:hover {
	color: #d4af37;
}

/* Card footer */
.ag-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid rgba(255,255,255,0.06);
}
.ag-product-card__price {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
}
.ag-product-card__price del {
	color: rgba(255,255,255,0.35);
	font-weight: 400;
	font-size: 0.85rem;
	margin-left: 8px;
}
.ag-product-card__price ins {
	text-decoration: none;
}
.ag-product-card__cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: rgba(212,175,55,0.1);
	border: 1px solid rgba(212,175,55,0.2);
	color: #d4af37;
	text-decoration: none;
	transition: all 0.25s ease;
}
.ag-product-card__cart-btn:hover {
	background: #d4af37;
	color: #1a1a1a;
	border-color: #d4af37;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ag-shop-grid .woocommerce-pagination {
	margin-top: 48px;
	text-align: center;
}
.ag-shop-grid .woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0;
}
.ag-shop-grid .woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: 10px;
	font-size: 0.9rem;
	font-weight: 500;
	color: rgba(255,255,255,0.6);
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.08);
	text-decoration: none;
	transition: all 0.2s ease;
}
.ag-shop-grid .woocommerce-pagination .page-numbers:hover {
	color: #fff;
	background: rgba(255,255,255,0.1);
}
.ag-shop-grid .woocommerce-pagination .page-numbers.current {
	color: #1a1a1a;
	background: linear-gradient(135deg, #d4af37, #f3d37a);
	border-color: transparent;
	font-weight: 700;
}

/* ============================================================
   NO PRODUCTS FOUND
   ============================================================ */
.ag-shop-grid .woocommerce-no-products-found {
	text-align: center;
	padding: 80px 20px;
}
.ag-shop-grid .woocommerce-no-products-found p {
	color: rgba(255,255,255,0.5);
	font-size: 1.1rem;
}
.ag-shop-grid .woocommerce-no-products-found a {
	color: #d4af37;
	text-decoration: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
	.ag-shop-grid .products {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
	.ag-shop-grid .products[data-columns="4"] {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 768px) {
	.ag-shop-hero {
		padding: 60px 0 40px;
	}
	.ag-filter-bar__inner {
		flex-direction: column;
		align-items: stretch;
	}
	.ag-filter-bar__cats {
		overflow-x: auto;
		padding-bottom: 8px;
		-ms-overflow-style: none;
		scrollbar-width: none;
	}
	.ag-filter-bar__cats::-webkit-scrollbar {
		display: none;
	}
	.ag-filter-bar__actions {
		justify-content: space-between;
	}
	.ag-shop-grid .products {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
	.ag-shop-grid .products[data-columns="3"],
	.ag-shop-grid .products[data-columns="4"] {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 480px) {
	.ag-shop-grid .products {
		grid-template-columns: 1fr;
	}
	.ag-product-card__body {
		padding: 14px;
	}
}
