/* Anda components. Tokens come from theme.json; this file only holds what it can't express. */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* ---------- Header ---------- */

/* Sticky on the template-part wrapper: the header's own parent is only as tall as the header,
   so a sticky .anda-header would never stick. */
.wp-site-blocks > .wp-block-template-part:first-child {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 20;
}

.anda-header {
	background: var(--wp--preset--color--oat);
}

/* Flex row: nav on the right, order on the left, logo centred on top. WooCommerce injects
   extra header blocks (account, mini-cart) after the navigation, so no fixed grid. */
.anda-header__bar.anda-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 48px;
	margin: 0;
	padding: 12px 16px;
}

.anda-header__logo.anda-header__logo {
	position: absolute;
	inset-inline-start: 50%;
	transform: translateX(50%);
	margin: 0;
}
.anda-header__order.anda-header__order { margin-inline-start: auto; }

/* Phone: the order button is a plain text link. */
.anda-header__order .wp-block-button__link {
	background: none;
	border: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

@media (min-width: 768px) {
	.anda-header {
		background: transparent;
		padding: 18px 24px 0;
	}

	.anda-header__bar.anda-header__bar {
		max-width: 1240px;
		margin-inline: auto;
		padding: 8px 22px 8px 10px;
		background: var(--wp--preset--color--oat);
		border-radius: var(--wp--custom--radius--pill);
		box-shadow: var(--wp--custom--shadow--float);
	}

	.anda-header__logo img { width: 104px; }

	.anda-header__order .wp-block-button__link {
		background: var(--wp--preset--color--sun);
		padding: 10px 24px;
		font-size: 15px;
		font-weight: 500;
	}

	/* Front page: the pill floats over the hero and stays put while you scroll. The wrapper is
	   transparent, so it lets clicks through everywhere except the pill itself. */
	body.home .wp-site-blocks > .wp-block-template-part:first-child {
		position: fixed;
		inset: var(--wp-admin--admin-bar--height, 0px) 0 auto;
		pointer-events: none;
	}

	body.home .anda-header__bar { pointer-events: auto; }
	body.home .anda-main { margin-block-start: 0; }
}

/* ---------- Hero ---------- */

.anda-hero.anda-hero {
	padding: 22px 18px;
	margin-block: 0;
}

.anda-hero .anda-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 0;
}

.anda-hero__title {
	margin: 0 0 16px;
	font-size: var(--wp--preset--font-size--hero);
}

.anda-hero .wp-block-cover__inner-container { width: 100%; }

/* Phone: music sits next to the order button. Desktop: bottom-left corner of the hero. */
.anda-hero .anda-music { align-self: center; }

.anda-hero .anda-music .wp-block-button__link {
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 400;
	color: var(--wp--preset--color--cream);
	border-color: rgba(251, 247, 238, 0.7);
	background: rgba(43, 33, 24, 0.15);
}

.anda-hero .anda-music .wp-block-button__link[aria-pressed="true"] {
	background: rgba(251, 247, 238, 0.2);
}

@media (min-width: 768px) {
	.anda-hero.anda-hero { padding: 36px 40px; }

	.anda-hero__actions { position: relative; }

	.anda-hero .anda-music {
		position: absolute;
		left: 0;
		bottom: 0;
	}
}

/* ---------- Footer ---------- */

.anda-footer {
	border-top: 1px solid var(--wp--preset--color--sand);
	padding: 36px 18px 44px;
	color: var(--wp--preset--color--bark);
	font-size: var(--wp--preset--font-size--small);
	line-height: 2;
}

.anda-footer p { margin: 0; }
.anda-footer a { color: inherit; }

.anda-footer .anda-footer__head {
	color: var(--wp--preset--color--espresso);
	font-weight: 500;
}

.anda-footer__cols.anda-footer__cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px 12px;
}

