/**
 * Home page shop: green promotion strip + category chips (the only two fixed elements),
 * category titles and product cards. Colors come from the brand variables (--fdk-*).
 * One column on phones, two columns from 860 px. No side column.
 *
 * --fdk-promo-h and --fdk-sticky-h are set by shop.js (heights of the fixed elements).
 */
body.admin-bar {
	--fdk-adminbar: 32px;
}

@media (max-width: 782px) {
	body.admin-bar {
		--fdk-adminbar: 46px;
	}
}

/* Below 600 px the WordPress admin bar scrolls away, so nothing to compensate. */
@media (max-width: 600px) {
	body.admin-bar {
		--fdk-adminbar: 0px;
	}
}

.fdk-shop {
	box-sizing: border-box;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 16px 24px;
	font-family: var(--fdk-font-text);
	color: var(--fdk-ink, #1B1011);
}

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

.fdk-shop__empty {
	margin: 32px 0;
	text-align: center;
	font-weight: 600;
}

/* ---------- Fixed: green promotion strip ---------- */
.fdk-promo {
	position: sticky;
	top: var(--fdk-adminbar, 0px);
	z-index: 31;
	background: var(--fdk-promo);
	color: #143A12;
	border: 1px solid #111;
	border-radius: 0 0 14px 14px;
	text-align: center;
	font-weight: 700;
	font-size: 13.5px;
	line-height: 1.35;
	padding: 9px 16px;
}

/* ---------- Fixed: category chips ---------- */
.fdk-rail {
	position: sticky;
	top: calc(var(--fdk-adminbar, 0px) + var(--fdk-promo-h, 0px));
	z-index: 30;
	margin: 0;
	padding: 0;
	background: var(--fdk-surface);
	border-bottom: 1px solid var(--fdk-line, #EADFDC);
	box-shadow: 0 4px 12px rgba(60, 0, 10, 0.1);
}

.fdk-rail__list {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	justify-content: center;
	/* Soft fade on the side that has more chips (shop.js sets --fdk-fade-l / --fdk-fade-r). */
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fdk-fade-l, 0px), #000 calc(100% - var(--fdk-fade-r, 0px)), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 var(--fdk-fade-l, 0px), #000 calc(100% - var(--fdk-fade-r, 0px)), transparent 100%);
}

.fdk-rail__list::-webkit-scrollbar {
	display: none;
}

.fdk-rail__list li {
	flex: none;
	margin: 0;
}

.fdk-chip {
	display: block;
	padding: 8px 18px;
	border: 1px solid #111;
	border-radius: 999px;
	background: #fff;
	color: #1B1011;
	font-weight: 700;
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
}

.fdk-chip[aria-current="true"] {
	background: var(--fdk-brand);
	color: var(--fdk-on-brand);
}

.fdk-chip:focus-visible,
.fdk-card__add:focus-visible {
	outline: 2px solid var(--fdk-brand);
	outline-offset: 2px;
}

/* ---------- Categories ---------- */
.fdk-shop .fdk-cat {
	padding-top: 28px;
	scroll-margin-top: calc(var(--fdk-adminbar, 0px) + var(--fdk-sticky-h, 0px) - 18px);
}

.fdk-shop .fdk-cat__title {
	margin: 0 0 16px;
	font-family: var(--fdk-font-title);
	font-weight: 800;
	font-size: 24px;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--fdk-ink, #1B1011);
}

.fdk-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

/* ---------- Cards ---------- */
.fdk-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid #111;
	border-radius: var(--fdk-radius-card, 24px);
	box-shadow: 0 2px 14px rgba(60, 20, 25, 0.08);
}

.fdk-card__photo {
	position: relative;
	aspect-ratio: 1 / 1;
	border-bottom: 1px solid #111;
	background: #F1E9E6;
}

