/* WooCommerce shop, product, and account overrides */
.hadithi-shop-shell,
.hadithi-single-product-shell,
.hadithi-account-shell,
.hadithi-woo-wrapper {
	max-width: 1180px;
	margin-inline: auto;
	padding: clamp(1.25rem, 4vw, 3rem) var(--wp--preset--spacing--40);
}

.hadithi-shop-hero,
.hadithi-account-hero {
	border-radius: 8px;
	padding: clamp(1.5rem, 4vw, 3rem);
	background: var(--wp--preset--color--linen);
	box-shadow: 0 18px 44px rgb(75 36 28 / 10%);
	margin-bottom: var(--wp--preset--spacing--50);
}

.hadithi-shop-hero__eyebrow,
.hadithi-account-hero__eyebrow,
.hadithi-single-product__eyebrow {
	margin: 0 0 0.4rem;
	color: var(--wp--preset--color--coral);
	font-weight: 900;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hadithi-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.1rem;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product.hadithi-product-card {
	float: none;
	width: auto;
	margin: 0;
	border: 2px solid rgb(216 138 99 / 30%);
	border-radius: 8px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
	box-shadow: 0 14px 34px rgb(55 37 28 / 9%);
}

.hadithi-product-card__image {
	display: block;
	background: var(--wp--preset--color--linen);
}

.hadithi-product-card__image img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.hadithi-product-card__body {
	display: grid;
	gap: 0.6rem;
	padding: 1rem;
}

.hadithi-product-card .woocommerce-loop-product__title {
	padding: 0;
	margin: 0;
	font-size: 1.05rem;
}

.hadithi-product-card .button,
.hadithi-single-product .single_add_to_cart_button,
.hadithi-account-shell .button {
	border-radius: 8px;
	background: var(--wp--preset--color--mahogany);
	color: var(--wp--preset--color--base);
	font-weight: 800;
}

.hadithi-single-product__hero {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}

.hadithi-single-product__gallery,
.hadithi-single-product__summary,
.hadithi-single-product__details,
.hadithi-account-content,
.hadithi-account-panel {
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	box-shadow: 0 14px 34px rgb(55 37 28 / 10%);
}

.hadithi-single-product__summary,
.hadithi-single-product__details,
.hadithi-account-content,
.hadithi-account-panel {
	padding: clamp(1.25rem, 3vw, 2rem);
}

.hadithi-product-gallery__frame {
	margin: 0;
}

.hadithi-product-gallery__frame img {
	border-radius: 8px;
}

.hadithi-product-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.6rem;
	margin-top: 0.75rem;
}

.hadithi-product-gallery__thumbs img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.hadithi-account-shell {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 1.25rem;
}

.hadithi-account-hero {
	grid-column: 1 / -1;
}

.hadithi-account-nav ul {
	display: grid;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hadithi-account-nav a {
	display: block;
	border-radius: 8px;
	padding: 0.85rem 1rem;
	background: var(--wp--preset--color--linen);
	color: var(--wp--preset--color--mahogany);
	font-weight: 800;
	text-decoration: none;
}

.hadithi-account-nav .is-active a,
.hadithi-account-nav a:hover,
.hadithi-account-nav a:focus-visible {
	background: var(--wp--preset--color--mahogany);
	color: var(--wp--preset--color--base);
}

.hadithi-auth-grid,
.hadithi-address-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.hadithi-account-shell input,
.hadithi-account-shell select,
.hadithi-account-shell textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	border: 2px solid rgb(216 138 99 / 55%);
	border-radius: 8px;
	padding: 0.65rem 0.8rem;
}

.hadithi-account-table-panel table {
	border-collapse: collapse;
	width: 100%;
}

.hadithi-account-table-panel th,
.hadithi-account-table-panel td {
	border-bottom: 1px solid rgb(216 138 99 / 28%);
	padding: 0.85rem;
}

.hadithi-address-card {
	border: 2px solid rgb(216 138 99 / 30%);
	border-radius: 8px;
	padding: 1rem;
	background: var(--wp--preset--color--linen);
}

.hadithi-address-card header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

@media (max-width: 980px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hadithi-single-product__hero,
	.hadithi-account-shell {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.woocommerce ul.products,
	.hadithi-auth-grid,
	.hadithi-address-grid {
		grid-template-columns: 1fr;
	}
}


/* Site header and footer */
.hadithi-site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	padding: 0.7rem var(--wp--preset--spacing--40);
	background: rgb(255 250 242 / 94%);
	box-shadow: 0 8px 28px rgb(75 36 28 / 9%);
	backdrop-filter: blur(12px);
}

