/* ==========================================================================
   Prime Smart Flags - Shop, product card and product page
   Replaces the ad-hoc !important block that previously lived in Customizer
   CSS (post 7345). Every suppression below is intentional and annotated.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Quote-funnel suppressions
   This store takes enquiries, not payments: 27 of 30 products have no price,
   and there are no cart/checkout pages. Anything implying instant purchase is
   hidden so the UI never promises something the business cannot deliver.
   -------------------------------------------------------------------------- */

/* Native WooCommerce add-to-cart button. The surrounding <form> is kept
   because it renders the variation selects that the WhatsApp enquiry reads. */
.single-product button.single_add_to_cart_button,
.single-product .woocommerce-variation-add-to-cart .button {
	display: none !important;
}

/* Quantity picker: irrelevant for made-to-order print runs where quantity is
   negotiated in the enquiry. */
.single-product .woocommerce-variation-add-to-cart .quantity,
.single-product form.cart > .quantity {
	display: none !important;
}

/* Note: the previous Customizer CSS hid `.item--popcard` and `.info-right span`
   outright, because both carried "Add to cart" and an "AED 0.00" price. Both
   are now repurposed - the popcard holds the "View options" CTA and the price
   slot holds "Request a quote" - so they must stay visible. */

/* --------------------------------------------------------------------------
   2. Variation selector
   Attribute values here are long descriptive strings ("Medium: 3m x 90cm -
   Pole Height: 4m", 62 size terms, 35 fabric terms), so swatch buttons are
   the wrong control. Native selects are kept - as they were - but styled
   properly instead of the previous `border: 1px solid black`.
   The underlying <select> elements stay in the DOM because
   order-on-whatsapp.js reads their values to build the enquiry message.
   -------------------------------------------------------------------------- */

/* Swatch radiogroups stay hidden: label text is far too long for chips. */
.single-product ul[role="radiogroup"] {
	display: none !important;
}

.single-product table.variations {
	width: 100%;
	margin: 0 0 var(--ps-5);
	border: 0;
	border-collapse: collapse;
}
.single-product table.variations tr {
	display: block;
	margin-bottom: var(--ps-4);
	border: 0;
}
.single-product table.variations th,
.single-product table.variations td {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
}
.single-product table.variations th.label label {
	display: block;
	margin-bottom: var(--ps-2);
	font-size: var(--ps-fs-sm);
	font-weight: 600;
	color: var(--ps-ink);
	text-transform: none;
}

.single-product table.variations td.value select {
	display: block !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	width: 100%;
	min-height: 52px;
	padding: var(--ps-3) var(--ps-10) var(--ps-3) var(--ps-4);
	border: 1px solid var(--ps-line-strong) !important;
	border-radius: var(--ps-radius);
	background-color: var(--ps-surface);
	/* Chevron drawn inline so it costs no extra request. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%234c4a4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right var(--ps-4) center;
	font-family: var(--ps-font);
	font-size: var(--ps-fs-base);
	line-height: 1.4;
	color: var(--ps-ink);
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.single-product table.variations td.value select:hover {
	border-color: var(--ps-maroon) !important;
}
.single-product table.variations td.value select:focus {
	border-color: var(--ps-maroon) !important;
	box-shadow: var(--ps-focus);
	outline: none;
}
/* Unselected state reads as "needs your attention" without relying on colour
   alone - the label text carries the meaning too. */
.single-product table.variations td.value select:invalid,
.single-product table.variations td.value select[value=""] {
	color: var(--ps-muted);
}

.single-product .woocommerce-variation-price {
	margin-bottom: var(--ps-4);
}
.single-product a.reset_variations {
	display: inline-block;
	margin-top: var(--ps-2);
	font-size: var(--ps-fs-sm);
	color: var(--ps-muted);
}
.single-product a.reset_variations:hover {
	color: var(--ps-maroon);
}

/* --------------------------------------------------------------------------
   3. Quote panel - the single primary action on the product page
   -------------------------------------------------------------------------- */
.ps-quote-panel {
	padding: var(--ps-5);
	margin-bottom: var(--ps-5);
	background: var(--ps-surface);
	border: 1px solid var(--ps-line);
	border-radius: var(--ps-radius-lg);
	box-shadow: var(--ps-shadow-1);
}
.ps-quote-panel__price {
	display: flex;
	align-items: baseline;
	gap: var(--ps-2);
	margin-bottom: var(--ps-1);
	font-size: var(--ps-fs-2xl);
	font-weight: 700;
	color: var(--ps-ink);
}
.ps-quote-panel__from {
	font-size: var(--ps-fs-sm);
	font-weight: 500;
	color: var(--ps-muted);
}
.ps-quote-panel__note {
	margin: 0 0 var(--ps-4);
	font-size: var(--ps-fs-sm);
	color: var(--ps-muted);
}

/* The enquiry button is printed by order-on-whatsapp with inline styles, so
   these overrides need !important to win. */
#orderOnWhatsappBtn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: var(--ps-2);
	width: 100% !important;
	min-height: 56px;
	margin-top: 0 !important;
	padding: var(--ps-4) var(--ps-6) !important;
	background-color: var(--ps-maroon) !important;
	border-radius: var(--ps-radius) !important;
	font-size: var(--ps-fs-lg) !important;
	font-weight: 600 !important;
	color: #fff !important;
	text-align: center;
	letter-spacing: 0;
	transition: background-color 0.18s ease;
}
#orderOnWhatsappBtn:hover,
#orderOnWhatsappBtn:focus {
	background-color: var(--ps-maroon-600) !important;
}
#orderOnWhatsappBtn::before {
	content: "";
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.174.199-.347.223-.644.075-.297-.149-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.148-.669-1.611-.916-2.207-.242-.579-.487-.5-.669-.51l-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.263.489 1.694.625.712.227 1.36.195 1.872.118.571-.085 1.758-.719 2.006-1.413.247-.694.247-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884a9.82 9.82 0 016.988 2.898 9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Secondary actions sit quietly below the decision area so they never compete
   with the primary CTA. */
