:root {
	--container: 1200px;
	--pad: clamp(12px, 4vw, 18px);

	--bg: #ffffff;
	--text: #3a3a3a;
	--muted: #777;

	--pink: #e882b3;
	--pink-2: #f7c5d8;
	--pink-3: #fde7f1;

	--r: 10px;
	--shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	--bottom-safe: env(safe-area-inset-bottom, 0px);
}

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

html,
body {
	height: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

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

a {
	color: inherit;
	text-decoration: none;
}

.container {
	width: min(100%, calc(var(--container) + var(--pad) * 2));
	margin-inline: auto;
	padding-inline: var(--pad);
}

.cart-page {
	max-width: 980px;
	margin-inline: auto;
}

.page__sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* top */
.top {
	padding: 16px 0 10px;
}

.top__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 8px 0 12px;
}

.top__logo {
	display: grid;
	place-items: center;
	margin: 8px 0 12px;
}

.top__head .top__logo {
	margin: 0;
}

.top__contacts {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.top__contact {
	height: 44px;
	width: 44px;
	border-radius: 10px;
	background: var(--pink-3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow);
	flex: 0 0 auto;
}

.top__contact-icon {
	width: 22px;
	height: 22px;
	display: block;
	object-fit: contain;
}

.top__contact--phone {
	width: auto;
	padding: 0 12px;
	gap: 8px;
}

.top__contact-phone {
	display: none;
	font-size: 14px;
	font-weight: 800;
	color: #4a4a4a;
	white-space: nowrap;
}

.logo {
	width: 92px;
	height: 92px;
	border-radius: 999px;
	background: var(--pink-2);
	display: grid;
	place-items: center;
	text-align: center;
	box-shadow: var(--shadow);
}

.logo__title {
	font-weight: 800;
	letter-spacing: 0.08em;
	font-size: 12px;
	color: #b23a6c;
}

.logo__sub {
	margin-top: 4px;
	font-size: 9px;
	letter-spacing: 0.18em;
	color: rgba(178, 58, 108, 0.7);
}

@media (max-width: 900px) {
	.top__head {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}

	.top__contacts {
		justify-content: flex-end;
		flex-wrap: nowrap;
	}

	.logo {
		width: 72px;
		height: 72px;
	}

	.top__contact--phone {
		width: 44px;
		padding: 0;
	}
}

@media (min-width: 901px) {
	.top__contact-phone {
		display: inline;
	}
}


/* chips */
.chips {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
	padding: 6px 0 12px;
}

.chips__item {
	display: inline-flex;
	align-items: center;
	height: 42px;
	padding: 0 14px;
	border-radius: var(--r);
	background: var(--pink-3);
	color: #4a4a4a;
	font-size: 15px;
	white-space: nowrap;
	flex: 0 0 auto;
}

.chips__item--active {
	background: var(--pink);
	color: #fff;
	font-weight: 700;
}

/* catalog grid */
.catalog {
	padding: 6px 0 40px;
}

.catalog__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
	justify-content: center;
	gap: 30px;
	padding: 10px 0 30px;
}

.product {
	width: 100%;
}

.product__media {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--r);
	overflow: hidden;
	background: #f3f3f3;
	box-shadow: var(--shadow);
}

.product__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product__title {
	margin: 12px 0 6px;
	font-size: 20px;
}

.product__price {
	font-size: 20px;
	color: var(--pink);
	font-weight: 700;
}

/* product page */
.page--product .page__main {
	padding-bottom: calc(130px + var(--bottom-safe));
}

/* Splide slider inside card */
.card__media--slider {
	border-radius: var(--r);
	overflow: hidden;
	background: #f3f3f3;
	box-shadow: var(--shadow);
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
}

.card__media--slider .splide {
	width: 100%;
}

.card__media--slider .splide__track {
	border-radius: var(--r);
	overflow: hidden;
}

.card__media--slider .splide__slide {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.card__media--slider .splide__slide::before {
	content: '';
	display: block;
	padding-top: 100%; /* 1:1 aspect ratio */
}

.card__media--slider .splide__slide .card__img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Arrows: white circles */
.card__media--slider .splide__arrow {
	background: rgba(255, 255, 255, 0.92);
	border: 0;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	opacity: 1;
	top: 50%;
	transform: translateY(-50%);
}

.card__media--slider .splide__arrow svg {
	width: 20px;
	height: 20px;
	fill: #333;
}

.card__media--slider .splide__arrow--prev {
	left: 12px;
}

.card__media--slider .splide__arrow--next {
	right: 12px;
}

/* Pagination: white dots at bottom */
.card__media--slider .splide__pagination {
	bottom: 14px;
	padding: 0;
	gap: 6px;
}

.card__media--slider .splide__pagination__page {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.55);
	border: 0;
	opacity: 1;
	margin: 0;
}

