/* MyBrewery redesign: one stylesheet for the homepage and its components.
   Living reference: html/components.html. Rules for using it: html/components.md. */

:root {
	/* From the logo */
	--hop: #4C6129;
	--hop-pale: #D8E2C6;
	--hop-mist: #F1F4E8;
	--foam: #F4F0D6;
	--ink: #2B2B26;
	--ink-soft: #5F6054;
	--line: #DFE3D2;

	/* Sale price, and the slide while its photo loads */
	--amber: #A9591A;

	--gutter: clamp(16px, 3vw, 32px);
	--radius-lg: 24px;
	--radius-md: 14px;
	--font: 'Noto Sans Georgian', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
/* Bootstrap (still loaded for the auth modals) sets a:hover blue and underlined; the design has no
   link hover. Links that set their own colour keep it on hover; intentional hovers are more specific. */
a:hover { color: inherit; text-decoration: none; }
.action--basket:hover { color: #fff; }
.pour:hover { color: var(--ink); }
.site-nav__link[aria-current="page"]:hover { color: var(--hop); }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
	outline: 3px solid var(--hop);
	outline-offset: 3px;
	border-radius: 6px;
}

.container {
	width: min(1240px, 100% - 2 * var(--gutter));
	margin-inline: auto;
}

.display {
	margin: 0;
	font-stretch: 70%;
	font-weight: 800;
	line-height: 1.05;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid var(--line);
}

/* On a pseudo-element because a blurred parent would stop the account menu's blur reaching the page */
.site-header::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.site-header__row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px clamp(16px, 4vw, 48px);
	padding-block: 12px;
}

.logo img { width: 176px; height: auto; }

.search {
	display: flex;
	width: 100%;
	max-width: 560px;
	justify-self: center;
	background: var(--hop-mist);
	border: 1px solid transparent;
	border-radius: 999px;
	transition: border-color .15s, background-color .15s;
}

.search:focus-within {
	background: #fff;
	border-color: var(--hop);
}

.search input {
	flex: 1;
	min-width: 0;
	padding: 11px 4px 11px 20px;
	background: none;
	border: 0;
	outline: 0;
	color: inherit;
	font: inherit;
}

.search input::placeholder { color: var(--ink-soft); }
.search input::-webkit-search-cancel-button { display: none; }

.search button {
	display: grid;
	place-items: center;
	width: 46px;
	background: none;
	border: 0;
	border-radius: 999px;
	color: var(--hop);
	cursor: pointer;
}

.actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 12px;
	background: none;
	border: 0;
	border-radius: 999px;
	color: inherit;
	font: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: background-color .15s;
}

.action:hover { background: var(--hop-mist); }

.action--basket {
	margin-left: 4px;
	background: var(--hop);
	color: #fff;
	font-weight: 600;
}

.action--basket:hover { background: #3C4E1F; }

/* Language switch: a round flag of the language it switches to */
.action--lang { justify-content: center; min-width: 44px; padding: 8px; }

.action__flag { width: 28px; height: 28px; }

/* Signed-in account menu: replaces the sign-in action */
.account { position: relative; }

.account__toggle { padding-left: 8px; }
.account__toggle[aria-expanded="true"] { background: var(--hop-mist); }

.account__avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 30px;
	height: 30px;
	background: var(--hop-pale);
	border-radius: 50%;
	color: var(--hop);
	font-size: 14px;
	font-weight: 700;
}

.account__chevron { flex: none; transition: transform .2s; }
.account__toggle[aria-expanded="true"] .account__chevron { transform: rotate(180deg); }

.account__menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 248px;
	padding: 6px;
	background: rgba(255, 255, 255, .78);
	border-radius: 18px;
	box-shadow:
		inset 0 0 0 .5px rgba(255, 255, 255, .9),
		inset 0 1px 0 #fff,
		0 22px 40px -18px rgba(43, 43, 38, .5);
	-webkit-backdrop-filter: blur(22px) saturate(150%);
	backdrop-filter: blur(22px) saturate(150%);
	animation: account-open .16s ease-out;
}

.account__menu[hidden] { display: none; }

@keyframes account-open {
	from { opacity: 0; transform: translateY(-4px); }
}

.account__link {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 15px;
	transition: background-color .15s;
}

.account__link:hover { background: rgba(76, 97, 41, .12); }