@media (min-width: 768px) {
	.anda-footer { padding-inline: 40px; }
	.anda-footer__cols.anda-footer__cols { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Shared ---------- */

.anda-label.anda-label {
	margin: 0 0 6px;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--bark);
}

/* ---------- Deals carousel ---------- */

.anda-deals.anda-deals {
	padding: 40px 18px;
	margin: 0;
}

.anda-deals__tabs {
	display: flex;
	justify-content: center;
	gap: 18px;
	margin-bottom: 32px;
	white-space: nowrap;
}

.anda-deals__tabs [role="tab"] {
	position: relative;
	padding: 0 0 12px;
	border: 0;
	background: none;
	font: inherit;
	font-size: 18px;
	color: var(--wp--preset--color--bark);
	cursor: pointer;
}

.anda-deals__tabs [aria-selected="true"] { color: var(--wp--preset--color--espresso); }

.anda-deals__tabs [aria-selected="true"]::after {
	content: "";
	position: absolute;
	bottom: 0;
	inset-inline-start: 50%;
	width: 5px;
	height: 5px;
	margin-inline-start: -2.5px;
	border-radius: 50%;
	background: var(--wp--preset--color--espresso);
}

.anda-deals__panel { display: none; }
.anda-deals__panel.is-active { display: block; }

/* Phone: one card and a bit, swiped sideways. position: relative makes the rail the containing
   block for WooCommerce's absolutely positioned image layers, which otherwise escape the
   scroller and widen the whole page. */
.anda-deals .wc-block-product-template.wc-block-product-template {
	position: relative;
	display: flex;
	gap: 14px;
	margin: 0 -18px;
	padding: 0 18px 4px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 18px;
	scrollbar-width: none;
	list-style: none;
}

.anda-deals .wc-block-product-template::-webkit-scrollbar { display: none; }

.anda-deals .wc-block-product-template > li {
	flex: 0 0 82%;
	width: auto;
	margin: 0;
	scroll-snap-align: start;
	text-align: start;
}

@media (min-width: 768px) {
	.anda-deals.anda-deals { padding: 64px 40px; }
	.anda-deals__tabs { gap: 28px; margin-bottom: 40px; }
	.anda-deals__tabs [role="tab"] { font-size: 22px; }

	.anda-deals .wc-block-product-template.wc-block-product-template {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
		margin: 0;
		padding: 0;
		overflow: visible;
	}
}

/* Product card (carousel and shop). */
.anda-card__image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--photo);
}

.anda-card__row.anda-card__row {
	gap: 12px;
	margin: 16px 0 4px;
}

.anda-card__title.anda-card__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--heading);
	font-weight: 500;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.anda-card__price.anda-card__price {
	margin: 0;
	flex: none;
	font-size: var(--wp--preset--font-size--heading);
	font-weight: 500;
	text-align: end;
}

.anda-card__desc.anda-card__desc {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.45;
	color: var(--wp--preset--color--bark);
}

.anda-card__desc .wp-block-post-excerpt__excerpt { margin: 0; }

.anda-card__link.anda-card__link {
	display: block;
	padding-top: 12px;
	border-top: 1px solid var(--wp--preset--color--sand);
	font-size: 15px;
	text-decoration: none;
}

/* ---------- Four ways ---------- */

.anda-ways.anda-ways {
	padding: 0 18px 40px;
	margin: 0;
}

.anda-ways__title.anda-ways__title { margin: 0 0 18px; }

.anda-way {
	border-top: 1px solid var(--wp--preset--color--sand);
}

.anda-way:last-of-type { border-bottom: 1px solid var(--wp--preset--color--sand); }

.anda-way > summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 0;
	font-size: 18px;
	list-style: none;
	cursor: pointer;
}

.anda-way > summary::-webkit-details-marker { display: none; }

.anda-way > summary::after {
	content: "+";
	font-size: 20px;
	color: var(--wp--preset--color--bark);
}

.anda-way[open] > summary::after { content: "−"; }

.anda-way > :not(summary) { margin-block: 0 16px; }
.anda-way p { font-size: 15px; color: var(--wp--preset--color--bark); }
.anda-way .wp-block-buttons { margin-bottom: 22px; }

.anda-way__img img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--photo);
}

.anda-ways__pics { display: none; }

