.tagh-smcalc {
	--tagh-ink: #0A121F;
	--tagh-ink-2: #16283F;
	--tagh-teal: #0E9F9A;
	--tagh-teal-dark: #0C8580;
	--tagh-gold: #C68A2E;
	--tagh-border: #E2E8F0;
	--tagh-muted: #52627A;

	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 20px;
	font-family: 'Tajawal', 'Cairo', 'Segoe UI', system-ui, sans-serif;
	direction: rtl;
}

.tagh-smcalc__title {
	font-size: clamp(28px, 3.4vw, 42px);
	font-weight: 800;
	color: var(--tagh-ink);
	text-align: center;
	margin: 0 0 12px;
}

.tagh-smcalc__subtitle {
	font-size: 16px;
	color: var(--tagh-muted);
	text-align: center;
	max-width: 640px;
	margin: 0 auto 36px;
	line-height: 1.7;
}

.tagh-smcalc__frame {
	background: #fff;
	border: 1px solid var(--tagh-border);
	border-radius: 20px;
	box-shadow: 0 8px 30px rgba(15, 27, 45, 0.06);
	padding: 8px;
}

/* ---- Reskin the real WooCommerce single-product layout ----
   Theme markup (PrintSpace): .product > .single-product-top is a flex row
   containing BOTH the gallery AND .single-product-summary (title/price/form)
   side by side — do not cap its width, that crushes the form column. */

.tagh-smcalc__frame .product {
	padding: 8px 8px 28px;
}

/* Let the theme's own gallery/summary flex layout keep its natural width —
   do not cap .single-product-top/.single-product-bottom, both the gallery
   AND the entire form live inside .single-product-top as flex siblings. */

.tagh-smcalc__frame .woocommerce-product-gallery {
	border-radius: 16px;
	overflow: hidden;
	background: #F5F7FB;
}

.tagh-smcalc__frame .product_title {
	font-size: 26px;
	font-weight: 800;
	color: var(--tagh-ink);
	margin-top: 0;
}

.tagh-smcalc__frame .price {
	font-family: 'IBM Plex Mono', 'Courier New', monospace;
	font-size: 28px;
	font-weight: 700;
	color: var(--tagh-teal-dark);
}

.tagh-smcalc__frame .woocommerce-product-details__short-description {
	color: var(--tagh-muted);
	line-height: 1.7;
}

/* Variation attribute rows */
.tagh-smcalc__frame table.variations {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0 4px;
}

.tagh-smcalc__frame table.variations,
.tagh-smcalc__frame table.variations tbody {
	display: block !important;
}

.tagh-smcalc__frame table.variations tr {
	display: block !important;
	width: 100% !important;
	margin-bottom: 18px;
}

.tagh-smcalc__frame table.variations td.label {
	display: block !important;
	width: 100% !important;
	font-weight: 700;
	color: var(--tagh-ink);
	font-size: 14px;
	margin-bottom: 10px;
}

.tagh-smcalc__frame table.variations td.value {
	display: block !important;
	width: 100% !important;
}

/* Hide the native <select> visually but keep it fully functional
   (WooCommerce's own JS reads/writes .val() and listens for 'change'). */
.tagh-smcalc__native-select {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tagh-smcalc__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tagh-smcalc__pill {
	appearance: none;
	border: 1.5px solid var(--tagh-border);
	background: #F5F7FB;
	color: var(--tagh-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: all 150ms cubic-bezier(0.2, 0, 0.2, 1);
}

.tagh-smcalc__pill:hover {
	border-color: var(--tagh-teal);
	color: var(--tagh-teal-dark);
}

.tagh-smcalc__pill.is-active {
	background: var(--tagh-teal);
	border-color: var(--tagh-teal);
	color: #fff;
	box-shadow: 0 4px 14px rgba(14, 159, 154, 0.3);
}

.tagh-smcalc__pill:active {
	transform: translateY(1px);
}

.tagh-smcalc__frame .woocommerce-variation-price .price,
.tagh-smcalc__frame .woocommerce-variation-availability {
	font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

.tagh-smcalc__frame .single_add_to_cart_button {
	background: var(--tagh-teal);
	border: none;
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	padding: 14px 28px;
	border-radius: 12px;
	cursor: pointer;
	transition: background 150ms;
}

.tagh-smcalc__frame .single_add_to_cart_button:hover {
	background: var(--tagh-teal-dark);
}

.tagh-smcalc__frame .reset_variations {
	color: var(--tagh-muted);
	font-size: 13px;
}

/* File upload field (WPC Product Options) */
.tagh-smcalc__frame .wpcpo-wrapper {
	background: #F5F7FB;
	border: 1.5px dashed var(--tagh-border);
	border-radius: 14px;
	padding: 16px 18px;
	margin: 8px 0 18px;
}

.tagh-smcalc__frame .wpcpo-wrapper label {
	font-weight: 700;
	color: var(--tagh-ink);
}

.tagh-smcalc__frame input[type="file"] {
	font-size: 13px;
	color: var(--tagh-muted);
}

.tagh-smcalc__frame input[type="file"]::file-selector-button {
	appearance: none;
	border: none;
	background: var(--tagh-ink-2);
	color: #fff;
	font-family: inherit;
	font-weight: 600;
	font-size: 13px;
	padding: 9px 16px;
	border-radius: 999px;
	cursor: pointer;
	margin-inline-end: 10px;
	transition: background 150ms;
}

.tagh-smcalc__frame input[type="file"]::file-selector-button:hover {
	background: var(--tagh-teal-dark);
}

/* Simplify: hide tabs/related products for a focused calculator feel */
.tagh-smcalc__frame .woocommerce-tabs,
.tagh-smcalc__frame .related.products {
	display: none;
}
