.gift-product-detail,
.berry-catalog {
	--berry-accent: #05a7c4;
	--berry-accent-dark: #048da6;
	box-sizing: border-box;
	width: min(100%, 1480px);
	margin-inline: auto;
}

.gift-product-detail *,
.berry-catalog * {
	box-sizing: border-box;
}

.gift-product-detail:focus {
	outline: none;
}

.gift-product-layout {
	display: grid;
	grid-template-columns: 104px minmax(420px, 1fr) minmax(280px, 360px);
	grid-template-areas: "thumbs main info";
	gap: clamp(20px, 3vw, 48px);
	align-items: start;
}

.gift-thumb-column {
	grid-area: thumbs;
}

.gift-thumb-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 650px;
	padding: 3px;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: thin;
}

.gift-thumb {
	flex: 0 0 auto;
	width: 92px;
	height: 92px;
	padding: 3px;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 10px;
	background: #f7f7f7;
	cursor: pointer;
	transition: border-color 160ms ease, transform 160ms ease;
}

.gift-thumb:hover {
	transform: translateY(-1px);
}

.gift-thumb.is-active {
	border-color: var(--berry-accent);
}

.gift-thumb:focus-visible,
.gift-carousel-button:focus-visible,
.gift-consult-button:focus-visible {
	outline: 3px solid rgba(5, 167, 196, 0.35);
	outline-offset: 2px;
}

.gift-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.gift-main-column {
	grid-area: main;
	min-width: 0;
	text-align: center;
}

.gift-main-image {
	position: relative;
	display: grid;
	min-height: 420px;
	place-items: center;
	overflow: hidden;
	border-radius: 18px;
	background: #fafafa;
}

.gift-main-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 680px;
	object-fit: contain;
	border-radius: 18px;
}

.gift-carousel-button {
	position: absolute;
	top: 50%;
	display: grid;
	width: 44px;
	height: 44px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
	color: var(--berry-accent);
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	transform: translateY(-50%);
}

.gift-prev {
	left: 14px;
}

.gift-next {
	right: 14px;
}

.gift-image-note {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 14px;
	color: #777;
	font-size: 14px;
	line-height: 1.55;
}

.gift-carousel-counter {
	margin-top: 8px;
	color: #777;
	font-size: 14px;
}

.gift-product-info {
	grid-area: info;
	min-width: 0;
	padding: clamp(8px, 2vw, 30px) 0;
}

.gift-product-title {
	margin: 0 0 22px;
	color: #222;
	font-size: clamp(26px, 2.2vw, 38px);
	line-height: 1.25;
}

.gift-price {
	margin: 0 0 20px;
	color: var(--berry-accent);
	font-size: clamp(28px, 3vw, 42px);
	font-weight: 750;
	line-height: 1.15;
	overflow-wrap: anywhere;
}

.gift-product-size {
	display: flex;
	gap: 18px;
	justify-content: space-between;
	margin: 0 0 24px;
	padding: 14px 0;
	border-block: 1px solid #e8e8e8;
	color: #555;
}

.gift-product-size strong {
	color: #222;
	text-align: right;
	overflow-wrap: anywhere;
}

.gift-variant-grid {
	margin-bottom: 24px;
	color: #555;
	line-height: 1.75;
}

.gift-variant-grid p {
	margin: 0 0 8px;
}

.gift-consult-button {
	display: inline-flex;
	width: 100%;
	min-height: 50px;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 8px;
	background: var(--berry-accent);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: background 160ms ease, transform 160ms ease;
}

.gift-consult-button:hover {
	background: var(--berry-accent-dark);
	transform: translateY(-1px);
}

.gift-product-intro {
	margin-top: clamp(55px, 7vw, 100px);
}

.gift-product-intro h2 {
	margin: 0 0 28px;
	text-align: center;
}

.gift-product-intro-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(12px, 2vw, 24px);
}

.gift-product-intro-grid figure {
	margin: 0;
}

.gift-product-intro-grid img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}