@media (min-width: 768px) {
	.anda-ways.anda-ways { padding: 0 40px 64px; }
	.anda-ways__cols.anda-ways__cols { gap: 48px; align-items: stretch; }
	.anda-way > summary { font-size: 20px; }
	.anda-way__img { display: none; }

	.anda-ways__pics.anda-ways__pics { display: block; position: relative; min-height: 440px; }

	.anda-ways__img.anda-ways__img {
		display: none;
		height: 100%;
		margin: 0;
	}

	.anda-ways__img.is-active { display: block; }

	.anda-ways__img img {
		width: 100%;
		height: 100%;
		min-height: 440px;
		object-fit: cover;
		border-radius: var(--wp--custom--radius--photo);
	}
}

.anda-muted.anda-muted {
	font-size: 15px;
	color: var(--wp--preset--color--bark);
}

/* ---------- Customer club ---------- */

.anda-club.anda-club {
	padding: 40px 18px;
	margin: 0;
}

.anda-club__img-tall { display: none; }

.anda-club img,
.anda-about__img img {
	width: 100%;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--photo);
}

.anda-club__img-short img { height: 230px; }
.anda-club__img-short { margin-bottom: 22px; }
.anda-club h2,
.anda-about h2 { margin: 0 0 12px; }
.anda-club .anda-muted { margin: 0 0 20px; max-width: 440px; }

@media (min-width: 768px) {
	.anda-club.anda-club { padding: 64px 40px; }
	.anda-club__cols.anda-club__cols { gap: 32px; }
	.anda-club__img-tall { display: block; margin: 0; }
	.anda-club__img-tall img { height: 520px; }
	.anda-club__img-short img { height: 260px; }
	.anda-club__img-short { margin-bottom: 28px; }
}

/* ---------- About ---------- */

.anda-about.anda-about {
	padding: 40px 18px;
	margin: 0;
}

.anda-about__img { margin: 0 0 22px; }
.anda-about__img img { height: 210px; }
.anda-about__text .anda-muted { margin: 0 0 18px; max-width: 520px; }

@media (min-width: 768px) {
	.anda-about.anda-about { padding: 64px 40px; }
	.anda-about__img img { height: 340px; }
	.anda-about__img { margin-bottom: 28px; }
	.anda-about__text .anda-muted { margin: 0; }
}

/* ---------- Info band ---------- */

.anda-info.anda-info {
	padding: 28px 18px;
	margin: 0;
}

.anda-info h3 { margin: 0 0 14px; }
.anda-info .anda-muted { margin: 0; }
.anda-info__cols.anda-info__cols { gap: 28px; }

.anda-hours { margin: 0; }

.anda-hours > div {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-top: 1px solid var(--wp--preset--color--espresso);
	font-size: 15px;
}

.anda-hours > div:last-child { border-bottom: 1px solid var(--wp--preset--color--espresso); }
.anda-hours dd { margin: 0; direction: ltr; }

@media (min-width: 768px) {
	.anda-info.anda-info { padding: 48px 40px; }
	.anda-info__cols.anda-info__cols { gap: 40px; }
}

/* Plain pages built on the page-home template (contact). */
.anda-page-title.anda-page-title {
	margin: 0;
	padding: 40px 18px 24px;
}

@media (min-width: 768px) {
	.anda-page-title.anda-page-title { padding: 48px 40px 32px; max-width: 1240px; margin-inline: auto; }
}

/* ---------- Shop and category archives ---------- */

.anda-shop.anda-shop {
	padding: 24px 18px 56px;
	margin: 0;
}

.anda-shop__title.anda-shop__title { margin: 0 0 28px; }

