/*
Theme Name: Wooden & Weave - Furniture Store
Theme URI: https://example.com/
Author: Your Store
Author URI: https://example.com/
Description: A complete, self-contained WordPress theme for an online furniture store. Includes a built-in product catalog, homepage gallery, WhatsApp ordering on every product, and legal pages - every section is editable from Appearance > Customize and the wp-admin dashboard. No page builder or extra plugin required.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: furniture-store
Tags: e-commerce, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready
*/

/* =============================================
   0. Design Tokens (overridden live via Customizer, see functions.php)
============================================= */
:root {
	--fst-primary: #5C3D2E;
	--fst-accent: #7C8B6F;
	--fst-bg: #F6F1E9;
	--fst-surface: #FFFFFF;
	--fst-text: #2B211B;
	--fst-line: #E4DACB;

	--fst-font-display: 'Fraunces', Georgia, serif;
	--fst-font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--fst-whatsapp: #2FAE60;
	--fst-whatsapp-dark: #24924f;
	--fst-radius: 4px;
	--fst-container: 1200px;
}

/* =============================================
   1. Reset & Base
============================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--fst-font-body);
	background: var(--fst-bg);
	color: var(--fst-text);
	line-height: 1.6;
	font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
	font-family: var(--fst-font-display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	color: var(--fst-text);
}
p { margin: 0 0 1em; max-width: 68ch; }
table { border-collapse: collapse; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}
.fst-skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 10000;
	background: var(--fst-primary); color: #fff; padding: 12px 20px;
}
.fst-skip-link:focus { left: 10px; top: 10px; }

:focus-visible {
	outline: 3px solid var(--fst-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.fst-container {
	max-width: var(--fst-container);
	margin: 0 auto;
	padding: 0 24px;
}

/* =============================================
   2. Buttons
============================================= */
.fst-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: var(--fst-radius);
	font-weight: 600;
	font-size: 0.95rem;
	border: 1.5px solid transparent;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
	white-space: nowrap;
}
.fst-btn:active { transform: translateY(1px); }
.fst-btn--primary { background: var(--fst-primary); color: #fff; }
.fst-btn--primary:hover { background: color-mix(in srgb, var(--fst-primary) 85%, black); }
.fst-btn--outline { background: transparent; border-color: var(--fst-primary); color: var(--fst-primary); }
.fst-btn--outline:hover { background: var(--fst-primary); color: #fff; }
.fst-btn--whatsapp { background: var(--fst-whatsapp); color: #fff; }
.fst-btn--whatsapp:hover { background: var(--fst-whatsapp-dark); }
.fst-btn--sm { padding: 8px 16px; font-size: 0.85rem; }
.fst-btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.fst-icon-whatsapp { flex-shrink: 0; }

/* =============================================
   3. Header
============================================= */
.fst-header {
	position: sticky; top: 0; z-index: 200;
	background: var(--fst-bg);
	border-bottom: 1px solid transparent;
	transition: box-shadow .2s ease, border-color .2s ease;
}
.fst-header.is-scrolled {
	box-shadow: 0 2px 14px rgba(0,0,0,.06);
	border-color: var(--fst-line);
}
.fst-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 16px;
	padding-bottom: 16px;
}
.fst-logo-text {
	font-family: var(--fst-font-display);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--fst-text);
}
.custom-logo { max-height: 52px; width: auto; }

.fst-nav__list {
	display: flex;
	gap: 30px;
}
.fst-nav__list a {
	font-weight: 500;
	position: relative;
	padding: 6px 0;
}
.fst-nav__list a::after {
	content: '';
	position: absolute; left: 0; right: 100%; bottom: 0;
	height: 2px; background: var(--fst-accent);
	transition: right .18s ease;
}
.fst-nav__list a:hover::after { right: 0; }

.fst-nav__list .sub-menu {
	display: none;
	position: absolute;
	background: var(--fst-surface);
	border: 1px solid var(--fst-line);
	padding: 8px 0;
	min-width: 180px;
	box-shadow: 0 8px 20px rgba(0,0,0,.08);
	z-index: 10;
}
.fst-nav__list li { position: relative; }
.fst-nav__list li:hover > .sub-menu { display: block; }
.fst-nav__list .sub-menu li { display: block; }
.fst-nav__list .sub-menu a { display: block; padding: 8px 18px; }

.fst-header__actions { display: flex; align-items: center; gap: 14px; }
.fst-header__whatsapp span { display: inline; }

.fst-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px; height: 40px;
	background: transparent; border: 1px solid var(--fst-line); border-radius: var(--fst-radius);
}
.fst-nav-toggle__bar {
	width: 20px; height: 2px; background: var(--fst-text); margin: 0 auto;
	transition: transform .2s ease, opacity .2s ease;
}
body.fst-nav-open .fst-nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.fst-nav-open .fst-nav-toggle__bar:nth-child(2) { opacity: 0; }
body.fst-nav-open .fst-nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.fst-breadcrumb {
	font-size: 0.85rem;
	color: color-mix(in srgb, var(--fst-text) 65%, transparent);
	padding: 16px 0 0;
}
.fst-breadcrumb a { text-decoration: underline; text-underline-offset: 2px; }