.account__menu hr {
	height: 1px;
	margin: 6px 12px;
	background: rgba(76, 97, 41, .2);
	border: 0;
}

/* Site menu (Model.Menu, admin pages marked as menu items). NOT part of the approved design:
   a proposed slot, rendered only when the menu has items. A second header row of pills that
   scrolls sideways on phones, so the site needs no hamburger. */
.site-nav { border-top: 1px solid var(--line); }

.site-nav__list {
	display: flex;
	gap: 4px;
	padding-block: 6px;
	overflow-x: auto;
	scrollbar-width: none;
}

.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__link {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 15px;
	white-space: nowrap;
	transition: background-color .15s;
}

.site-nav__link:hover { background: var(--hop-mist); }
.site-nav__link[aria-current="page"] { background: var(--hop-mist); color: var(--hop); font-weight: 600; }

/* Slide */
.slide { padding-top: clamp(16px, 2.5vw, 24px); }

.slide a {
	display: block;
	overflow: hidden;
	border-radius: var(--radius-lg);
	aspect-ratio: 1500 / 550;
	background: var(--amber);
}

.slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Several slides (Slick, wwwroot/js/Home/Index.js). NOT part of the approved design: dots and
   arrows had no design, so they reuse the frosted look of the card's + button. One slide: no Slick. */
.slide__track { position: relative; }
.slide__track:not(.slick-initialized) > :not(:first-child) { display: none; }

.slide .slick-arrow {
	position: absolute;
	top: 50%;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .72);
	box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .9), inset 0 1px 0 #fff, 0 6px 14px -6px rgba(43, 43, 38, .4);
	color: var(--hop);
	cursor: pointer;
	transform: translateY(-50%);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
	transition: background-color .15s, color .15s;
}

.slide .slick-arrow:hover { background: var(--hop); color: #fff; }
.slide .slick-prev { left: 12px; }
.slide .slick-next { right: 12px; }

.slide .slick-dots {
	position: absolute;
	bottom: 12px;
	left: 50%;
	display: flex;
	gap: 6px;
	padding: 6px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .72);
	transform: translateX(-50%);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
}

.slide .slick-dots button {
	display: block;
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--line);
	font-size: 0;
	cursor: pointer;
	transition: width .2s, background-color .2s;
}

.slide .slick-dots .slick-active button { width: 20px; background: var(--hop); }

@media (max-width: 767px) {
	.slide .slick-arrow { display: none; }
}

/* The tasting flight: four glasses of real-looking beer behind frosted labels */
.flight { padding-top: clamp(12px, 1.5vw, 16px); }

.flight__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(8px, 1vw, 12px);
}

.pour {
	--level: 9%;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	min-height: clamp(250px, 27vw, 340px);
	padding: 10px;
	overflow: hidden;
	background: linear-gradient(#F8F9F4, #ECEFE3);
	border-radius: var(--radius-lg);
	box-shadow: 0 22px 36px -26px var(--shadow);
	color: var(--ink);
	outline-offset: 3px;
	transition: box-shadow .3s;
}

.pour:hover, .pour:focus-visible {
	--level: 3%;
	box-shadow: 0 26px 44px -22px var(--shadow);
}

/* Beer is lit from behind: brightest low in the glass, deepest at the edges */
.pour__liquid {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background:
		radial-gradient(90% 60% at 42% 66%, var(--glow), transparent 72%),
		linear-gradient(var(--beer-top), var(--beer-low));
	transform: translateY(var(--level));
	transition: transform .55s cubic-bezier(.3, 1.2, .5, 1);
	animation: pour 1.1s cubic-bezier(.2, .8, .3, 1) backwards;
	animation-delay: var(--delay);
}

/* The head */
.pour__liquid::before {
	content: '';
	position: absolute;
	inset: -2px 0 auto;
	z-index: 1;
	height: 96px;
	background: url("../images/beer-foam.svg") var(--foam-x) 0 / 640px 96px repeat-x;
}

/* Carbonation: a tall bubble texture drifting upward, looped seamlessly */
.pour__liquid::after {
	content: '';
	position: absolute;
	inset: 0 0 -640px;
	background: url("../images/beer-bubbles.svg") var(--foam-x) 0 / 320px 640px;
	opacity: var(--fizz);
	animation: fizz var(--fizz-time) linear infinite;
}

@keyframes pour { from { transform: translateY(101%); } }
@keyframes fizz { to { transform: translateY(-640px); } }

/* The glass itself: a bright rim and two reflections from a window */
.pour::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: inherit;
	background:
		linear-gradient(100deg, rgba(255, 255, 255, .3) 0, rgba(255, 255, 255, .08) 7%, transparent 15%),
		linear-gradient(262deg, rgba(255, 255, 255, .14) 0, transparent 5%);
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, .34),
		inset 0 1px 0 rgba(255, 255, 255, .7);
	pointer-events: none;
}

