/*
Theme Name:        DedeBuy
Text Domain:       dedebuy
Version:           1.5.0
Tested up to:      7.0
Requires at least: 6.0
Requires PHP:      7.4
Author:            DedeBuy
Description:       Standalone crochet kit store theme. Built-in homepage with WordPress Customizer. Optional WooCommerce. No parent theme or extra plugins required.
Tags:              e-commerce, custom-logo, custom-menu, translation-ready, blog, one-column
License:           GPLv3 or later
License URI:       https://www.gnu.org/licenses/gpl-3.0.html
*/

/* ---- Brand tokens (see assets/css/healing.css) ---- */
:root {
	--wf-main-rgb: 166, 124, 82;
	--wf-main-color: #a67c52;
	--wf-secondary-color: #171717;
	--dedebuy-teal: #171717;
	--dedebuy-cream: #fafaf8;
	--dedebuy-accent: #d4af37;
	--dedebuy-radius: 12px;
	--dedebuy-radius-lg: 16px;
	--dedebuy-shadow: 0 2px 16px rgba(23, 23, 23, 0.06);
	--dedebuy-font-display: "Rubik", system-ui, sans-serif;
}

/* ---- Base reset ---- */
*, *::before, *::after { box-sizing: border-box; }

body.dedebuy-theme {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--wf-secondary-color);
	background: var(--dedebuy-cream);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--wf-main-color); }

.dedebuy-site { min-height: 100vh; display: flex; flex-direction: column; }
.dedebuy-main { flex: 1; }

.dedebuy-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

/* Layout widths – see assets/css/layout.css */

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.dedebuy-skip-link:focus {
	position: fixed; top: 0; left: 0; z-index: 99999;
	width: auto; height: auto; clip: auto;
	padding: 0.75rem 1rem; background: #fff; color: #000;
}

/* ---- Header ---- */
.dedebuy-header__inner {
	display: flex; align-items: center; gap: 1.5rem;
	min-height: 72px;
}

.dedebuy-header__brand { flex-shrink: 0; }

.dedebuy-brand {
	display: flex; flex-direction: column;
	text-decoration: none; color: var(--wf-secondary-color);
}

.dedebuy-brand__name {
	font-family: var(--dedebuy-font-display);
	font-size: 1.35rem; font-weight: 700;
}

.dedebuy-brand__tagline {
	font-size: 0.75rem; color: #5c6370;
}

.custom-logo-link img { max-height: 48px; width: auto; }

.dedebuy-nav { flex: 1; }

.dedebuy-nav__list {
	display: flex; align-items: center; gap: 1.5rem;
	list-style: none; margin: 0; padding: 0;
}

.dedebuy-nav__list a {
	text-decoration: none; color: var(--wf-secondary-color);
	font-weight: 600; font-size: 0.95rem;
	transition: color 0.2s;
}

.dedebuy-nav__list > li > a:hover,
.dedebuy-nav__list > li.current-menu-item > a,
.dedebuy-nav__list > li.current-menu-ancestor > a,
.dedebuy-nav__list > li.current_page_item > a {
	color: var(--wf-main-color);
}

.dedebuy-header__actions {
	display: flex; align-items: center; gap: 0.75rem;
	margin-left: auto;
}

.dedebuy-header-cart,
.dedebuy-header-account {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	color: var(--wf-secondary-color);
	text-decoration: none;
	transition: color 0.2s;
}

.dedebuy-header-cart:hover,
.dedebuy-header-account:hover {
	color: var(--wf-main-color);
}

.dedebuy-header-cart__count {
	position: absolute; top: -6px; right: -8px;
	min-width: 18px; height: 18px; line-height: 18px;
	border-radius: 50%; background: var(--dedebuy-teal);
	color: #fff; font-size: 0.65rem; font-weight: 700; text-align: center;
}

.dedebuy-nav-toggle {
	display: none; flex-direction: column; gap: 5px;
	background: none; border: none; padding: 0.5rem; cursor: pointer;
}

.dedebuy-nav-toggle span {
	display: block; width: 22px; height: 2px;
	background: var(--wf-secondary-color); border-radius: 1px;
}

