/* SP Catalog RFQ — catalog mode + quote request form. RTL-first, inherits theme typography. */

/* Prices that may be printed by widgets bypassing WooCommerce price filters. */
.woocommerce-cart .cart-collaterals,
.woocommerce-cart .wc-proceed-to-checkout,
.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal,
.woocommerce-mini-cart__total,
.elementor-menu-cart__subtotal,
.elementor-menu-cart__footer-buttons .elementor-button--checkout,
.elementor-menu-cart__product-price .woocommerce-Price-amount,
.wc-block-mini-cart__footer-subtotal,
.wc-block-mini-cart__footer-checkout {
	display: none !important;
}

/* Category product table (sp-woocommerce-category-manager): set price, or "on request" in muted text. */
.sp-category-products-table .sp-product-price-cell {
	white-space: nowrap;
}

.sp-category-products-table .sp-product-price {
	color: #083043;
	font-size: 17px;
	font-weight: 700;
}

.sp-category-products-table .sp-product-price del {
	display: block;
	color: #5c6e77;
	font-size: 14px;
	font-weight: 400;
}

.sp-category-products-table .sp-product-price ins {
	color: #b84e14;
	text-decoration: none;
}

.sp-category-products-table .sp-crfq-noprice {
	color: #5c6e77;
	font-size: 14px;
	font-weight: 400;
}

/* WooCommerce appends a "view list" link after an AJAX add; in the table it widens the column — the header counter covers it. */
.sp-category-products-table a.added_to_cart {
	display: none !important;
}

.sp-crfq-loadmore-bar {
	display: flex;
	justify-content: center;
	margin: 24px 0 8px;
}

.sp-crfq-loadmore-bar .sp-crfq-loadmore {
	min-height: 48px;
	padding: 12px 28px;
	border: 1px solid #083043 !important; /* Theme button styles would recolour it. */
	border-radius: 6px;
	background: #fff !important;
	color: #083043 !important;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.sp-crfq-loadmore-bar .sp-crfq-loadmore:hover:not(:disabled),
.sp-crfq-loadmore-bar .sp-crfq-loadmore:focus-visible {
	background: #083043 !important;
	color: #fff !important;
}

.sp-crfq-loadmore:disabled {
	opacity: 0.6;
	cursor: wait;
}

.sp-category-products-table td {
	vertical-align: middle;
}

.sp-category-products-table .sp-product-actions-cell {
	width: 1%;
	white-space: nowrap;
}

.sp-category-products-table .sp-add-to-cart-form {
	display: flex;
	flex-direction: row !important; /* The table plugin stacks it as a column. */
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.sp-category-products-table .sp-quantity-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.sp-category-products-table .sp-quantity-label {
	margin: 0;
	font-weight: 600;
	white-space: nowrap;
}

.sp-category-products-table .sp-quantity-input {
	width: 64px;
	height: 40px;
	margin: 0;
	padding: 0 6px;
	text-align: center;
	box-sizing: border-box;
}

.sp-category-products-table .sp-add-to-cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	margin: 0;
	padding: 0 18px;
	white-space: nowrap;
	line-height: 1;
}

.sp-category-products-table .sp-add-to-cart-form {
	position: relative;
}

/* Confirmation line injected by the table script: below the row, without breaking the alignment. */
.sp-category-products-table .sp-success-message {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	margin-top: 4px;
	font-size: 12px;
	white-space: normal;
	text-align: center;
}

@media (max-width: 768px) {
	.sp-category-products-table .sp-product-actions-cell {
		width: auto;
	}

	.sp-category-products-table .sp-add-to-cart-form {
		justify-content: flex-start;
	}

	.sp-category-products-table .sp-add-to-cart-btn {
		flex: 1 1 auto;
		width: auto !important;
		min-width: 0 !important;
	}
}

/* Header link to the request list: icon + counter bubble. Inherits the header text colour. */
.sp-crfq-cart-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	color: inherit;
	text-decoration: none;
	line-height: 1;
}

.sp-crfq-cart-link:hover,
.sp-crfq-cart-link:focus-visible {
	color: inherit;
	opacity: 0.85;
}

.sp-crfq-cart-link svg {
	display: block;
	flex: 0 0 auto;
}

