/*
Theme Name: Elaia
Theme URI: https://example.com/elaia
Author: [YOUR NAME]
Description: A block theme for a Greek olive oil import shop. Built for WooCommerce. Olive and Aegean palette, GFS Didot headings with Manrope body text.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elaia
Tags: e-commerce, block-patterns, full-site-editing, wide-blocks, custom-colors
*/

/* ---------- Base ---------- */
body { -webkit-font-smoothing: antialiased; }
:where(a):focus-visible,
:where(button, input, select, textarea):focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--aegean);
	outline-offset: 3px;
}
img { max-width: 100%; height: auto; }

.elaia-section { padding-top: clamp(64px, 8vw, 104px); padding-bottom: clamp(64px, 8vw, 104px); }
.elaia-section.elaia-tight { padding-top: 36px; padding-bottom: 36px; }

.elaia-eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin-bottom: 0.75rem !important;
}
.elaia-lead { font-size: 1.1875rem; line-height: 1.65; max-width: 34em; }
.elaia-center { text-align: center; }
.elaia-center .wp-block-buttons { justify-content: center; }

/* ---------- Header ---------- */
.elaia-announcement {
	text-align: center;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	padding-top: 10px;
	padding-bottom: 10px;
}
.elaia-announcement p { margin: 0; }
.elaia-header {
	border-bottom: 1px solid var(--wp--preset--color--sand);
	padding-top: 18px;
	padding-bottom: 18px;
}
.elaia-header .wp-block-site-title,
.elaia-footer .wp-block-site-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.875rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0;
}
.elaia-header .wp-block-site-title a,
.elaia-footer .wp-block-site-title a { text-decoration: none; color: inherit; }
.elaia-header .wp-block-navigation { font-weight: 600; font-size: 0.9375rem; }
.elaia-header .wp-block-navigation a { text-decoration: none; }
.elaia-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }
.elaia-header-tools { gap: 6px; }

/* ---------- Hero ---------- */
.elaia-hero h1 {
	font-size: clamp(2.75rem, 6vw, 4.75rem);
	line-height: 1.02;
	margin-top: 0;
}
.elaia-hero .elaia-lead { color: var(--wp--preset--color--olive-light); }
.elaia-hero .wp-block-image img { border-radius: 4px; width: 100%; object-fit: cover; }

