/*
Theme Name: Botanica
Theme URI: https://botanica.local
Description: Child theme of Blocksy for Botanica — small-batch natural skincare. Design tokens and component styling live here.
Author: Botanica
Template: blocksy
Version: 1.0.1
Text Domain: botanica
*/

/* ==========================================================================
   1. Design tokens — mirrors beauty/botanica-homepage.html
   ========================================================================== */

:root {
	--bg:        #F4EEE4; /* warm oat off-white */
	--bg-deep:   #ECE3D3; /* deeper oat panel   */
	--surface:   #FCFAF4; /* warm white card    */
	--ink:       #2B2823; /* warm charcoal      */
	--ink-soft:  #6E675C; /* muted body text    */
	--sage:      #6F7D56; /* accent (fills)     */
	--sage-deep: #5A6645; /* accent (text/hover)*/
	--sage-tint: #E5E8DB; /* accent wash panel  */
	--line:      rgba(43, 40, 35, 0.14);
	--footer-bg: #231F19;
	--footer-tx: #C9C2B4;
	--footer-mu: #7E7869;

	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans:  "Work Sans", system-ui, -apple-system, sans-serif;

	--container: 1200px;
	--radius: 16px;
	--arch: 280px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

body {
	font-family: var(--sans);
	background: var(--bg);
	color: var(--ink);
	line-height: 1.65;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1, h2, h3, h4,
.entry-title,
.woocommerce-loop-product__title,
.product_title {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 1.08;
	letter-spacing: -0.01em;
	color: var(--ink);
}

::selection { background: var(--sage); color: #fff; }

/* Film-grain atmosphere over the whole page, as in the source design. */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	opacity: .04;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   3. Shared typographic pieces
   ========================================================================== */

.botanica-kicker,
.botanica-kicker .elementor-heading-title {
	font-family: var(--sans);
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--sage-deep);
	line-height: 1.4;
}

.botanica-kicker { margin-bottom: 1.1rem; }

.botanica-h1 .elementor-heading-title {
	font-size: clamp(2.7rem, 6vw, 4.7rem);
	margin: .4rem 0 1.5rem;
}
.botanica-h1 em { font-style: italic; color: var(--sage-deep); }

.botanica-h2 .elementor-heading-title {
	font-size: clamp(2rem, 4vw, 3.1rem);
	margin: .3rem 0 1.4rem;
}

.botanica-lead,
.botanica-lead p {
	color: var(--ink-soft);
	font-size: 1.075rem;
	max-width: 46ch;
}
.botanica-hero .botanica-lead p { font-size: 1.15rem; margin-bottom: 2.3rem; }
.botanica-lead p + p { margin-top: 1.1rem; }

.botanica-sec-lead,
.botanica-sec-lead p {
	color: var(--ink-soft);
	max-width: 600px;
	margin-inline: auto;
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */

.botanica-btn .elementor-button {
	font-family: var(--sans);
	font-size: .92rem;
	font-weight: 500;
	letter-spacing: .02em;
	padding: .95rem 1.8rem;
	border-radius: 100px;
	border: 1px solid transparent;
	transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}

.botanica-btn-primary .elementor-button { background: var(--sage); color: #fff; }
.botanica-btn-primary .elementor-button:hover {
	background: var(--sage-deep);
	transform: translateY(-2px);
	box-shadow: 0 12px 26px -14px rgba(90, 102, 69, .7);
}

.botanica-btn-cream .elementor-button { background: var(--bg); color: var(--ink); }
.botanica-btn-cream .elementor-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .4);
}

/* Text link with an underline that grows on hover. */
.botanica-btn-link .elementor-button {
	background: transparent;
	color: var(--sage-deep);
	padding: .95rem 0;
	border-radius: 0;
	border-bottom: 1px solid transparent;
}
.botanica-btn-link .elementor-button:hover {
	border-bottom-color: var(--sage-deep);
	transform: none;
	box-shadow: none;
}

.botanica-cta-row { flex-wrap: wrap; }

/* ==========================================================================
   5. Hero and brand story
   ========================================================================== */

.botanica-meta {
	display: flex;
	gap: 2.2rem;
	margin-top: 3.2rem;
	padding-top: 1.8rem;
	border-top: 1px solid var(--line);
}
.botanica-meta b {
	font-family: var(--serif);
	font-size: 1.45rem;
	font-weight: 500;
	display: block;
	line-height: 1.25;
}
.botanica-meta span { font-size: .82rem; color: var(--ink-soft); }

/* Arch-topped image panels. */
.botanica-arch .elementor-widget-image,
.botanica-arch figure { width: 100%; }

.botanica-arch .elementor-widget-image img {
	width: 100%;
	display: block;
	border-radius: var(--arch) var(--arch) var(--radius) var(--radius);
	box-shadow: 0 40px 70px -40px rgba(80, 90, 60, .55);
	object-fit: cover;
	aspect-ratio: 4 / 5;
}

.botanica-arch-story .elementor-widget-image img {
	border-radius: var(--radius);
	aspect-ratio: 1 / 1;
}

/* ==========================================================================
   6. Product grid and cards
   ========================================================================== */

.woocommerce ul.products,
ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(20px, 2.4vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products li.product,
ul.products li.product {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 14px 14px 22px;
	margin: 0;
	width: auto;
	float: none;
	text-align: left;
	transition: transform .3s ease, box-shadow .3s ease;
}

ul.products li.product:hover {
	transform: translateY(-6px);
	box-shadow: 0 30px 50px -32px rgba(0, 0, 0, .35);
}

ul.products li.product figure { margin: 0 0 1.1rem; }

ul.products li.product img {
	border-radius: 12px;
	aspect-ratio: 4 / 5 !important;
	object-fit: cover;
	width: 100%;
	margin: 0;
}

ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--serif);
	font-size: 1.22rem;
	font-weight: 400;
	line-height: 1.25;
	margin: 0 0 .2rem;
	padding: 0;
}
ul.products li.product .woocommerce-loop-product__title a { color: var(--ink); }

.botanica-ingredients {
	font-size: .83rem;
	color: var(--ink-soft);
	margin-bottom: 1rem;
	line-height: 1.5;
}

ul.products li.product .price {
	font-family: var(--serif);
	font-size: 1.2rem;
	color: var(--ink);
	margin: 0;
	display: inline-block;
}
ul.products li.product .price .woocommerce-Price-amount { font-weight: 400; }

/* The design's cards show name, ingredients, price and the button only. */
ul.products li.product .entry-meta,
ul.products li.product .ct-woo-card-extra { display: none !important; }

/* Price and Add to cart share one row (wrapper added in functions.php). */
ul.products li.product {
	display: flex;
	flex-direction: column;
}
ul.products li.product .botanica-card-row {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
}
ul.products li.product .botanica-card-row .price { margin: 0; }

ul.products li.product .button {
	flex: none;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--ink);
	font-family: var(--sans);
	font-size: .82rem;
	font-weight: 500;
	padding: .55rem 1.05rem;
	border-radius: 100px;
	transition: .25s;
	line-height: 1.2;
}
ul.products li.product .button:hover,
ul.products li.product .button.added {
	background: var(--sage);
	color: #fff;
	border-color: var(--sage);
}
ul.products li.product .added_to_cart {
	order: 10;
	font-size: .78rem;
	color: var(--sage-deep);
	margin-top: .6rem;
}