/* =============================================
   4. Hero (full-bleed landscape banner with overlaid content)
============================================= */
.fst-hero {
	position: relative;
	isolation: isolate;
	min-height: clamp(420px, 62vw, 620px);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	padding: 0;
}
.fst-hero__media { position: absolute; inset: 0; z-index: -2; }
.fst-hero__img {
	width: 100%; height: 100%;
	aspect-ratio: 16/7;
	object-fit: cover;
}
.fst-hero__placeholder {
	width: 100%; height: 100%;
	background:
		linear-gradient(135deg, transparent 24px, var(--fst-line) 25px, transparent 26px) 0 0/48px 48px,
		var(--fst-surface);
}
.fst-hero::after {
	content: '';
	position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(0deg, rgba(20,15,10,.78) 0%, rgba(20,15,10,.38) 48%, rgba(20,15,10,.08) 100%);
}
.fst-hero__inner {
	display: block;
	width: 100%;
	padding: 48px 0 44px;
}
.fst-hero__content { max-width: 640px; }
.fst-hero__eyebrow {
	font-family: var(--fst-font-display);
	font-style: italic;
	color: #E7DCC5;
	font-size: 1.1rem;
	margin-bottom: 14px;
}
.fst-hero__title {
	color: #fff;
	font-size: clamp(2rem, 4vw, 3.1rem);
	max-width: 16ch;
	margin-bottom: 18px;
}
.fst-hero__subtitle { font-size: 1.1rem; max-width: 52ch; color: rgba(255,255,255,.88); }
.fst-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 26px 0 34px; }
.fst-hero__stats { display: flex; gap: 40px; }
.fst-hero__stat { display: flex; flex-direction: column; }
.fst-hero__stat-number { font-family: var(--fst-font-display); font-size: 1.8rem; font-weight: 700; color: #fff; }
.fst-hero__stat-label { font-size: 0.85rem; color: rgba(255,255,255,.75); }

/* =============================================
   5. Trust badges strip
============================================= */
.fst-trust { background: var(--fst-surface); border-top: 1px solid var(--fst-line); border-bottom: 1px solid var(--fst-line); padding: 32px 0; }
.fst-trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.fst-trust__item h3 { font-size: 1rem; margin-bottom: 4px; }
.fst-trust__item p { font-size: 0.88rem; opacity: .75; margin: 0; }

/* =============================================
   6. Sections (generic)
============================================= */
.fst-section { padding: 64px 0; }
.fst-section__head { text-align: center; max-width: 560px; margin: 0 auto 40px; }
.fst-section__head--left { text-align: left; margin: 0 0 32px; max-width: none; }
.fst-section__head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.fst-section__head p { margin: 0 auto; opacity: .8; }
.fst-section__cta { text-align: center; margin-top: 40px; }

/* =============================================
   7. Product grid & cards
============================================= */
.fst-product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 28px;
}
.fst-product-card {
	background: var(--fst-surface);
	border: 1px solid var(--fst-line);
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color .15s ease, transform .15s ease;
}
.fst-product-card:hover { border-color: var(--fst-primary); transform: translateY(-3px); }
.fst-product-card__image { position: relative; display: block; aspect-ratio: 1/1; overflow: hidden; background: var(--fst-bg); }
.fst-product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.fst-product-card:hover .fst-product-card__image img { transform: scale(1.04); }
.fst-product-card__placeholder { width: 100%; height: 100%; background: repeating-linear-gradient(45deg, var(--fst-line), var(--fst-line) 10px, var(--fst-bg) 10px, var(--fst-bg) 20px); }
.fst-badge {
	position: absolute; top: 12px; left: 12px;
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
	padding: 5px 10px; border-radius: 3px;
}
.fst-badge--sale { background: var(--fst-primary); color: #fff; }

.fst-product-card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.fst-product-card__title { font-size: 1.05rem; margin: 0; }
.fst-product-card__title a:hover { color: var(--fst-primary); }
.fst-price { font-weight: 600; font-size: 1.05rem; }
.fst-price del { opacity: .5; font-weight: 400; margin-right: 6px; }
.fst-price ins { text-decoration: none; color: var(--fst-primary); }
.fst-product-card .fst-btn { margin-top: auto; width: 100%; }

/* =============================================
   8. Shop / archive layout
============================================= */
.fst-shop { padding: 40px 24px 80px; }
.fst-shop__head { margin-bottom: 32px; }
.fst-shop__title { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.fst-shop__layout { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.fst-shop__sidebar-title { font-size: 1rem; text-transform: none; margin-bottom: 14px; }
.fst-shop__cat-list li { margin-bottom: 4px; }
.fst-shop__cat-list a {
	display: flex; justify-content: space-between;
	padding: 8px 10px; border-radius: var(--fst-radius);
	font-size: 0.95rem;
}
.fst-shop__cat-list a span { opacity: .55; }
.fst-shop__cat-list li.is-active a, .fst-shop__cat-list a:hover { background: var(--fst-surface); color: var(--fst-primary); }
.fst-empty { padding: 40px 0; opacity: .75; }
.fst-pagination { display: flex; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.fst-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 12px;
	border: 1px solid var(--fst-line); border-radius: var(--fst-radius);
}
.fst-pagination .page-numbers.current { background: var(--fst-primary); color: #fff; border-color: var(--fst-primary); }

/* =============================================
   9. Single product
============================================= */
.fst-product { padding: 40px 24px 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.fst-product__main-image { position: relative; aspect-ratio: 1/1; border-radius: 6px; overflow: hidden; background: var(--fst-surface); border: 1px solid var(--fst-line); }
.fst-product__main-image img { width: 100%; height: 100%; object-fit: cover; }
.fst-product__thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.fst-product__thumb {
	width: 76px; height: 76px; padding: 0; border-radius: 4px; overflow: hidden;
	border: 2px solid var(--fst-line); background: none;
}
.fst-product__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fst-product__thumb.is-active { border-color: var(--fst-primary); }

.fst-product__category { text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; opacity: .65; margin-bottom: 6px; }
.fst-product__title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 10px; }
.fst-product__price { font-size: 1.5rem; font-weight: 700; color: var(--fst-primary); margin-bottom: 20px; }
.fst-product__price del { font-size: 1.1rem; opacity: .5; margin-right: 8px; }
.fst-product__price ins { text-decoration: none; }
.fst-product__excerpt { margin-bottom: 20px; }
.fst-product__specs { width: 100%; margin-bottom: 24px; }
.fst-product__specs th, .fst-product__specs td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--fst-line); font-size: 0.92rem; }
.fst-product__specs th { width: 140px; font-weight: 600; opacity: .8; }
.fst-product__order { border-top: 1px solid var(--fst-line); padding-top: 24px; }
.fst-product__order-note { font-size: 0.85rem; opacity: .7; margin: 12px 0 0; max-width: 42ch; }

/* =============================================
   10. Gallery + Lightbox
============================================= */
.fst-gallery__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 220px;
	gap: 16px;
}
.fst-gallery__item { display: block; overflow: hidden; border-radius: 6px; }
.fst-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.fst-gallery__item:hover img { transform: scale(1.06); }
.fst-gallery__item--1 { grid-row: span 2; }
.fst-gallery--empty p { text-align: center; opacity: .6; }

.fst-lightbox {
	position: fixed; inset: 0; z-index: 999;
	background: rgba(20,15,10,.92);
	display: flex; align-items: center; justify-content: center; padding: 40px;
}
.fst-lightbox[hidden] { display: none; }
.fst-lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.fst-lightbox__close {
	position: absolute; top: 24px; right: 24px;
	width: 44px; height: 44px; border-radius: 50%;
	background: rgba(255,255,255,.12); color: #fff; border: none; font-size: 1.6rem; line-height: 1;
}
body.fst-lightbox-open { overflow: hidden; }

/* =============================================
   11. CTA band
============================================= */
.fst-cta { background: var(--fst-primary); color: #fff; padding: 64px 0; text-align: center; }
.fst-cta h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.fst-cta p { color: rgba(255,255,255,.85); max-width: 50ch; margin: 0 auto 28px; }

/* =============================================
   12. Contact page
============================================= */
.fst-contact { padding: 40px 24px 80px; }
.fst-contact__layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; margin-top: 24px; }
.fst-contact__info p { margin-bottom: 12px; }
.fst-contact__info .fst-btn { margin: 16px 0 24px; }
.fst-contact__map iframe { width: 100%; height: 280px; border: 0; border-radius: 6px; }
.fst-contact-form label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 0.92rem; }
.fst-contact-form input, .fst-contact-form textarea {
	display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
	border: 1px solid var(--fst-line); border-radius: var(--fst-radius); background: var(--fst-surface);
}
.fst-notice { padding: 14px 18px; border-radius: var(--fst-radius); margin-bottom: 20px; }
.fst-notice--success { background: color-mix(in srgb, var(--fst-whatsapp) 15%, white); color: var(--fst-whatsapp-dark); }
.fst-notice--error { background: #fbe4e1; color: #a4372b; }

/* =============================================
   13. Generic page / post content
============================================= */
.fst-page, .fst-generic-content, .fst-404 { padding: 48px 24px 80px; max-width: 820px; margin: 0 auto; }
.fst-page__content, .fst-post__content { margin-top: 20px; }
.fst-page__content h2, .fst-page__content h3 { margin-top: 1.6em; }
.fst-page__content ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.fst-404 { text-align: center; }
.fst-404 .fst-btn { margin: 8px; }

/* =============================================
   14. Footer
============================================= */
.fst-footer { background: var(--fst-text); color: #EFE9DF; margin-top: 40px; }
.fst-footer__top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 56px; padding: 56px 24px; }
.fst-footer__brand .fst-logo-text, .fst-footer__brand .custom-logo { filter: brightness(0) invert(1); }
.fst-footer__brand p { opacity: .75; font-size: 0.92rem; margin-top: 14px; }
.fst-footer__social { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.fst-footer__social a { font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; opacity: .85; }
.fst-footer__widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-widget-title { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.fst-footer__menu li, .fst-footer__contact-list li { margin-bottom: 10px; opacity: .8; font-size: 0.92rem; }
.fst-footer__menu a:hover { opacity: .7; text-decoration: underline; }
.fst-footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; }
.fst-footer__bottom p { margin: 0; font-size: 0.82rem; opacity: .65; text-align: center; }

/* =============================================
   15. Floating WhatsApp button
============================================= */
.fst-float-whatsapp {
	position: fixed; right: 20px; bottom: 20px; z-index: 500;
	width: 58px; height: 58px; border-radius: 50%;
	background: var(--fst-whatsapp); color: #fff;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 6px 18px rgba(0,0,0,.25);
	transition: transform .15s ease;
}
.fst-float-whatsapp:hover { transform: scale(1.06); background: var(--fst-whatsapp-dark); }
.fst-float-whatsapp svg { width: 28px; height: 28px; }

/* =============================================
   16. Responsive
============================================= */
@media (max-width: 960px) {
	.fst-hero { min-height: 460px; align-items: center; }
	.fst-product-grid { grid-template-columns: repeat(3, 1fr); }
	.fst-shop__layout { grid-template-columns: 1fr; }
	.fst-shop__sidebar { order: 2; border-top: 1px solid var(--fst-line); padding-top: 24px; margin-top: 24px; }
	.fst-product { grid-template-columns: 1fr; gap: 32px; }
	.fst-contact__layout { grid-template-columns: 1fr; }
	.fst-footer__top { grid-template-columns: 1fr; }
	.fst-footer__widgets { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
	.fst-nav {
		position: fixed; top: 0; right: -100%; height: 100vh; width: min(320px, 85vw);
		background: var(--fst-surface);
		box-shadow: -8px 0 30px rgba(0,0,0,.12);
		padding: 90px 28px 28px;
		transition: right .25s ease;
		z-index: 250;
	}
	.fst-nav.is-open { right: 0; }
	.fst-nav__list { flex-direction: column; gap: 6px; }
	.fst-nav__list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--fst-line); }
	.fst-nav__list .sub-menu { position: static; border: none; box-shadow: none; padding-left: 14px; display: none; }
	.fst-nav__list li:hover > .sub-menu { display: block; }
	.fst-nav-toggle { display: flex; }
	.fst-header__whatsapp span { display: none; }
	.fst-header__whatsapp { padding: 10px; }

	.fst-hero { min-height: 400px; }
	.fst-hero__title { max-width: 100%; }
	.fst-hero__stats { gap: 24px; flex-wrap: wrap; }
	.fst-trust__grid { grid-template-columns: repeat(2, 1fr); }
	.fst-product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
	.fst-gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
	.fst-gallery__item--1 { grid-row: span 1; }
	.fst-footer__widgets { grid-template-columns: 1fr; gap: 28px; }
	.fst-hero__stats { gap: 24px; }
	.fst-container, .fst-shop, .fst-product, .fst-contact, .fst-page, .fst-generic-content { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 480px) {
	.fst-product-grid { grid-template-columns: 1fr 1fr; }
	.fst-hero__title { font-size: 1.9rem; }
	.fst-btn--lg { width: 100%; }
}
