/*
Theme Name:   Craft Demo (kiwano.design)
Description:  Дочірня тема Storefront для демонстраційного стенду kiwano.design: каталог крафтової майстерні.
Template:     storefront
Version:      2.0.0
Text Domain:  craft-demo
*/

:root {
	--cd-primary: #3f5a3b;   /* deep sage */
	--cd-accent: #c46a45;    /* terracotta */
	--cd-soft: #ecd9c6;      /* raw cotton */
	--cd-ink: #3b302a;
	--cd-bg: #f6f1e8;        /* linen */
	--cd-radius: 14px;
}

body {
	background: var(--cd-bg);
	color: var(--cd-ink);
	font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

h1, h2, h3, .site-title {
	font-family: Georgia, "Times New Roman", serif;
	letter-spacing: -0.01em;
}

/* ---------- Demo bar ---------- */
.cd-demo-bar {
	background: var(--cd-ink);
	color: #f3ece2;
	font-size: .875rem;
	line-height: 1.3;
}
.cd-demo-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 66.4989378333em;
	margin: 0 auto;
	padding: .55rem 2.617924em;
}
.cd-demo-bar__label { display: flex; align-items: center; gap: .5rem; }
.cd-demo-bar__label::before {
	content: "DEMO";
	background: var(--cd-accent);
	color: #fff;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .08em;
	padding: .15rem .45rem;
	border-radius: 4px;
}
.cd-demo-bar a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cd-lang { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.cd-lang a, .cd-lang span {
	display: inline-block;
	padding: .2rem .55rem;
	border-radius: 6px;
	font-weight: 700;
	text-decoration: none;
	font-size: .8rem;
}
.cd-lang span { background: #f3ece2; color: var(--cd-ink); }
.cd-lang a { color: #f3ece2; border: 1px solid rgba(243, 236, 226, .4); text-decoration: none; }
.cd-lang a:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Header ---------- */
.site-header { border-bottom: 3px solid var(--cd-accent); }
.site-branding .site-title a { color: var(--cd-primary); }
.site-branding .site-description { color: #7a6d63; }
.main-navigation ul.menu > li > a { font-weight: 600; }
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current_page_parent > a { color: var(--cd-accent) !important; }
/* Cart is not part of the brief: navigation can use the full width. */
@media (min-width: 768px) {
	.woocommerce-active .site-header .main-navigation { width: 100%; margin-right: 0; }
}

/* ---------- Front page ---------- */
.home.page .entry-header { display: none; }
.home .site-content { padding-top: 0; }
.cd-hero, .cd-cta { text-align: center; padding: 5rem 1.5rem; }
.cd-hero { background: var(--cd-primary); color: #f3ece2; margin-bottom: 1rem; }
.cd-hero h1 { color: #fff !important; font-size: clamp(2rem, 4vw, 3.3rem); max-width: 18em; margin: 0 auto 1rem; }
.cd-hero p { max-width: 42em; margin: 0 auto 2rem; font-size: 1.15rem; }
.cd-hero .wp-block-buttons, .cd-cta .wp-block-buttons, .cd-section .wp-block-buttons { justify-content: center; }
.cd-hero .wp-block-button__link { background: var(--cd-accent); color: #fff; }
.cd-hero .is-style-outline .wp-block-button__link { background: transparent; color: #fff; border-color: #fff; }
.cd-cta { background: var(--cd-soft); margin-top: 2rem; }
.cd-cta h2 { color: var(--cd-primary) !important; }
.cd-cta .wp-block-button__link { background: var(--cd-primary); color: #fff; }
.cd-cta .is-style-outline .wp-block-button__link { background: transparent; color: var(--cd-primary); border-color: var(--cd-primary); }
.cd-section { padding: 3rem 0; }
.cd-section h2 { text-align: center; margin-bottom: 2rem; }

.cd-card {
	background: #fff;
	border-radius: var(--cd-radius);
	padding: 1.5rem;
	height: 100%;
	box-shadow: 0 2px 12px rgba(59, 48, 42, .06);
}
.cd-card h3 { margin-top: .25rem; }
.cd-stat { font-size: 2.6rem; font-weight: 700; color: var(--cd-accent); font-family: Georgia, serif; margin: 0; }

.wp-block-button__link { border-radius: 999px; font-weight: 600; }
button, .button, input[type="submit"] { border-radius: 999px; }

.wp-block-latest-posts.is-grid li { background: #fff; border-radius: var(--cd-radius); padding: 1rem; }
.wp-block-latest-posts__featured-image img { border-radius: 10px; }

/* ---------- Catalog ---------- */
ul.products li.product img { border-radius: var(--cd-radius); }
ul.products li.product .button { margin-top: .5rem; }
.cd-order-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.cd-order-actions .cd-note { width: 100%; margin: 0 0 .25rem; color: #7a6d63; }
.cd-order-actions .button.alt { background: var(--cd-primary); color: #fff; }
.cd-order-actions .button.cd-secondary { background: #fff; color: var(--cd-primary); border: 2px solid var(--cd-primary); }
.cd-badge { display: inline-block; background: var(--cd-soft); color: var(--cd-ink); padding: .2rem .7rem; border-radius: 999px; font-size: .85rem; margin-bottom: .75rem; }

.widget-area .widget { background: #fff; border-radius: var(--cd-radius); padding: 1.25rem 1.5rem; }
.widget-area .widget .widget-title { border-bottom: 2px solid var(--cd-soft); }
.cd-stock-filter li.is-active a { font-weight: 700; color: var(--cd-accent); }

/* ---------- Order dialog ---------- */
.cd-dialog {
	width: min(560px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	border: 0;
	border-radius: var(--cd-radius);
	padding: 0;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.cd-dialog::backdrop { background: rgba(59, 48, 42, .55); }
.cd-dialog__head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: var(--cd-primary); color: #fff; }
.cd-dialog__head h2 { margin: 0; font-size: 1.3rem; color: #fff; }
.cd-dialog__close { background: transparent; color: #fff; font-size: 1.6rem; line-height: 1; padding: .2rem .6rem; }
.cd-dialog .wpcf7 form { box-shadow: none; border-radius: 0; }
.cd-dialog__body { padding: 0 0 .5rem; }

/* ---------- Forms, partners, map ---------- */
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .wpcf7 select, .wpcf7 textarea { width: 100%; border-radius: 8px; }
.wpcf7 form { background: #fff; padding: 1.5rem; border-radius: var(--cd-radius); }
.cd-partner-logos img { background: #fff; border-radius: var(--cd-radius); padding: 1rem; }
.cd-map iframe { width: 100%; min-height: 340px; border: 0; border-radius: var(--cd-radius); }

/* ---------- Footer ---------- */
.site-footer { border-top: 3px solid var(--cd-accent); }
.cd-footer-note { font-size: .85rem; line-height: 1.5; opacity: .9; margin-top: 1rem; max-width: 60rem; }

/* ---------- 404 ---------- */
.cd-404 { text-align: center; padding: 3rem 0; }
.cd-404 .cd-404-code { font-size: 7rem; font-family: Georgia, serif; color: var(--cd-accent); line-height: 1; margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.cd-demo-bar__inner { padding: .5rem 1rem; font-size: .8rem; }
	.cd-hero, .cd-cta { padding: 3rem 1rem; }
	.cd-hero p { font-size: 1rem; }
	.cd-order-actions .button { flex: 1 1 100%; text-align: center; }
	.site-header .site-branding { margin-bottom: .5rem; }
}

/* Outline buttons on light sections */
.cd-section .is-style-outline .wp-block-button__link { background: transparent; color: var(--cd-primary); border: 2px solid var(--cd-primary); }
.cd-section .is-style-outline .wp-block-button__link:hover { background: var(--cd-primary); color: #fff; }