.sp-crfq-cart-label {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.sp-crfq-cart-count {
	position: absolute;
	top: -2px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: #c62828;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-sizing: border-box;
}

.sp-crfq-cart-link:not(.has-items) .sp-crfq-cart-count {
	display: none;
}

.sp-crfq-cart-link.is-icon-only .sp-crfq-cart-label {
	display: none;
}

@media (max-width: 767px) {
	.sp-crfq-cart-label {
		display: none;
	}
}

/* WooCommerce prints the PhotoSwipe lightbox markup on pages where its stylesheet is not
   loaded; the bare toolbar buttons then show up under the footer. Keep it hidden until opened. */
.pswp:not(.pswp--open) {
	display: none !important;
}

/* ---- Phones: category grid two per row ---- */
@media (max-width: 767px) {
	.sp-categories-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
	}

	.sp-categories-grid .sp-category-grid-image-wrapper {
		position: relative;
	}

	.sp-categories-grid .sp-category-grid-image-wrapper .sp-category-image-placeholder {
		position: absolute !important;
		inset: 0;
		width: 100% !important;
		height: 100% !important;
		margin: 0 !important;
	}

	.sp-categories-grid .sp-category-grid-name {
		padding: 10px 8px !important;
		font-size: 15px !important;
		line-height: 1.3 !important;
	}
}

/* ---- Phones: category products table as compact rows (thumb | name, then qty + button) ---- */
@media (max-width: 767px) {
	.sp-category-products-table,
	.sp-category-products-table tbody {
		display: block !important;
		width: 100% !important;
	}

	.sp-category-products-table thead {
		display: none !important;
	}

	.sp-category-products-table tbody tr {
		display: grid !important;
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 10px 12px;
		align-items: start;
		margin: 0 0 10px !important;
		padding: 12px !important;
		border: 1px solid #dbe5ea !important;
		border-radius: 12px !important;
		background: #fff !important;
		box-shadow: none !important;
	}

	.sp-category-products-table tbody td {
		display: block !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		background: transparent !important;
		text-align: start !important;
	}

	.sp-category-products-table tbody td::before {
		display: none !important;
	}

	.sp-category-products-table td.sp-product-price-cell {
		grid-column: 2;
	}

	.sp-category-products-table td.sp-product-image-cell {
		grid-row: span 2;
	}

	.sp-category-products-table .sp-product-price del {
		display: inline;
		margin-inline-end: 6px;
	}

	.sp-category-products-table td.sp-product-image-cell img,
	.sp-category-products-table .sp-product-image-placeholder {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 64px !important;
		height: 64px !important;
		margin: 0 !important;
		border-radius: 8px !important;
		object-fit: contain;
		font-size: 11px !important;
		line-height: 1.2 !important;
		text-align: center;
	}

	.sp-category-products-table .sp-product-name {
		margin: 0 0 4px !important;
		font-size: 15px !important;
		line-height: 1.35 !important;
	}

	.sp-category-products-table .sp-product-description {
		font-size: 13px !important;
		line-height: 1.4 !important;
	}

	.sp-category-products-table td.sp-product-actions-cell {
		grid-column: 1 / -1;
	}

	.sp-category-products-table .sp-add-to-cart-form {
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
		gap: 10px !important;
	}

	.sp-category-products-table .sp-quantity-wrapper {
		display: flex !important;
		flex: 0 0 auto !important;
		width: auto !important;
		align-items: center;
		gap: 6px;
		margin: 0 !important;
	}

	.sp-category-products-table .sp-quantity-input {
		width: 64px !important;
		height: 44px !important;
	}

	.sp-category-products-table .sp-add-to-cart-btn {
		flex: 1 1 auto;
		min-height: 44px;
		margin: 0 !important;
	}
}

/* ---- My account: links and buttons in brand colours instead of the theme pink / grey ---- */
.woocommerce-account .woocommerce a:not(.button) {
	color: #083043;
}

.woocommerce-account .woocommerce .button,
.woocommerce-account .woocommerce button.button {
	border: 0;
	border-radius: 8px;
	background: #083043 !important;
	color: #fff !important;
	font-weight: 700;
}

.woocommerce-account .woocommerce .button:hover,
.woocommerce-account .woocommerce button.button:hover {
	background: #0d4a66 !important;
}