.card__media--slider .splide__pagination__page.is-active {
	background: #fff;
	transform: none;
}

@media (max-width: 600px) {
	.card__media--slider {
		max-width: 100%;
	}

	.card__media--slider .splide__arrow {
		width: 36px;
		height: 36px;
	}

	.card__media--slider .splide__arrow svg {
		width: 16px;
		height: 16px;
	}

	.card__media--slider .splide__arrow--prev {
		left: 8px;
	}

	.card__media--slider .splide__arrow--next {
		right: 8px;
	}

	.card__media--slider .splide__pagination {
		bottom: 10px;
	}

	.card__media--slider .splide__pagination__page {
		width: 8px;
		height: 8px;
	}
}

/* catalog pages with bottom action bar */
.page--catalog .page__main {
	padding-bottom: calc(90px + var(--bottom-safe));
}

.card {
	padding: 4px 0 26px;
}

.card__media {
	border-radius: var(--r);
	overflow: hidden;
	background: #f3f3f3;
	box-shadow: var(--shadow);
	width: 100%;
	max-width: 520px;
	aspect-ratio: 1 / 1;
	margin: 0 auto;
}

.card__img {
	/* width: 100%; */
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.card__body {
	padding: 10px 4px 0;
}

.card__title {
	margin: 14px 0 8px;
	font-size: 32px;
	font-weight: 500;
}

.card__price {
	color: var(--pink);
	font-size: 20px;
	margin-bottom: 12px;
}

.card__text {
	margin: 0 0 14px;
	font-size: 18px;
	color: var(--muted);
}

.card__list {
	margin: 0;
	padding-left: 18px;
	color: #666;
	font-size: 18px;
	line-height: 1.6;
}

.card-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	padding: 10px 0 20px;
}

.card-actions__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 16px;
	border-radius: 10px;
	background: var(--pink-3);
	color: #4a4a4a;
	font-weight: 700;
}

/* bottom action bar */
.action-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	background: #f6f6f6;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	padding: 10px 10px calc(10px + var(--bottom-safe));
	display: flex;
	justify-content: center;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.action-bar__btn {
	height: 44px;
	width: 150px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: #fff;
	color: #4a4a4a;
	font-weight: 800;
	letter-spacing: 0.06em;
	font-size: 12px;
}

.action-bar__count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--pink);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
}

.action-bar__count.is-hidden {
	display: none;
}

.action-bar__btn--main {
	width: 250px;
	background: var(--pink);
	color: #fff;
	border-color: rgba(0, 0, 0, 0.06);
}

.action-bar__svg {
	width: 22px;
	height: 22px;
	fill: #6b6b6b;
}

.action-bar__btn--main .action-bar__svg {
	fill: #fff;
}

@media (max-width: 600px) {
	.chips {
		justify-content: flex-start;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		/* Firefox */
		/* padding: 6px 0 12px; */
	}

	.chips::-webkit-scrollbar {
		display: none;
		/* Chrome/Safari */
	}

	.catalog__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		justify-content: stretch;
		gap: 14px;
	}

	.card-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.card-actions__btn {
		width: 100%;
	}

	.action-bar__btn--main {
		order: 1;
		width: 100%;
		max-width: 520px;
	}

	.action-bar__btn--side {
		order: 2;
		width: min(150px, calc(50% - 6px));
	}
}

.action-bar__icon-img {
	width: 24px;
	height: 24px;
	display: block;
	object-fit: contain;
}

/* cart page */
.cart-page__head {
	padding-top: 14px;
}

.cart-page__back {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	padding: 0 14px;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: #fff;
	box-shadow: var(--shadow);
	cursor: pointer;
}

.cart-page__back-icon {
	width: 24px;
	height: 24px;
	display: block;
	object-fit: contain;
}

.cart-page__back-text {
	font-size: 16px;
	font-weight: 700;
	color: #4a4a4a;
}

.cart-page__title {
	margin: 14px 0 16px;
	font-size: 28px;
	font-weight: 600;
}

.cart {
	padding: 10px 0 26px;
}

.cart__empty {
	margin: 0;
	padding: 16px;
	border-radius: 10px;
	background: var(--pink-3);
	color: #555;
	font-size: 18px;
}

.cart__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cart-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	border-radius: 10px;
	background: #fff;
	box-shadow: var(--shadow);
}

.cart-item__media {
	width: 90px;
	height: 90px;
	border-radius: 10px;
	overflow: hidden;
	background: #f3f3f3;
	flex: 0 0 auto;
}

.cart-item__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cart-item__info {
	flex: 1 1 auto;
	min-width: 0;
}

