/*
Theme Name: Barzah
Description: Custom WooCommerce theme for Barzah (Crochet by Barzah). Soft, clean and handmade: ivory base, blush and sage accents, wine headings.
Author: Atif Ahmed
Version: 5.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: barzah
Tags: e-commerce, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Tokens (from the Barzah brand board)
   ========================================================================== */
:root {
	--ivory: #F4ECE1;
	--ivory-light: #FBF7F0;
	--blush: #E6ACA3;
	--peach: #F3C9BD;
	--peach-soft: #F8E1D8;
	--sage: #919D8C;
	--sage-soft: #DDE3D8;
	--wine: #924B52;
	--wine-dark: #7A3C43;
	--gold: #C18B46;
	--brown: #4A3638;
	--brown-deep: #3F2A2E;

	--font-head: "Cormorant Garamond", Georgia, serif;
	--font-script: "Pinyon Script", "Brush Script MT", cursive;
	--font-body: "Lora", Georgia, serif;

	--radius: 18px;
	--gutter: clamp(16px, 4vw, 32px);
	--max: 1200px;

	/* Scalloped edge: half circles cycling blush, sage and gold. */
	--scallop-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='14' viewBox='0 0 108 18'%3E%3Cpath d='M0 0A18 18 0 0 0 36 0Z' fill='%23E6ACA3'/%3E%3Cpath d='M36 0A18 18 0 0 0 72 0Z' fill='%23919D8C'/%3E%3Cpath d='M72 0A18 18 0 0 0 108 0Z' fill='%23C18B46'/%3E%3C/svg%3E");
	--scallop-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='14' viewBox='0 0 108 18'%3E%3Cpath d='M0 18A18 18 0 0 1 36 18Z' fill='%23E6ACA3'/%3E%3Cpath d='M36 18A18 18 0 0 1 72 18Z' fill='%23919D8C'/%3E%3Cpath d='M72 18A18 18 0 0 1 108 18Z' fill='%23C18B46'/%3E%3C/svg%3E");
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--ivory);
	color: var(--brown);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--wine); text-underline-offset: 3px; }
a:hover { color: var(--wine-dark); }

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

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--wine); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); color: var(--wine); }
h3 { font-size: 1.5rem; color: var(--brown-deep); }
h4 { font-size: 1.25rem; color: var(--brown-deep); }

p { margin: 0 0 1em; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal;
}
.skip-link {
	position: absolute; left: -999px; top: 8px; z-index: 100;
	background: var(--wine); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { left: 8px; color: #fff; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow, .narrow { max-width: 780px; }
.text-center { text-align: center; }

.script {
	font-family: var(--font-script);
	font-size: clamp(2.25rem, 5vw, 3rem);
	line-height: 1.1;
	color: var(--wine);
	margin: 0 0 .25em;
	font-weight: 400;
	text-transform: none;
}
.script--small { font-size: 2rem; line-height: 1.35; margin-top: .9rem; }

.eyebrow {
	display: block;
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--wine);
	margin: 0 0 .5rem;
}

/* Stitched divider: dashed line with a small gold diamond. */
.stitch-divider {
	width: 140px; height: 0; margin: 1rem auto 0;
	border-top: 2px dashed var(--blush);
	position: relative;
}
.stitch-divider::after {
	content: ""; position: absolute; left: 50%; top: -6px;
	width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg);
	background: var(--gold);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	display: inline-block;
	padding: .8rem 1.7rem;
	background: var(--wine);
	color: var(--ivory-light);
	border: 2px solid var(--wine);
	border-radius: 999px;
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
	/* inner dashed "stitch" line */
	outline: 1.5px dashed rgba(255, 248, 240, .65);
	outline-offset: -6px;
	transition: background .2s, color .2s, transform .2s;
}
.btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background: var(--wine-dark);
	border-color: var(--wine-dark);
	color: #fff;
}
.btn--ghost {
	background: transparent;
	color: var(--wine);
	outline-color: rgba(146, 75, 82, .45);
}
.btn--ghost:hover { background: var(--wine); color: var(--ivory-light); }
.btn--light { background: var(--ivory); color: var(--wine); border-color: var(--ivory); outline-color: rgba(146, 75, 82, .4); }
.btn--light:hover { background: #fff; color: var(--wine-dark); border-color: #fff; }
.btn--small { padding: .55rem 1.2rem; font-size: .95rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { background: var(--ivory); position: relative; z-index: 50; }

.announce { background: var(--wine); color: var(--ivory-light); text-align: center; font-size: .9rem; padding: .45rem var(--gutter); }
.announce p { margin: 0; }

.header-inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1.5rem;
	padding-block: 1rem;
}
.brand { grid-column: 1; grid-row: 1; }
.primary-nav { grid-column: 2; grid-row: 1; justify-self: center; }
.header-tools { grid-column: 3; grid-row: 1; justify-self: end; display: flex; align-items: center; gap: 1rem; }
.nav-toggle { grid-column: 1; grid-row: 1; justify-self: start; }

.custom-logo-link img, .brand img { max-height: 84px; width: auto; }

.wordmark { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; }
.wordmark__name { font-family: var(--font-script); font-size: 2.9rem; color: var(--wine); line-height: 1; }
.wordmark__sub { font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--brown-deep); margin-top: .15rem; }
.wordmark--footer { align-items: flex-start; padding-top: .35rem; }