.anda-shop .wc-block-product-template.wc-block-product-template {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.anda-shop .wc-block-product-template > li {
	width: auto;
	margin: 0;
	text-align: start;
}

@media (min-width: 768px) {
	.anda-shop.anda-shop { padding: 48px 40px 80px; }
	.anda-shop .wc-block-product-template.wc-block-product-template {
		grid-template-columns: repeat(3, 1fr);
		gap: 40px 24px;
	}
}

/* ---------- PAOU add-ons (RTL) ---------- */

/* PAOU pins its custom radio/checkbox to the left with left padding; mirror it for Hebrew. */
.rtl .pewc-radio-form-label,
.rtl .pewc-checkbox-form-label {
	padding-left: 0;
	padding-right: 35px;
}

.rtl .pewc-radio-form-label .pewc-theme-element,
.rtl .pewc-checkbox-form-label .pewc-theme-element {
	left: auto;
	right: 0;
}

.pewc-theme-element {
	border: 1px solid var(--wp--preset--color--espresso);
}

.pewc-product-extra-groups-wrap {
	margin-block: 8px 20px;
}

/* ---------- Single product ---------- */

.woocommerce-product-gallery__image img,
.wp-block-woocommerce-product-image-gallery img {
	border-radius: var(--wp--custom--radius--photo);
}

/* ---------- Header cart and side-cart drawer ---------- */

.anda-header__cart.anda-header__cart { margin-inline-start: auto; }
.anda-header__order.anda-header__order { margin-inline-start: 0; }

.anda-header__cart .wc-block-mini-cart__button { padding: 6px; color: var(--wp--preset--color--espresso); }

.anda-header__cart .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--espresso);
	color: var(--wp--preset--color--oat);
	font-weight: 500;
}

.wc-block-mini-cart__drawer .components-modal__content,
.wc-block-mini-cart__drawer .wc-block-components-drawer__content {
	background: var(--wp--preset--color--oat);
}

.wc-block-mini-cart__drawer .wp-block-woocommerce-mini-cart-title-block { font-size: 24px; font-weight: 400; }

.wc-block-mini-cart__drawer .wc-block-cart-item__image img { border-radius: 16px; }

.wc-block-mini-cart__drawer .wc-block-components-product-details { color: var(--wp--preset--color--bark); font-size: 13px; }

.wc-block-mini-cart__drawer .wc-block-components-quantity-selector {
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: #E9E1D2;
}

/* Upsell row */
.anda-upsells { padding: 16px 0 10px; border-top: 1px solid var(--wp--preset--color--sand); }
.anda-upsells[hidden] { display: none; }

.anda-upsells__title.anda-upsells__title {
	margin: 0 0 10px;
	padding: 0 16px;
	font-size: 17px;
	font-weight: 500;
}

.anda-upsells__rail {
	display: flex;
	gap: 10px;
	padding: 0 16px 4px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 16px;
	scrollbar-width: none;
}

.anda-upsells__rail::-webkit-scrollbar { display: none; }

.anda-upsell { flex: 0 0 112px; scroll-snap-align: start; }

.anda-upsell__media { position: relative; }

.anda-upsell__img {
	display: block;
	height: 104px;
	border-radius: 16px;
	overflow: hidden;
	background: #E9E1D2;
}

.anda-upsell__img img { width: 100%; height: 100%; object-fit: cover; }

.anda-upsell__add {
	position: absolute;
	bottom: 8px;
	left: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--oat);
	color: var(--wp--preset--color--espresso);
	font: inherit;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 2px 6px rgba(43, 33, 24, 0.15);
	cursor: pointer;
}

.anda-upsell__add.is-busy { opacity: 0.5; }

.anda-upsell__name.anda-upsell__name,
.anda-upsell__price.anda-upsell__price {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.3;
}

.anda-upsell__price.anda-upsell__price { margin-top: 2px; color: var(--wp--preset--color--bark); }

/* ---------- Option pills (PAOU) ---------- */

.anda-pills { padding: 18px 0 6px; border-top: 1px solid var(--wp--preset--color--sand); list-style: none; }

.anda-pills .pewc-field-label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: 18px;
	font-weight: 500;
}

.anda-pills .required,
.anda-pills .pewc-theme-element { display: none !important; }

.anda-pills__count { font-size: 14px; font-weight: 400; color: var(--wp--preset--color--bark); }

.anda-pills .pewc-description {
	margin: 2px 0 12px;
	font-size: 12px;
	color: var(--wp--preset--color--bark);
}

