/* =========================================================================
   Chubby Chair — design tokens + global layout (header / footer / primitives)
   Re-creates the Tailwind design language as hand-authored, RTL-first CSS.
   Section styles (home, woocommerce, pages, tracking) live in their own files.
   ========================================================================= */

:root {
	--background: #ffffff;
	--foreground: #000000;
	--brand-blue: #6eb9ff;
	--brand-blue-soft: #e7f2ff;
	--brand-blue-tint: #cfe6ff;
	--brand-orange: #ff6a3d;
	--neutral-soft: #f7f7f7;
	--neutral-400: #747271;

	--font-sans: "Vazirmatn", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-display: "Bricolage Grotesque", "Vazirmatn", sans-serif;

	--container: 1440px;
	--pad-x: 2rem;          /* px-8  */
	--pad-x-md: 3.75rem;    /* px-15 */

	--radius-sm: 0.75rem;   /* 12px */
	--radius: 1rem;         /* 16px */
	--radius-lg: 1.5rem;    /* 24px */
	--radius-xl: 40px;
	--shadow-card: 0 4px 18px rgba(0, 0, 0, 0.05);
	--shadow-btn: 0 6px 18px rgba(0, 0, 0, 0.08);
}

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

html {
	width: 100%;
	margin-inline: 0;
	padding-inline: 0;
	-webkit-text-size-adjust: 100%;
}

body {
	width: 100%;
	margin: 0;
	padding-inline: 0;
	background: var(--background);
	color: var(--foreground);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	direction: rtl;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

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

a { color: inherit; text-decoration: none; transition: opacity .2s ease, color .2s ease; }
a:hover { opacity: .85; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; }
button { font-family: inherit; }

.cc-site {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
}
.cc-main {
	flex: 1 0 auto;
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: 0;
}

/* ------------------------------------------------------------- utilities */
.cc-container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--pad-x);
}
@media (min-width: 768px) {
	.cc-container { padding-inline: var(--pad-x-md); }
}

.cc-ltr { direction: ltr; }
.cc-rtl { direction: rtl; }
.cc-display { font-family: var(--font-display); }

