/**
 * SNX Website Enhancements - front-end styles.
 * Colours are exposed as custom properties so they can be re-themed.
 */

:root {
	--snx-ink: #1A1A1A;
	--snx-ink-soft: #F7F1E3;
	--snx-gold: #E1BF70;
	--snx-gold-dark: #C9A752;
	--snx-pink: #D6208B;
	--snx-cream: #F7F1E3;
	--snx-surface: #1A1A1A;
	--snx-surface-alt: #242424;
	--snx-border: rgba(225, 191, 112, 0.22);
	--snx-radius: 10px;
}

/* -------------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------------- */
.snx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	padding: 0.85em 1.6em;
	border-radius: 999px;
	font-weight: 600;
	line-height: 1.1;
	text-decoration: none;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}

.snx-btn:hover,
.snx-btn:focus {
	transform: translateY(-1px);
}

.snx-btn--primary {
	background: var(--snx-gold);
	color: var(--snx-ink);
}

.snx-btn--primary:hover,
.snx-btn--primary:focus {
	background: var(--snx-gold-dark);
	color: var(--snx-ink);
}

.snx-btn--ghost {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.6);
}

.snx-btn--ghost:hover,
.snx-btn--ghost:focus {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

/* -------------------------------------------------------------------------
 * Homepage hero
 * ---------------------------------------------------------------------- */
.snx-hero {
	background: radial-gradient(120% 140% at 15% 0%, #242424 0%, var(--snx-ink) 55%);
	color: #fff;
	padding: clamp(2.5rem, 6vw, 5rem) 1.25rem;
	margin-bottom: 2rem;
}

.snx-hero__inner {
	max-width: 1080px;
	margin: 0 auto;
	text-align: center;
}

.snx-hero__heading {
	color: #fff;
	font-size: clamp(1.7rem, 4vw, 2.9rem);
	line-height: 1.15;
	margin: 0 0 0.75rem;
}

.snx-hero__sub {
	color: rgba(255, 255, 255, 0.82);
	font-size: clamp(1rem, 2vw, 1.15rem);
	max-width: 60ch;
	margin: 0 auto 1.75rem;
}

.snx-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	justify-content: center;
}

/* -------------------------------------------------------------------------
 * Trust bar
 * ---------------------------------------------------------------------- */
.snx-trust-bar {
	background: var(--snx-surface-alt);
	border-bottom: 1px solid var(--snx-border);
}

.snx-trust-bar__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 2rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.7rem 1.25rem;
	list-style: none;
}

.snx-trust-bar__item {
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--snx-ink-soft);
	position: relative;
	padding-left: 1.15rem;
}

.snx-trust-bar__item::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var(--snx-gold-dark);
	font-weight: 700;
}

/* -------------------------------------------------------------------------
 * Footer trust
 * ---------------------------------------------------------------------- */
.snx-footer-trust {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem 1.25rem;
}

.snx-footer-trust h3 {
	font-size: 1rem;
	margin: 0 0 0.6rem;
}

.snx-footer-trust ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.snx-footer-trust li {
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
}

/* -------------------------------------------------------------------------
 * Single product assurance
 * ---------------------------------------------------------------------- */
.snx-delivery {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	margin: 0.75rem 0;
	padding: 0.7rem 0.9rem;
	background: var(--snx-surface-alt);
	border-left: 3px solid var(--snx-gold);
	border-radius: 4px;
	font-size: 0.9rem;
}

.snx-assurance {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	display: grid;
	gap: 0.5rem;
}

.snx-assurance__item {
	position: relative;
	padding-left: 1.5rem;
	font-size: 0.9rem;
}

.snx-assurance__item::before {
	position: absolute;
	left: 0;
	top: 0;
	color: var(--snx-gold-dark);
}

.snx-assurance__item--shipping::before {
	content: "\1F69A";
}

.snx-assurance__item--returns::before {
	content: "\21BA";
}

.snx-assurance__item--payment::before {
	content: "\1F512";
}

.snx-assurance__item--whatsapp::before {
	content: "\1F4AC";
}

.snx-catalog-visibility .snx-assurance__item::before,
.single-product .snx-assurance__item::before {
	font-size: 0.95em;
}

/* -------------------------------------------------------------------------
 * Shop filter bar
 * ---------------------------------------------------------------------- */
