/*
 * Dhali Foods — hand-authored component layer for the Claude Design mockup redesign.
 * Enqueued after assets/css/style.min.css (which is compiled with no source and must
 * not be hand-edited) — everything here either adds new dhali-* components consumed
 * by patterns/templates built in later phases, or overrides specific legacy rules
 * catalogued in plans/reference/style-min-css-audit.md.
 */

/* ---------------------------------------------------------------------------
   1. Foundations

   Own spacing scale, deliberately not reusing var(--wp--preset--spacing--NN):
   those numeric slugs are WP's shared default scale and pre-existing content
   (old Home/About buttons etc.) already depends on their non-literal default
   values. Redefining them to literal px inflated every legacy button on the
   site. Component spacing here stays self-contained instead.
--------------------------------------------------------------------------- */

:root {
	--dhali-space-20: 20px;
	--dhali-space-30: 30px;
	--dhali-space-40: 40px;
	--dhali-space-60: 60px;
}

.dhali-eyebrow {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand);
	margin-bottom: var(--dhali-space-20);
}

.dhali-eyebrow--on-dark {
	color: var(--wp--preset--color--white);
}

/* ---------------------------------------------------------------------------
   2. Buttons — pill, solid + outline
--------------------------------------------------------------------------- */

.dhali-btn,
.wp-element-button.dhali-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--dhali-space-20);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--base);
	line-height: 1;
	padding: var(--dhali-space-30) var(--dhali-space-60);
	border-radius: 26px;
	border: 1.5px solid transparent;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.dhali-btn--solid {
	background-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
}

.dhali-btn--solid:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

.dhali-btn--outline {
	background-color: transparent;
	color: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
}

.dhali-btn--outline:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

.dhali-btn--outline-light {
	background-color: transparent;
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
}

.dhali-btn--outline-light:hover {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ink);
}

/* WooCommerce's product-loop "Select options" / "Add to cart" buttons ship as
   an outline pill in the mockup; is-style-outline is already applied in the
   archive-product.html template, this just fixes the treatment. */
.wc-block-components-product-button .wp-block-button__link.is-style-outline,
.wp-block-woocommerce-product-collection .wp-block-button__link.is-style-outline,
a.button.product_type_variable,
a.add_to_cart_button {
	background-color: transparent;
	color: var(--wp--preset--color--ink);
	border: 1.5px solid var(--wp--preset--color--ink);
	font-weight: 600;
}

.wc-block-components-product-button .wp-block-button__link.is-style-outline:hover,
.wp-block-woocommerce-product-collection .wp-block-button__link.is-style-outline:hover,
a.button.product_type_variable:hover,
a.add_to_cart_button:hover {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--white);
}

/* ---------------------------------------------------------------------------
   3. Cards — product / category / recipe
--------------------------------------------------------------------------- */

.dhali-card {
	display: flex;
	flex-direction: column;
	border-radius: 14px;
	overflow: hidden;
	background-color: var(--wp--preset--color--white);
}

.dhali-card__image {
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.dhali-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
}

.dhali-card__body {
	padding-top: var(--dhali-space-20);
}

.dhali-card__title {
	font-size: var(--wp--preset--font-size--md);
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	margin: 0 0 var(--dhali-space-20);
}

.dhali-card__meta {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}

/* Real WooCommerce product-collection card markup (Home + Shop) */
.wc-block-components-product-image,
.woocommerce-shop main .wp-block-woocommerce-product-image {
	border-radius: 10px;
	overflow: hidden;
}

.wc-block-components-product-image img,
.woocommerce-shop main .wp-block-woocommerce-product-image img {
	border-radius: 10px;
}

.wp-block-woocommerce-product-price .wc-block-components-product-price ins,
.wp-block-woocommerce-product-price .wc-block-components-product-price .woocommerce-Price-amount:last-child {
	color: var(--wp--preset--color--brand);
	font-weight: 600;
	text-decoration: none;
}