.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.75rem; }
.primary-nav a {
	font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
	letter-spacing: .16em; text-transform: uppercase;
	color: var(--brown-deep); text-decoration: none; padding: .25rem 0;
	border-bottom: 2px dashed transparent;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a { color: var(--wine); border-bottom-color: var(--blush); }

.cart-link { position: relative; display: inline-flex; color: var(--brown-deep); padding: .25rem; }
.cart-link:hover { color: var(--wine); }
.cart-count {
	position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
	background: var(--wine); color: var(--ivory-light); border-radius: 999px;
	font-size: .75rem; line-height: 20px; text-align: center; font-family: var(--font-body);
}
.cart-count.is-empty { display: none; }

.nav-toggle {
	display: none; width: 44px; height: 44px; padding: 0;
	background: transparent; border: 0; cursor: pointer; position: relative; color: var(--brown-deep);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
	content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s;
}
.nav-toggle__bars { top: 21px; }
.nav-toggle__bars::before { top: -7px; left: 0; right: 0; }
.nav-toggle__bars::after { top: 7px; left: 0; right: 0; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Scalloped edges */
.scallop { height: 14px; background-repeat: repeat-x; background-size: 108px 14px; }
.scallop--down { background-image: var(--scallop-down); background-position: top left; }
.scallop--up { background-image: var(--scallop-up); background-position: bottom left; }

@media (max-width: 860px) {
	.header-inner { grid-template-columns: 44px 1fr auto; gap: .5rem; }
	.brand { grid-column: 2; text-align: center; }
	.header-tools { grid-column: 3; }
	.nav-toggle { display: block; }
	.primary-nav {
		display: none; grid-column: 1 / -1; grid-row: 2; justify-self: stretch;
		border-top: 2px dashed var(--blush); padding-top: .75rem;
	}
	.nav-open .primary-nav { display: block; }
	.primary-nav .menu { flex-direction: column; gap: 0; }
	.primary-nav a { display: block; padding: .85rem 0; border-bottom: 0; }
	.wordmark__name { font-size: 2.4rem; }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.site-main { min-height: 50vh; }
.page-article { padding-block: clamp(2rem, 5vw, 4rem); }
.page-head { text-align: center; margin-bottom: 2rem; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.25rem; }
.entry-content li { margin-bottom: .4rem; }
.post-card { padding-block: 1.5rem; border-bottom: 2px dashed var(--blush); }
.post-card__title a { text-decoration: none; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: 0; }
.section-cta { text-align: center; margin: 2.5rem 0 0; }

/* ==========================================================================
   Home: hero
   ========================================================================== */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero-copy h1 { margin-bottom: .4em; }
.hero-sub { font-size: 1.1rem; max-width: 34em; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Arch frame with a stitched inner border */
.arch-frame {
	position: relative; display: block; overflow: hidden;
	aspect-ratio: 4 / 5; background: var(--peach);
	border-radius: 999px 999px 28px 28px;
	max-width: 460px; margin-inline: auto;
}
.arch-frame img { width: 100%; height: 100%; object-fit: cover; }
.arch-frame::after {
	content: ""; position: absolute; inset: 10px; pointer-events: none;
	border: 1.5px dashed rgba(255, 255, 255, .9); border-radius: inherit;
}
.arch-placeholder {
	position: absolute; inset: 0; display: flex; flex-direction: column;
	align-items: center; justify-content: center; text-align: center;
	background: linear-gradient(160deg, var(--peach-soft), var(--blush));
}
.arch-placeholder .script { font-size: clamp(3.5rem, 9vw, 5.5rem); color: var(--wine); }

@media (max-width: 860px) {
	.hero-grid { grid-template-columns: 1fr; }
	.hero-art { order: -1; }
	.arch-frame { max-width: 320px; }
	.hero-copy { text-align: center; }
	.hero-sub { margin-inline: auto; }
	.hero-actions { justify-content: center; }
}

/* ==========================================================================
   Home: categories
   ========================================================================== */
.category-grid {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 2.25rem);
}
.category-tile a { display: block; text-align: center; text-decoration: none; color: var(--brown); }
.arch-frame--tile { max-width: none; margin-bottom: 1rem; transition: transform .25s; }
.category-tile a:hover .arch-frame--tile { transform: translateY(-4px); }
.category-tile:nth-child(3n+1) .arch-placeholder { background: linear-gradient(160deg, var(--peach-soft), var(--peach)); }
.category-tile:nth-child(3n+2) .arch-placeholder { background: linear-gradient(160deg, var(--ivory-light), var(--blush)); }
.category-tile:nth-child(3n) .arch-placeholder { background: linear-gradient(160deg, var(--ivory-light), var(--sage-soft)); }
.category-tile__name {
	display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
	letter-spacing: .1em; text-transform: uppercase; color: var(--brown-deep);
}
.category-tile__pitch { display: block; font-size: .95rem; margin-top: .2rem; }
.category-tile a:hover .category-tile__name { color: var(--wine); }

@media (max-width: 700px) {
	.category-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
	.category-tile__name { font-size: 1.05rem; letter-spacing: .06em; }
	.category-tile__pitch { font-size: .85rem; }
}

/* ==========================================================================
   Home: promise, gifting, CTA
   ========================================================================== */
.section--promise { background: var(--peach-soft); }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.promise-grid h3 {
	font-size: 1.6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--wine); margin-bottom: .35rem;
}
.promise-grid p { margin: 0; max-width: 24em; margin-inline: auto; }
@media (max-width: 700px) { .promise-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.gift-card {
	text-align: center; background: var(--ivory-light);
	border: 2px dashed var(--blush); border-radius: 28px;
	padding: clamp(1.75rem, 5vw, 3.5rem);
}
.gift-card h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.gift-card p:last-child { margin-bottom: 0; }

.cta-band { background: var(--wine); color: var(--ivory-light); text-align: center; padding-block: clamp(3rem, 7vw, 4.5rem); position: relative; }
.cta-band .script { color: var(--ivory-light); font-size: clamp(2.5rem, 6vw, 3.75rem); }
.cta-band p { max-width: 34em; margin-inline: auto; }
.cta-band__inner > .btn { margin-top: .5rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--peach-soft); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-block: 3rem 2rem; }
.footer-title { font-size: 1rem; letter-spacing: .22em; text-transform: uppercase; color: var(--wine); margin-bottom: .75rem; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: .35rem; }
.footer-menu a { color: var(--brown); text-decoration: none; }
.footer-menu a:hover { color: var(--wine); text-decoration: underline; }
.footer-brand p { max-width: 30em; }
.footer-bottom { border-top: 2px dashed var(--blush); padding-block: 1.25rem; font-size: .9rem; text-align: center; }
.footer-bottom p { margin: 0; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

.wa-float {
	position: fixed; right: 18px; bottom: 18px; z-index: 60;
	width: 54px; height: 54px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--wine); color: var(--ivory-light);
	box-shadow: 0 6px 18px rgba(63, 42, 46, .25);
}
.wa-float:hover { background: var(--wine-dark); color: #fff; }

/* ==========================================================================
   Forms (custom order, contact, checkout)
   ========================================================================== */
.form .field { margin: 0 0 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

label { display: block; font-weight: 500; margin-bottom: .3rem; color: var(--brown-deep); }
.req { color: var(--wine); }
.hint { display: block; font-size: .88rem; margin-top: .3rem; opacity: .85; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="date"], input[type="search"], select, textarea,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	width: 100%;
	padding: .75rem 1rem;
	font: inherit; color: var(--brown);
	background: #FFFCF8;
	border: 1.5px solid var(--blush);
	border-radius: 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--wine); outline-offset: 1px; border-color: var(--wine); }
textarea { resize: vertical; }

.form-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.5rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 1rem 1.25rem; border-radius: 12px; margin-bottom: 1.5rem; }
.notice--ok { background: var(--sage-soft); border: 1.5px dashed var(--sage); color: var(--brown-deep); }
.notice--error { background: var(--peach-soft); border: 1.5px dashed var(--wine); color: var(--brown-deep); }

.inquiry { margin-top: 2.5rem; padding: clamp(1.25rem, 4vw, 2.25rem); background: var(--ivory-light); border: 2px dashed var(--blush); border-radius: 24px; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Storefront refinement: editorial product-first, consistent imaging */
:root{--max:1180px;}
.site-header{border-bottom:1px solid #e9dbcf;}
.site-header .scallop{display:none;}
.hero{padding-block:clamp(40px,6vw,84px);}
.hero-grid{grid-template-columns:1fr .86fr;gap:clamp(30px,6vw,90px);}
.hero-copy .script{font-size:clamp(1.6rem,3vw,2.15rem);margin:0 0 12px;}
.hero-copy h1{max-width:560px;font-size:clamp(2.6rem,5.8vw,5rem);line-height:.99;letter-spacing:-.025em;margin-bottom:20px;}
.hero-sub{font-size:1rem;max-width:420px;}
.hero .arch-frame{max-width:none;aspect-ratio:4/4.4;border-radius:8px;background:#efe4d8;}
.hero .arch-frame:after{display:none;}
.hero .arch-frame img{object-fit:cover;object-position:center;}
.hero-actions .btn{border-radius:5px;}
.section{padding-block:clamp(42px,6vw,76px);}
.section-head{text-align:left;margin-bottom:26px;}
.section-head .eyebrow{font-size:.84rem;letter-spacing:.14em;}
.section-head h2{font-size:clamp(2rem,3vw,2.7rem);}
.section-head .stitch-divider{display:none;}
.category-grid{gap:18px;}
.category-tile{min-width:0;}
.category-tile a{text-align:left;}
.category-tile .arch-frame--tile{aspect-ratio:4/4.6;max-width:none;border-radius:8px!important;margin:0 0 12px;background:#e9e0d6;}
.category-tile .arch-frame--tile:after{display:none;}
.category-tile .arch-frame--tile img{object-fit:cover;object-position:center;}
.category-tile__name{font-size:clamp(1.08rem,1.9vw,1.4rem);letter-spacing:0;text-transform:none;line-height:1.12;}
.category-tile__pitch{font-size:.82rem;line-height:1.5;color:var(--brown);}
.section--promise{background:#f0e3d9;}
.promise-grid{text-align:left;gap:28px;}
.promise-grid h3{font-size:1.35rem;letter-spacing:.06em;}
.gift-card{border:1px solid #e4c2b8;background:#fffaf3;border-radius:10px;}
.site-footer{background:#efe0d6;}
.site-footer .scallop{display:none;}
.primary-nav .menu{gap:clamp(14px,2.4vw,32px);}
@media(max-width:860px){.hero-grid{grid-template-columns:1fr 1fr;gap:22px}.hero-art{order:initial}.hero-copy{text-align:left}.hero-actions{justify-content:flex-start}.hero-sub{margin-inline:0}.hero-copy h1{font-size:clamp(2rem,5vw,3rem)}}
@media(max-width:700px){.hero{padding-block:24px 44px}.hero-grid{display:flex;flex-direction:column-reverse;gap:25px}.hero-art{width:100%}.hero .arch-frame{aspect-ratio:16/12;max-width:none}.hero-copy{text-align:left;width:100%}.hero-copy h1{max-width:340px;font-size:clamp(2.3rem,9vw,3.25rem)}.hero-actions{justify-content:flex-start;gap:8px}.hero-actions .btn{font-size:.82rem;padding:10px 13px}.category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}.category-tile__name{font-size:1.12rem}.category-tile__pitch{font-size:.76rem}.section-head{margin-bottom:20px}.promise-grid{text-align:left;gap:16px}.footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.footer-brand{grid-column:1/-1}}
@media(max-width:390px){.hero-actions .btn{font-size:.76rem}.category-tile__name{font-size:1.06rem}}
@media(prefers-reduced-motion:reduce){.category-tile a:hover .arch-frame--tile{transform:none}*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
