/* ChicAntiq storefront + checkout. Brand gold = Rehub main colour #d1b775. */
:root {
	--chq-gold: #d1b775;
	--chq-gold-dark: #b39652;
	--chq-ink: #1d1d1f;
	--chq-muted: #6b6b70;
	--chq-line: #e4e4e7;
	--chq-bg-soft: #faf8f3;
	--chq-radius: 4px;
}

/* ---- Archive / homepage add-to-cart: square outline in the text colour ---- */
.products .add_to_cart_button.flat-woo-btn,
.products .re_track_btn.flat-woo-btn,
.products a.button.product_type_simple,
.products a.button.product_type_variable {
	color: var(--chq-gold-text, #7a5f22) !important;
	border: 1px solid currentColor !important;
	border-radius: 0 !important;
	padding: 8px 16px !important;
	line-height: 1.2 !important;
	background: transparent !important;
	transition: background-color .15s ease, color .15s ease;
}
.products .add_to_cart_button.flat-woo-btn:hover,
.products .re_track_btn.flat-woo-btn:hover,
.products a.button.product_type_simple:hover {
	background: var(--chq-gold) !important;
	border-color: var(--chq-gold) !important;
	color: #1d1d1f !important;
}
.products .add_to_cart_button.loading { opacity: .6; }
.products .added_to_cart.wc-forward { display: none !important; } /* the side cart opens instead */

/* ---- Sticky header: always opaque ---- */
.re-stickyheader.re-stickyheader-active,
.rh-stickme.rh-stickme-active,
header .rh-stickme.sticky,
.is-sticky .main-nav,
.main-nav.dark_style.rh-stickme {
	background-color: #fff !important;
}

/* ---- Side cart ---- */
.rh-sslide-panel .rh-sslide-close-btn + *,
#rh-woo-cart-panel .widget_shopping_cart_content { font-size: 15px; }
#rh-woo-cart-panel .woocommerce-mini-cart__buttons .checkout,
.rh-sslide-panel .woocommerce-mini-cart__buttons .checkout {
	background: var(--chq-gold) !important;
	color: #1d1d1f !important;
	font-weight: 600;
}

/* ---- Progress steps (cart, checkout, thank-you) ---- */
.chq-steps {
	display: flex;
	justify-content: space-between;
	max-width: 760px;
	margin: 8px auto 36px;
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.chq-step {
	position: relative;
	flex: 1;
	text-align: center;
	color: var(--chq-muted);
	font-size: 14px;
}
.chq-step::before {
	content: "";
	position: absolute;
	top: 13px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--chq-line);
	z-index: 0;
}
.chq-step:first-child::before { display: none; }
.chq-step.is-done::before,
.chq-step.is-current::before { background: var(--chq-gold); }
.chq-step__n {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--chq-line);
	font-weight: 600;
	margin-bottom: 6px;
}
.chq-step.is-done .chq-step__n,
.chq-step.is-current .chq-step__n {
	background: var(--chq-gold);
	border-color: var(--chq-gold);
	color: #1d1d1f;
}
.chq-step.is-current { color: var(--chq-ink); font-weight: 600; }
.chq-step__label { display: block; }

/* ---- Focused checkout: no menu, search, wishlist or footer columns ---- */
.chq-focus-checkout .main-nav .top_menu,
.chq-focus-checkout .main-nav nav,
.chq-focus-checkout .header_icons_menu .rh-header-icon:not(.rh_woocartmenu-link),
.chq-focus-checkout .header-actions-logo .rh-header-icon:not(.rh_woocartmenu-link),
.chq-focus-checkout .rh_woocartmenu-link,
.chq-focus-checkout .icon-search-onclick,
.chq-focus-checkout .rh-search-icon,
.chq-focus-checkout .wpsm-button.wishlist,
.chq-focus-checkout footer .footer_widget,
.chq-focus-checkout #theme_footer .footer_widget,
.chq-focus-checkout .footer-bottom .footer_widget,
.chq-focus-checkout .footer_widget_section {
	display: none !important;
}
.chq-focus-checkout .woocommerce-form-login-toggle { display: none; }

.chq-focus-checkout .post,
.chq-focus-checkout .rh-post-wrapper,
.chq-focus-checkout .main-side.page {
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}
.chq-focus-checkout h1 { display: none; }