.pour__label {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(6px, .8vw, 10px);
	padding: clamp(10px, 1.1vw, 14px) 8px clamp(9px, 1vw, 12px);
	background: var(--plate);
	border-radius: 15px;
	box-shadow:
		inset 0 0 0 .5px rgba(255, 255, 255, .45),
		inset 0 1px 0 rgba(255, 255, 255, .4),
		0 8px 20px -10px rgba(30, 12, 4, .45);
	-webkit-backdrop-filter: blur(18px) saturate(125%);
	backdrop-filter: blur(18px) saturate(125%);
}

/* Detailed illustrations: they need this much room to read at all */
.pour img {
	width: auto;
	height: clamp(84px, 9vw, 124px);
	filter: drop-shadow(0 5px 5px rgba(30, 12, 4, .22));
	transition: transform .4s cubic-bezier(.3, 1.3, .5, 1);
}

.pour:hover img, .pour:focus-visible img { transform: translateY(-3px); }

.pour__name {
	max-width: 100%;
	font-size: clamp(18px, 1.95vw, 27px);
	overflow-wrap: anywhere;
	text-align: center;
}

.pour--straw {
	--beer-top: #EDC24A; --beer-low: #C98F1C; --glow: rgba(255, 236, 150, .75);
	--plate: rgba(255, 255, 255, .55); --shadow: #A87A18;
	--fizz: .7; --fizz-time: 19s; --foam-x: 0px; --delay: 0ms;
}

.pour--gold {
	--beer-top: #DC9326; --beer-low: #9C5610; --glow: rgba(255, 196, 92, .7);
	--plate: rgba(255, 255, 255, .58); --shadow: #8A4E10;
	--fizz: .6; --fizz-time: 23s; --foam-x: -210px; --delay: 110ms;
}

.pour--amber {
	--beer-top: #A4521A; --beer-low: #4F1F08; --glow: rgba(226, 112, 38, .6);
	--plate: rgba(255, 255, 255, .64); --shadow: #4F1F08;
	--fizz: .4; --fizz-time: 27s; --foam-x: -390px; --delay: 220ms;
}

/* Stout: a tan head, and only a hint of ruby where light gets through */
.pour--stout {
	--beer-top: #2C170C; --beer-low: #0F0704; --glow: rgba(112, 38, 16, .5);
	--plate: rgba(255, 255, 255, .68); --shadow: #1A0C05;
	--fizz: .14; --fizz-time: 36s; --foam-x: -540px; --delay: 330ms;
}

.pour--stout .pour__liquid::before { background-image: url("../images/beer-foam-stout.svg"); }

/* Special offer */
.offer { padding-block: clamp(48px, 7vw, 88px) clamp(40px, 6vw, 72px); }

.offer__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: clamp(20px, 3vw, 32px);
}

.offer__title { font-size: clamp(30px, 4.2vw, 52px); }

.button {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 10px 22px;
	border: 1.5px solid var(--hop);
	border-radius: 999px;
	color: var(--hop);
	font-weight: 600;
	transition: background-color .15s, color .15s;
}

.button:hover {
	background: var(--hop);
	color: #fff;
}

.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(28px, 3.5vw, 44px) clamp(12px, 2vw, 24px);
}

.product {
	position: relative;
	display: flex;
	flex-direction: column;
}

.product__media {
	position: relative;
	aspect-ratio: 1;
	margin-bottom: 14px;
	overflow: hidden;
	background: var(--hop-mist);
	border-radius: var(--radius-md);
	transition: background-color .2s;
}

.product:hover .product__media { background: var(--hop-pale); }