.ps-product-secondary {
	display: flex;
	align-items: center;
	gap: var(--ps-5);
	margin-top: var(--ps-5);
	padding-top: var(--ps-4);
	border-top: 1px solid var(--ps-line);
}
.ps-product-secondary .elementor-widget {
	margin: 0;
}

.ps-specs__title {
	margin: var(--ps-5) 0 var(--ps-2);
	font-size: var(--ps-fs-base);
	font-weight: 600;
	color: var(--ps-ink);
}
.ps-specs__title:first-child {
	margin-top: 0;
}

/* Artwork upload box from user-file-uploader, restyled in place. */
.custom-upload-wrapper {
	width: 100% !important;
	margin: 0 0 var(--ps-4) !important;
}
.custom-upload-box {
	padding: var(--ps-5) !important;
	border: 1.5px dashed var(--ps-line-strong) !important;
	border-radius: var(--ps-radius) !important;
	background: var(--ps-surface-2);
	transition: border-color 0.18s ease, background-color 0.18s ease;
}
.custom-upload-box:hover {
	border-color: var(--ps-maroon) !important;
	background: var(--ps-maroon-050);
}
.upload-title {
	font-size: var(--ps-fs-base) !important;
	font-weight: 600 !important;
	color: var(--ps-ink) !important;
}
.upload-description {
	font-size: var(--ps-fs-sm) !important;
	color: var(--ps-muted) !important;
}
.upload-button {
	padding: var(--ps-2) var(--ps-5) !important;
	background-color: var(--ps-surface) !important;
	border: 1px solid var(--ps-line-strong) !important;
	border-radius: var(--ps-radius-sm) !important;
	font-size: var(--ps-fs-sm) !important;
	font-weight: 600;
	color: var(--ps-ink) !important;
}
.ps-upload-filename {
	display: block;
	margin-top: var(--ps-2);
	font-size: var(--ps-fs-sm);
	font-weight: 600;
	color: var(--ps-success);
}
#shortcode-response {
	font-size: var(--ps-fs-sm);
}

/* --------------------------------------------------------------------------
   4. Product card
   Targets Kitify's actual loop markup:
   li.product_item > .product-item > .product-item__thumbnail
                                   > .product-item__description
   -------------------------------------------------------------------------- */
.products .product_item .product-item {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--ps-surface);
	border: 1px solid var(--ps-line);
	border-radius: var(--ps-radius-lg);
	overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.products .product_item .product-item:hover,
.products .product_item .product-item:focus-within {
	border-color: var(--ps-line-strong);
	box-shadow: var(--ps-shadow-2);
	transform: translateY(-2px);
}

/* A single ratio for every card. Flags vary wildly in shape, so `contain`
   keeps them whole and the fixed box removes layout shift. */