/* ==========================================================================
   7. Why natural
   ========================================================================== */

.botanica-values { align-items: flex-start; }

/* Elementor forces text-align:center on the icon-box wrapper with !important,
   so these overrides have to match that weight. */
.elementor-widget.botanica-value .elementor-icon-box-wrapper {
	text-align: left !important;
	align-items: flex-start !important;
}

.elementor-widget.botanica-value .elementor-icon-box-icon {
	width: 54px;
	height: 54px;
	border-radius: 14px;
	background: var(--bg);
	border: 1px solid var(--line);
	display: grid;
	place-items: center;
	margin: 0 0 1.3rem;
}
.elementor-widget.botanica-value .elementor-icon {
	color: var(--sage-deep);
	font-size: 22px;
	line-height: 0;
}
.elementor-widget.botanica-value .elementor-icon svg {
	width: 24px;
	height: 24px;
	fill: var(--sage-deep);
}
.botanica-value .elementor-icon-box-title {
	font-family: var(--serif);
	font-size: 1.25rem;
	font-weight: 400;
	margin-bottom: .5rem;
	color: var(--ink);
}
.botanica-value .elementor-icon-box-description {
	font-size: .92rem;
	color: var(--ink-soft);
	line-height: 1.6;
}

/* ==========================================================================
   8. Closing CTA band
   ========================================================================== */