/* ---- Page header ---- */
.dedebuy-content { padding: 2.5rem 0 4rem; }
.dedebuy-content--center { text-align: center; }

/* ---- Post cards ---- */
.dedebuy-post-list {
	display: grid; gap: 2rem;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.dedebuy-post-card {
	background: #fff; border-radius: var(--dedebuy-radius);
	overflow: hidden; box-shadow: var(--dedebuy-shadow);
}

.dedebuy-post-card__thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.dedebuy-post-card__body { padding: 1.25rem; }

.dedebuy-post-card__title {
	font-size: 1.1rem; margin: 0 0 0.5rem;
}

.dedebuy-post-card__title a {
	text-decoration: none; color: var(--wf-secondary-color);
}

.dedebuy-post-card__title a:hover { color: var(--wf-main-color); }

.dedebuy-post-card__date {
	font-size: 0.8rem; color: #5c6370;
}

.dedebuy-entry-content { line-height: 1.75; }
.dedebuy-entry-content > *:first-child { margin-top: 0; }

/* ---- Footer ---- */
.dedebuy-footer {
	background: var(--wf-secondary-color);
	color: rgba(255, 255, 255, 0.85);
	margin-top: auto;
}

.dedebuy-footer__widgets {
	padding: 2.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dedebuy-footer-widget__title { color: #fff; margin-top: 0; }

.dedebuy-footer__bottom {
	padding: 1.5rem 0; text-align: center;
}

.dedebuy-footer-nav__list {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
	list-style: none; margin: 0 0 1rem; padding: 0;
}

.dedebuy-footer-nav__list a {
	color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.9rem;
}

.dedebuy-footer-nav__list a:hover { color: #fff; }

.dedebuy-footer__tagline {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	color: rgba(255,255,255,0.7);
	line-height: 1.5;
}

.dedebuy-footer__copy { margin: 0; font-size: 0.875rem; }
.dedebuy-footer__copy a { color: #fff; text-decoration: none; }

/* ---- Pagination ---- */
.navigation.pagination { margin-top: 2rem; }
.navigation.pagination .nav-links { display: flex; gap: 0.5rem; justify-content: center; }
.navigation.pagination a, .navigation.pagination span {
	padding: 0.5rem 0.85rem; border-radius: 8px;
	background: #fff; text-decoration: none; box-shadow: var(--dedebuy-shadow);
}

/* ---- Buttons ---- */
.dedebuy-btn {
	display: inline-block;
	padding: 0.85rem 1.75rem;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s;
}

.dedebuy-btn--primary {
	background: var(--wf-secondary-color);
	color: #fff;
}

.dedebuy-btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(23, 23, 23, 0.15);
	color: #fff;
}

.dedebuy-btn--light {
	background: #fff;
	color: var(--wf-secondary-color);
}

.dedebuy-btn--light:hover {
	transform: translateY(-2px);
	box-shadow: var(--dedebuy-shadow);
	color: var(--wf-main-color);
}

/* ---- Hero slider ---- */
.dedebuy-hero {
	position: relative;
	overflow: hidden;
	border-radius: 0 0 var(--dedebuy-radius-lg) var(--dedebuy-radius-lg);
	margin-bottom: 0;
}

.dedebuy-hero__track {
	position: relative;
	min-height: clamp(320px, 55vw, 520px);
}

.dedebuy-hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0.6s;
}

.dedebuy-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.dedebuy-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dedebuy-hero__bg--placeholder {
	background: linear-gradient(135deg, var(--wf-main-color), var(--dedebuy-teal));
}

.dedebuy-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(45, 49, 66, 0.72) 0%, rgba(45, 49, 66, 0.25) 100%);
}

.dedebuy-hero__content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(320px, 55vw, 520px);
	max-width: 640px;
	padding: 3rem 0;
	color: #fff;
}

.dedebuy-hero__eyebrow {
	display: inline-block;
	padding: 0.35rem 1rem;
	border-radius: 999px;
	background: rgba(255, 209, 102, 0.25);
	color: var(--dedebuy-accent);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 1rem;
	width: fit-content;
}