.product__media img {
	width: 100%;
	height: 100%;
	padding: 9%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

/* A square photo with no white around it fills the tile instead of floating in it */
.product__media--fill img {
	padding: 0;
	object-fit: cover;
	mix-blend-mode: normal;
}

/* Glass shared by the badge and the basket button */
.product__badge, .product__add {
	background: rgba(255, 255, 255, .72);
	box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .9), inset 0 1px 0 #fff, 0 6px 14px -6px rgba(43, 43, 38, .4);
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
}

.product__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 11px;
	border-radius: 999px;
	color: var(--amber);
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.product__add {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: var(--hop);
	cursor: pointer;
	transition: background-color .15s, color .15s, transform .25s cubic-bezier(.3, 1.6, .5, 1);
}

.product__add:hover, .product__add.is-added {
	background: var(--hop);
	color: #fff;
}

.product__add:active { transform: scale(.9); }
.product__add svg { grid-area: 1 / 1; }
.product__add-done, .is-added .product__add-plus { visibility: hidden; }
.is-added .product__add-done { visibility: visible; }

.product__name {
	display: -webkit-box;
	margin: 0 0 6px;
	overflow: hidden;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

/* The link covers the whole card, so the card has one link and the basket button can sit on top */
.product__name a::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--radius-md);
}

.product__name a:focus-visible { outline: 0; }

.product__name a:focus-visible::after {
	outline: 3px solid var(--hop);
	outline-offset: 3px;
}

.product:hover .product__name a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Pinned to the bottom so prices line up whatever the length of the name */
.price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 10px;
	margin: auto 0 0;
	font-size: 19px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.price--sale { color: var(--amber); }

.price del {
	color: var(--ink-soft);
	font-size: 15px;
	font-weight: 400;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Out of stock. NOT part of the approved homepage design: a proposed state, because the
   site has out-of-stock products. The card has no basket button in this state. */
.product--out .product__media img { opacity: .45; }

.product__stock {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 3px 11px;
	background: rgba(255, 255, 255, .72);
	border-radius: 999px;
	box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .9), inset 0 1px 0 #fff, 0 6px 14px -6px rgba(43, 43, 38, .4);
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
	-webkit-backdrop-filter: blur(12px) saturate(140%);
	backdrop-filter: blur(12px) saturate(140%);
}

/* Brands */
.brands {
	padding-block: clamp(24px, 3vw, 36px);
	border-top: 1px solid var(--line);
}

.brands__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
}

.brands img {
	width: auto;
	height: 60px;
	max-width: 130px;
	object-fit: contain;
}

/* Category page (Views/Categories/CategoryParent.cshtml, html/category.html): the category's
   subcategories as cards. Same card and heading as the homepage offer, without price or + button. */
.category { padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 88px); }

.category__head {
	display: flex;
	align-items: center;
	gap: clamp(14px, 2vw, 24px);
	margin-bottom: clamp(24px, 3.5vw, 40px);
}

.category__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: clamp(64px, 8vw, 96px);
	aspect-ratio: 1;
	background: var(--foam);
	border-radius: 50%;
}

.category__icon img { width: 62%; height: 62%; object-fit: contain; }

.category__title { font-size: clamp(30px, 4.2vw, 52px); }

.category__text {
	max-width: 60ch;
	margin: 8px 0 0;
	color: var(--ink-soft);
}

/* Product list (Views/Products/Products.cshtml, html/products.html): /products and
   /categories/{parent}/{child}/products. Filters on the left, the homepage card in a grid.
   wwwroot/js/Products/Products.js finds every control by its js-* class; these classes only style. */
.listing { padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 88px); }

.listing__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 24px;
	margin-bottom: clamp(24px, 3.5vw, 40px);
}

.listing__title { font-size: clamp(30px, 4.2vw, 52px); }

.listing__tools {
	display: flex;
	gap: 8px;
}

.listing__body {
	display: grid;
	grid-template-columns: 264px minmax(0, 1fr);
	align-items: start;
	gap: 40px clamp(24px, 3.5vw, 48px);
}

