/**
 * WikishoP - WooCommerce Styles
 * 
 * @package WikishoP
 */

body.wikishop-look-atelier .wikishop-archive-hero {
	background: #fff;
	border-color: color-mix(in srgb, var(--ws-gold, var(--ws-primary)) 22%, #fff);
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
body.wikishop-look-atelier .wikishop-archive-kicker {
	background: color-mix(in srgb, var(--ws-gold, var(--ws-primary)) 12%, #fff);
	color: var(--ws-gold, var(--ws-primary));
}
.wikishop-woo-page { padding: 1.25rem 0 2rem; }
.wikishop-archive-hero {
	background: #fff;
	border: 1px solid #eef2f7;
	border-radius: 18px;
	padding: 1.15rem 1rem 1rem;
	margin-bottom: 1.25rem;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.wikishop-archive-head { text-align: center; margin-bottom: 0.85rem; }
.wikishop-archive-kicker {
	display: inline-block;
	margin: 0 0 0.35rem;
	padding: 0.15rem 0.65rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ws-primary) 12%, #fff);
	color: var(--ws-primary);
	font-size: 12px;
	font-weight: 700;
}
.wikishop-woo-title {
	font-size: clamp(1.35rem, 4vw, 2rem);
	margin: 0 0 0.35rem;
}
.wikishop-archive-hero .wikishop-cats-carousel-wrap { margin: 0; }
.wikishop-archive-hero .wikishop-carousel-title { display: none; }
.wikishop-archive-hero .term-description,
.wikishop-archive-hero .woocommerce-products-header__description {
	color: #475569;
	font-size: 0.95rem;
	max-width: 42rem;
	margin: 0 auto;
}
.wikishop-woo-header {
	margin-bottom: 1.25rem;
	text-align: center;
}

/* === فیلترها و مرتب‌سازی === */
.woocommerce-ordering,
.woocommerce-result-count {
	margin-bottom: 1rem;
}
.woocommerce-result-count {
	color: #475569;
	font-size: 0.92rem;
	text-align: center;
}
.woocommerce-ordering select {
	padding: 0.625rem 1rem;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
}

/* === Grid محصولات === */
.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.products.columns-1 { grid-template-columns: 1fr; }
.products.columns-2 { grid-template-columns: repeat(2, 1fr); }
.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
.products.columns-5 { grid-template-columns: repeat(5, 1fr); }
.products .product,
.products .wikishop-card-product { height: 100%; }

/* === کارت محصول === */
.product {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	transition: transform 0.3s, box-shadow 0.3s;
	display: flex;
	flex-direction: column;
}
.product:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.product a { display: block; }

/* === تصویر محصول === */
.product .woocommerce-loop-product__link {
	position: relative;
}
.product img {
	width: 100%;
	aspect-ratio: 1/1;
	object-fit: cover;
	display: block;
}

/* === بج فروش === */
.product .onsale {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	background: var(--ws-accent, #ec4899);
	color: #fff;
	padding: 0.25rem 0.75rem;
	border-radius: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	z-index: 1;
}

/* === عنوان محصول === */
.woocommerce-loop-product__title {
	padding: 1rem 1rem 0.5rem;
	font-size: 1rem;
	color: var(--ws-heading, #0f172a);
	margin: 0;
}

/* === قیمت === */
.product .price {
	padding: 0 1rem 1rem;
	font-weight: 600;
	color: var(--ws-primary, #8b5cf6);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.product .price del,
.wikishop-carousel-price del {
	opacity: 0.5;
	font-weight: 400;
	font-size: 0.875rem;
	text-decoration: line-through;
}
.product .price ins,
.wikishop-carousel-price ins {
	text-decoration: none;
	color: var(--ws-accent, #ec4899);
}

/* === دکمه افزودن به سبد === */
.product .add_to_cart_button,
.product .product_type_simple,
.product .product_type_variable,
.wikishop-add-btn {
	margin: 0 1rem 1rem;
	padding: 0.7rem 1rem;
	background: var(--ws-btn-bg, #8b5cf6);
	color: var(--ws-btn-text, #fff);
	border: none;
	border-radius: 8px;
	font-weight: 600;
	text-align: center;
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
	min-height: 44px;
}
.wikishop-add-btn.is-busy { opacity: .7; pointer-events: none; }
body.wikishop-look-atelier .wikishop-card-body .wikishop-add-btn {
	margin: 0;
	background: transparent;
	color: var(--ws-gold, var(--ws-primary));
	border: 1px solid var(--ws-gold, var(--ws-primary));
	border-radius: 999px;
	box-shadow: none;
}
body.wikishop-look-atelier .wikishop-card-body .wikishop-add-btn:hover {
	background: var(--ws-btn-bg);
	color: var(--ws-btn-text);
	border-color: var(--ws-btn-bg);
	transform: none;
	box-shadow: none;
}
.product .add_to_cart_button:hover,
.product .product_type_simple:hover,
.product .product_type_variable:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
	opacity: 1;
	color: #fff;
}
.product .added_to_cart {
	display: block;
	margin: 0 1rem 1rem;
	text-align: center;
	color: var(--ws-primary);
	font-size: 0.875rem;
}

/* === Pagination === */
.woocommerce-pagination {
	margin-top: 3rem;
	text-align: center;
}
.woocommerce-pagination ul {
	display: inline-flex;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.woocommerce-pagination li {
	margin: 0;
}
.woocommerce-pagination a,
.woocommerce-pagination span {
	display: inline-block;
	padding: 0.5rem 0.875rem;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	color: var(--ws-text);
	transition: all 0.2s;
}
.woocommerce-pagination a:hover,
.woocommerce-pagination .current {
	background: var(--ws-primary);
	border-color: var(--ws-primary);
	color: #fff;
}

/* === محصول تکی (fallback - افزونه Aroma override می‌کند) === */
.single-product .product {
	background: transparent;
	box-shadow: none;
}
.single-product .woocommerce-product-gallery {
	aspect-ratio: 1 / 1;
	min-height: 240px;
	background: #f8fafc;
	border-radius: 18px;
	overflow: hidden;
}
.single-product .woocommerce-product-gallery img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
}

/* === سبد خرید === */
.woocommerce-cart-form__contents {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.woocommerce-cart-form__contents th,
.woocommerce-cart-form__contents td {
	padding: 1rem;
	text-align: right;
	border-bottom: 1px solid #e5e7eb;
}
.woocommerce-cart-form__contents th {
	background: var(--ws-bg);
	font-weight: 600;
}
.woocommerce-cart-form__contents img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 8px;
}
.woocommerce-cart-form .quantity input {
	width: 70px;
	padding: 0.5rem;
	border: 2px solid #e5e7eb;
	border-radius: 6px;
	text-align: center;
}
.cart .actions .button {
	padding: 0.75rem 1.5rem;
	background: var(--ws-btn-bg);
	color: var(--ws-btn-text);
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
}

/* === جمع سبد === */
.cart-collaterals {
	margin-top: 2rem;
}
.cart_totals {
	background: #fff;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	max-width: 500px;
	margin: 0 0 0 auto;
}
.cart_totals h2 {
	margin-bottom: 1rem;
	font-size: 1.5rem;
}
.cart_totals table {
	width: 100%;
	border-collapse: collapse;
}
.cart_totals th,
.cart_totals td {
	padding: 0.75rem 0;
	text-align: right;
	border-bottom: 1px solid #e5e7eb;
}
.cart_totals .order-total th,
.cart_totals .order-total td {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ws-primary);
}
.wc-proceed-to-checkout .checkout-button {
	display: block;
	width: 100%;
	padding: 1rem;
	background: var(--ws-btn-bg);
	color: var(--ws-btn-text);
	border: none;
	border-radius: 8px;
	font-size: 1.125rem;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	margin-top: 1rem;
	transition: transform 0.2s;
}
.wc-proceed-to-checkout .checkout-button:hover {
	transform: translateY(-2px);
	opacity: 1;
}

/* === Checkout === */
.woocommerce-checkout .col2-set,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
	background: #fff;
	border-radius: 12px;
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.woocommerce-checkout .form-row {
	margin-bottom: 1.5rem;
}
.woocommerce-checkout label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	transition: border-color 0.2s;
}
.woocommerce-checkout input:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus {
	outline: none;
	border-color: var(--ws-primary);
}
#place_order {
	width: 100%;
	padding: 1rem;
	background: var(--ws-btn-bg);
	color: var(--ws-btn-text);
	border: none;
	border-radius: 8px;
	font-size: 1.125rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.2s;
}
#place_order:hover {
	transform: translateY(-2px);
}

/* === پیام‌ها === */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	background: #fff;
	border-right: 4px solid var(--ws-primary);
	border-radius: 8px;
	padding: 1rem 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.woocommerce-message::before,
.woocommerce-info::before { display: none; }
.woocommerce-error { border-color: #ef4444; }

/* === Responsive === */
@media (max-width: 1024px) {
	.products { grid-template-columns: repeat(3, 1fr); }
}

/* Reviews */
.wikishop-reviews { background: #fff; border-radius: 16px; padding: 1.1rem; margin-top: 1rem; }
.wikishop-reviews-summary { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem; }
.wikishop-review-stars { border: 0; margin: 0 0 1rem; padding: 0; }
.wikishop-review-stars legend { font-weight: 800; margin-bottom: 0.4rem; }
.wikishop-stars { display: inline-flex; flex-direction: row-reverse; gap: 0.15rem; }
.wikishop-stars input { position: absolute; opacity: 0; pointer-events: none; }
.wikishop-stars label {
	font-size: 2rem;
	line-height: 1;
	color: #e2e8f0;
	cursor: pointer;
	min-width: 36px;
	min-height: 36px;
	display: grid;
	place-items: center;
}
.wikishop-stars label:hover,
.wikishop-stars label:hover ~ label,
.wikishop-stars input:checked ~ label,
.wikishop-stars input:focus-visible + label { color: #f59e0b; }
.wikishop-reviews .comment-form-comment textarea,
.wikishop-reviews input[type="text"],
.wikishop-reviews input[type="email"] {
	width: 100%;
	border: 2px solid #e5e7eb;
	border-radius: 10px;
	padding: 0.75rem 0.85rem;
	min-height: 48px;
}
.wikishop-reviews textarea { min-height: 140px; }
.wikishop-hp {
	position: absolute !important;
	inset: 0 auto auto 0;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
.wikishop-reviews .form-submit .submit {
	background: var(--ws-btn-bg);
	color: var(--ws-btn-text);
	border: 0;
	border-radius: 10px;
	padding: 0.75rem 1.2rem;
	min-height: 44px;
	font-weight: 800;
}

@media (max-width: 768px) {
	.products,
	.products.columns-3,
	.products.columns-4,
	.products.columns-5 { grid-template-columns: repeat(2, 1fr); gap: 0.55rem; }
	.products.columns-1 { grid-template-columns: 1fr; }
	.wikishop-woo-title { font-size: 1.35rem; }
	.wikishop-archive-hero { padding: 1rem 0.75rem 0.85rem; }
	.woocommerce-ordering { width: 100%; }
	.woocommerce-ordering select { width: 100%; min-height: 44px; font-size: 16px; }
}

/* پاپ‌آپ مرحله‌ای افزودن به سبد */
.aroma-flow-lock { overflow: hidden; }
.aroma-flow {
	position: fixed; inset: 0; z-index: 520;
	background: rgba(15, 23, 42, .45);
	display: flex; align-items: flex-end; justify-content: center;
	padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
}
.aroma-flow[hidden] { display: none !important; }
.aroma-flow-card {
	width: min(420px, 100%);
	max-height: min(92vh, 760px);
	overflow: auto;
	background: #fff;
	border-radius: 22px 22px 16px 16px;
	box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
	position: relative;
	padding: 18px 16px 16px;
	font-family: inherit;
	direction: rtl;
}
.aroma-flow-x {
	position: absolute; top: 12px; left: 12px;
	width: 32px; height: 32px; border: 0; border-radius: 50%;
	background: #fee2e2; color: #b91c1c; font-size: 20px; line-height: 1; cursor: pointer;
}
.aroma-flow-card h3 {
	margin: 0 36px 10px 36px; text-align: center; font-size: 16px;
}
.aroma-flow-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.aroma-flow-dots i {
	width: 7px; height: 7px; border-radius: 50%; background: #e2e8f0; display: block;
}
.aroma-flow-dots i.on { background: #7c3aed; }
.aroma-flow-main {
	display: flex; gap: 10px; align-items: center;
	background: #f8fafc; border-radius: 14px; padding: 10px;
	margin-bottom: 14px;
}
.aroma-flow-main img {
	width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #fff;
}
.aroma-flow-main strong { display: block; font-size: 13px; line-height: 1.5; }
.aroma-flow-main b { display: block; margin-top: 4px; color: #6d28d9; font-size: 13px; }
.aroma-flow-sec h4 {
	margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 8px;
}
.aroma-flow-sec h4 em {
	font-style: normal; font-size: 11px; font-weight: 800;
	background: #e2e8f0; color: #475569; border-radius: 999px; padding: 2px 8px;
}
.aroma-flow-sec h4 em.is-need { background: #0f172a; color: #fff; }
.aroma-flow-list { display: flex; flex-direction: column; gap: 8px; }
.aroma-flow-row {
	display: grid; grid-template-columns: 22px minmax(0, 1fr) 56px;
	gap: 10px; align-items: center;
	border: 1px solid #e2e8f0; border-radius: 14px; padding: 8px 10px;
	background: #fff; cursor: pointer;
}
.aroma-flow-row.is-on { border-color: #c4b5fd; background: #f5f3ff; }
.aroma-flow-row input { width: 18px; height: 18px; accent-color: #7c3aed; }
.aroma-flow-row strong { display: block; font-size: 12.5px; line-height: 1.45; }
.aroma-flow-row b { display: block; margin-top: 3px; font-size: 12px; color: #6d28d9; }
.aroma-flow-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.aroma-flow-boxes {
	display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.aroma-flow-box {
	border: 1px solid #e2e8f0; background: #fff; border-radius: 14px;
	padding: 8px; text-align: center; cursor: pointer; font-family: inherit;
}
.aroma-flow-box.is-on { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124, 58, 237, .2); }
.aroma-flow-box img {
	width: 100%; height: 110px; object-fit: cover; border-radius: 10px; background: #f8fafc;
}
.aroma-flow-box span { display: block; margin-top: 6px; font-size: 12px; font-weight: 700; }
.aroma-flow-box b { display: block; margin-top: 2px; font-size: 12px; color: #6d28d9; }
.aroma-flow-foot { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.aroma-flow-total {
	display: flex; justify-content: space-between; align-items: baseline;
	background: #f8fafc; border-radius: 12px; padding: 10px 12px; font-size: 13px;
}
.aroma-flow-total strong { color: #6d28d9; font-size: 15px; }
.aroma-flow-qty[hidden] { display: none !important; }
.aroma-flow-qty {
	display: flex; align-items: center; justify-content: center; gap: 8px;
}
.aroma-flow-w {
	display: block; margin-top: 3px; font-size: 11px; font-weight: 700; color: #64748b;
}
.aroma-flow-qty button {
	width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e2e8f0;
	background: #fff; font-size: 18px; cursor: pointer;
}
.aroma-flow-qty input {
	width: 48px; height: 36px; text-align: center; border: 1px solid #e2e8f0;
	border-radius: 10px; font: inherit;
}
.aroma-flow-go {
	width: 100%; height: 48px; border: 0; border-radius: 999px;
	background: linear-gradient(90deg, #7c3aed, #6d28d9); color: #fff;
	font: inherit; font-weight: 800; cursor: pointer;
}
@media (min-width: 720px) {
	.aroma-flow { align-items: center; }
	.aroma-flow-card { border-radius: 20px; }
}