.berry-product-empty {
	padding: 24px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
	text-align: center;
}

.berry-catalog-tools {
	display: grid;
	gap: 20px;
	margin-bottom: 32px;
}

.berry-search-box {
	display: flex;
	width: min(100%, 680px);
	margin-inline: auto;
	overflow: hidden;
	border: 2px solid var(--berry-accent);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 7px 24px rgba(5, 167, 196, 0.08);
}

.berry-search-input {
	flex: 1;
	min-width: 0;
	padding: 13px 20px;
	border: 0;
	background: transparent;
	font: inherit;
	outline: 0;
}

.berry-search-button {
	flex: 0 0 auto;
	padding: 10px 25px;
	border: 0;
	background: var(--berry-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.berry-category-filter {
	display: flex;
	gap: 10px;
	justify-content: center;
	overflow-x: auto;
	padding: 3px;
}

.berry-category-filter button {
	flex: 0 0 auto;
	padding: 8px 17px;
	border: 1px solid #ddd;
	border-radius: 999px;
	background: #fff;
	color: #444;
	cursor: pointer;
}

.berry-category-filter button.is-active {
	border-color: var(--berry-accent);
	background: var(--berry-accent);
	color: #fff;
}

.berry-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(18px, 2.5vw, 34px);
}

.berry-product-card[hidden] {
	display: none;
}

.berry-product-image {
	display: grid;
	width: 100%;
	aspect-ratio: 1 / 1;
	place-items: center;
	overflow: hidden;
	border-radius: 14px;
	background: #f7f7f7;
	color: inherit;
	text-decoration: none;
}

.berry-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 220ms ease, opacity 220ms ease;
}

a.berry-product-image:hover img {
	opacity: 0.94;
	transform: scale(1.025);
}

a.berry-product-image:focus-visible {
	outline: 3px solid var(--berry-accent);
	outline-offset: 3px;
}

.berry-product-image.is-unlinked {
	cursor: default;
}

.berry-product-name {
	margin: 14px 0 5px;
	font-weight: 650;
	line-height: 1.45;
}

.berry-catalog .berry-product-name-link {
	color: inherit;
	text-decoration: none;
}

.berry-catalog .berry-product-name-link:hover {
	color: var(--berry-accent);
}

.berry-catalog .berry-product-name-link:focus-visible {
	outline: 2px solid var(--berry-accent);
	outline-offset: 3px;
}

.berry-product-price {
	margin: 0;
	color: var(--berry-accent);
	font-weight: 700;
}

.berry-catalog-empty {
	margin: 40px 0;
	color: #777;
	text-align: center;
}

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

@media (max-width: 1050px) {
	.gift-product-layout {
		grid-template-columns: 100px minmax(0, 1fr);
		grid-template-areas:
			"thumbs main"
			"info info";
	}

	.gift-product-info {
		width: min(100%, 720px);
		margin-inline: auto;
	}

	.berry-product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.gift-product-intro-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.berry-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.gift-product-detail,
	.berry-catalog {
		width: 100%;
	}

	.gift-product-layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"main"
			"thumbs"
			"info";
		gap: 18px;
	}

	.gift-main-image {
		min-height: 260px;
		border-radius: 12px;
	}

	.gift-main-image img {
		max-height: 500px;
		border-radius: 12px;
	}

	.gift-thumb-list {
		flex-direction: row;
		max-height: none;
		padding-bottom: 7px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x proximity;
	}

	.gift-thumb {
		width: 76px;
		height: 76px;
		scroll-snap-align: start;
	}

	.gift-product-info {
		padding: 8px 0 0;
	}

	.gift-product-size {
		flex-direction: column;
		gap: 5px;
	}

	.gift-product-size strong {
		text-align: left;
	}

	.gift-carousel-button {
		width: 40px;
		height: 40px;
	}

	.gift-product-intro {
		margin-top: 52px;
	}

	.gift-product-intro-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.berry-product-grid {
		gap: 18px 12px;
	}

	.berry-search-button {
		padding-inline: 18px;
	}
}
