/**
 * MebliU v3 — minimal design system
 * Brand: #2F457B primary, Montserrat + Benzin
 */

@font-face {
	font-family: 'Benzin';
	src: url('../fonts/benzin-regular.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Benzin';
	src: url('../fonts/benzin-medium.ttf') format('truetype');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Benzin';
	src: url('../fonts/benzin-semibold.ttf') format('truetype');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Benzin';
	src: url('../fonts/benzin-bold.ttf') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--c-primary: #2F457B;
	--c-primary-dark: #243660;
	--c-primary-light: #4A6BA8;
	--c-accent: #2F457B;
	--c-text: #1a1a1a;
	--c-muted: #6b7280;
	--c-border: #e5e7eb;
	--c-bg: #ffffff;
	--c-surface: #f8f9fb;
	--c-sale: #e85555;

	--font: 'Montserrat', system-ui, sans-serif;
	--font-heading: 'Benzin', system-ui, sans-serif;
	--radius: 10px;
	--radius-sm: 6px;
	--shadow: 0 4px 24px rgba(47, 69, 123, 0.08);
	--header-h: 64px;
	--wrap: 1440px;
	--gap: 24px;
	--ease: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--c-text);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: color var(--ease), opacity var(--ease); }
a:hover { opacity: 0.85; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.15;
	color: var(--c-primary);
	text-transform: uppercase;
	letter-spacing: -0.01em;
}
h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 500; }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: clamp(18px, 2vw, 24px); }
p { margin: 0 0 1em; }

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 32px);
}

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-family: var(--font);
	font-size: 14px;
	font-weight: 600;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
	text-align: center;
}
.btn:hover { opacity: 1; transform: translateY(-1px); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-primary); border-color: var(--c-border); }
.btn--ghost:hover { border-color: var(--c-primary); background: var(--c-surface); }
.btn--block { width: 100%; }

.badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 4px 10px;
	border-radius: 999px;
}
.badge--sale { background: var(--c-sale); color: #fff; }

/* Header */
.header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--c-border);
}
.header__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: var(--header-h);
}
.header__menu-btn {
	display: none;
	background: none;
	border: none;
	color: var(--c-primary);
	cursor: pointer;
	padding: 4px;
}
.header__logo {
	flex-shrink: 0;
	font-weight: 700;
	font-size: 20px;
	color: var(--c-primary);
}
.header__logo img { height: 32px; width: auto; }
.header__logo-accent { color: var(--c-primary-light); }

.header__nav { flex: 1; display: flex; justify-content: center; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.nav__item { position: relative; }
.nav__link {
	display: block;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 500;
	color: var(--c-text);
	border-radius: var(--radius-sm);
	white-space: nowrap;
}
.nav__link:hover { background: var(--c-surface); color: var(--c-primary); opacity: 1; }
.nav__sub {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 240px;
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	padding: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--ease), visibility var(--ease), transform var(--ease);
	z-index: 50;
}
.nav__item:hover > .nav__sub {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.nav__sub .nav__item { position: relative; }
.nav__sub .nav__item:hover { z-index: 51; }
.nav__sub .nav__link { font-size: 13px; position: relative; }
/* Nested submenu flies out to the right */
.nav__sub .nav__sub {
	top: 0;
	left: 100%;
	margin-left: 4px;
	transform: translateX(-6px);
}
.nav__sub .nav__item:hover > .nav__sub {
	transform: translateX(0);
}
.nav__sub .nav__item--has-children > .nav__link {
	padding-right: 28px;
}
.nav__sub .nav__item--has-children > .nav__link::after {
	content: '›';
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--c-muted);
	font-size: 16px;
	line-height: 1;
}