.fdk-card__img,
.fdk-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fdk-card__placeholder {
	background: linear-gradient(135deg, #F1E9E6, #E3D6D2);
}

.fdk-card--soldout .fdk-card__img,
.fdk-card--soldout .fdk-card__placeholder {
	filter: grayscale(0.9) opacity(0.7);
}

.fdk-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #1B1011;
	color: #fff;
	border-radius: 999px;
	padding: 6px 12px;
	font-weight: 700;
	font-size: 12px;
	line-height: 1.2;
}

.fdk-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 18px;
}

.fdk-shop .fdk-card__name {
	margin: 0;
	font-family: var(--fdk-font-title);
	font-weight: 800;
	font-size: 18px;
	line-height: 1.2;
	color: var(--fdk-ink, #1B1011);
}

.fdk-shop .fdk-card__desc {
	margin: 0;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.45;
	color: #1B1011;
}

.fdk-card__buy {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 12px;
}

.fdk-card__price {
	font-weight: 800;
	font-size: 20px;
	color: var(--fdk-brand);
}

.fdk-card__add {
	appearance: none;
	border: 0;
	border-radius: 999px;
	background: var(--fdk-brand);
	color: var(--fdk-on-brand);
	font-family: inherit;
	font-weight: 700;
	font-size: 14px;
	padding: 12px 22px;
}

.fdk-card__add {
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.fdk-card__reserve {
	border-radius: 999px;
	background: #F1E9E6;
	color: #1B1011;
	font-weight: 700;
	font-size: 13px;
	padding: 11px 16px;
	text-align: center;
}

/* ---------- Desktop: two columns ---------- */
@media (min-width: 860px) {
	.fdk-grid {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.fdk-card {
		transition: transform 0.2s, box-shadow 0.2s;
	}

	.fdk-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 14px 30px rgba(60, 20, 25, 0.16);
	}
}

/* ---------- Phones: all text one point larger ---------- */
@media (max-width: 859px) {
	.fdk-promo {
		font-size: 14.5px;
	}

	.fdk-rail__list {
		justify-content: flex-start;
	}

	.fdk-chip {
		font-size: 14px;
	}

	.fdk-shop .fdk-cat__title {
		font-size: 25px;
	}

	.fdk-shop .fdk-card__name {
		font-size: 19px;
	}

	.fdk-shop .fdk-card__desc {
		font-size: 15px;
	}

	.fdk-card__price {
		font-size: 21px;
	}

	.fdk-card__add {
		font-size: 15px;
		padding: 13px 24px;
	}

	.fdk-card__reserve {
		font-size: 14px;
	}

	.fdk-card__badge {
		font-size: 13px;
	}
}

/* ---------- v0.5.1: chips keep their own colors in every state (no browser blue) ---------- */
.fdk-shop .fdk-chip,
.fdk-shop .fdk-chip:link,
.fdk-shop .fdk-chip:visited,
.fdk-shop .fdk-chip:hover,
.fdk-shop .fdk-chip:focus,
.fdk-shop .fdk-chip:active {
	background: #fff;
	border-color: #111;
	color: #1B1011;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

/* Hover only where there is a real mouse; on touch screens an unmarked chip is always white. */
@media (hover: hover) and (pointer: fine) {
	.fdk-shop .fdk-chip:hover {
		background: #F6EEEB;
	}
}

.fdk-shop .fdk-chip[aria-current="true"],
.fdk-shop .fdk-chip[aria-current="true"]:link,
.fdk-shop .fdk-chip[aria-current="true"]:visited,
.fdk-shop .fdk-chip[aria-current="true"]:hover,
.fdk-shop .fdk-chip[aria-current="true"]:focus,
.fdk-shop .fdk-chip[aria-current="true"]:active {
	background: var(--fdk-brand);
	border-color: #111;
	color: var(--fdk-on-brand);
}

/* ---------- v0.5.1: compact fixed area on phones ---------- */
@media (max-width: 859px) {
	.fdk-promo {
		font-size: 13px;
		line-height: 1.25;
		padding: 6px 12px;
	}

	.fdk-rail__list {
		padding: 6px 0;
	}

	.fdk-chip {
		padding: 7px 16px;
	}
}