.wp-block-woocommerce-product-price .wc-block-components-product-price del,
.woocommerce ul.products li.product .price del {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

.woocommerce ul.products li.product .price ins {
	color: var(--wp--preset--color--brand);
	font-weight: 600;
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
   4. Header
--------------------------------------------------------------------------- */

.hostinger-ai-menu {
	box-shadow: none;
	border-bottom: 1px solid var(--wp--preset--color--border);
	background-color: var(--wp--preset--color--white);
}

.dhali-header__lockup {
	display: flex;
	align-items: center;
	gap: var(--dhali-space-20);
}

.dhali-header__wordmark {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.dhali-header__wordmark-title {
	font-weight: 800;
	font-size: var(--wp--preset--font-size--md);
	color: var(--wp--preset--color--ink);
}

.dhali-header__wordmark-eyebrow {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brand);
	margin: 0;
}

.dhali-header__inner {
	width: 100%;
	padding-top: 18px;
	padding-bottom: 18px;
}

.dhali-header__nav a {
	font-size: 14.5px;
	font-weight: 600;
}

.dhali-header__nav .current-menu-item > a,
.dhali-header__nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--brand);
}

.dhali-header__icons {
	display: flex;
	align-items: center;
	gap: var(--dhali-space-30);
}

.dhali-header__icons svg {
	display: block;
}

.dhali-cart-badge,
.wc-block-mini-cart__badge {
	background-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
	font-size: 11px;
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
   5. Footer
--------------------------------------------------------------------------- */

.site-footer {
	background-color: var(--wp--preset--color--footer-bg);
	color: var(--wp--preset--color--footer-text);
	padding-top: var(--dhali-space-60);
	padding-bottom: 26px;
}

.site-footer a {
	color: var(--wp--preset--color--footer-text);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--wp--preset--color--white);
}

.site-footer .wp-block-navigation-item a {
	font-size: 13.5px;
}

.dhali-footer__columns {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--dhali-space-30);
	padding-bottom: var(--dhali-space-40);
}

.dhali-footer__links {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dhali-footer__col-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--wp--preset--color--white);
	margin: 0 0 16px;
}

.dhali-footer__socials {
	display: flex;
	gap: 12px;
	margin-top: 12px;
}

.dhali-footer__socials .wp-social-link {
	background-color: rgba(255, 255, 255, 0.08);
}

.dhali-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-top: 20px;
	text-align: center;
	color: var(--wp--preset--color--footer-text);
	font-size: 12.5px;
}

@media (max-width: 782px) {
	.dhali-footer__columns {
		grid-template-columns: 1fr 1fr;
	}
}

/* ---------------------------------------------------------------------------
   6. Shop — filter sidebar + product grid
--------------------------------------------------------------------------- */

.woocommerce-shop main {
	padding: var(--dhali-space-60) var(--dhali-space-60);
}

.dhali-shop-layout {
	display: grid;
	grid-template-columns: 230px 1fr;
	gap: var(--dhali-space-60);
	align-items: start;
}

.dhali-shop-filters {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: var(--dhali-space-40);
}

.dhali-shop-filters__group + .dhali-shop-filters__group {
	margin-top: var(--dhali-space-40);
	padding-top: var(--dhali-space-40);
	border-top: 1px solid var(--wp--preset--color--border);
}

.dhali-shop-filters__title {
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--wp--preset--color--ink);
	margin-bottom: var(--dhali-space-20);
}

.dhali-breadcrumb,
.wp-block-woocommerce-breadcrumbs {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}

.dhali-breadcrumb a,
.wp-block-woocommerce-breadcrumbs a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
   7. Cart — WooCommerce Cart block
--------------------------------------------------------------------------- */

.wp-block-woocommerce-cart-line-items-block {
	border-top: 1px solid var(--wp--preset--color--border);
}

.wc-block-cart-items__header,
.wc-block-cart-item {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wc-block-components-quantity-selector {
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 10px;
	overflow: hidden;
}

.wc-block-components-quantity-selector__button {
	color: var(--wp--preset--color--ink);
}

.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
	background-color: var(--wp--preset--color--cream);
	border-radius: 16px;
	padding: var(--dhali-space-40);
}

.wp-block-woocommerce-proceed-to-checkout-block .wp-block-button__link {
	width: 100%;
	background-color: var(--wp--preset--color--brand);
	color: var(--wp--preset--color--white);
	border-radius: 26px;
}

/* ---------------------------------------------------------------------------
   8. Checkout — WooCommerce Checkout block
--------------------------------------------------------------------------- */

.wc-block-checkout__form .wc-block-components-text-input input,
.wc-block-checkout__form .wc-block-components-address-form input,
.wc-block-checkout__form select {
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 10px;
}

.wc-block-components-radio-control__option {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
}

.wc-block-components-radio-control__option.wc-block-components-radio-control__option-checked {
	border-color: var(--wp--preset--color--brand);
}

/* ---------------------------------------------------------------------------
   9. Product page — variation pills + qty stepper
--------------------------------------------------------------------------- */