.listing .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Sort: a pill like the header search */
.select {
	min-height: 46px;
	padding: 10px 44px 10px 18px;
	background: var(--hop-mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234C6129' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 16px center / 16px no-repeat;
	border: 1px solid transparent;
	border-radius: 999px;
	outline: 0;
	color: inherit;
	font: inherit;
	font-size: 15px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s, background-color .15s;
}

.select:hover { background-color: var(--hop-pale); }
.select:focus-visible { background-color: #fff; border-color: var(--hop); }

/* Phones only: opens the filters in the slide panel */
.listing__filters-button {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 20px;
	background: #fff;
	border: 1.5px solid var(--hop);
	border-radius: 999px;
	color: var(--hop);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}

.listing__filters-button:hover { background: var(--hop); color: #fff; }

/* One filter: price, category tree or a checkbox list. Also used inside the slide panel. */
.filter {
	padding-block: 20px;
	border-top: 1px solid var(--line);
}

.filter__title {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	margin: 0;
	font-size: 15px;
	cursor: pointer;
}

.check__input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	background: #fff center / 14px no-repeat;
	border: 1.5px solid #B4BC9F;
	border-radius: 6px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .15s, border-color .15s;
}

.check:hover .check__input { border-color: var(--hop); }

.check__input:checked {
	background-color: var(--hop);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
	border-color: var(--hop);
}

/* Category tree: parents are headings, children are links; the current one is a pill */
.tree__parent {
	display: block;
	padding: 8px 0 4px;
	font-size: 15px;
	font-weight: 600;
}

.tree__parent.is-active { color: var(--hop); }

.tree__children { margin-bottom: 6px; }

.tree__link {
	display: flex;
	align-items: center;
	min-height: 36px;
	margin-left: -10px;
	padding: 6px 10px;
	border-radius: 10px;
	color: var(--ink-soft);
	font-size: 15px;
	line-height: 1.35;
	transition: background-color .15s, color .15s;
}

a.tree__link:hover { background: var(--hop-mist); color: var(--ink); }
.tree__link.is-active { background: var(--hop-mist); color: var(--hop); font-weight: 600; }

/* Price: bootstrap-slider (wwwroot/plugins/RangeSlider) builds .slider inside .range and sets an
   inline width; these rules override RangeSlider.css, which loads first */
.filter.range { padding-top: 0; border-top: 0; }

.range__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0 12px;
	margin-bottom: 6px;
}

.range__head .filter__title { margin: 0; }

.range__value {
	font-size: 15px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.range .slider.slider-horizontal {
	display: block;
	width: auto !important;
	height: 32px;
	margin-inline: 12px;
}

.range .slider.slider-horizontal .slider-track {
	top: 50%;
	height: 4px;
	margin-top: -2px;
	background: var(--line);
	border-radius: 999px;
	box-shadow: none;
}

.range .slider.slider-horizontal .slider-selection {
	background: var(--hop);
	border-radius: 999px;
	box-shadow: none;
}

.range .slider.slider-horizontal .slider-handle {
	top: 0;
	width: 24px;
	height: 24px;
	margin: -10px 0 0 -12px;
	background: #fff;
	border: 2px solid var(--hop);
	border-radius: 50%;
	box-shadow: 0 3px 8px -2px rgba(43, 43, 38, .35);
	opacity: 1;
	cursor: grab;
}

/* A finger-sized grab area around the handle */
.range .slider-handle::before {
	content: '';
	position: absolute;
	inset: -10px;
}

.range .tooltip, .range .slider input { display: none; }

.pager { margin-top: clamp(40px, 5vw, 64px); }

.pager__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.pager__link {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	transition: background-color .15s;
}

a.pager__link:hover { background: var(--hop-mist); }
.pager__link[aria-current="page"] { background: var(--hop); color: #fff; }

.listing__empty {
	display: grid;
	justify-items: center;
	gap: 16px;
	padding: clamp(40px, 6vw, 72px) 24px;
	background: var(--hop-mist);
	border-radius: var(--radius-lg);
	color: var(--ink-soft);
	text-align: center;
}

.listing__empty img { width: 126px; mix-blend-mode: multiply; }

.listing__empty p {
	margin: 0;
	color: var(--ink);
	font-size: 19px;
	font-weight: 600;
}

/* Filter panel on phones: wwwroot/plugins/zSlidePanel. Its own zSlidePanel.css loads first; these
   rules restyle it for the redesign and keep it working if that file changes. Clicking the close link or
   resizing past 767px puts the filters back (Products.js). */
.zSlidePanel-overlay {
	position: fixed;
	inset: 0;
	z-index: 450;
	background: rgba(43, 43, 38, .45);
	opacity: 0;
	transition: opacity .3s ease;
}

.zSlidePanel {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 500;
	width: min(340px, 100% - 48px);
	background: #fff;
	border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
	box-shadow: 0 0 40px -10px rgba(43, 43, 38, .5);
	transform: translateX(-105%);
	transition: transform .3s ease;
}

.zSlidePanel-opened .zSlidePanel-overlay { opacity: 1; }
.zSlidePanel-opened .zSlidePanel { transform: none; }

.zSlidePanel-body {
	position: absolute;
	inset: 0;
	padding: 72px 20px 32px;
	overflow: auto;
	overscroll-behavior: contain;
}

.close-zSlidePanel {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	background: var(--hop-mist);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .15s;
}

.close-zSlidePanel:hover { background: var(--hop-pale); }

.close-zSlidePanel i {
	position: relative;
	width: 16px;
	height: 16px;
}

.close-zSlidePanel i::before, .close-zSlidePanel i::after {
	content: '';
	position: absolute;
	top: 7px;
	left: 0;
	width: 16px;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transform: rotate(45deg);
}

.close-zSlidePanel i::after { transform: rotate(-45deg); }

/* Product page (Views/Products/Product.cshtml, html/product.html). Gallery and quantity behaviour
   come from wwwroot/js/Products/Product.js (Slick, numericInput); this only restyles them.
   .product-price and .product-needs-milling stay in the markup: Product.js finds them by class. */
.item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: start;
	gap: clamp(32px, 5vw, 80px);
	padding-block: clamp(32px, 5vw, 64px) clamp(48px, 7vw, 88px);
}

/* Stays in view while a long description scrolls past */
.item__gallery { position: sticky; top: 112px; min-width: 0; }

.item__photo, .item__thumb {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 1;
	background: var(--hop-mist);
}

.item__photo { border-radius: var(--radius-lg); }

.item__photo img, .item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.item__photo img { padding: 8%; }

/* Thumbnails: Slick shows four. A single photo needs no strip. */
.item__thumbs { margin-top: 12px; }
.item__thumbs:not(.slick-initialized), .item__thumbs:has(.slick-slide:only-child) { display: none; }
.item__thumbs .slick-list { margin-inline: -6px; }
.item__thumbs .slick-slide { padding-inline: 6px; cursor: pointer; }

.item__thumb {
	border: 2px solid transparent;
	border-radius: var(--radius-md);
	transition: border-color .15s;
}

.item__thumb img { padding: 10%; }
.item__thumbs .slick-slide:hover .item__thumb { border-color: var(--hop-pale); }
.item__thumbs .slick-current .item__thumb { border-color: var(--hop); }

/* More than four photos: Slick adds prev/next buttons (its theme CSS isn't loaded) */
.item__thumbs .slick-arrow {
	position: absolute;
	top: 50%;
	z-index: 1;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 2px 8px rgba(43, 43, 38, .15);
	color: transparent;
	font-size: 0;
	transform: translateY(-50%);
}

.item__thumbs .slick-prev { left: -6px; }
.item__thumbs .slick-next { right: -6px; }

.item__thumbs .slick-arrow::before {
	content: '';
	display: block;
	width: 9px;
	height: 9px;
	margin: auto;
	border: solid var(--ink);
	border-width: 0 2px 2px 0;
	transform: translateX(-2px) rotate(-45deg);
}

.item__thumbs .slick-prev::before { transform: translateX(2px) rotate(135deg); }
.item__thumbs .slick-disabled { opacity: 0; pointer-events: none; }

.item__info { min-width: 0; }

.item__title { font-size: clamp(32px, 4.2vw, 52px); overflow-wrap: anywhere; }

.item__code {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 14px 0 0;
	color: var(--ink-soft);
	font-size: 14px;
}

.item__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 12px;
	margin: 20px 0 0;
	font-size: 32px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
}

.item__price--sale { color: var(--amber); }

.item__price del {
	color: var(--ink-soft);
	font-size: 19px;
	font-weight: 400;
}

.item__specs { margin: 28px 0 0; }

.item__specs div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-block: 11px;
	border-bottom: 1px solid var(--line);
}