.products .product_item .product-item__thumbnail {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--ps-surface-2);
	overflow: hidden;
}
.products .product_item .product-item__thumbnail-placeholder {
	display: block;
	width: 100%;
	height: 100%;
}
.products .product_item .product-item__thumbnail-placeholder a {
	display: block;
	width: 100%;
	height: 100%;
}
.products .product_item .product-item__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	padding: var(--ps-4);
	transition: transform 0.3s ease;
}
.products .product_item .product-item:hover .product-item__thumbnail img {
	transform: scale(1.03);
}

/* CTA bar. Revealed on hover for pointer devices so the product image stays
   unobstructed; always visible on touch, where there is no hover. */
.products .product_item .item--popcard {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 3;
	padding: var(--ps-3);
	background: rgba(255, 255, 255, 0.96);
	border-top: 1px solid var(--ps-line);
	transform: translateY(101%);
	transition: transform 0.22s ease;
}
.products .product_item .product-item:hover .item--popcard,
.products .product_item .product-item:focus-within .item--popcard {
	transform: translateY(0);
}
@media (hover: none), (max-width: 1024px) {
	.products .product_item .item--popcard {
		position: static;
		transform: none;
		background: transparent;
		border-top: 0;
		padding: 0 var(--ps-5) var(--ps-5);
	}
}

/* Wishlist / quick-view actions */
.products .product_item .product-item__description--top-actions {
	position: absolute;
	top: var(--ps-3);
	right: var(--ps-3);
	z-index: 4;
	display: flex;
	flex-direction: column;
	gap: var(--ps-2);
}
.products .product_item .product-item__description--top-actions a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid var(--ps-line);
	border-radius: 50%;
	color: var(--ps-body);
}
.products .product_item .product-item__description--top-actions a:hover {
	border-color: var(--ps-maroon);
	color: var(--ps-maroon);
}

/* Text block */
.products .product_item .product-item__description {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: var(--ps-4) var(--ps-5) var(--ps-3);
}
.products .product_item .product-item__description--info {
	display: flex;
	flex-direction: column;
	gap: var(--ps-1);
}
.products .product_item .info-left a.title {
	text-decoration: none;
}
.products .product_item .woocommerce-loop-product__title {
	margin: 0;
	font-size: var(--ps-fs-lg);
	font-weight: 600;
	line-height: var(--ps-lh-snug);
	color: var(--ps-ink);
}
.products .product_item .info-left a.title:hover .woocommerce-loop-product__title {
	color: var(--ps-maroon);
}
.products .product_item .info-right .price {
	font-size: var(--ps-fs-base);
	font-weight: 700;
	color: var(--ps-ink);
}
.ps-card__quote {
	font-size: var(--ps-fs-sm);
	font-weight: 600;
	color: var(--ps-maroon);
}

/* Never show an empty price slot. */
.products .product_item .price:empty {
	display: none;
}

/* Ratings stay hidden until genuine reviews exist (currently zero approved). */
.products .product_item .star-rating,
.products .product_item .woocommerce-product-rating {
	display: none;
}

/* Stock badges are meaningless for made-to-order goods. */
.products .product_item .stock,
.single-product p.stock {
	display: none;
}

/* The theme's own badge slot is empty in this catalogue; collapse it so it
   does not add stray spacing. */
.products .product_item .product-item__badges:empty {
	display: none;
}

/* --------------------------------------------------------------------------
   5. Specifications
   -------------------------------------------------------------------------- */
.woocommerce-product-attributes,
#panel_material_tab table,
.ps-specs table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--ps-fs-sm);
}
.woocommerce-product-attributes th,
.woocommerce-product-attributes td,
#panel_material_tab table th,
#panel_material_tab table td,
.ps-specs th,
.ps-specs td {
	padding: var(--ps-3) var(--ps-4) !important;
	border: 1px solid var(--ps-line) !important;
	text-align: left;
	vertical-align: top;
	line-height: var(--ps-lh-snug);
}
.woocommerce-product-attributes th,
#panel_material_tab table th,
.ps-specs th {
	width: 34%;
	background: var(--ps-surface-2) !important;
	font-weight: 600;
	color: var(--ps-ink);
}
.woocommerce-product-attributes td,
.ps-specs td {
	color: var(--ps-body);
}

/* Tabs */
.woocommerce-tabs ul.tabs li a,
.nova-product-tabs .tab-title {
	font-weight: 600;
	color: var(--ps-body);
}
.woocommerce-tabs ul.tabs li.active a {
	color: var(--ps-maroon);
}