.botanica-cta .elementor-heading-title { color: #fff; font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
.botanica-cta-lead p {
	color: rgba(255, 255, 255, .85);
	max-width: 48ch;
	margin: 0 auto 2.4rem;
	font-size: 1.05rem;
	text-align: center;
}

/* ==========================================================================
   9. Header
   ========================================================================== */

header#header.ct-header {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 100;
	background: transparent;
}

header#header.ct-header [data-row="middle"] {
	background: transparent;
	transition: background .35s ease, box-shadow .35s ease;
}

/* Blocksy only emits column-layout and device-visibility CSS for rows saved
   through the Customizer. This header was configured programmatically, so both
   the layout and the desktop/mobile switch are defined here instead. */
header#header [data-row] > .ct-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
header#header [data-column="middle"] { flex: 1; display: flex; justify-content: center; }

@media (max-width: 999px) {
	header#header [data-device="desktop"] { display: none; }
}
@media (min-width: 1000px) {
	header#header [data-device="mobile"] { display: none; }
}

/* Solid oat bar once the page is scrolled. */
body.botanica-scrolled header#header.ct-header [data-row="middle"] {
	background: rgba(244, 238, 228, .86);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	box-shadow: 0 1px 0 var(--line);
}

header#header .site-title a {
	font-family: var(--serif);
	font-size: 1.55rem;
	font-weight: 500;
	color: var(--ink);
	letter-spacing: .01em;
}

header#header .ct-menu-link {
	font-family: var(--sans);
	font-size: .94rem;
	font-weight: 400;
	color: var(--ink);
	text-transform: none;
	letter-spacing: 0;
}

/* Cart: icon plus a sage count badge; Blocksy's running total is hidden. */
header#header .ct-header-cart .ct-label { display: none; }
header#header .ct-cart-item { color: var(--ink); }
header#header .ct-dynamic-count-cart {
	background: var(--sage);
	color: #fff;
	font-family: var(--sans);
	font-size: .64rem;
	font-weight: 600;
	min-width: 17px;
	height: 17px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	line-height: 1;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */

footer#footer.ct-footer {
	background: var(--footer-bg);
	color: var(--footer-tx);
}
footer#footer [data-row] { background: transparent; }

footer#footer [data-row="middle"] { padding-block: clamp(64px, 8vw, 96px) 56px; }

/* Four columns: brand/newsletter, then three link lists. Blocksy only emits
   its own column layout CSS when the row is configured in the Customizer, so
   the grid is defined here. */
footer#footer [data-row="middle"] > .ct-container {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: clamp(32px, 4vw, 56px);
	align-items: start;
}

footer#footer [data-row="bottom"] > .ct-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

@media (max-width: 900px) {
	footer#footer [data-row="middle"] > .ct-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
	footer#footer [data-row="middle"] > .ct-container { grid-template-columns: 1fr; }
	footer#footer [data-row="bottom"] > .ct-container { flex-direction: column; align-items: flex-start; }
}

footer#footer .widget-title,
footer#footer .widget h3 {
	font-family: var(--sans);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--footer-mu);
	margin-bottom: 1.2rem;
}

footer#footer a { color: var(--footer-tx); transition: color .2s; }
footer#footer a:hover { color: var(--bg); }

footer#footer .widget_nav_menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
footer#footer .widget_nav_menu a { font-size: .92rem; }

.botanica-foot-brand {
	font-family: var(--serif);
	font-size: 1.55rem;
	font-weight: 500;
	color: var(--bg);
	display: block;
	margin-bottom: 1rem;
}
.botanica-foot-about {
	font-size: .92rem;
	max-width: 30ch;
	color: #9C958A;
	margin: 0;
}

