/* ==========================================================================
   GiftExpert — one stylesheet, no build step.
   Tokens come from the Figma file (Giftexpert, eK0JjAEfjdq7IyUUZXR1yS):
   charcoal #232e39, sage #97b192, cream #f5f0e8, section grey #f0f0f0,
   radius 10px; Roboto for UI, Fraunces Light (italic for the accent word)
   for headings, 14px body on a 20px line.
   BEM blocks, kebab-case; every colour is a custom property on :root.
   ========================================================================== */

:root {
	/* colour */
	--ink: #232e39;
	--ink-soft: #3b4651;
	--sage: #97b192;
	--sage-dark: #7c9a77;
	--sage-soft: #e1ebde;
	--cream: #f5f0e8;
	--mist: #f0f0f0;
	--line: #dbdbdb;
	--muted: #6b7280;
	--placeholder: #c4c4c4;
	--white: #ffffff;
	--star: #f5b400;
	--ok: #4f9d5d;
	--warn: #e2a300;
	--error: #c0392b;

	/* type */
	--font-body: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-display: Fraunces, Georgia, "Times New Roman", serif;
	--text-xs: 0.6875rem;  /* 11px */
	--text-sm: 0.75rem;    /* 12px */
	--text-md: 0.875rem;   /* 14px */
	--text-lg: 1rem;
	--text-h3: 1.5rem;     /* 24px */
	--text-h2: 2rem;       /* 32px */
	--text-h1: 2.75rem;
	--leading: 1.45;

	/* shape and space */
	--radius: 10px;
	--radius-pill: 999px;
	--gutter: 16px;
	--container: 1400px;
	--space-1: 0.5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2.5rem;
	--space-5: 4rem;
	--space-6: 6rem;
	--shadow: 0 10px 30px rgba(35, 46, 57, 0.08);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/roboto-regular.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/roboto-medium.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/roboto-semibold.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/roboto-bold.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/fraunces-light.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/fraunces-light-italic.woff2") format("woff2"); }

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font: 400 var(--text-md) / var(--leading) var(--font-body);
	-webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

h1, h2, h3, .heading {
	margin: 0 0 var(--space-2);
	font-family: var(--font-display);
	font-weight: 300;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}
h1 { font-size: var(--text-h1); }
h2, .heading { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
.heading__accent {
	font-style: italic;
	color: var(--sage-dark);
	background: linear-gradient(transparent 78%, var(--sage-soft) 78%) no-repeat;
}
p { margin: 0 0 var(--space-2); }
.muted { color: var(--muted); }
.eyebrow { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-5); }
.section--mist { background: var(--mist); }
.section--ink { background: var(--ink); color: var(--white); }
.section--ink .heading__accent { color: var(--sage); background: none; }

/* --------------------------------------------------------------------------
   Buttons and badges
   -------------------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	min-height: 44px; padding: 0.6em 1.4em;
	border: 1px solid transparent; border-radius: var(--radius);
	background: var(--sage); color: var(--white);
	font-weight: 500; line-height: 1; cursor: pointer;
	transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { background: var(--sage-dark); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn--ink { background: var(--ink); }
.btn--ink:hover { background: var(--ink-soft); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--cream { background: var(--cream); color: var(--ink); font-size: var(--text-sm); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.btn--cream:hover { background: var(--white); }
.btn--sm { min-height: 36px; padding: 0.4em 1em; font-size: var(--text-sm); }

.badge {
	display: inline-flex; align-items: center; gap: 0.35em;
	padding: 0.3em 0.75em; border-radius: var(--radius-pill);
	background: var(--sage); color: var(--white);
	font-size: var(--text-xs); font-weight: 500; line-height: 1.2;
}
.badge--ink { background: var(--ink); }
.badge--soft { background: var(--sage-soft); color: var(--ink); }

/* --------------------------------------------------------------------------
   Header: top bar, logo row, category bar, breadcrumb
   -------------------------------------------------------------------------- */
.topbar { background: var(--sage); color: var(--white); font-size: var(--text-sm); }
.topbar__inner { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: 0.4rem; }
.topbar__contact { display: flex; gap: var(--space-3); }

.masthead { background: var(--white); }
.masthead__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3); padding-block: 1rem; }
.masthead__logo img { height: 44px; width: auto; }
.search { display: flex; max-width: 540px; }
.search__input { flex: 1; min-height: 44px; padding: 0 1rem 0 2.5rem; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--white) url("../img/icons/search.svg") no-repeat 1rem center / 16px; }
.search__input::placeholder { color: var(--placeholder); }
.search__submit { min-height: 44px; width: 44px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--sage); color: var(--white); cursor: pointer; }
.masthead__actions { display: flex; align-items: center; gap: var(--space-2); }
.masthead__icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius); color: var(--ink); }
.masthead__icon:hover { background: var(--mist); }