.header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}
.header__search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: var(--c-surface);
	border-radius: 999px;
	border: 1px solid transparent;
	transition: border-color var(--ease);
}
.header__search:focus-within { border-color: var(--c-primary); }
.header__search svg { color: var(--c-muted); flex-shrink: 0; }
.header__search input {
	border: none;
	background: transparent;
	font-size: 13px;
	width: 140px;
	outline: none;
}
.header__action {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: none;
	background: none;
	color: var(--c-primary);
	cursor: pointer;
	border-radius: var(--radius-sm);
}
.header__action:hover { background: var(--c-surface); opacity: 1; }
.header__cart-count {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--c-primary);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Cart drawer */
.cart-drawer { pointer-events: none; }
.cart-drawer.is-open { pointer-events: auto; }
.cart-drawer__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.4);
	opacity: 0;
	transition: opacity var(--ease);
	z-index: 200;
}
.cart-drawer.is-open .cart-drawer__overlay { opacity: 1; }
.cart-drawer__panel {
	position: fixed;
	top: 0;
	right: 0;
	width: min(420px, 100vw);
	height: 100%;
	background: #fff;
	box-shadow: -8px 0 40px rgba(0,0,0,0.12);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 201;
	display: flex;
	flex-direction: column;
}
.cart-drawer.is-open .cart-drawer__panel { transform: translateX(0); }
.cart-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--c-border);
}
.cart-drawer__head h2 { font-size: 20px; margin: 0; font-family: var(--font-heading); text-transform: uppercase; font-weight: 500; }
.cart-drawer__close {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--c-muted);
	padding: 4px;
}
.cart-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 24px;
}
.cart-drawer__empty {
	text-align: center;
	color: var(--c-muted);
	padding: 48px 0;
}
.cart-drawer__list { display: flex; flex-direction: column; gap: 16px; }
.cart-drawer__item { display: flex; gap: 12px; }
.cart-drawer__thumb { width: 72px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--c-surface); }
.cart-drawer__thumb img { width: 100%; height: 72px; object-fit: cover; }
.cart-drawer__name { font-size: 14px; font-weight: 600; color: var(--c-text); display: block; margin-bottom: 4px; }
.cart-drawer__qty { font-size: 13px; color: var(--c-muted); }
.cart-drawer__total {
	display: flex;
	justify-content: space-between;
	padding: 16px 0;
	margin-top: 16px;
	border-top: 1px solid var(--c-border);
	font-size: 16px;
}
.cart-drawer__foot {
	padding: 16px 24px 24px;
	border-top: 1px solid var(--c-border);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

body.cart-open { overflow: hidden; }

/* Footer */
.footer {
	margin-top: 80px;
	background: var(--c-surface);
	border-top: 1px solid var(--c-border);
}
.footer__grid {
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr 1fr;
	gap: 40px;
	padding: 48px 0;
}
.footer__name { font-size: 20px; font-weight: 700; color: var(--c-primary); margin-bottom: 12px; }
.footer__name span { color: var(--c-primary-light); }
.footer__tagline { font-size: 14px; color: var(--c-muted); max-width: 280px; }
.footer__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-primary); margin-bottom: 16px; }
.footer__menu { display: flex; flex-direction: column; gap: 10px; }
.footer__menu a { font-size: 14px; color: var(--c-muted); }
.footer__menu a:hover { color: var(--c-primary); opacity: 1; }
.footer__bar { border-top: 1px solid var(--c-border); }
.footer__bar-inner {
	display: flex;
	justify-content: space-between;
	padding: 16px 0;
	font-size: 13px;
	color: var(--c-muted);
}

/* Hero */
.hero { padding: clamp(32px, 5vw, 56px) 0 0; }
.hero__top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: clamp(24px, 4vw, 40px);
}
.hero__title {
	font-size: clamp(28px, 5vw, 52px);
	font-weight: 600;
	line-height: 1.1;
	margin: 0;
	max-width: min(720px, 75%);
}
.hero__cta { flex-shrink: 0; }
.hero__media {
	width: 100%;
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--c-surface);
	margin-bottom: clamp(24px, 4vw, 48px);
}
.hero__media img {
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

/* Sections */
.section { padding: 56px 0; }
.section--muted { background: var(--c-surface); }
.section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
}
.section__title { font-size: clamp(26px, 3.5vw, 38px); font-weight: 500; margin: 0; color: var(--c-primary); }
.section__link { font-size: 14px; font-weight: 600; color: var(--c-primary); white-space: nowrap; }

/* Category grid */
.cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
}
.cat-grid__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 20px 12px;
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	text-align: center;
	color: var(--c-text);
	transition: border-color var(--ease), box-shadow var(--ease);
}
.cat-grid__item:hover { border-color: var(--c-primary); box-shadow: var(--shadow); opacity: 1; }
.cat-grid__item img { width: 64px; height: 64px; object-fit: contain; }
.cat-grid__item span { font-size: 13px; font-weight: 600; }

/* Product grid & cards */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--gap);
}
.card {
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--c-border);
	transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card--pad { padding: 28px; }
.card__link { display: block; color: inherit; }
.card__link:hover { opacity: 1; }
.card__media {
	position: relative;
	aspect-ratio: 1;
	background: var(--c-surface);
	overflow: hidden;
}
.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.card:hover .card__media img { transform: scale(1.03); }
.card__media .badge { position: absolute; top: 12px; left: 12px; }
.card__body { padding: 16px; }
.card__title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.card__price { font-size: 16px; font-weight: 700; color: var(--c-primary); }
.card__price del { font-size: 13px; color: var(--c-muted); font-weight: 400; margin-right: 6px; }
.card__price ins { text-decoration: none; }