.hadithi-site-header--classic {
	box-sizing: border-box;
}

.hadithi-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1180px;
	margin-inline: auto;
}

.hadithi-site-brand__title,
.hadithi-site-brand__title a,
.hadithi-site-footer__title,
.hadithi-site-footer__title a {
	color: var(--wp--preset--color--mahogany);
	font-family: var(--wp--preset--font-family--georgia);
	font-size: clamp(1.25rem, 2vw, 1.65rem);
	font-weight: 800;
	line-height: 1.05;
	text-decoration: none;
}

.hadithi-primary-nav,
.hadithi-primary-nav--classic {
	display: flex;
	align-items: center;
	gap: 0.2rem;
}

.hadithi-primary-nav a,
.hadithi-primary-nav .wp-block-navigation-item__content,
.hadithi-primary-nav--classic a {
	border-radius: 999px;
	padding: 0.55rem 0.8rem;
	color: var(--wp--preset--color--mahogany);
	font-size: 0.95rem;
	font-weight: 800;
	text-decoration: none;
}

.hadithi-primary-nav a:hover,
.hadithi-primary-nav a:focus-visible,
.hadithi-primary-nav .wp-block-navigation-item__content:hover,
.hadithi-primary-nav .wp-block-navigation-item__content:focus-visible,
.hadithi-primary-nav--classic a:hover,
.hadithi-primary-nav--classic a:focus-visible {
	background: var(--wp--preset--color--linen);
	color: var(--wp--preset--color--coral);
}

.hadithi-primary-nav .wp-block-navigation-item:nth-child(2) .wp-block-navigation-item__content,
.hadithi-primary-nav--classic a:nth-child(2) {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--base);
}

.hadithi-site-footer {
	padding: clamp(2rem, 5vw, 4rem) var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--mahogany);
	color: var(--wp--preset--color--base);
}

.hadithi-site-footer--classic {
	box-sizing: border-box;
}

.hadithi-site-footer__columns {
	max-width: 1180px;
	margin-inline: auto;
}

.hadithi-site-footer,
.hadithi-site-footer p,
.hadithi-site-footer a,
.hadithi-site-footer__title,
.hadithi-site-footer__title a {
	color: var(--wp--preset--color--base);
}

.hadithi-site-footer__columns,
.hadithi-site-footer--classic .hadithi-site-footer__columns {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr) auto;
	gap: 1.5rem;
	align-items: center;
}

.hadithi-footer-nav,
.hadithi-footer-nav .wp-block-navigation__container {
	display: grid;
	gap: 0.35rem;
}

.hadithi-footer-nav a,
.hadithi-footer-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--base);
	font-weight: 800;
	text-decoration: none;
}

.hadithi-footer-nav a:hover,
.hadithi-footer-nav a:focus-visible,
.hadithi-footer-nav .wp-block-navigation-item__content:hover,
.hadithi-footer-nav .wp-block-navigation-item__content:focus-visible {
	color: var(--wp--preset--color--marigold);
}

.hadithi-site-footer__small {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 800;
}

@media (max-width: 900px) {
	.hadithi-site-header__inner {
		align-items: flex-start;
	}

	.hadithi-primary-nav--classic {
		flex-wrap: wrap;
		justify-content: flex-end;
	}

	.hadithi-site-footer__columns,
	.hadithi-site-footer--classic .hadithi-site-footer__columns {
		grid-template-columns: 1fr;
	}

	.hadithi-site-footer__small,
	.hadithi-site-footer .has-text-align-right {
		text-align: left;
	}
}

@media (max-width: 640px) {
	.hadithi-site-header {
		position: relative;
	}

	.hadithi-site-header__inner {
		display: grid;
	}

	.hadithi-primary-nav--classic {
		justify-content: flex-start;
	}
}

/* WooCommerce contrast hardening */
.woocommerce,
.woocommerce-page,
.hadithi-single-product-shell,
.hadithi-shop-shell,
.hadithi-account-shell,
.hadithi-woo-wrapper,
.woocommerce div.product,
.woocommerce div.product .summary,
.woocommerce div.product form.cart,
.woocommerce div.product .woocommerce-tabs,
.woocommerce table.shop_table,
.woocommerce form,
.woocommerce .woocommerce-MyAccount-content {
	color: var(--wp--preset--color--mahogany);
}

