/*
Theme Name: WayOrganic
Theme URI: https://wayorganic.net/
Author: WayOrganic
Description: Тема для каталога БАДов WayOrganic: 3 языка (Srpski latinica / English / Русский) через Polylang, карточки товаров в виде мини-лендингов, заказ через WhatsApp/Viber/телефон.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: wayorganic
*/

:root {
	--green-900: #1f3a2b;
	--green-700: #2f5d43;
	--green-500: #4f8a5f;
	--green-100: #e7f0e6;
	--cream: #faf7f0;
	--sand: #f1ebdd;
	--ink: #1d211e;
	--muted: #5f6a62;
	--line: #e3ddcf;
	--accent: #d9902f;
	--radius: 18px;
	--shadow: 0 10px 30px rgba(31, 58, 43, .08);
	--font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--cream);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--green-900); letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin-bottom: 1em; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); }
.muted { color: var(--muted); }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-soft { background: var(--sand); }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 14px 26px; border-radius: 999px;
	font-weight: 700; font-size: 16px; text-decoration: none;
	border: 2px solid var(--green-700); color: var(--green-700); background: transparent;
	transition: .2s ease;
}
.btn:hover { background: var(--green-700); color: #fff; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); border-color: var(--green-900); }
.btn-ghost { background: #fff; }
.btn-small { padding: 9px 18px; font-size: 14px; }
.order-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-note { font-size: 14px; color: #a0522d; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(250, 247, 240, .92); backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { text-decoration: none; }
.brand-logo { max-height: 44px; width: auto; }
.brand-text { font-size: 22px; font-weight: 600; color: var(--green-900); }
.brand-text b { font-weight: 800; color: var(--green-500); }
.brand-light { color: #fff; }
.main-nav { display: flex; gap: 24px; margin-left: auto; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.main-nav a:hover { color: var(--green-500); }
.menu-toggle { display: none; }

.lang-switch { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch a {
	padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800;
	text-decoration: none; color: var(--muted); letter-spacing: .04em;
}
.lang-switch a.is-current { background: var(--green-700); color: #fff; }
.lang-switch a:not(.is-current):hover { color: var(--green-700); }

/* Hero (home) */
.hero {
	padding: clamp(64px, 10vw, 130px) 0;
	background:
		radial-gradient(circle at 85% 20%, rgba(79, 138, 95, .18), transparent 45%),
		radial-gradient(circle at 10% 90%, rgba(217, 144, 47, .12), transparent 40%),
		var(--cream);
}
.hero-text { max-width: 720px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 800; color: var(--green-500); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); }

/* Product grid & card */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card {
	background: #fff; border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow); display: flex; flex-direction: column;
	transition: transform .2s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-card-img { position: relative; display: block; background: var(--green-100); aspect-ratio: 1; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.product-card-body h3 a { color: inherit; text-decoration: none; }
.product-card-body .muted { font-size: 15px; }
.product-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 800; font-size: 20px; color: var(--green-900); }
.price s { font-weight: 500; font-size: .7em; color: var(--muted); margin-left: 6px; }
.price-big { font-size: 34px; margin: 10px 0 22px; }
.badge {
	position: absolute; top: 14px; left: 14px; z-index: 2;
	background: var(--accent); color: #fff; font-size: 12px; font-weight: 800;
	padding: 5px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em;
}
.img-placeholder { display: block; width: 100%; height: 100%; min-height: 260px; background: linear-gradient(135deg, var(--green-100), var(--sand)); }

/* Info cards */
.grid-3, .grid-4 { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.info-card { background: #fff; border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.info-card p { color: var(--muted); margin: 0; }
.info-num {
	display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: var(--green-100); color: var(--green-700); font-weight: 800; margin-bottom: 14px;
}

/* Product page */
.product-hero { padding: clamp(40px, 6vw, 80px) 0; background: linear-gradient(180deg, var(--green-100), var(--cream)); }
.product-hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.product-hero-img { position: relative; background: #fff; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1; }
.product-hero-img img { width: 100%; height: 100%; object-fit: contain; }
.pack span { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.prose p { color: #343a36; }
.prose ul { padding-left: 1.2em; }
.spec { display: grid; gap: 16px; }
.spec-block { background: #fff; border-radius: var(--radius); padding: 24px 26px; border: 1px solid var(--line); }
.spec-block p { margin: 0; color: #343a36; }

/* Product hero extras */
.pack-chip {
	display: inline-block; background: var(--green-900); color: #fff;
	font-weight: 800; letter-spacing: .03em; padding: 8px 16px; border-radius: 999px; font-size: 15px;
}
.highlights { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; gap: 8px; }
.highlights li { position: relative; padding-left: 28px; font-weight: 600; }
.highlights li::before {
	content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
	background: var(--green-100); color: var(--green-700); font-size: 12px; display: grid; place-items: center; font-weight: 800;
}
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.narrow-left { max-width: 780px; }
h2.mt { margin-top: 56px; }

/* Compare */
.compare {
	display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius);
	overflow: hidden; border: 1px solid var(--line); background: #fff;
}
.compare-head { padding: 16px 22px; font-weight: 800; }
.compare-head.compare-ours { background: var(--green-700); color: #fff; }
.compare-head.compare-others { background: #ece7da; color: var(--muted); }
.compare-cell { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.compare-cell.compare-ours { font-weight: 600; background: #fbfdfb; }
.compare-cell.compare-others { color: var(--muted); border-left: 1px solid var(--line); }
.mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; margin-top: 1px; }
.mark.yes { background: var(--green-100); color: var(--green-700); }
.mark.no { background: #f3e3dc; color: #b0533a; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.timeline li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.timeline li:last-child { background: var(--green-700); border-color: var(--green-700); }
.timeline li:last-child .timeline-when, .timeline li:last-child p { color: #fff; }
.timeline-when { display: block; font-weight: 800; font-size: 18px; color: var(--green-700); margin-bottom: 8px; }
.timeline p { margin: 0; color: var(--muted); }

/* Usage + composition */
.two-col-even { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Reviews */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.review blockquote { margin: 0 0 12px; color: #343a36; }
.review blockquote::before { content: "“"; display: block; font-size: 42px; line-height: .6; color: var(--green-500); margin-bottom: 6px; }
.review figcaption { font-weight: 800; color: var(--green-900); }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 24px; color: var(--green-500); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* CTA band */
.cta-band { background: var(--green-900); color: #dfe9df; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-band .btn-ghost:hover { background: #fff; color: var(--green-900); }
.cta-band .btn-primary { background: var(--accent); border-color: var(--accent); }

/* Footer */
.site-footer { background: #15281e; color: #b9c7bc; padding: 60px 0 30px; }
.site-footer h3 { color: #fff; font-size: 16px; }
.site-footer a { color: #e6efe7; text-decoration: none; }
.site-footer .muted { color: #8fa294; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 22px; font-size: 14px; }
.disclaimer { color: #8fa294; }
.site-footer .lang-switch { background: transparent; border-color: rgba(255, 255, 255, .2); }
.site-footer .lang-switch a { color: #b9c7bc; }
.site-footer .lang-switch a.is-current { background: #fff; color: var(--green-900); }

/* Responsive */
@media (max-width: 960px) {
	.product-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
	.grid-4 { grid-template-columns: repeat(2, 1fr); }
	.product-hero-inner, .two-col { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
	.compare { grid-template-columns: 1fr; }
	.compare-head.compare-others { display: none; }
	.compare-cell.compare-others { border-left: 0; border-top: 0; padding-top: 0; font-size: 14px; }
	.compare-cell.compare-ours { background: #fff; }
	.two-col-even, .grid-2, .timeline { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.header-inner { gap: 12px; }
	.menu-toggle {
		display: inline-flex; margin-left: auto; order: 2;
		background: transparent; border: 1px solid var(--line); border-radius: 999px;
		padding: 7px 14px; font: 700 14px var(--font); color: var(--ink); cursor: pointer;
	}
	.site-header .lang-switch { order: 3; }
	.main-nav {
		display: none; position: absolute; top: 72px; left: 0; right: 0;
		flex-direction: column; gap: 0; background: var(--cream);
		border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
	}
	.main-nav.is-open { display: flex; }
	.main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
	body { font-size: 16px; }
	.product-grid, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
	.lang-switch a { padding: 5px 9px; }
	.order-buttons .btn { flex: 1 1 100%; }
}