.dedebuy-hero__title {
	font-family: var(--dedebuy-font-display);
	font-size: clamp(1.75rem, 4.5vw, 3rem);
	line-height: 1.15;
	margin: 0 0 1rem;
}

.dedebuy-hero__text {
	font-size: clamp(0.95rem, 2vw, 1.1rem);
	line-height: 1.6;
	margin: 0 0 1.5rem;
	opacity: 0.92;
}

.dedebuy-hero__dots {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 0.5rem;
	z-index: 3;
}

/* Split-card hero (homepage) — dots/arrows in controls row */
.dedebuy-hero__card .dedebuy-hero__dots {
	position: static;
	bottom: auto;
	left: auto;
	transform: none;
	z-index: auto;
}

.dedebuy-hero__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: transparent;
	padding: 0;
	cursor: pointer;
	opacity: 0.6;
}

.dedebuy-hero__dot.is-active {
	background: #fff;
	opacity: 1;
}

/* ---- Trust bar ---- */
.dedebuy-trust {
	background: #fff;
	padding: 2.5rem 0;
	border-bottom: 1px solid rgba(45, 49, 66, 0.06);
}

.dedebuy-trust__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
}

.dedebuy-trust__item {
	text-align: center;
}

.dedebuy-trust__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: rgba(61, 191, 184, 0.12);
	font-size: 1.35rem;
	margin-bottom: 0.75rem;
}

.dedebuy-trust__title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--wf-secondary-color);
	margin: 0 0 0.35rem;
}

.dedebuy-trust__text {
	font-size: 0.875rem;
	color: #5c6370;
	margin: 0;
	line-height: 1.5;
}

/* ---- How it works ---- */
.dedebuy-steps {
	padding: 4rem 0;
	background: linear-gradient(180deg, #fff, var(--dedebuy-cream));
}

.dedebuy-steps__header {
	text-align: center;
	max-width: 640px;
	margin: 0 auto 2.5rem;
}

.dedebuy-steps__eyebrow {
	display: inline-block;
	padding: 0.35rem 1rem;
	border-radius: 999px;
	background: rgba(var(--wf-main-rgb), 0.12);
	color: var(--wf-main-color);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 0.75rem;
}

.dedebuy-steps__title {
	font-family: var(--dedebuy-font-display);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	color: var(--wf-secondary-color);
	margin: 0 0 0.75rem;
}

.dedebuy-steps__subtitle {
	color: #5c6370;
	margin: 0;
	line-height: 1.6;
}

.dedebuy-steps__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

.dedebuy-step-card {
	background: #fff;
	border-radius: var(--dedebuy-radius-lg);
	padding: 2rem 1.5rem;
	text-align: center;
	box-shadow: var(--dedebuy-shadow);
}

.dedebuy-step-card__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--dedebuy-teal), #2a9d8f);
	color: #fff;
	font-weight: 800;
	margin-bottom: 1rem;
}

.dedebuy-step-card__title {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--wf-secondary-color);
	margin: 0 0 0.5rem;
}

.dedebuy-step-card__text {
	font-size: 0.925rem;
	color: #5c6370;
	margin: 0;
	line-height: 1.55;
}

/* ---- CTA ---- */
.dedebuy-cta {
	position: relative;
	margin: 3rem 1.25rem;
	border-radius: var(--dedebuy-radius-lg);
	overflow: hidden;
	background: linear-gradient(135deg, var(--wf-main-color), #c9b1ff);
	background-size: cover;
	background-position: center;
}

.dedebuy-cta__overlay {
	position: absolute;
	inset: 0;
	background: rgba(45, 49, 66, 0.45);
}

.dedebuy-cta__inner {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 3.5rem 1.5rem;
	color: #fff;
}

.dedebuy-cta__title {
	font-family: var(--dedebuy-font-display);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	margin: 0 0 0.75rem;
}

.dedebuy-cta__text {
	max-width: 520px;
	margin: 0 auto 1.5rem;
	line-height: 1.6;
	opacity: 0.95;
}

/* ---- WooCommerce (optional) ---- */
.dedebuy-difficulty-badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	margin-top: 0.35rem;
}