.snx-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.85rem;
	padding: 1rem 1.1rem;
	margin-bottom: 1.5rem;
	background: var(--snx-surface-alt);
	border: 1px solid var(--snx-border);
	border-radius: var(--snx-radius);
}

.snx-filters__field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 150px;
	flex: 1 1 150px;
}

.snx-filters__field label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--snx-ink-soft);
}

.snx-filters select,
.snx-filters input[type="number"] {
	width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--snx-border);
	border-radius: 6px;
	background: #fff;
	min-height: 42px;
}

.snx-filters__price {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.snx-filters__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.snx-filters__reset {
	font-size: 0.85rem;
	color: var(--snx-ink-soft);
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Collections
 * ---------------------------------------------------------------------- */
.snx-collections {
	margin: 2rem 0;
}

.snx-collections__title {
	margin-bottom: 1rem;
}

.snx-collections__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.snx-collections__item a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 84px;
	padding: 1rem;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	color: var(--snx-cream);
	background: var(--snx-surface-alt);
	border: 1px solid var(--snx-border);
	border-radius: var(--snx-radius);
	transition: border-color 0.2s ease, transform 0.15s ease;
}

.snx-collections__item a:hover,
.snx-collections__item a:focus {
	border-color: var(--snx-gold);
	transform: translateY(-2px);
}

/* -------------------------------------------------------------------------
 * Cart & checkout
 * ---------------------------------------------------------------------- */
.snx-cart-notes,
.snx-checkout-assurance {
	list-style: none;
	margin: 1rem 0;
	padding: 0.9rem 1.1rem;
	background: var(--snx-surface-alt);
	border-radius: var(--snx-radius);
	font-size: 0.9rem;
}

.snx-cart-notes__item,
.snx-checkout-assurance__item {
	margin-bottom: 0.35rem;
}

.snx-cart-notes__item:last-child,
.snx-checkout-assurance__item:last-child {
	margin-bottom: 0;
}

.snx-empty-cart {
	margin-top: 2rem;
}

/* -------------------------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------------------- */
@media (max-width: 768px) {
	.snx-hero {
		padding: 2rem 1rem;
	}

	.snx-hero__actions {
		flex-direction: column;
	}

	.snx-hero__actions .snx-btn {
		width: 100%;
	}

	.snx-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.snx-filters__actions {
		justify-content: space-between;
	}

	/* Comfortable tap targets */
	.snx-btn,
	.snx-collections__item a,
	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.woocommerce #respond input#submit {
		min-height: 48px;
	}

	.single_add_to_cart_button {
		min-height: 52px;
		font-size: 1.02rem;
	}

	.woocommerce form .form-row input.input-text,
	.woocommerce form .form-row textarea,
	.woocommerce form .form-row select {
		min-height: 48px;
	}

	.snx-trust-bar__list {
		gap: 0.4rem 1.25rem;
	}
}

/* Keep floating chat widgets clear of checkout controls on small screens. */
body.snx-checkout-active .snx-whatsapp-float,
body.snx-checkout-active .whatsapp-float,
body.snx-checkout-active #whatsapp-button,
body.snx-checkout-active .ht-ctc-chat {
	bottom: 90px !important;
}

/* -------------------------------------------------------------------------
 * Storefront layout refinements
 * (moved here from the child theme so the parent theme's colours are kept)
 * ---------------------------------------------------------------------- */
.home .site-content {
	margin-top: 0;
}

.snx-hero + .snx-trust-bar {
	margin-top: 0;
}

/* Tighter, more scannable product grid. */
ul.products li.product {
	margin-bottom: 1.75rem;
}

ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	line-height: 1.3;
}

ul.products li.product .price {
	font-weight: 700;
}

/* Consistent product image crop so mixed supplier photos feel uniform. */
ul.products li.product a img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
	height: auto;
}

.single-product div.product .woocommerce-product-gallery__image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

/* Emphasise the single product summary. */
.single-product div.product .summary .product_title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	line-height: 1.2;
}

.single-product div.product .summary .price {
	font-size: 1.5rem;
	font-weight: 700;
}

.woocommerce-products-header__title.page-title {
	margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
	.main-navigation ul li a,
	.main-navigation ul li button {
		min-height: 48px;
		display: flex;
		align-items: center;
	}

	ul.products[class*="columns-"] li.product {
		width: 48%;
		float: left;
		margin-right: 4%;
	}

	ul.products[class*="columns-"] li.product:nth-child(2n) {
		margin-right: 0;
	}
}