/* Two columns: details | sticky order summary */
@media (min-width: 992px) {
	.chq-focus-checkout form.checkout.woocommerce-checkout {
		display: grid;
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		column-gap: 48px;
		align-items: start;
	}
	.chq-focus-checkout form.checkout > .clearfix { display: none; }
	.chq-focus-checkout form.checkout > .col2-set { grid-column: 1; grid-row: 1; width: 100% !important; float: none !important; }
	/* Rehub wraps heading + review in .re_woocheckout_order; stock WooCommerce doesn't. */
	.chq-focus-checkout form.checkout > .re_woocheckout_order,
	.chq-focus-checkout form.checkout > #order_review_heading,
	.chq-focus-checkout form.checkout > #order_review { grid-column: 2; width: 100% !important; float: none !important; }
	.chq-focus-checkout form.checkout > .re_woocheckout_order { grid-row: 1; position: sticky; top: 24px; }
	.chq-focus-checkout .re_woocheckout_order #order_review,
	.chq-focus-checkout .re_woocheckout_order #order_review_heading { width: 100% !important; float: none !important; }
	.chq-focus-checkout .col2-set .col-1,
	.chq-focus-checkout .col2-set .col-2 { float: none; width: 100%; }
}

.chq-focus-checkout .woocommerce-billing-fields h3,
.chq-focus-checkout #order_review_heading,
.chq-focus-checkout .woocommerce-additional-fields h3 {
	font-size: 19px;
	font-weight: 600;
	text-transform: none;
	margin: 0 0 18px;
}

.chq-focus-checkout .form-row label {
	font-weight: 600;
	font-size: 14px;
	color: var(--chq-ink);
	margin-bottom: 6px;
}
.chq-focus-checkout .form-row input.input-text,
.chq-focus-checkout .form-row textarea,
.chq-focus-checkout .form-row select,
.chq-focus-checkout .select2-container .select2-selection--single {
	min-height: 46px;
	border: 1px solid #d4d4d8 !important;
	border-radius: var(--chq-radius) !important;
	padding: 10px 12px;
	font-size: 16px; /* no iOS zoom */
	background: #fff !important;
	box-shadow: none !important;
}
.chq-focus-checkout .select2-container .select2-selection--single .select2-selection__rendered { line-height: 44px; padding-left: 12px; }
.chq-focus-checkout .select2-container .select2-selection--single .select2-selection__arrow { height: 44px; }
.chq-focus-checkout .form-row input.input-text:focus,
.chq-focus-checkout .form-row textarea:focus,
.chq-focus-checkout .form-row select:focus {
	border-color: var(--chq-gold) !important;
	outline: 2px solid rgba(209, 183, 117, .35);
	outline-offset: 0;
}
.chq-focus-checkout .form-row .description { font-size: 13px; color: var(--chq-muted); margin-top: 4px; }

/* Order summary card */
.chq-focus-checkout #order_review {
	background: var(--chq-bg-soft);
	border: 1px solid var(--chq-line);
	border-radius: 8px;
	padding: 22px;
}
.chq-focus-checkout #order_review table.shop_table {
	border: 0;
	margin: 0 0 18px;
	background: transparent;
}
.chq-focus-checkout #order_review table.shop_table th,
.chq-focus-checkout #order_review table.shop_table td {
	border: 0;
	border-bottom: 1px solid var(--chq-line);
	padding: 12px 0;
	text-transform: none;
	font-size: 15px;
	background: transparent;
}
.chq-focus-checkout #order_review table.shop_table thead { display: none; }
.chq-focus-checkout #order_review .order-total th,
.chq-focus-checkout #order_review .order-total td { font-size: 18px; font-weight: 700; border-bottom: 0; }
.chq-focus-checkout #order_review .order-total .includes_tax { display: block; font-size: 13px; font-weight: 400; color: var(--chq-muted); }
.chq-focus-checkout #order_review ul#shipping_method { margin: 0; padding: 0; list-style: none; text-align: left; }
.chq-focus-checkout #order_review ul#shipping_method label { text-transform: none; font-weight: 600; }
.chq-focus-checkout #order_review tr.woocommerce-shipping-totals td { text-align: right; }