.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.woocommerce h4,
.woocommerce label,
.woocommerce legend,
.woocommerce p,
.woocommerce li,
.woocommerce td,
.woocommerce th,
.woocommerce address,
.woocommerce .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce div.product .stock,
.woocommerce div.product form.cart .variations label,
.woocommerce div.product form.cart .reset_variations,
.woocommerce div.product form.cart .woocommerce-variation-price,
.woocommerce div.product form.cart .woocommerce-variation-description {
	color: var(--wp--preset--color--mahogany);
}

.woocommerce a:not(.button),
.woocommerce-page a:not(.button) {
	color: var(--wp--preset--color--coral);
}

.woocommerce a:not(.button):hover,
.woocommerce-page a:not(.button):hover {
	color: var(--wp--preset--color--mahogany);
}

.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.woocommerce-page input.input-text,
.woocommerce-page textarea,
.woocommerce-page select,
.woocommerce div.product form.cart .variations select,
.woocommerce .quantity .qty {
	box-sizing: border-box;
	min-height: 52px;
	border: 2px solid var(--wp--preset--color--mahogany);
	border-radius: 0;
	padding: 0.65rem 0.85rem;
	background: #fffaf2 !important;
	color: var(--wp--preset--color--mahogany) !important;
	font: inherit;
}

.woocommerce select option,
.woocommerce-page select option,
.woocommerce div.product form.cart .variations select option {
	background: #fffaf2 !important;
	color: var(--wp--preset--color--mahogany) !important;
}

.woocommerce select option:checked,
.woocommerce-page select option:checked,
.woocommerce div.product form.cart .variations select option:checked {
	background: var(--wp--preset--color--coral) !important;
	color: #fffaf2 !important;
}

.woocommerce input.input-text:focus,
.woocommerce textarea:focus,
.woocommerce select:focus,
.woocommerce-page input.input-text:focus,
.woocommerce-page textarea:focus,
.woocommerce-page select:focus {
	outline: 3px solid rgb(242 184 75 / 42%);
	outline-offset: 2px;
}

.woocommerce div.product form.cart .variations {
	border-collapse: separate;
	border-spacing: 0 0.75rem;
}

.woocommerce div.product form.cart .variations td,
.woocommerce div.product form.cart .variations th {
	vertical-align: middle;
}

.woocommerce div.product form.cart .variations select {
	min-width: min(100%, 280px);
}

.woocommerce div.product .woocommerce-variation {
	margin: 0.75rem 0;
}

.woocommerce div.product .woocommerce-variation-price .price {
	display: inline-block;
	font-size: 1.25rem;
	font-weight: 800;
}

.woocommerce div.product .single_variation_wrap,
.woocommerce div.product form.cart .variations_button {
	color: var(--wp--preset--color--mahogany);
}

.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .single_add_to_cart_button {
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--coral) !important;
	color: #fffaf2 !important;
	font-weight: 900;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--mahogany) !important;
	color: #fffaf2 !important;
}

.woocommerce button.button.disabled,
.woocommerce button.button:disabled,
.woocommerce button.button:disabled[disabled],
.woocommerce .single_add_to_cart_button.disabled {
	background: #725044 !important;
	color: #fffaf2 !important;
	opacity: 0.78;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
	border-radius: 8px;
	background: #fffaf2;
	color: var(--wp--preset--color--mahogany);
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
	color: var(--wp--preset--color--coral);
	font-weight: 800;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a,
.woocommerce div.product .woocommerce-tabs .panel,
.woocommerce #reviews #comments ol.commentlist li .comment-text,
.woocommerce .woocommerce-product-details__short-description {
	color: var(--wp--preset--color--mahogany);
}

.woocommerce .woocommerce-breadcrumb {
	color: var(--wp--preset--color--earth);
}

.woocommerce .woocommerce-breadcrumb a {
	color: var(--wp--preset--color--coral);
}

.woocommerce div.product .product_meta,
.woocommerce div.product .product_meta span,
.woocommerce div.product .product_meta a {
	color: var(--wp--preset--color--earth);
}

.woocommerce .wc-square-credit-card-hosted-field,
.woocommerce .payment_box,
.woocommerce-checkout #payment,
.woocommerce-checkout #payment div.payment_box {
	color: var(--wp--preset--color--mahogany);
}


/* Final donation form contrast override for live theme/plugin CSS conflicts */
form.hadithi-donate {
	background: #f8ead8 !important;
	color: #4b241c !important;
}