/* CTA banner */
.cta-banner { padding-bottom: 80px; }
.cta-banner__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 40px 48px;
	background: var(--c-primary);
	color: #fff;
	border-radius: var(--radius);
}
.cta-banner__inner h2 { color: #fff; font-size: clamp(22px, 3vw, 32px); margin-bottom: 8px; }
.cta-banner__inner p { color: rgba(255,255,255,0.85); margin: 0; }

/* Breadcrumbs */
.breadcrumbs { padding: 20px 0 8px; font-size: 13px; color: var(--c-muted); }
.breadcrumbs__list { display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs__list li:not(:last-child)::after { content: '/'; margin-left: 8px; opacity: 0.4; }
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs span { color: var(--c-text); }

/* Contacts */
.page-contacts { padding-bottom: 80px; }
.page-title { font-size: clamp(32px, 4vw, 48px); margin-bottom: 32px; color: var(--c-primary); }
.contacts-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}
.contacts-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.contacts-list li { font-size: 15px; }
.contacts-list strong { display: block; font-size: 12px; text-transform: uppercase; color: var(--c-muted); margin-bottom: 4px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form h2 { font-size: 20px; margin-bottom: 4px; }
.contact-form label span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--c-muted); }
.contact-form input,
.contact-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--c-border);
	border-radius: var(--radius-sm);
	font-family: var(--font);
	font-size: 14px;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--c-primary); }

/* Responsive */
@media (max-width: 960px) {
	.header__menu-btn { display: flex; }
	.header__nav {
		display: none;
		position: fixed;
		inset: var(--header-h) 0 0;
		background: #fff;
		padding: 24px;
		overflow-y: auto;
		z-index: 99;
		justify-content: flex-start;
	}
	.header__nav.is-open { display: block; }
	.header__nav .nav { flex-direction: column; align-items: stretch; }
	.header__nav .nav__sub {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		padding-left: 16px;
		min-width: 0;
	}
	.header__nav .nav__sub .nav__sub {
		position: static;
		margin-left: 0;
		transform: none;
		padding-left: 16px;
	}
	.header__nav .nav__sub .nav__item--has-children > .nav__link::after { display: none; }
	.hero__top { flex-direction: column; align-items: flex-start; }
	.hero__title { max-width: 100%; }
	.hero__cta { width: 100%; }
	.hero__media img { aspect-ratio: 16 / 10; }
	.header__search { display: none; }
	.footer__grid { grid-template-columns: 1fr 1fr; }
	.contacts-layout { grid-template-columns: 1fr; }
	.cta-banner__inner { flex-direction: column; text-align: center; }
	.collections-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
	.footer__grid { grid-template-columns: 1fr; }
	.product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.collections-grid { grid-template-columns: 1fr; }
	.card__body { padding: 12px; }
	.card__title { font-size: 12px; }
	.collection-header { grid-template-columns: 1fr; }
}

/* Collections — homepage & archive */
.section--collections { padding-top: 0; }
.collections-page { padding-bottom: 80px; }
.collections-page__head { margin-bottom: 32px; }
.collections-page__intro { color: var(--c-muted); max-width: 640px; font-size: 16px; }

.collections-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 28px;
}
.collections-tabs__btn {
	padding: 10px 20px;
	font-family: var(--font);
	font-size: 13px;
	font-weight: 600;
	color: var(--c-muted);
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: 999px;
	cursor: pointer;
	transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.collections-tabs__btn:hover { color: var(--c-primary); border-color: var(--c-primary); }
.collections-tabs__btn.is-active {
	background: var(--c-primary);
	border-color: var(--c-primary);
	color: #fff;
}

.collections-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--gap);
}
.collection-card {
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: var(--radius);
	overflow: hidden;
	transition: box-shadow var(--ease), transform var(--ease);
}
.collection-card.is-hidden { display: none; }
.collection-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.collection-card__link { display: block; color: inherit; }
.collection-card__link:hover { opacity: 1; }
.collection-card__image {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--c-surface);
	overflow: hidden;
}
.collection-card__image img,
.collection-card__image .collection-card__placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.collection-card__placeholder { background: linear-gradient(135deg, var(--c-surface), var(--c-border)); min-height: 200px; }
.collection-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	font-family: var(--font);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 5px 12px;
	border-radius: 999px;
}
.collection-card__badge--premium { background: var(--c-primary); color: #fff; }
.collection-card__badge--standart { background: #fff; color: var(--c-primary); border: 1px solid var(--c-border); }
.collection-card__body { padding: 20px; }
.collection-card__title {
	font-family: var(--font-heading);
	font-size: clamp(16px, 2vw, 20px);
	font-weight: 500;
	text-transform: uppercase;
	margin: 0 0 10px;
	line-height: 1.2;
	color: var(--c-primary);
}
.collection-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--c-primary);
}
.collection-card__cta svg { transition: transform var(--ease); }
.collection-card:hover .collection-card__cta svg { transform: translateX(3px); }

/* Single collection */
.collection-header {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: center;
	margin-bottom: 48px;
}
.collection-header__image { border-radius: var(--radius); overflow: hidden; background: var(--c-surface); }
.collection-header__image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.collection-header__title { font-size: clamp(26px, 3vw, 38px); margin-top: 12px; }
.collection-products { padding-bottom: 80px; }