/* Payment */
.chq-focus-checkout #payment {
	background: #fff !important;
	border: 1px solid var(--chq-line);
	border-radius: 8px;
}
.chq-focus-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--chq-line); padding: 6px 16px; }
.chq-focus-checkout #payment ul.payment_methods li { padding: 10px 0; }
.chq-focus-checkout #payment div.payment_box { background: var(--chq-bg-soft) !important; border-radius: var(--chq-radius); }
.chq-focus-checkout #payment div.payment_box::before { display: none !important; }
.chq-focus-checkout #payment .place-order { padding: 16px; }
.chq-focus-checkout #place_order {
	width: 100%;
	float: none;
	min-height: 54px;
	font-size: 17px !important;
	font-weight: 700;
	text-transform: none;
	border-radius: var(--chq-radius) !important;
	background: var(--chq-ink) !important;
	color: #fff !important;
	box-shadow: none !important;
}
.chq-focus-checkout #place_order:hover { background: #000 !important; }
.chq-trust { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--chq-muted); }

@media (max-width: 600px) {
	.chq-steps { margin-bottom: 24px; }
	.chq-step { font-size: 12px; }
	.chq-focus-checkout #order_review { padding: 16px; }
}

/* Rehub draws its own box around the summary; the card above replaces it. */
.chq-focus-checkout .re_woocheckout_order {
	border: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}
.chq-focus-checkout #payment,
.chq-focus-checkout #payment ul.payment_methods,
.chq-focus-checkout #payment .place-order { width: auto !important; float: none !important; }

/* ---- Product page: no layout shift while the gallery initialises ---- */
/* Flexslider wraps the slides and adds the thumbnail nav a few frames BEFORE it floats them, so for
   a moment all slides stack at full width (48,000 px measured). Until a slide carries flexslider's
   inline float style, only the first one is shown. */
.woocommerce-product-gallery__image:not([style*="float"]):nth-child(n+2) { display: none !important; }
/* Thumbnails: square from the start, so the strip has its final height before the images load. */
.woocommerce-product-gallery .flex-control-thumbs li img { display: block; width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; object-fit: cover; }
/* Reserve the strip's space until flexslider builds it (17.5% wide squares, capped at 112 px, plus margins). */
@media (max-width: 1023px) {
	.woocommerce-product-gallery.gallery-thumbnails-enabled:not(:has(.flex-control-nav)) { padding-bottom: calc(30px + min(17.5%, 112px)); }
}
@media (min-width: 1024px) {
	.woocommerce-product-gallery.gallery-thumbnails-enabled:not(:has(.flex-control-nav)) > .woocommerce-product-gallery__wrapper { margin-left: 90px; width: calc(100% - 90px); }
}
.woocommerce-product-gallery__trigger {
	width: 44px !important;
	height: 44px !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
}
.chq-related-title { font-size: 20px; line-height: 1.3; margin: 0 0 15px; }

/* ---- Contrast (WCAG AA): gold text on white is 1.9:1, use the dark gold for text ---- */
:root { --chq-gold-text: #7a5f22; }
.product_meta a,
.posted_in a,
.woocommerce-breadcrumb a,
.re_filtersort_btn.active,
#mobile-trigger-sidebar,
.re_filtersort_btn:hover,
.woocommerce-info a,
.woocommerce-privacy-policy-text a,
.woocommerce-terms-and-conditions-link { color: var(--chq-gold-text) !important; }
.price del, .price del bdi, .price del .amount { color: #5f5f66 !important; opacity: 1 !important; }
p.stock.in-stock { color: #2e6b30 !important; }
.onsale, .onsale span, span.onsale {
	background: #8f1d1d !important;
	color: #fff !important;
}
/* Complianz banner */
.cmplz-cookiebanner .cmplz-btn.cmplz-accept { background-color: var(--chq-gold) !important; border-color: var(--chq-gold) !important; color: #1d1d1f !important; }
.cmplz-cookiebanner .cmplz-btn.cmplz-deny { background-color: #4b4b50 !important; border-color: #4b4b50 !important; color: #fff !important; }
.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences,
.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences { background-color: #fff !important; border-color: #4b4b50 !important; color: #1d1d1f !important; }
.cmplz-cookiebanner .cmplz-links a { color: var(--chq-gold-text) !important; }
/* Gold buttons carry dark text instead of white */
.single_add_to_cart_button,
.rh_woocartmenu-link + * .checkout,
.woocommerce-mini-cart__buttons .checkout,
.chq-inpost button,
.wpsm-button.rehub_main_btn { color: #1d1d1f !important; }

/* Links inside text need more than colour to stand out */
.product_meta a, .posted_in a, .woocommerce-product-details__short-description a, .woocommerce-Tabs-panel a { text-decoration: underline !important; text-underline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