.catbar { background: var(--ink); color: var(--white); }
.catbar__inner { display: flex; align-items: center; gap: var(--space-3); min-height: 60px; }
.catbar__menu, .catbar__aside { display: flex; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.catbar__aside { margin-left: auto; }
.catbar__menu a, .catbar__aside a { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.5em 0; color: var(--white); font-size: var(--text-md); }
.catbar__menu .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.5em 1em; padding-block: var(--space-2); font-size: var(--text-sm); color: var(--muted); }
.breadcrumb a { color: var(--ink); }
.breadcrumb .current { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }

/* --------------------------------------------------------------------------
   Cards, products, grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--space-3); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.product { position: relative; display: flex; flex-direction: column; gap: 0.35rem; }
.product__media { position: relative; aspect-ratio: 1; border-radius: var(--radius); background: var(--mist); display: grid; place-items: center; overflow: hidden; }
.product__media img { width: 70%; height: auto; transition: transform 0.4s var(--ease); }
.product:hover .product__media img { transform: scale(1.04); }
.product__media--wide { aspect-ratio: 4 / 3; }
.product__media--wide img { width: 100%; height: 100%; object-fit: cover; }
.product__stock { position: absolute; top: 0.75rem; left: 0.75rem; }
.product__cat { font-size: var(--text-xs); font-weight: 600; color: var(--sage-dark); margin-top: 0.5rem; }
.product__title { margin: 0; font: 700 var(--text-lg) / 1.2 var(--font-body); }
.product__desc { color: var(--muted); font-size: var(--text-md); }
.product__price { font: 400 var(--text-h3) / 1 var(--font-display); }
.price--quote { color: var(--muted); font-size: var(--text-md); }

.category-tile { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.25rem; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); font-weight: 700; }
.category-tile__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--sage-soft); display: grid; place-items: center; }
.category-tile__icon img { width: 60%; }
.section--mist .category-tile { box-shadow: none; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { display: grid; gap: 0.35rem; }
.field__label { font-size: var(--text-sm); font-weight: 500; }
.input, .select, .textarea {
	width: 100%; min-height: 44px; padding: 0.6rem 1rem;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sage-dark); outline: none; }
.textarea { min-height: 140px; resize: vertical; }
.checkbox { display: flex; gap: 0.6rem; align-items: flex-start; }
.checkbox input { width: 20px; height: 20px; margin: 0; border-radius: 50%; accent-color: var(--sage-dark); }

/* --------------------------------------------------------------------------
   Footer: newsletter band, link columns, legal line
   -------------------------------------------------------------------------- */
.newsletter { background: var(--ink); color: var(--white); border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.newsletter__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: var(--space-4); }
.newsletter__title { margin: 0; font-size: var(--text-h3); }
.newsletter__form { display: flex; gap: 0.75rem; }
.newsletter__form .input { min-width: 300px; background: transparent; border-color: rgba(255, 255, 255, 0.25); color: var(--white); }

.footer { background: var(--ink); color: var(--white); font-size: var(--text-md); }
.footer__inner { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: var(--space-4); padding-block: var(--space-5); }
.footer__logo img { height: 36px; width: auto; }
.footer__tagline { color: rgba(255, 255, 255, 0.7); max-width: 28ch; margin-top: 1rem; }
.footer__heading { margin: 0 0 1rem; font: 600 var(--text-xs) / 1 var(--font-body); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.footer a { color: var(--white); }
.footer__social { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.footer__social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: var(--radius); }
.footer__legal { display: flex; justify-content: space-between; gap: var(--space-2); padding-block: var(--space-3); border-top: 1px solid rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.55); font-size: var(--text-sm); }
.footer__legal ul { display: flex; gap: var(--space-3); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
	:root { --text-h1: 2rem; --text-h2: 1.6rem; --space-5: 2.5rem; }
	.topbar__contact { display: none; }
	.masthead__inner { grid-template-columns: auto 1fr; }
	.search { grid-column: 1 / -1; max-width: none; }
	.catbar__inner { overflow-x: auto; scrollbar-width: none; }
	.grid--5, .grid--3, .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.newsletter__inner { flex-direction: column; align-items: stretch; }
	.newsletter__form .input { min-width: 0; }
	.footer__inner { grid-template-columns: 1fr; gap: var(--space-3); }
	.footer__legal { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
