/* Grizzly Den preview shop. Colours and type follow the podcast site:
   Roboto, white and greys, dark square buttons. */
:root {
	--ink: rgb(53, 53, 53);
	--ink-soft: rgb(102, 102, 102);
	--line: rgb(217, 217, 217);
	--panel: rgb(238, 238, 238);
	--footer: rgb(217, 217, 217);
	--white: #fff;
	--width: 1240px;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--white);
	color: var(--ink);
	font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

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

a {
	color: inherit;
}

h1,
h2 {
	margin: 0;
	font-weight: 500;
	line-height: 1.2;
}

.wrap {
	width: min(calc(100% - 32px), var(--width));
	margin-inline: auto;
}

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

:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* Header */
.site-header {
	border-bottom: 1px solid var(--panel);
	background: var(--white);
}

.site-header__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 15px 0;
}

.site-header__logo img {
	width: 80px;
	height: 80px;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	padding-bottom: 2px;
	border-bottom: 1px solid transparent;
	text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	border-bottom-color: currentColor;
}

/* Buttons */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 28px;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: var(--ink);
	color: var(--white);
	font: inherit;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover {
	background: rgb(30, 30, 30);
}

.button--light {
	background: var(--white);
	color: var(--ink);
}

.button--light:hover {
	background: var(--panel);
}

.button--wide {
	width: 100%;
}

/* Product page */
.product {
	display: grid;
	gap: 32px;
	padding: 40px 0 64px;
}

.gallery__main {
	border: 1px solid var(--panel);
	background: var(--white);
}

.gallery__main img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
}

.gallery__thumbs {
	display: flex;
	gap: 12px;
	margin-top: 12px;
}

.gallery__thumb {
	width: 84px;
	padding: 0;
	border: 1px solid var(--line);
	background: var(--white);
	cursor: pointer;
}

.gallery__thumb[aria-pressed="true"] {
	border-color: var(--ink);
	outline: 1px solid var(--ink);
}

.product__eyebrow {
	margin: 0 0 8px;
	color: var(--ink-soft);
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.product h1 {
	font-size: clamp(28px, 4vw, 40px);
}

.product__price {
	margin: 12px 0 0;
	font-size: 22px;
}

.product__price small {
	color: var(--ink-soft);
	font-size: 14px;
}

.product__lead {
	max-width: 46ch;
	margin: 16px 0 0;
	color: var(--ink-soft);
}

.field-label {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 500;
}

.sizes {
	margin: 28px 0 0;
	padding: 0;
	border: 0;
}

.sizes__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sizes__list label {
	position: relative;
}

.sizes__list input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.sizes__list span {
	display: grid;
	place-items: center;
	min-width: 56px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line);
	background: var(--white);
	font-weight: 500;
}

.sizes__list input:checked + span {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--white);
}

.sizes__list input:focus-visible + span {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.buy-row {
	display: flex;
	gap: 12px;
	margin-top: 24px;
}

.qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--line);
}

.qty button {
	width: 40px;
	border: 0;
	background: var(--white);
	color: var(--ink);
	font: inherit;
	font-size: 18px;
	cursor: pointer;
}

.qty button:hover {
	background: var(--panel);
}

.qty input {
	width: 44px;
	border: 0;
	border-inline: 1px solid var(--line);
	border-radius: 0;
	background: var(--white);
	color: var(--ink);
	font: inherit;
	font-weight: 500;
	text-align: center;
	appearance: textfield;
	-moz-appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.buy-row .button {
	flex: 1 1 auto;
}

.status {
	min-height: 24px;
	margin: 12px 0 0;
	font-size: 14px;
}

.details {
	margin: 28px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid var(--line);
}

.details h2 {
	margin-bottom: 8px;
	font-size: 16px;
}

.details ul {
	margin: 0;
	padding-left: 20px;
	color: var(--ink-soft);
}

.details li + li {
	margin-top: 4px;
}

/* Cart and checkout */
.page {
	padding: 40px 0 72px;
}

.page h1 {
	margin-bottom: 24px;
	font-size: clamp(28px, 4vw, 40px);
}

.empty {
	padding: 40px 0;
}

.empty p {
	margin: 0 0 20px;
	color: var(--ink-soft);
}

.cart-layout,
.checkout-layout {
	display: grid;
	gap: 32px;
	align-items: start;
}

.lines {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--line);
	list-style: none;
}

.line {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--line);
}

.line img {
	width: 84px;
	height: 84px;
	border: 1px solid var(--panel);
	object-fit: contain;
}

.line__name {
	margin: 0;
	font-weight: 500;
}

.line__meta {
	margin: 2px 0 8px;
	color: var(--ink-soft);
	font-size: 14px;
}

.line__remove {
	margin-left: 12px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink-soft);
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

.line__total {
	font-weight: 500;
	white-space: nowrap;
}

.summary {
	padding: 24px;
	background: var(--panel);
}

.summary h2 {
	margin-bottom: 16px;
	font-size: 18px;
}

.summary dl {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px 16px;
	margin: 0 0 20px;
}

.summary dt,
.summary dd {
	margin: 0;
}

.summary dd {
	text-align: right;
}

.summary .total {
	padding-top: 12px;
	border-top: 1px solid var(--line);
	font-size: 18px;
	font-weight: 500;
}

.summary__lines {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	font-size: 14px;
}

.summary__lines li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 4px 0;
}

.note {
	margin: 12px 0 0;
	color: var(--ink-soft);
	font-size: 14px;
}

.form-section {
	margin: 0 0 28px;
	padding: 0;
	border: 0;
}

.form-section legend {
	margin-bottom: 12px;
	padding: 0;
	font-size: 18px;
	font-weight: 500;
}

.form-grid {
	display: grid;
	gap: 12px;
}

.field label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
}

.field input,
.field select {
	width: 100%;
	min-height: 46px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 0;
	background: var(--panel);
	color: var(--ink);
	font: inherit;
}

.field input:focus,
.field select:focus {
	background: var(--white);
}

.payment-box {
	padding: 16px;
	border: 1px solid var(--line);
	color: var(--ink-soft);
}

.done {
	max-width: 620px;
	padding: 24px 0;
}

.done p {
	color: var(--ink-soft);
}

/* Footer */
.site-footer {
	padding: 40px 0;
	background: var(--footer);
}

.site-footer__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px 32px;
	font-size: 14px;
}

.site-footer p {
	margin: 0;
}

@media (min-width: 820px) {
	.product {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		gap: 56px;
		padding-top: 56px;
	}

	.cart-layout,
	.checkout-layout {
		grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
		gap: 48px;
	}

	.form-grid--two {
		grid-template-columns: 1fr 1fr;
	}

	.summary {
		position: sticky;
		top: 24px;
	}
}

@media (max-width: 480px) {
	.site-header__logo img {
		width: 60px;
		height: 60px;
	}

	.site-nav {
		gap: 6px 18px;
	}

	.buy-row {
		flex-wrap: wrap;
	}

	.line {
		grid-template-columns: 64px minmax(0, 1fr);
	}

	.line img {
		width: 64px;
		height: 64px;
	}

	.line__total {
		grid-column: 2;
	}
}
