/*
Theme Name: Alamraa Foods
Theme URI: https://alamraafoods.com
Author: Alamraa Foods
Description: Single-theme block design for Alamraa Foods: warm cream backgrounds, forest-green brand elements and restrained gold accents. Built for WooCommerce, with WhatsApp ordering on product pages and in the cart.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alamraa-foods
*/

/* Sticky header */
.alamraa-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .alamraa-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .alamraa-header { top: 0; } }

/* Small uppercase label with a gold rule */
.alamraa-eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.alamraa-eyebrow::before {
	content: "";
	width: 32px;
	height: 1px;
	background: var(--wp--preset--color--gold);
	flex-shrink: 0;
}

/* Category cards */
.alamraa-cat a { text-decoration: none; }
.alamraa-cat img { border-radius: 16px; width: 100%; height: auto; display: block; }
.alamraa-cat--soon { border-style: dashed !important; }
.alamraa-badge {
	display: inline-block;
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 999px;
	padding: 2px 10px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Product grid from the [products] shortcode */
.alamraa-products ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; margin: 0; padding: 0; }
.alamraa-products ul.products::before,
.alamraa-products ul.products::after { display: none !important; }
.alamraa-products ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 20px;
	padding: 14px 14px 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	list-style: none;
}
.alamraa-products ul.products li.product img { border-radius: 14px; aspect-ratio: 1 / 1; object-fit: cover; margin: 0 0 6px !important; }
.alamraa-products ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 600;
	font-size: 1.2rem !important;
	color: var(--wp--preset--color--forest);
	padding: 0 !important;
}
.alamraa-products ul.products li.product .price { color: var(--wp--preset--color--ink) !important; font-weight: 700; font-size: 1rem !important; }
.alamraa-products ul.products li.product .button { margin-top: auto !important; text-align: center; }

/* WooCommerce buttons pick up the brand style everywhere */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button:not(.is-link) {
	background: var(--wp--preset--color--forest) !important;
	color: var(--wp--preset--color--white) !important;
	border-radius: 999px !important;
	font-weight: 800 !important;
	padding: 0.8em 1.4em !important;
	min-height: 44px;
	border: none !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover { background: var(--wp--preset--color--forest-dark) !important; }

/* WhatsApp ordering */
.alamraa-wa { margin: 16px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.alamraa-wa__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 22px;
	border-radius: 999px;
	border: 1.5px solid var(--wp--preset--color--forest);
	color: var(--wp--preset--color--forest) !important;
	background: var(--wp--preset--color--white);
	font-weight: 800;
	text-decoration: none !important;
	align-self: flex-start;
}
.alamraa-wa__btn:hover { background: var(--wp--preset--color--sand); }
.alamraa-wa__note { margin: 0; font-size: 0.85rem; color: var(--wp--preset--color--muted); max-width: 46ch; }
li.product .alamraa-wa { margin: 4px 0 0; }
li.product .alamraa-wa__btn { align-self: stretch; min-height: 42px; font-size: 0.9rem; }

/* FAQ accordion (core Details block) */
.alamraa-faq details { border-bottom: 1px solid var(--wp--preset--color--line); padding: 4px 0; }
.alamraa-faq summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; padding: 14px 0; list-style-position: outside; }
.alamraa-faq details > :not(summary) { margin: 0 0 16px; color: var(--wp--preset--color--muted); }

/* Keyboard focus */
:where(a, button, summary, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Footer */
.alamraa-links { list-style: none; padding-left: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.alamraa-links a { text-decoration: none; }
.alamraa-links a:hover { text-decoration: underline; }
.alamraa-copyright { border-top: 1px solid #1F5A3A; padding-top: 18px; margin-top: 32px !important; max-width: 1200px; margin-left: auto !important; margin-right: auto !important; }

/* Header search: compact round icon button */
.alamraa-header .wp-block-search__button {
	width: 44px;
	height: 44px;
	min-width: 44px;
	padding: 0 !important;
	border-radius: 50% !important;
	background: var(--wp--preset--color--white) !important;
	color: var(--wp--preset--color--forest) !important;
	border: 1px solid var(--wp--preset--color--line) !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.alamraa-header .wp-block-search__button svg { width: 20px; height: 20px; fill: currentColor; }
.alamraa-header .wp-block-search__input { border-radius: 999px; border-color: var(--wp--preset--color--line); }

/* Mini cart icon in brand colours */
.alamraa-header .wc-block-mini-cart__button { color: var(--wp--preset--color--forest); min-height: 44px; }
.alamraa-header .wc-block-mini-cart__badge { background: var(--wp--preset--color--forest) !important; color: var(--wp--preset--color--white) !important; }

/* FAQ: + / – on the right instead of the default arrow */
.alamraa-faq summary {
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}
.alamraa-faq summary::-webkit-details-marker { display: none; }
.alamraa-faq summary::after {
	content: "+";
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--gold);
	color: var(--wp--preset--color--forest);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1;
}
.alamraa-faq details[open] summary::after { content: "–"; }