/* --------------------------------------------------------------------------
   6. Sticky mobile enquiry bar
   -------------------------------------------------------------------------- */
.ps-sticky-cta {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 900;
	display: none;
	gap: var(--ps-3);
	padding: var(--ps-3) var(--ps-4);
	padding-bottom: calc(var(--ps-3) + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, 0.97);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--ps-line);
	box-shadow: 0 -4px 20px rgba(35, 31, 32, 0.1);
	transform: translateY(100%);
	transition: transform 0.25s ease;
}
.ps-sticky-cta.is-visible {
	transform: translateY(0);
}
.ps-sticky-cta__label {
	flex: 1 1 auto;
	min-width: 0;
	align-self: center;
}
.ps-sticky-cta__title {
	display: block;
	font-size: var(--ps-fs-sm);
	font-weight: 600;
	color: var(--ps-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ps-sticky-cta__hint {
	display: block;
	font-size: var(--ps-fs-xs);
	color: var(--ps-muted);
}
.ps-sticky-cta .ps-btn {
	flex: 0 0 auto;
}

@media (max-width: 1024px) {
	.single-product .ps-sticky-cta {
		display: flex;
	}
	/* Keep the last section clear of the bar. */
	.single-product .site-footer {
		padding-bottom: 88px;
	}
}

/* --------------------------------------------------------------------------
   7. Shop archive - filters and toolbar
   -------------------------------------------------------------------------- */
.ps-shop-head {
	padding-block: var(--ps-8) var(--ps-6);
}
.ps-shop-head h1 {
	margin: var(--ps-2) 0 var(--ps-3);
	font-size: var(--ps-fs-3xl);
	line-height: var(--ps-lh-tight);
	color: var(--ps-ink);
}
.ps-shop-head__intro {
	max-width: 72ch;
	color: var(--ps-body);
	line-height: var(--ps-lh-base);
}
.ps-shop-count {
	font-size: var(--ps-fs-sm);
	color: var(--ps-muted);
}

.novaapf-widget,
.widget_novaapf_attribute_filter,
.widget_novaapf_category_filter,
.widget_novaapf_price_filter {
	padding: var(--ps-5);
	margin-bottom: var(--ps-4);
	background: var(--ps-surface);
	border: 1px solid var(--ps-line);
	border-radius: var(--ps-radius);
}
.widget-title,
.widgettitle {
	margin: 0 0 var(--ps-3);
	font-size: var(--ps-fs-base);
	font-weight: 600;
	color: var(--ps-ink);
}

/* Mobile filter/sort sheet */
.ps-filter-bar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: none;
	gap: var(--ps-3);
	padding: var(--ps-3) 0;
	background: var(--ps-surface);
	border-bottom: 1px solid var(--ps-line);
}
.ps-filter-bar .ps-btn {
	flex: 1 1 0;
	min-height: 44px;
}
@media (max-width: 1024px) {
	.ps-filter-bar {
		display: flex;
	}
	.ps-shop-sidebar {
		position: fixed;
		inset: 0;
		z-index: 950;
		display: block;
		padding: var(--ps-5);
		background: var(--ps-surface);
		overflow-y: auto;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
	}
	.ps-shop-sidebar.is-open {
		transform: translateX(0);
	}
	.ps-shop-sidebar__close {
		position: sticky;
		top: 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-bottom: var(--ps-4);
		background: var(--ps-surface);
	}
}

/* Real pagination instead of infinite scroll, so crawlers can reach page 2+. */
.woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ps-2);
	justify-content: center;
	padding: 0;
	border: 0;
	list-style: none;
}
.woocommerce-pagination ul.page-numbers li {
	border: 0;
}
.woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 var(--ps-3);
	border: 1px solid var(--ps-line);
	border-radius: var(--ps-radius-sm);
	color: var(--ps-body);
	text-decoration: none;
}
.woocommerce-pagination .page-numbers.current {
	background: var(--ps-maroon);
	border-color: var(--ps-maroon);
	color: #fff;
}
.woocommerce-pagination a.page-numbers:hover {
	border-color: var(--ps-maroon);
	color: var(--ps-maroon);
}

/* --------------------------------------------------------------------------
   8. Responsive product page layout
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	.ps-quote-panel {
		padding: var(--ps-4);
	}
	.ps-shop-head h1 {
		font-size: var(--ps-fs-2xl);
	}
	.single-product table.variations td.value select {
		min-height: 48px;
		font-size: var(--ps-fs-base); /* >=16px stops iOS zoom-on-focus */
	}
}