/* ---------- Trust strip ---------- */
.elaia-trust { border-bottom: 1px solid var(--wp--preset--color--sand); }
.elaia-trust .wp-block-column p {
	display: flex;
	align-items: center;
	gap: 14px;
	font-weight: 600;
	font-size: 0.9375rem;
	margin: 0;
}
.elaia-trust p::before {
	content: "";
	flex: 0 0 28px;
	height: 28px;
	background-color: var(--wp--preset--color--aegean);
	-webkit-mask: var(--elaia-icon) center / contain no-repeat;
	mask: var(--elaia-icon) center / contain no-repeat;
}
.elaia-icon-drop  { --elaia-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 3c4 4 6 7 6 10a6 6 0 0 1-12 0c0-3 2-6 6-10z'/%3E%3C/svg%3E"); }
.elaia-icon-home  { --elaia-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 20h18M6 20V10l6-6 6 6v10'/%3E%3C/svg%3E"); }
.elaia-icon-label { --elaia-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E"); }
.elaia-icon-truck { --elaia-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 7h11v10H3zM14 10h4l3 3v4h-7'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E"); }

/* ---------- Section headings row ---------- */
.elaia-heading-row { margin-bottom: 40px; align-items: flex-end; }
.elaia-heading-row h2 { margin: 0; }
.elaia-heading-row .elaia-more a { font-weight: 700; }

/* ---------- Groves ---------- */
.elaia-grove-list { border-top: 1px solid #CFCEC2; margin-top: 24px; }
.elaia-grove {
	border-bottom: 1px solid #CFCEC2;
	padding-top: 18px;
	padding-bottom: 18px;
	gap: 20px;
	align-items: baseline;
}
.elaia-grove .elaia-grove-num {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.5rem;
	color: var(--wp--preset--color--aegean);
	min-width: 32px;
	margin: 0;
}
.elaia-grove h3 { font-family: var(--wp--preset--font-family--body); font-size: 1rem; font-weight: 700; margin: 0; }
.elaia-grove p { margin: 4px 0 0; color: var(--wp--preset--color--muted); font-size: 0.9375rem; }
.elaia-media img { border-radius: 4px; width: 100%; object-fit: cover; }

/* ---------- Steps ---------- */
.elaia-step {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--sand);
	border-radius: 4px;
	padding: 32px;
	height: 100%;
}
.elaia-step .elaia-step-num {
	font-family: var(--wp--preset--font-family--display);
	font-size: 2.5rem;
	line-height: 1;
	color: var(--wp--preset--color--aegean);
	margin: 0 0 12px;
}
.elaia-step h3 { font-family: var(--wp--preset--font-family--body); font-size: 1.1875rem; font-weight: 700; margin: 0 0 8px; }
.elaia-step p { color: var(--wp--preset--color--muted); font-size: 0.9375rem; line-height: 1.6; margin: 0; }

/* ---------- Journal (query loop) ---------- */
.elaia-journal .wp-block-post-featured-image img { border-radius: 4px; }
.elaia-journal .wp-block-post-terms {
	font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
	margin-top: 14px;
}
.elaia-journal .wp-block-post-terms a { color: var(--wp--preset--color--gold); text-decoration: none; }
.elaia-journal .wp-block-post-title { font-size: 1.625rem; margin-top: 6px; }
.elaia-journal .wp-block-post-title a { text-decoration: none; color: inherit; }

/* ---------- Wholesale ---------- */
.elaia-wholesale h2 { margin-top: 0; }
.elaia-wholesale p { color: #E3EAF4; }

/* ---------- Footer ---------- */
.elaia-footer { padding-top: 72px; padding-bottom: 40px; font-size: 0.875rem; }
.elaia-footer h2 {
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.875rem; font-weight: 700;
	margin: 0 0 12px;
}
.elaia-footer ul { list-style: none; padding: 0; margin: 0; }
.elaia-footer li { margin: 0 0 10px; }
.elaia-footer a { text-decoration: none; color: var(--wp--preset--color--olive-light); }
.elaia-footer a:hover { text-decoration: underline; color: var(--wp--preset--color--limestone); }
.elaia-footer-bottom {
	border-top: 1px solid #3A4A3E;
	margin-top: 48px;
	padding-top: 24px;
	font-size: 0.8125rem;
	color: #B5C0AE;
}
.elaia-footer-bottom p { margin: 0; }

/* ---------- WooCommerce: shop grid ---------- */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px; margin: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; display: flex; flex-direction: column; }
.woocommerce ul.products li.product a img {
	aspect-ratio: 4 / 5; object-fit: cover; background: #E9E8DF; border-radius: 4px; margin-bottom: 18px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400; font-size: 1.75rem; padding: 0; margin: 0 0 6px;
}
.woocommerce ul.products li.product .price { color: var(--wp--preset--color--ink); font-weight: 700; font-size: 1.0625rem; }
.woocommerce ul.products li.product .button { margin-top: auto; align-self: flex-start; }

/* ---------- WooCommerce: buttons ---------- */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--limestone);
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	padding: 0.9em 1.8em;
	border: 0;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover {
	background: var(--wp--preset--color--olive-dark);
	color: var(--wp--preset--color--limestone);
}
.woocommerce span.onsale { background: var(--wp--preset--color--aegean); border-radius: 999px; min-height: 0; line-height: 1; padding: 8px 12px; }

/* ---------- WooCommerce: single product ---------- */
.woocommerce div.product .product_title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	font-size: clamp(2.25rem, 4vw, 3.375rem);
	line-height: 1.05;
}
.woocommerce div.product p.price, .woocommerce div.product span.price {
	color: var(--wp--preset--color--ink);
	font-size: 1.875rem;
	font-weight: 700;
}
.woocommerce div.product .woocommerce-product-gallery img { border-radius: 4px; background: #E9E8DF; }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.woocommerce div.product form.cart.variations_form { display: block; }
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.woocommerce .quantity .qty {
	height: 52px; width: 5em; border: 1.5px solid #B9B8AC; border-radius: 999px; font: inherit; font-weight: 700;
}
.woocommerce div.product form.cart .button { height: 52px; padding: 0 2.2em; flex: 1 1 200px; }
.woocommerce div.product form.cart .variations select {
	min-height: 48px; border: 1.5px solid #B9B8AC; border-radius: 999px; padding: 0 1em; font: inherit; background: var(--wp--preset--color--white);
}
.woocommerce div.product form.cart .variations th.label { font-weight: 700; padding-right: 1em; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: 0; background: transparent; border: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom: 2px solid var(--wp--preset--color--ink); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }

/* Fact grid (variety / origin / acidity / harvest date) */
.elaia-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	background: var(--wp--preset--color--sand);
	border: 1px solid var(--wp--preset--color--sand);
	border-radius: 4px;
	overflow: hidden;
	margin: 24px 0;
	font-size: 0.875rem;
}
.elaia-fact { background: var(--wp--preset--color--white); padding: 16px; }
.elaia-fact span { display: block; color: var(--wp--preset--color--muted); }
.elaia-fact strong { display: block; margin-top: 4px; }

.woocommerce-message, .woocommerce-info { border-top-color: var(--wp--preset--color--aegean); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--wp--preset--color--aegean); }

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
	.elaia-header > .wp-block-group { justify-content: space-between; }
	.elaia-heading-row { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}