.cc-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- buttons */
.cc-btn {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	height: 56px;
	padding-inline: 1.75rem;
	border: 0;
	border-radius: 9999px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	box-shadow: var(--shadow-btn);
	transition: background-color .5s ease, color .5s ease, opacity .2s ease;
	white-space: nowrap;
}
.cc-btn svg { width: 20px; height: 14px; }
.cc-btn--dark { background: #000; color: #fff; box-shadow: none; }
.cc-btn--neutral {
	background: var(--neutral-soft);
	color: #616161;
	box-shadow: none;
	font-weight: 500;
}
.cc-btn--block { width: 100%; justify-content: center; }

/* Squared add-to-cart / pay buttons (h-12, rounded-xl) */
.cc-btn-square {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding-inline: 1.25rem;
	border: 0;
	border-radius: var(--radius-sm);
	background: #000;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
}

/* --------------------------------------------------------- price / toman */
.cc-toman { display: inline-block; vertical-align: middle; }
.cc-amount { display: inline-flex; align-items: center; gap: .5rem; }
.cc-amount__num { font-weight: 800; line-height: 1; }
.cc-oldprice { position: relative; opacity: .25; font-weight: 600; }
.cc-oldprice::after {
	content: ""; position: absolute; inset-inline: 0; top: 50%;
	height: 1px; background: rgba(0,0,0,.4);
}

/* --------------------------------------------------------- decorative bits */
.cc-pill {
	display: inline-block;
	border-radius: 9999px;
	padding: .75rem 1.25rem;
	font-size: .875rem;
	font-weight: 800;
	color: #fff;
	box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.cc-pill--blue { background: var(--brand-blue); }
.cc-pill--orange { background: var(--brand-orange); }

.cc-swatch {
	position: relative;
	display: grid;
	place-items: center;
	height: 28px; width: 28px;
	border: 0; background: none; padding: 0;
	border-radius: 9999px;
	cursor: pointer;
	transition: transform .2s ease;
}
.cc-swatch:hover { transform: scale(1.1); }
.cc-swatch[disabled] { cursor: default; }
.cc-swatch[disabled]:hover { transform: none; }
.cc-swatch__dot { display: block; height: 24px; width: 24px; border-radius: 9999px; }
.cc-swatch.is-active .cc-swatch__under {
	position: absolute; bottom: -12px; left: 50%;
	height: 8px; width: 8px; transform: translateX(-50%);
	border-radius: 9999px;
}

.cc-check-badge { position: relative; display: inline-block; height: 56px; width: 56px; }
.cc-check-badge__ring { position: absolute; inset: 0; border-radius: 9999px; background: var(--brand-blue-tint); }
.cc-check-badge__fill {
	position: absolute; inset: 10px; display: grid; place-items: center;
	border-radius: 9999px; background: var(--brand-blue);
}

.cc-arrow-btn {
	display: grid; place-items: center;
	border-radius: 9999px; background: #000; color: #fff;
	flex-shrink: 0;
}

/* ================================================================ HEADER */
.cc-header {
	position: relative;
	z-index: 20;
}
.cc-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 1.5rem;
}
.cc-logo img,
.cc-logo svg { display: block; }
.cc-nav__menu {
	display: flex;
	align-items: center;
	gap: 2.5rem;
	font-size: 1rem;
	font-weight: 600;
}
.cc-nav__links {
	display: flex;
	align-items: center;
	gap: 2.5rem;
	list-style: none;
	padding: 0; margin: 0;
}
.cc-icons { display: flex; align-items: center; gap: 1.5rem; color: #000; }
.cc-icons a { display: grid; place-items: center; position: relative; }
.cc-nav__icon { display: block; width: 24px; height: 24px; max-width: none; }
.cc-cart-count {
	position: absolute; top: -8px; inset-inline-start: -10px;
	min-width: 18px; height: 18px; padding: 0 4px;
	display: grid; place-items: center;
	background: var(--brand-orange); color: #fff;
	font-size: 11px; font-weight: 700; line-height: 1;
	border-radius: 9999px;
}
.cc-nav__toggle { display: none; }

@media (max-width: 767px) {
	.cc-nav__toggle {
		display: inline-grid; place-items: center;
		height: 44px; width: 44px; border: 0; background: none; cursor: pointer;
	}
	.cc-nav__menu {
		position: absolute; inset-inline: var(--pad-x); top: 78px;
		flex-direction: column; align-items: flex-end; gap: 1.25rem;
		background: #fff; padding: 1.25rem 1.5rem;
		border-radius: var(--radius-lg);
		box-shadow: var(--shadow-card);
		display: none;
	}
	.cc-nav__menu.is-open { display: flex; }
	.cc-nav__links { flex-direction: column; align-items: flex-end; gap: 1rem; }
}

/* ================================================================ FOOTER */
.cc-footer { margin-top: 3rem; padding-bottom: 3rem; }
.cc-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	border-radius: var(--radius-xl);
	background: var(--brand-blue-soft);
	padding: 3.5rem 2.5rem;
}
@media (min-width: 768px) {
	.cc-footer__grid {
		grid-template-columns: 1fr 1fr auto;
		padding: 3.5rem 4rem;
	}
}
.cc-footer__col {
	display: flex; flex-direction: column; align-items: flex-end;
	gap: 1rem; text-align: right; font-size: 1rem; font-weight: 600;
}
.cc-footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.cc-footer__label { opacity: .4; }
.cc-footer__address { line-height: 1.75; }
.cc-footer__logo { display: flex; align-items: flex-start; justify-content: flex-end; }
.cc-footer__logo img { height: 64px; width: auto; }
.cc-footer__social {
	margin-top: 1.5rem;
	display: inline-flex; align-items: center; gap: 1rem;
	width: auto;
	border-radius: var(--radius-xl);
	background: var(--brand-blue-soft);
	padding: 1.25rem 2rem;
}
.cc-social-icon {
	display: grid; place-items: center;
	height: 56px; width: 56px;
	border-radius: 9999px;
	background: #fff;
	color: rgba(0,0,0,.7);
	opacity: .9;
}
.cc-social-icon:hover { opacity: 1; }
.cc-footer__copy { margin-top: 2.5rem; text-align: center; font-size: .875rem; color: var(--neutral-400); }

/* Generic single-column page (fallback for page.php / index.php) */
.cc-page { padding-block: 3rem 5rem; }
.cc-page__title { font-size: 2.25rem; font-weight: 800; text-align: center; margin-bottom: 2rem; }
.cc-prose { max-width: 760px; margin-inline: auto; line-height: 2; font-size: 1.0625rem; }
.cc-prose :is(h2,h3) { margin-top: 2rem; margin-bottom: .75rem; }
.cc-prose p { margin-bottom: 1rem; }
.cc-prose ul { padding-inline-start: 1.25rem; list-style: disc; }

/* Footer layout helpers used by the Figma footer markup. */
.cc-footer__links {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}
@media (min-width: 768px) {
	.cc-footer__links {
		grid-template-columns: repeat(3, 1fr);
		gap: 2.5rem;
	}
}
.cc-footer__phone {
	font-weight: 700;
}