.cart-item__title {
	font-size: 20px;
	margin-bottom: 6px;
}

.cart-item__meta {
	font-size: 16px;
	color: var(--pink);
	font-weight: 700;
	margin-bottom: 10px;
}

.cart-item__qty {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--pink-3);
	border-radius: 10px;
	padding: 6px 10px;
}

.cart-item__qty-btn {
	height: 34px;
	width: 34px;
	border: 0;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	font-size: 18px;
}

.cart-item__qty-num {
	min-width: 20px;
	text-align: center;
	font-size: 18px;
	line-height: 1;
}

.cart-item__remove {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	font-size: 18px;
	color: #666;
	flex: 0 0 auto;
}

.cart__footer {
	margin-top: 16px;
	padding: 14px;
	border-radius: 10px;
	background: #fff;
	box-shadow: var(--shadow);
}

.cart__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	font-size: 18px;
}

.cart__label {
	color: #666;
}

.cart__value {
	font-weight: 800;
}

.cart__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 16px;
}

.cart__actions--top {
	padding-top: 14px;
}

.cart__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 16px;
	border-radius: 10px;
	background: var(--pink-3);
	color: #4a4a4a;
	font-weight: 700;
	border: 0;
	cursor: pointer;
}

.cart__btn--primary {
	background: var(--pink);
	color: #fff;
}

.cart__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	filter: grayscale(0.2);
}

/* checkout */
.checkout {
	margin-top: 10px;
}

.checkout__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.checkout__field {
	width: 100%;
}

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

.checkout__label {
	display: block;
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	color: #4a4a4a;
}

.checkout__input,
.checkout__textarea {
	width: 100%;
	border-radius: 10px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: #fff;
	padding: 12px 12px;
	font-size: 16px;
	outline: none;
}

.checkout__textarea {
	resize: vertical;
}

.checkout__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.checkout__radio {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--pink-3);
}

.checkout__radio-input {
	margin: 0;
}

.checkout__radio-text {
	font-size: 16px;
	font-weight: 700;
	color: #4a4a4a;
}

.checkout__input--time {
	width: min(160px, 100%);
}

.checkout__switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--pink-3);
}

.checkout__switch-input {
	margin: 0;
}

.checkout__switch-text {
	font-size: 16px;
	font-weight: 700;
	color: #4a4a4a;
}

.checkout__actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin: 16px 0;
	padding-bottom: 20px;
}

.checkout__hint {
	margin: 12px 0 0;
	text-align: center;
	font-size: 16px;
	color: #666;
}

.checkout__pickup {
	margin-top: 10px;
	padding: 12px 12px;
	border-radius: 10px;
	background: var(--pink-3);
	color: #555;
	font-size: 16px;
	font-weight: 600;
	text-align: center;
}

.checkout-success {
	margin-top: 16px;
	padding: 18px 16px;
	border-radius: 12px;
	background: var(--pink-3);
	box-shadow: var(--shadow);
	text-align: center;
}

.checkout-success__title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
}

.checkout-success__text {
	margin: 0;
	font-size: 16px;
	color: #666;
}

.checkout-success__actions {
	margin-top: 14px;
	padding-bottom: 0;
}

.messenger-dialog {
	border: 0;
	padding: 0;
	border-radius: 14px;
	width: min(520px, calc(100% - 32px));
	box-shadow: var(--shadow);
}

.messenger-dialog::backdrop {
	background: rgba(0, 0, 0, 0.45);
}

.messenger-dialog__inner {
	position: relative;
	margin: 0;
	padding: 18px 16px;
	background: #fff;
	border-radius: 14px;
}

.messenger-dialog__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	border: 0;
	background: var(--pink-3);
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	color: #4a4a4a;
}

.messenger-dialog__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 800;
}

.messenger-dialog__text {
	margin: 0;
	font-size: 16px;
	color: #666;
	line-height: 1.5;
}

.messenger-dialog__actions {
	margin-top: 14px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.messenger-dialog__wa {
	background: var(--pink-2);
}

.is-hidden {
	display: none !important;
}

@media (min-width: 1020px) {
	.chips {
		flex-wrap: nowrap;
	}

	/* product: image left, content right */
	.card {
		display: flex;
		gap: 26px;
		align-items: start;
		padding: 14px 0 26px;
	}

	.card__media {
		flex: 0 0 50%;
		max-width: 50%;
		width: auto;
		aspect-ratio: 1 / 1;
		margin: 0;
	}

	.card__media--slider {
		flex: 0 0 50%;
		max-width: 50%;
		width: auto;
		margin: 0;
	}

	.card__body {
		flex: 0 0 50%;
		padding: 6px 0 0;
	}

	.card__img {
		aspect-ratio: 1 / 1;
	}
}