.dedebuy-difficulty-badge--beginner { background: rgba(61, 191, 184, 0.18); color: #2a9d8f; }
.dedebuy-difficulty-badge--easy { background: rgba(255, 209, 102, 0.35); color: #9a7200; }
.dedebuy-difficulty-badge--intermediate { background: rgba(var(--wf-main-rgb), 0.15); color: var(--wf-main-color); }

/* ---- WooCommerce shop ---- */
.dedebuy-woo .woocommerce-products-header__title {
	font-family: var(--dedebuy-font-display);
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
}

.dedebuy-woo ul.products {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.dedebuy-woo ul.products::before,
.dedebuy-woo ul.products::after {
	display: none;
}

.dedebuy-woo ul.products li.product {
	float: none;
	width: 100%;
	margin: 0;
	padding: 1rem;
	background: #fff;
	border-radius: var(--dedebuy-radius);
	box-shadow: var(--dedebuy-shadow);
}

.dedebuy-woo ul.products li.product img {
	border-radius: calc(var(--dedebuy-radius) - 4px);
}

.dedebuy-woo ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	font-weight: 700;
	padding: 0.5rem 0 0;
}

.dedebuy-woo ul.products li.product .price {
	color: var(--wf-main-color);
	font-weight: 700;
}

.dedebuy-woo .woocommerce-result-count,
.dedebuy-woo .woocommerce-ordering {
	margin-bottom: 1.5rem;
}

.dedebuy-woo .woocommerce-info,
.dedebuy-woo .woocommerce-message {
	border-radius: var(--dedebuy-radius);
}

@media (max-width: 991px) {
	.dedebuy-woo ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
}

@media (max-width: 575px) {
	.dedebuy-woo ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
}

.woocommerce ul.products li.product {
	border-radius: var(--dedebuy-radius);
	box-shadow: var(--dedebuy-shadow);
}

.woocommerce div.product .product_title {
	font-family: var(--dedebuy-font-display);
}

.woocommerce a.button, .woocommerce button.button {
	border-radius: var(--dedebuy-radius-pill);
	background: var(--wf-secondary-color);
	color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
	.dedebuy-nav-toggle { display: flex; margin-left: auto; }

	.dedebuy-nav {
		position: fixed;
		top: var(--dedebuy-header-h, 72px);
		left: 0;
		right: 0;
		width: 100%;
		max-width: 100vw;
		background: #fff;
		padding: 0.25rem var(--dedebuy-gutter) 1rem;
		border-top: 1px solid rgba(23, 23, 23, 0.08);
		border-bottom: 1px solid rgba(23, 23, 23, 0.08);
		box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
		box-sizing: border-box;
	}

	.dedebuy-nav.is-open {
		transform: translateY(0);
		opacity: 1;
		visibility: visible;
	}

	.dedebuy-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
		margin: 0;
		padding: 0;
	}

	.dedebuy-nav__list li { width: 100%; }

	.dedebuy-nav__list a {
		display: block;
		width: 100%;
		padding: 0.9rem 0;
		border-bottom: 1px solid rgba(23, 23, 23, 0.08);
		box-sizing: border-box;
	}

	.dedebuy-nav__list li:last-child a { border-bottom: none; }

	.dedebuy-header__actions { margin-left: 0; }

	.dedebuy-trust__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.dedebuy-steps__grid {
		grid-template-columns: 1fr;
		max-width: 420px;
		margin: 0 auto;
	}
}

@media (max-width: 575px) {
	.dedebuy-trust__grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.dedebuy-hero {
		border-radius: 0;
	}

	.dedebuy-cta {
		margin: 2rem 0;
		border-radius: 0;
	}
}

/* About page layout – see assets/css/layout.css */

@media (max-width: 991px) {
	.dedebuy-about-values__grid {
		grid-template-columns: 1fr;
		max-width: 420px;
		margin: 0 auto;
	}
}