.item__specs div:first-child { border-top: 1px solid var(--line); }
.item__specs dt { color: var(--ink-soft); font-weight: 400; }
.item__specs dd { margin: 0; font-weight: 600; text-align: right; }

/* Milling: a switch that changes the price shown */
.item__milling {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 28px 0 0;
	font-weight: 600;
	cursor: pointer;
}

.item__switch {
	flex: none;
	position: relative;
	width: 48px;
	height: 28px;
	margin: 0;
	border-radius: 999px;
	background: var(--line);
	cursor: pointer;
	appearance: none;
	transition: background-color .2s;
}

.item__switch::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(43, 43, 38, .25);
	transition: transform .2s;
}

.item__switch:checked { background: var(--hop); }
.item__switch:checked::after { transform: translateX(20px); }

.item__buy {
	display: flex;
	gap: 12px;
	margin-top: 28px;
}

/* Quantity: one pill, the round buttons inside it */
.qty {
	flex: none;
	display: flex;
	align-items: center;
	height: 56px;
	padding: 4px;
	border: 1.5px solid var(--line);
	border-radius: 999px;
}

.qty__button {
	position: relative;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--ink);
	transition: background-color .15s;
}

.qty__button:hover { background: var(--hop-mist); }

.qty__button::before, .qty__button--plus::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transform: translate(-50%, -50%);
}