/* ---- Header menu: the seven items stay on one row on laptops; the deals item stands out ---- */
@media (min-width: 1025px) and (max-width: 1440px) {
	.elementor-location-header .elementor-widget-nav-menu {
		--e-nav-menu-horizontal-menu-item-margin: calc(34px / 2) !important;
	}
}

.elementor-nav-menu .sp-menu-deals > a {
	color: #b84e14 !important;
	font-weight: 700;
}

/* ---- Minimum order note under the price ---- */
.sp-crfq-minqty {
	display: block;
	margin-top: 4px;
	color: #5c6e77;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

/* ---- Deals block ([sp_rfq_deals]): home strip and the deals page ---- */
.sp-crfq-deals {
	padding: 48px 16px 64px;
	color: #1f2d34;
	font-family: Assistant, "Arial Hebrew", Arial, sans-serif;
}

.sp-crfq-deals--grid {
	padding: 32px 0 48px;
}

.sp-crfq-deals__inner {
	max-width: 1240px;
	margin: 0 auto;
}

.sp-crfq-deals__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 0 0 28px;
}

.sp-crfq-deals__title {
	margin: 0;
	color: #083043;
	font-family: inherit;
	font-size: 38px;
	font-weight: 700;
	line-height: 1.2;
}

.sp-crfq-deals__lead {
	margin: 4px 0 0;
	color: #5c6e77;
	font-size: 18px;
	line-height: 1.5;
}

.sp-crfq-deals__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: #083043 !important;
	font-size: 17px;
	font-weight: 700;
	text-decoration: underline !important;
	text-underline-offset: 4px;
}

.sp-crfq-deals__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sp-crfq-deal {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 14px;
	border: 1px solid #dbe5ea;
	border-radius: 12px;
	background: #fff;
	color: #1f2d34;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sp-crfq-deal:hover {
	box-shadow: 0 10px 28px rgba(8, 48, 67, 0.22);
	transform: translateY(-2px);
}

.sp-crfq-deal__link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	color: inherit !important;
	text-decoration: none !important;
}

.sp-crfq-deal__badge {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	z-index: 1;
	padding: 4px 10px;
	border-radius: 6px;
	background: #b84e14;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.sp-crfq-deal img,
.sp-crfq-deal .sp-crfq-card-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	margin: 0 0 12px;
	border-radius: 8px;
	background: #eef4f7;
	color: #8aa3ae;
	object-fit: contain;
}

.sp-crfq-deal__name {
	display: -webkit-box;
	margin: 0 0 10px;
	overflow: hidden;
	color: #1f2d34;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.sp-crfq-deal__price {
	margin: auto 0 12px;
	color: #b84e14;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}

.sp-crfq-deal__price del {
	margin-inline-end: 8px;
	color: #5c6e77;
	font-size: 15px;
	font-weight: 400;
}

.sp-crfq-deal__price ins {
	text-decoration: none;
}

.sp-crfq-deal .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid #083043 !important;
	border-radius: 8px;
	background: #083043 !important;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

.sp-crfq-deal .button:hover,
.sp-crfq-deal .button:focus-visible {
	background: #0d4a66 !important;
}

.sp-crfq-deal .added_to_cart {
	margin-top: 8px;
	color: #083043;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.sp-crfq-deals__empty {
	padding: 40px 16px;
	color: #1f2d34;
	font-size: 18px;
	text-align: center;
}

.sp-crfq-deals__empty a {
	color: #083043;
	font-weight: 700;
}

.sp-crfq-deals__pages {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 28px 0 0;
}

.sp-crfq-deals__pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	border: 1px solid #dbe5ea;
	border-radius: 8px;
	background: #fff;
	color: #083043;
	font-weight: 700;
	text-decoration: none;
}

.sp-crfq-deals__pages .page-numbers.current {
	border-color: #083043;
	background: #083043;
	color: #fff;
}

@media (max-width: 767px) {
	.sp-crfq-deals {
		padding: 36px 16px;
	}

	.sp-crfq-deals--grid {
		padding: 20px 0 32px;
	}

	.sp-crfq-deals__title {
		font-size: 30px;
	}

	.sp-crfq-deals__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.sp-crfq-deal {
		padding: 10px;
	}

	.sp-crfq-deal__name {
		font-size: 15px;
	}

	.sp-crfq-deal__price {
		font-size: 19px;
	}
}
