/*
Theme Name: Есин — магазин конфет
Theme URI: https://esin.nadivane.shop/
Author: Есин
Description: Mobile-first WooCommerce theme for the ERP-owned Esin candy catalogue.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: esin-candy
*/

:root {
	--esin-ink: #3b2730;
	--esin-muted: #725d65;
	--esin-cream: #fff9ee;
	--esin-paper: #fffdf8;
	--esin-pink: #c94863;
	--esin-pink-dark: #9e3049;
	--esin-green: #276847;
	--esin-gold: #c9974b;
	--esin-line: #e7d8cf;
	--esin-shadow: 0 14px 36px rgba(90, 44, 55, .12);
	--esin-radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--esin-cream);
	color: var(--esin-ink);
	font-family: "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
}
body::before {
	content: "";
	display: block;
	height: 70px;
	background: #d66075 url("assets/images/tail-top.jpg") repeat-x top left;
}
a { color: var(--esin-pink-dark); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.esin-container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: rgba(255, 249, 238, .96);
	border-bottom: 1px solid var(--esin-line);
	backdrop-filter: blur(12px);
}
.site-header__row {
	display: flex;
	min-height: 66px;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}
.site-branding { display: flex; align-items: baseline; gap: 9px; text-decoration: none; color: var(--esin-ink); }
.site-branding__name { font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 700; line-height: 1; }
.site-branding__descriptor { color: var(--esin-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--esin-ink); text-decoration: none; font-weight: 600; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--esin-pink-dark); }
.site-nav__cart {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 8px 15px;
	border: 1px solid var(--esin-pink);
	border-radius: 999px;
}
.site-nav-toggle { display: none; border: 0; background: transparent; color: var(--esin-ink); font-size: 25px; padding: 8px; }

.esin-hero {
	position: relative;
	overflow: hidden;
	min-height: 620px;
	background:
		radial-gradient(circle at 84% 25%, rgba(255,255,255,.94), rgba(255,255,255,0) 28%),
		linear-gradient(135deg, #fffaf0 0%, #ffe5e1 58%, #f7bec8 100%);
	border-bottom: 1px solid var(--esin-line);
}
.esin-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .88fr); min-height: 620px; align-items: center; gap: 22px; }
.esin-kicker { margin: 0 0 10px; color: var(--esin-pink-dark); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.esin-hero h1 { max-width: 720px; margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 6vw, 74px); line-height: .98; font-weight: 700; }
.esin-hero__lead { max-width: 610px; margin: 0 0 28px; color: var(--esin-muted); font-size: clamp(18px, 2.2vw, 23px); }
.esin-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.esin-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .single_add_to_cart_button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px !important;
	border: 1px solid var(--esin-pink) !important;
	border-radius: 999px !important;
	background: var(--esin-pink) !important;
	color: #fff !important;
	font-weight: 750 !important;
	line-height: 1.2 !important;
	text-decoration: none;
	box-shadow: 0 8px 18px rgba(158, 48, 73, .18);
}
.esin-button:hover, .esin-button:focus-visible, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--esin-pink-dark) !important; }
.esin-button--secondary { background: transparent !important; color: var(--esin-pink-dark) !important; box-shadow: none; }
.esin-hero__art { position: relative; align-self: stretch; min-height: 560px; }
.esin-hero__art img { position: absolute; pointer-events: none; user-select: none; }
.esin-hero__wave { inset: 7% -19% auto -18%; width: 142%; opacity: .72; transform: rotate(7deg); }
.esin-hero__lollipop { z-index: 3; width: min(72%, 410px); left: 21%; top: 2%; filter: drop-shadow(0 24px 22px rgba(100, 34, 50, .23)); transform: rotate(8deg); }
.esin-hero__berry--whole { z-index: 4; width: 36%; left: -1%; bottom: 4%; transform: rotate(-13deg); filter: drop-shadow(0 15px 12px rgba(100, 34, 50, .18)); }
.esin-hero__berry--half { z-index: 4; width: 31%; right: -3%; bottom: 12%; transform: rotate(14deg); filter: drop-shadow(0 15px 12px rgba(100, 34, 50, .18)); }
.esin-source-note { margin-top: 18px; color: var(--esin-muted); font-size: 12px; }

.esin-section { padding: 68px 0; }
.esin-section--paper { background: var(--esin-paper); border-block: 1px solid var(--esin-line); }
.esin-section__head { max-width: 760px; margin: 0 0 30px; }
.esin-section h2 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 47px); line-height: 1.08; }
.esin-section__head p { margin: 0; color: var(--esin-muted); font-size: 18px; }
.esin-proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--esin-line); background: var(--esin-line); }
.esin-proof { padding: 26px; background: var(--esin-paper); }
.esin-proof strong { display: block; margin-bottom: 5px; font-family: Georgia, "Times New Roman", serif; font-size: 23px; }
.esin-proof p { margin: 0; color: var(--esin-muted); }