.qty__button--plus::after { transform: translate(-50%, -50%) rotate(90deg); }

.qty__input {
	width: 52px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	font: 600 18px/1 var(--font);
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.qty__input:focus-visible { outline-offset: 0; }

.item__add {
	position: relative;
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	padding: 10px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--hop);
	color: #fff;
	font: 600 17px/1.2 var(--font);
	transition: background-color .15s;
}

.item__add:hover { background: #3C4E1F; }
.item__add img { width: 22px; height: 22px; }

/* Product.js adds .is-loading while the basket call runs, then .is-loading-success */
.item__add.is-loading { pointer-events: none; }
.item__add.is-loading > * { opacity: 0; }

.item__add.is-loading::before {
	content: '';
	position: absolute;
	inset: 0;
	background: url("../images/icons/spinner_white.svg") center / 28px no-repeat;
}

.item__add.is-loading-success::before { background-image: url("../images/icons/success_white.svg"); }

.item__stock {
	margin: 28px 0 0;
	padding: 16px 20px;
	border-radius: var(--radius-md);
	background: var(--foam);
	font-weight: 600;
	text-align: center;
}

.item__text {
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--line);
}

.item__subtitle {
	margin: 0 0 12px;
	font-size: 19px;
	font-weight: 700;
}

.item__description { line-height: 1.75; overflow-wrap: anywhere; }
.item__description p { margin: 0 0 1em; }
.item__description img { height: auto; border-radius: var(--radius-md); }

@media (max-width: 767px) {
	.item { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.item__gallery { position: static; }
	.item__price { font-size: 28px; }
	.item__add { padding-inline: 16px; }
}

/* Footer */
.site-footer {
	background: var(--hop-pale);
	font-size: 15px;
}

.site-footer__main {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.4fr;
	gap: 32px clamp(24px, 4vw, 64px);
	padding-block: clamp(36px, 5vw, 56px);
}

.site-footer img.logo-footer { width: 196px; height: auto; }

.site-footer h2 {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
}

.site-footer li + li, .site-footer p + p { margin-top: 6px; }
.site-footer p { margin: 0; }

.site-footer__main a:not(.social):hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.social {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-top: 14px;
	background: var(--hop);
	border-radius: 50%;
}

.social img { width: 22px; height: 22px; }

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	padding-block: 16px;
	border-top: 1px solid rgba(76, 97, 41, .25);
	font-size: 14px;
}

.credit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.credit img { height: 18px; width: auto; }

/* Auth modals (Views/Auth/AuthModalsPartial.cshtml) on LayoutRedesign pages. The minimum carried
   over from style.css, which these pages do not load; layout comes from Bootstrap. No approved design yet. */
.hidden { display: none !important; }

.auth-modal { accent-color: var(--hop); }
.auth-modal .modal-dialog { width: 100%; max-width: 350px; margin-inline: auto; }
.auth-modal.signup-modal .modal-dialog { max-width: 640px; }
.auth-modal .modal-content { padding: 22px 20px; border: 0; border-radius: var(--radius-md); }
.auth-modal .modal-header,
.auth-modal .modal-body { padding: 0; border: 0; }
.auth-modal .modal-header { margin-bottom: 15px; }
.auth-modal .title { margin: 0; color: var(--hop) !important; font-size: 1.75rem; font-weight: 800; font-stretch: 70%; line-height: 1.1; }