form.hadithi-donate,
form.hadithi-donate p,
form.hadithi-donate label,
form.hadithi-donate .hadithi-donate__intro,
form.hadithi-donate .hadithi-donate__hint,
form.hadithi-donate .hadithi-donate__custom label {
	color: #4b241c !important;
}

form.hadithi-donate input,
form.hadithi-donate input[type=number],
form.hadithi-donate .hadithi-donate__custom input {
	background: #fffaf2 !important;
	color: #4b241c !important;
	-webkit-text-fill-color: #4b241c !important;
}

form.hadithi-donate input::placeholder {
	color: #725044 !important;
	-webkit-text-fill-color: #725044 !important;
	opacity: 1 !important;
}

form.hadithi-donate .hadithi-donate__tier span {
	background: #fffaf2 !important;
	color: #4b241c !important;
	-webkit-text-fill-color: #4b241c !important;
}

form.hadithi-donate .hadithi-donate__tier input:checked + span,
form.hadithi-donate .hadithi-donate__tier input:focus-visible + span,
form.hadithi-donate .hadithi-donate__tier span:hover {
	background: #d94f45 !important;
	border-color: #d94f45 !important;
	color: #fffaf2 !important;
	-webkit-text-fill-color: #fffaf2 !important;
}

form.hadithi-donate button.hadithi-donate__submit,
form.hadithi-donate .hadithi-donate__submit,
.woocommerce form.hadithi-donate button.hadithi-donate__submit {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #d94f45 !important;
	border: 0 !important;
	color: #fffaf2 !important;
	-webkit-text-fill-color: #fffaf2 !important;
	opacity: 1 !important;
}

form.hadithi-donate button.hadithi-donate__submit:hover,
form.hadithi-donate button.hadithi-donate__submit:focus-visible,
.woocommerce form.hadithi-donate button.hadithi-donate__submit:hover {
	background: #4b241c !important;
	color: #fffaf2 !important;
	-webkit-text-fill-color: #fffaf2 !important;
}


/* Product gallery market hero */
.hadithi-market-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
	gap: clamp(1.25rem, 4vw, 3rem);
	align-items: stretch;
	overflow: hidden;
}

.hadithi-market-hero__copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.hadithi-market-hero__slogan {
	max-width: 620px;
	margin: 0.75rem 0 1.25rem;
	color: var(--wp--preset--color--earth);
	font-size: clamp(1.05rem, 2vw, 1.35rem);
	line-height: 1.45;
}

.hadithi-product-search {
	display: flex;
	max-width: 620px;
	border: 2px solid rgb(216 138 99 / 46%);
	border-radius: 8px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
	box-shadow: 0 10px 24px rgb(75 36 28 / 8%);
}

.hadithi-product-search input[type=search] {
	flex: 1;
	min-width: 0;
	border: 0;
	padding: 0.9rem 1rem;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--mahogany);
	font: inherit;
}

.hadithi-product-search input[type=search]::placeholder {
	color: var(--wp--preset--color--earth);
	opacity: 0.85;
}

.hadithi-product-search button {
	border: 0;
	padding: 0.85rem 1.2rem;
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-weight: 900;
}

.hadithi-market-hero__media {
	position: relative;
	min-height: 360px;
}

.hadithi-market-hero__product {
	display: block;
	width: 82%;
	height: 100%;
	min-height: 360px;
	border-radius: 8px;
	object-fit: cover;
	box-shadow: 0 20px 48px rgb(75 36 28 / 18%);
}

.hadithi-market-hero__ruth {
	position: absolute;
	right: -3%;
	bottom: -2rem;
	width: min(44%, 230px);
	max-height: 92%;
	object-fit: contain;
	filter: drop-shadow(0 18px 28px rgb(75 36 28 / 24%));
}

.hadithi-shop-fallback-hero {
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 1.2rem;
}

.hadithi-product-search-block {
	margin: 1.25rem auto 2rem;
	max-width: 680px;
}

@media (max-width: 900px) {
	.hadithi-market-hero {
		grid-template-columns: 1fr;
	}

	.hadithi-market-hero__product {
		width: 100%;
	}

	.hadithi-market-hero__ruth {
		right: 1rem;
	}
}

@media (max-width: 560px) {
	.hadithi-product-search {
		display: grid;
	}

	.hadithi-product-search button {
		width: 100%;
	}
}