.botanica-news {
	margin-top: 1.6rem;
	display: flex;
	gap: .5rem;
	max-width: 320px;
}
.botanica-news input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 100px;
	padding: .7rem 1.1rem;
	color: var(--bg);
	font-family: var(--sans);
	font-size: .88rem;
}
.botanica-news input::placeholder { color: #8A847A; }
.botanica-news button {
	background: var(--bg);
	color: var(--footer-bg);
	border: 0;
	border-radius: 100px;
	padding: 0 1.2rem;
	font-family: var(--sans);
	font-weight: 500;
	cursor: pointer;
}

footer#footer [data-row="bottom"] {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding-block: 1.8rem;
	font-size: .83rem;
	color: var(--footer-mu);
}
footer#footer .ct-footer-copyright { color: var(--footer-mu); font-size: .83rem; }

/* Social icons inherit the footer palette rather than each brand's colour. */
footer#footer .ct-social-box { display: flex; gap: 1.2rem; }
footer#footer .ct-social-box a,
footer#footer .ct-social-box a svg {
	color: var(--footer-tx);
	fill: var(--footer-tx);
	background: none;
	width: 18px;
	height: 18px;
}
footer#footer .ct-social-box a:hover svg { fill: var(--bg); }

/* The Elementor sections supply their own vertical rhythm, so the theme's
   content padding would otherwise leave a pale strip above the footer. */
.home #main-container { padding-block: 0; }

/* ==========================================================================
   11. WooCommerce pages (shop, single, cart)
   ========================================================================== */

.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	font-family: var(--sans);
	font-weight: 500;
	border-radius: 100px;
	background: var(--sage);
	color: #fff;
	transition: background .25s ease, transform .25s ease;
}
.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
	background: var(--sage-deep);
	color: #fff;
	transform: translateY(-2px);
}

.woocommerce .product_title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	font-family: var(--serif);
	font-size: 1.6rem;
	color: var(--ink);
}
.botanica-ingredients--single {
	font-size: .95rem;
	margin: -.4rem 0 1.2rem;
}

.woocommerce-message,
.woocommerce-info {
	border-top-color: var(--sage);
	background: var(--surface);
}
.woocommerce-message::before,
.woocommerce-info::before { color: var(--sage); }

/* Give inner shop/product pages room under the absolutely-positioned header. */
body:not(.home) #main-container { padding-top: 130px; }

/* ==========================================================================
   12. Responsive
   ========================================================================== */

@media (max-width: 900px) {
	.botanica-hero.e-con,
	.botanica-story.e-con { flex-direction: column; }
	.botanica-hero > .e-con,
	.botanica-story > .e-con { width: 100% !important; }

	/* Image leads on mobile in the hero, as in the source design. */
	.botanica-hero .botanica-arch-hero { order: -1; }
	.botanica-arch img { aspect-ratio: 5 / 4; max-height: 440px; }

	.woocommerce ul.products,
	ul.products { grid-template-columns: repeat(2, 1fr); }

	.botanica-values { flex-wrap: wrap; }
	.botanica-values > .elementor-widget { width: calc(50% - 22px); }
}

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

	.botanica-values > .elementor-widget { width: 100%; }

	/* Three equal columns keeps "UK / Made & sourced" on the same row as the
	   other two stats instead of dropping to a second line. */
	.botanica-meta {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: .9rem;
	}
	.botanica-meta b { font-size: 1.2rem; }
	.botanica-meta span { font-size: .7rem; line-height: 1.35; }

	/* The eyebrow is a long tracked string; at the desktop size it orphans
	   "BRITAIN" onto its own line. Tightening size and tracking fits it on one
	   line at 390px and still wraps gracefully on a 320px screen. */
	.botanica-kicker,
	.botanica-kicker .elementor-heading-title {
		font-size: .6rem;
		letter-spacing: .11em;
	}

	/* Centre the stacked footer — left-aligned single columns look unbalanced. */
	footer#footer [data-row="middle"] > .ct-container {
		justify-items: center;
		text-align: center;
	}
	footer#footer .botanica-foot-about,
	footer#footer .botanica-news { margin-inline: auto; }
	footer#footer [data-row="bottom"] > .ct-container {
		align-items: center;
		text-align: center;
	}
	footer#footer .ct-social-box { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	ul.products li.product,
	.botanica-btn .elementor-button { transition: none; }
}