.auth-modal .close-popup-btn {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	opacity: 1;
	transition: background-color .15s;
}

.auth-modal .close-popup-btn:hover { background: var(--hop-mist); }
.auth-modal .close-popup-btn svg { width: 12px; height: 12px; fill: var(--ink); }

.auth-modal .form-label { padding-left: 6px; color: var(--ink-soft); font-size: 14px; }
.auth-modal .form-control:focus { border-color: var(--hop); box-shadow: none; }

.auth-modal .controls { padding-top: 15px; text-align: center; }
.auth-modal .controls > div { margin-top: 12px; }

.auth-modal .btn-primary {
	width: 100%;
	max-width: 228px;
	padding: 11px 22px;
	background: var(--hop);
	border: 0;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
}

.auth-modal .btn-primary:hover,
.auth-modal .btn-primary:not(:disabled):not(.disabled):active { background: #3C4E1F; }

.auth-modal button.link {
	padding: 0;
	background: none;
	border: 0;
	color: var(--ink);
	font-size: 14px;
}

.auth-modal button.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.auth-modal .radio { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 14px; }

.auth-modal .error-text { display: none; padding: 2px 0 0 6px; color: #b61d22; font-size: 12px; }
.auth-modal .has-error .form-control { border-color: #b61d22; }
.auth-modal .has-error .error-text { display: block; }

@media (max-width: 991px) {
	.products { grid-template-columns: repeat(3, 1fr); }

	.listing__body { grid-template-columns: 220px minmax(0, 1fr); }
	.listing .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.site-header__row { grid-template-columns: auto 1fr; }
	.logo img { width: 148px; }
	.actions { justify-self: end; }
	.search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
	.action__label--collapsible { display: none; }
	.account__chevron { display: none; }
	.account__toggle { padding-inline: 7px; }

	/* Anchored to the header, not the avatar, so it stays on screen on narrow phones */
	.account { position: static; }
	.account__menu { top: calc(100% + 8px); right: var(--gutter); }

	/* Menu row runs to the screen edge so it reads as scrollable */
	.site-nav__list { width: auto; padding-inline: var(--gutter); }

	.flight__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pour { min-height: 250px; padding: 8px; }
	.pour__name { font-size: clamp(14px, 4.3vw, 24px); }

	/* One swipeable row, running to the screen edge; the next card peeks in to show there is more */
	.products {
		display: flex;
		gap: 12px;
		margin-inline: calc(-1 * var(--gutter));
		padding-inline: var(--gutter);
		overflow-x: auto;
		scroll-padding-inline: var(--gutter);
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.products::-webkit-scrollbar { display: none; }
	.product { flex: 0 0 42vw; scroll-snap-align: start; }

	.site-footer__main { grid-template-columns: 1fr; }

	/* Category page: a menu to choose from, not a row to browse, so two columns instead of the swipe row */
	.products--grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 12px;
		margin-inline: 0;
		padding-inline: 0;
		overflow: visible;
		scroll-snap-type: none;
	}

	/* Product list: filters move into the slide panel; title, then the filter button and sort side by side */
	.listing__head { display: block; }
	.listing__tools { flex-wrap: wrap; margin-top: 16px; }
	.listing__filters-button { display: inline-flex; }
	.listing__body { display: block; }
	.listing__filters { display: none; }
	.listing__filters-button { padding-inline: 14px; font-size: 14px; }
	/* 12.5rem fits the longest option ("ანბანი კლებადობით", 152px) plus padding. Where there isn't
	   that much room beside the button (360px phones), sort drops to its own full-width row. */
	.listing .select { flex: 1 1 12.5rem; min-width: 0; padding-inline: 14px 34px; background-position: right 12px center; font-size: 14px; text-overflow: ellipsis; }

	/* "მიუწვდომელია ონლაინ" can't fit one line on a 2-column phone card, so it spans the photo as a
	   centred two-line label. Product list only; the homepage offer cards are design-locked. */
	.listing .product__stock { left: 8px; right: 8px; bottom: 8px; padding: 4px 8px; border-radius: 12px; font-size: 13px; line-height: 1.3; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }

	/* zSlidePanel removes its elements on transitionend; with no transition the closed overlay would stay and block the page */
	.zSlidePanel { transition: transform 1ms !important; }
}
