/* Crystalwala — components introduced by the Blade storefront.

   storefront.css is a machine-assisted port of the block theme's stylesheet and
   can be regenerated from it; this file is hand-written and holds only what the
   Bagisto build needs in addition. Keeping them apart means re-running the port
   can never silently drop work that was only ever authored here.

   Tokens come from tokens.css. No colour is written as a literal below unless it
   is a one-off tint of one that is. */

.cw-body {
	background: var(--cw-color-ground);
	color: var(--cw-color-ink);
	font-family: var(--cw-font-body);
	font-size: var(--cw-text-base);
	line-height: 1.65;
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

/* :where() so this contributes ZERO specificity. Written as `.cw-body h1` it
   scored (0,1,1) and beat every single-class component rule -- including
   `.cw-hero__title`, which made the first line of the hero headline render in
   dark ink on a dark photograph, i.e. invisible. A base rule must never
   out-specify the components built on top of it. */
:where(.cw-body) :where(h1, h2, h3, h4) {
	font-family: var(--cw-font-display);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -0.005em;
	color: var(--cw-color-ink);
}

/* Bagisto's own stylesheet loads first and sets `main { background: #fff }`
   plus a Poppins stack on body. Both are reasserted here rather than fought
   with !important, because ours is simply the later sheet. */
main {
	background: var(--cw-color-ground);
}

/* ---------- header ---------- */

.cw-header__inner {
	max-width: var(--cw-wide);
	margin-inline: auto;
	padding: var(--cw-space-20) var(--cw-space-30);
	display: flex;
	align-items: center;
	gap: var(--cw-space-30);
}

.cw-nav {
	display: flex;
	gap: var(--cw-space-30);
	flex: 1 1 auto;
	justify-content: center;
	flex-wrap: wrap;
}

.cw-header__actions {
	display: flex;
	align-items: center;
	gap: var(--cw-space-20);
	margin-left: auto;
}

/* ---------- search ---------- */

.cw-search {
	position: relative;
	display: flex;
	align-items: center;
}

.cw-search input {
	width: clamp(9rem, 22vw, 17rem);
	border: 1px solid var(--cw-color-line);
	border-radius: 999px;
	background: var(--cw-color-surface);
	font-family: var(--cw-font-body);
	font-size: 0.875rem;
	color: var(--cw-color-ink);
	padding: 0.6rem 2.6rem 0.6rem 1.05rem;
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.cw-search input::placeholder { color: var(--cw-color-muted); }

.cw-search input:focus-visible {
	outline: none;
	border-color: var(--cw-color-gold);
	box-shadow: 0 0 0 3px rgba(200, 154, 60, .22);
}

.cw-search button {
	position: absolute;
	right: 0.3rem;
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cw-color-maroon);
	cursor: pointer;
}

.cw-search button:hover { background: var(--cw-color-gold-soft); }

.cw-search svg,
.cw-iconlink svg {
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ---------- header icons ---------- */

/* 44px minimum target. A 20px icon with no padding is a miss on a phone. */
.cw-iconlink {
	position: relative;
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	color: var(--cw-color-ink);
	text-decoration: none;
	transition: background-color 180ms ease, color 180ms ease;
}

.cw-iconlink:hover {
	background: var(--cw-color-gold-soft);
	color: var(--cw-color-maroon);
}

.cw-iconlink:focus-visible {
	outline: 2px solid var(--cw-color-maroon);
	outline-offset: 2px;
}

.cw-iconlink__count {
	position: absolute;
	top: 0.35rem;
	right: 0.25rem;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 0.28rem;
	border-radius: 999px;
	background: var(--cw-color-maroon);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.15rem;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* ---------- footer ---------- */

.cw-footer {
	background: var(--cw-color-ink);
	color: var(--cw-color-ground);
	margin-top: clamp(3.5rem, 8vw, 6rem);
	padding: var(--cw-space-50) var(--cw-space-30) var(--cw-space-40);
}

.cw-footer__inner {
	max-width: var(--cw-wide);
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
	gap: var(--cw-space-40) var(--cw-space-50);
}

.cw-footer__blurb {
	margin: var(--cw-space-20) 0 0;
	font-size: var(--cw-text-sm);
	color: rgba(253, 246, 236, .74);
	max-width: 26rem;
}

.cw-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	font-size: var(--cw-text-sm);
}

.cw-footer__legal {
	max-width: var(--cw-wide);
	margin: var(--cw-space-40) auto 0;
	text-align: center;
	font-size: var(--cw-text-xs);
	color: rgba(253, 246, 236, .6);
}

@media (max-width: 900px) {
	.cw-footer__inner { grid-template-columns: 1fr 1fr; }
	.cw-nav { display: none; }
}

@media (max-width: 620px) {
	.cw-footer__inner { grid-template-columns: 1fr; }
	.cw-header__inner { gap: var(--cw-space-20); }
	.cw-search input { width: 100%; }
}

/* Belt and braces with the U+FE0E selector in the markup: some platforms honour
   only one of the two. */
.cw-rashi__glyph {
	font-family: var(--cw-font-body);
	font-variant-emoji: text;
}