.dhali-variation-pills {
	display: flex;
	flex-wrap: wrap;
	gap: var(--dhali-space-20);
}

.dhali-variation-pill {
	display: inline-flex;
	align-items: center;
	padding: var(--dhali-space-20) var(--dhali-space-30);
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 24px;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}

.dhali-variation-pill.is-selected,
.dhali-variation-pill:has(input:checked) {
	border-color: var(--wp--preset--color--brand);
	background-color: var(--wp--preset--color--cream);
	font-weight: 600;
}

.dhali-variation-pill input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.dhali-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: 10px;
	overflow: hidden;
}

.dhali-qty-stepper__btn {
	background: none;
	border: none;
	width: 36px;
	height: 36px;
	font-size: var(--wp--preset--font-size--md);
	color: var(--wp--preset--color--ink);
	cursor: pointer;
}

.dhali-qty-stepper__input {
	width: 40px;
	text-align: center;
	border: none;
	font-size: var(--wp--preset--font-size--base);
}

/* ---------------------------------------------------------------------------
   10. FAQ — core/details accordion
--------------------------------------------------------------------------- */

.dhali-faq details {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: var(--dhali-space-30) var(--dhali-space-40);
}

.dhali-faq details + details {
	margin-top: var(--dhali-space-20);
}

.dhali-faq summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.dhali-faq summary::-webkit-details-marker {
	display: none;
}

.dhali-faq summary::after {
	content: "+";
	font-size: var(--wp--preset--font-size--lg);
	color: var(--wp--preset--color--brand);
	transition: transform 0.2s ease;
}

.dhali-faq details[open] summary::after {
	transform: rotate(45deg);
}

/* ---------------------------------------------------------------------------
   11. Account dashboard
--------------------------------------------------------------------------- */

.dhali-account {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: var(--dhali-space-60);
	align-items: start;
}

.dhali-account__nav a {
	display: block;
	padding: var(--dhali-space-20) var(--dhali-space-30);
	border-radius: 10px;
	color: var(--wp--preset--color--body-text);
	text-decoration: none;
	font-weight: 500;
}

.dhali-account__nav a:hover,
.dhali-account__nav a.is-current {
	background-color: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--ink);
}

.dhali-account__orders {
	width: 100%;
	border-collapse: collapse;
}

.dhali-account__orders th {
	text-align: left;
	font-size: var(--wp--preset--font-size--sm);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--muted);
	background-color: var(--wp--preset--color--cream);
	padding: var(--dhali-space-20) var(--dhali-space-30);
}

.dhali-account__orders td {
	padding: var(--dhali-space-20) var(--dhali-space-30);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.dhali-status {
	display: inline-flex;
	align-items: center;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}

.dhali-status--success {
	color: var(--wp--preset--color--success);
	background-color: color-mix(in srgb, var(--wp--preset--color--success) 15%, white);
}

.dhali-status--warning {
	color: var(--wp--preset--color--warning);
	background-color: color-mix(in srgb, var(--wp--preset--color--warning) 15%, white);
}

/* ---------------------------------------------------------------------------
   12. Legacy style.min.css conflicts neutralised here (markup-agnostic ones —
   header/menu-grid and contact-form conflicts are handled in Phase 3 / 4b,
   see plans/reference/style-min-css-audit.md)
--------------------------------------------------------------------------- */

.wp-block-button__link,
body .wp-element-button {
	font-weight: 600;
}

/* ---------------------------------------------------------------------------
   13. Responsive
   Desktop-as-drawn ≥1200px is the default above. The mockup itself is
   desktop-only, so these breakpoints are our own explicit design call.
--------------------------------------------------------------------------- */

@media (max-width: 1199px) {
	.hostinger-ai-menu .wp-block-group,
	.woocommerce-shop main {
		padding-left: var(--dhali-space-40);
		padding-right: var(--dhali-space-40);
	}

	.dhali-shop-layout,
	.dhali-account {
		grid-template-columns: 200px 1fr;
	}
}

@media (max-width: 782px) {
	.woocommerce-shop main {
		padding-left: var(--dhali-space-20);
		padding-right: var(--dhali-space-20);
	}

	.dhali-shop-layout {
		grid-template-columns: 1fr;
	}

	.dhali-shop-filters {
		display: none;
	}

	.dhali-shop-filters.is-open {
		display: block;
	}

	.dhali-account {
		grid-template-columns: 1fr;
	}

	.dhali-account__nav {
		display: flex;
		overflow-x: auto;
		gap: var(--dhali-space-20);
	}
}