/* Option lists become wrapping rows of pills. */
.anda-pills .pewc-radio-images-wrapper,
.anda-pills .pewc-checkboxes-images-wrapper,
.anda-pills ul.pewc-radio-list,
.anda-pills .pewc-radio-list {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: flex-start !important;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.anda-pills .pewc-radio-checkbox-image-wrapper,
.anda-pills .pewc-radio-list li {
	display: block !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* PAOU lays swatches out as vertical tiles; force a horizontal pill. */
.anda-pill.anda-pill {
	position: relative;
	display: inline-flex !important;
	flex-direction: row !important;
	width: auto !important;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	margin: 0;
	padding: 3px 12px;
	border-radius: var(--wp--custom--radius--pill);
	background: #E9E1D2;
	color: var(--wp--preset--color--espresso);
	font-size: 14px;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.15s, color 0.15s;
}

.anda-pill:has(img) { padding-inline-start: 3px; }

.anda-pill input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.anda-pills .anda-pill img {
	flex: 0 0 32px !important;
	width: 32px !important;
	min-width: 32px !important;
	max-width: 32px !important;
	height: 32px !important;
	padding: 0 !important;
	border: 0 !important;
	margin: 0 !important;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

.anda-pill .pewc-radio-image-desc,
.anda-pill .pewc-radio-image-desc span { display: inline !important; width: auto !important; margin: 0; padding: 0; font: inherit; color: inherit; }

.anda-pill .pewc-radio-image-desc .pewc-option-cost-label,
.anda-pill .pewc-option-cost-label {
	font-size: 12px;
	color: var(--wp--preset--color--bark);
	/* The price span reads left-to-right, so the gap before the Hebrew name is on its right. */
	margin-right: 6px !important;
}

/* PAOU outlines chosen swatches; the pill's own colour shows the choice. */
.anda-pills .pewc-radio-checkbox-image-wrapper,
.anda-pills .pewc-radio-checkbox-image-wrapper.checked,
.anda-pills .pewc-radio-checkbox-image-wrapper label {
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

.anda-pills .pewc-item-field-wrapper { width: 100% !important; margin: 0 !important; padding: 0 !important; float: none !important; }

.anda-pill__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(43, 33, 24, 0.07);
	font-size: 14px;
	line-height: 1;
}

.anda-pill__mark::before { content: "+"; }
.anda-pill:has(input[type="radio"]:checked) .anda-pill__mark::before { content: "✓"; }
.anda-pill:has(input[type="checkbox"]:checked) .anda-pill__mark::before { content: "×"; }

.anda-pill:has(input:checked) {
	background: var(--wp--preset--color--espresso);
	color: var(--wp--preset--color--oat);
}

.anda-pill:has(input:checked) .pewc-option-cost-label { color: #CFC4B2; }
.anda-pill:has(input:checked) .anda-pill__mark { background: rgba(251, 247, 238, 0.16); }
.anda-pill:has(input:focus-visible) { outline: 2px solid var(--wp--preset--color--espresso); outline-offset: 2px; }

/* At the limit, unchosen extras dim. */
.anda-pills.is-full .anda-pill:not(:has(input:checked)) { opacity: 0.45; }

/* PAOU's totals table: the running total lives in the add-to-cart button instead. */
.pewc-total-field-wrapper { display: none; }

/* ---------- Add-to-cart bar ---------- */

.anda-buy-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
}

.anda-buy-bar .quantity { margin: 0; }

.anda-buy-bar .single_add_to_cart_button.single_add_to_cart_button {
	flex: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 13px 20px;
}

.anda-buy-bar .quantity .qty {
	width: 64px;
	height: 46px;
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	background: #E9E1D2;
	color: var(--wp--preset--color--espresso);
	font: inherit;
	font-size: 16px;
	text-align: center;
}

.anda-buy-bar .single_add_to_cart_button.single_add_to_cart_button {
	display: flex !important;
	flex: 1 1 auto !important;
	width: auto !important;
}

/* Phones: the bar stays on screen while you choose. */
@media (max-width: 767px) {
	.anda-buy-bar {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 15;
		margin: 0;
		padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--oat);
		border-top: 1px solid var(--wp--preset--color--sand);
	}

	body.single-product { padding-bottom: 84px; }
}