.esin-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.esin-product-card {
	display: grid;
	grid-template-columns: minmax(140px, .8fr) minmax(0, 1.2fr);
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--esin-line);
	border-radius: var(--esin-radius);
	box-shadow: var(--esin-shadow);
}
.esin-product-card__image { display: flex; min-height: 300px; align-items: center; justify-content: center; background: linear-gradient(145deg, #fff8f0, #f9d5d8); }
.esin-product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.esin-product-card__body { display: flex; flex-direction: column; padding: 23px; }
.esin-product-card h3 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 24px; line-height: 1.12; }
.esin-product-card h3 a { color: var(--esin-ink); text-decoration: none; }
.esin-product-card__price { margin: auto 0 14px; font-size: 26px; font-weight: 800; }
.esin-product-card__status { margin: 0 0 16px; color: var(--esin-muted); font-size: 14px; }
.esin-favorite {
	display: inline-flex;
	width: fit-content;
	min-height: 38px;
	align-items: center;
	gap: 7px;
	margin: 0 0 14px;
	padding: 6px 12px;
	border: 1px solid var(--esin-line);
	border-radius: 999px;
	background: #fff;
	color: var(--esin-ink);
	cursor: pointer;
}
.esin-favorite [aria-hidden="true"] { color: var(--esin-pink-dark); font-size: 20px; line-height: 1; }
.esin-favorite.is-selected { border-color: var(--esin-pink); color: var(--esin-pink-dark); }
.esin-marketplaces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.esin-marketplace-link {
	display: inline-flex;
	min-height: 40px;
	align-items: center;
	padding: 8px 13px;
	border: 1px solid var(--esin-line);
	border-radius: 999px;
	background: #fff;
	color: var(--esin-ink);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}
.esin-marketplace-link:hover, .esin-marketplace-link:focus-visible { border-color: var(--esin-pink); color: var(--esin-pink-dark); }

.site-main { min-height: 55vh; }
.esin-content { padding: 46px 0 70px; }
.woocommerce .product .summary { padding-top: 10px; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--esin-pink-dark); font-size: 27px; font-weight: 800; }
.woocommerce table.shop_table, .esin-product-facts, .esin-legal-table { width: 100%; border-collapse: collapse; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td, .esin-product-facts th, .esin-product-facts td, .esin-legal-table th, .esin-legal-table td { padding: 9px 12px; border: 1px solid var(--esin-line); text-align: left; vertical-align: top; }
.esin-product-facts th { width: 32%; background: #fff8f4; }
.woocommerce-message, .woocommerce-info { border-top-color: var(--esin-green); background: #fff; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--esin-green); }

.site-footer { padding: 38px 0; background: #3e2931; color: #f8ece7; }
.site-footer__row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 34px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 7px; }
.site-footer__legal { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

.esin-cookie-choice {
	position: fixed;
	right: 18px;
	bottom: 18px;
	left: 18px;
	z-index: 9999;
	margin: auto;
	max-width: 920px;
	border: 1px solid var(--esin-line);
	background: #fff;
	box-shadow: 0 18px 50px rgba(50, 28, 36, .25);
}
.esin-cookie-choice__inner { padding: 18px 20px; }
.esin-cookie-choice h2 { margin: 0 0 7px; font-size: 20px; }
.esin-cookie-choice p { margin: 0 0 9px; }
.esin-cookie-choice__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
.esin-cookie-choice__actions form { margin: 0; }
.woocommerce .form-row.validate-required label.checkbox { line-height: 1.4; }

@media (max-width: 940px) {
	body::before { height: 54px; background-size: auto 54px; }
	.esin-hero__grid { grid-template-columns: 1fr .75fr; min-height: 570px; }
	.esin-hero__art { min-height: 510px; }
	.esin-products { grid-template-columns: 1fr; }
	.esin-product-card { grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr); }
}

@media (max-width: 720px) {
	.esin-container { width: min(100% - 24px, 620px); }
	.site-header__row { min-height: 60px; }
	.site-branding__descriptor { display: none; }
	.site-nav-toggle { display: inline-flex; }
	.site-nav {
		position: absolute;
		left: 0; right: 0; top: 100%;
		display: none;
		flex-direction: column;
		align-items: stretch;
		padding: 16px 20px 22px;
		background: var(--esin-cream);
		border-bottom: 1px solid var(--esin-line);
	}
	.site-nav.is-open { display: flex; }
	.site-nav a { min-height: 44px; display: flex; align-items: center; }
	.esin-hero { min-height: 0; }
	.esin-hero__grid { grid-template-columns: 1fr; padding-top: 48px; min-height: 0; }
	.esin-hero h1 { font-size: clamp(40px, 12vw, 57px); }
	.esin-hero__art { min-height: 440px; }
	.esin-hero__lollipop { width: 63%; left: 20%; top: -2%; }
	.esin-hero__wave { width: 128%; inset: 4% -12% auto -15%; }
	.esin-hero__berry--whole { width: 34%; left: 3%; bottom: 3%; }
	.esin-hero__berry--half { width: 30%; right: 1%; bottom: 10%; }
	.esin-section { padding: 52px 0; }
	.esin-proof-grid { grid-template-columns: 1fr; }
	.esin-product-card { grid-template-columns: 1fr; }
	.esin-product-card__image { min-height: 260px; max-height: 380px; }
	.site-footer__row { grid-template-columns: 1fr; }
	.esin-cookie-choice { right: 8px; bottom: 8px; left: 8px; }
	.esin-cookie-choice__actions { flex-direction: column; }
	.esin-cookie-choice__actions form, .esin-cookie-choice__actions button { width: 100%; }
}

@media (max-width: 380px) {
	body::before { height: 46px; background-size: auto 46px; }
	.esin-container { width: min(100% - 20px, 360px); }
	.site-branding__name { font-size: 27px; }
	.esin-actions { flex-direction: column; }
	.esin-button { width: 100%; }
	.esin-hero__art { min-height: 390px; }
	.esin-marketplaces { flex-direction: column; }
	.esin-marketplace-link { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
