/* ==========================================================================
   Tentrend mini cart — header button + slide-in popup
   Styling follows STYLEGUIDE.md (tokens with literal fallbacks) and mirrors
   the offerte popup in style.css.
   ========================================================================== */

/* ==========================================================================
   01. Header cart button
   --------------------------------------------------------------------------
   Moved to the theme's globally loaded style.css (see the
   ".tt-main-header__cart" block there) so the header is styled by a single
   stylesheet on every page — including checkout — and cannot be broken by
   per-page CSS optimisation/caching that only bundles this sheet on some
   pages. Only the slide-in popup styling remains below.
   ========================================================================== */

/* ==========================================================================
   02. Popup shell (mirrors .tt-offerte-popup)
   ========================================================================== */

body.tt-cart-open {
	overflow: hidden;
}

.tt-cart-popup {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}

.tt-cart-popup[aria-hidden="true"] {
	visibility: hidden;
}

.tt-cart-popup[aria-hidden="false"] {
	visibility: visible;
	pointer-events: auto;
}

.tt-cart-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(34, 24, 16, 0.08);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 320ms ease;
}

.tt-cart-popup[aria-hidden="false"] .tt-cart-popup__backdrop {
	opacity: 1;
}

.tt-cart-popup__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 35.5vw;
	min-width: 340px;
	max-width: 495px;
	height: 100%;
	padding: 22px 34px 24px;
	background:
		radial-gradient(circle at right bottom, rgba(235, 212, 186, 0.62) 0%, rgba(235, 212, 186, 0) 34%),
		linear-gradient(180deg, #f4ead7 0%, #f1e6d3 100%);
	border-top-left-radius: 30px;
	border-bottom-left-radius: 30px;
	box-shadow: -18px 0 46px rgba(42, 28, 16, 0.12);
	transform: translateX(100%);
	transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tt-cart-popup[aria-hidden="false"] .tt-cart-popup__panel {
	transform: translateX(0);
}

.tt-cart-popup__panel.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

.tt-cart-popup__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	padding-top: 6px;
}

.tt-cart-popup__title {
	margin: 0;
	color: var(--tt-title, #3c1c09);
	font-family: var(--tt-font-heading, "Tiro Bangla", serif);
	font-size: clamp(1.38rem, 1.55vw, 1.7rem);
	line-height: 0.98;
	letter-spacing: -0.06em;
	font-weight: 500;
}

.tt-cart-popup__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(133, 111, 87, 0.28);
	border-radius: 50%;
	background: rgba(241, 230, 211, 0.9);
	color: #5f5344;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.tt-cart-popup__close:focus,
.tt-cart-popup__close:active {
	background: rgba(241, 230, 211, 0.9);
	border-color: var(--tt-gold, #997a38);
	color: #5f5344;
	outline: none;
}

.tt-cart-popup__close:hover,
.tt-cart-popup__close:focus-visible {
	background: var(--tt-gold, #997a38);
	border-color: var(--tt-gold, #997a38);
	color: #f6f1ed;
	outline: none;
}

/* The panel receives focus on open; never show a focus box on it. */
.tt-cart-popup__panel:focus,
.tt-cart-popup__panel:focus-visible {
	outline: none;
}

.tt-cart-popup__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	margin: 0 -6px;
	padding: 0 6px 4px;
	scrollbar-width: thin;
}

/* ==========================================================================
   03. Cart items
   ========================================================================== */

.tt-cart-empty {
	margin: 28px 0;
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tt-copy-soft, #615748);
}

.tt-cart-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tt-cart-item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--tt-border-soft, #dbd2c2);
}

/* Extensions added alongside a tent render smaller and slightly indented. */
.tt-cart-item--sub {
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 12px;
	padding: 12px 0 12px 14px;
}

.tt-cart-item--sub .tt-cart-item__media {
	width: 52px;
	height: 52px;
}

.tt-cart-item--sub .tt-cart-item__title {
	font-size: 1rem;
}

.tt-cart-item__media {
	width: 72px;
	height: 72px;
	overflow: hidden;
	border-radius: 10px;
	background: var(--tt-card-fallback, #d8d0c3);
}

.tt-cart-item__image,
.tt-cart-item__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tt-cart-item__info {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tt-cart-item__top {
	display: flex;
	align-items: center;
	gap: 8px;
}

.tt-cart-item__title {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-family: var(--tt-font-heading, "Tiro Bangla", serif);
	font-size: 1.18rem;
	line-height: 1.04;
	letter-spacing: -0.04em;
	font-weight: 500;
	color: var(--tt-title, #3c1c09);
}

.tt-cart-item__title a {
	color: inherit;
	text-decoration: none;
}

.tt-cart-item__title a:hover,
.tt-cart-item__title a:focus-visible {
	color: var(--tt-gold, #997a38);
}

.tt-cart-item__remove {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--tt-muted, #86796a);
	font-size: 1.2rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 180ms ease, color 180ms ease;
}

.tt-cart-item__remove:hover,
.tt-cart-item__remove:focus-visible {
	background: rgba(143, 106, 52, 0.12);
	color: #8f6a34;
	outline: none;
}

.tt-cart-item__attrs {
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--tt-copy-soft, #615748);
}

.tt-cart-item__attrs .variation,
.tt-cart-item__attrs dl {
	margin: 0;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 6px;
	row-gap: 2px;
}

.tt-cart-item__attrs dt {
	margin: 0;
	font-weight: 600;
}

.tt-cart-item__attrs dd {
	margin: 0;
}

.tt-cart-item__attrs p {
	margin: 0;
}

/* Quantity stepper — minimal, borderless, tight against the number.
   Scoped under .tt-cart-popup so it overrides the theme's generic input width. */
.tt-cart-popup .tt-cart-qty {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 0;
	background: transparent;
}

.tt-cart-popup .tt-cart-qty__btn {
	width: 15px;
	height: 16px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--tt-muted, #86796a);
	font-size: 0.72rem;
	line-height: 1;
	cursor: pointer;
	transition: color 160ms ease;
}

.tt-cart-popup .tt-cart-qty__btn:hover,
.tt-cart-popup .tt-cart-qty__btn:focus-visible {
	background: transparent;
	color: #8f6a34;
	outline: none;
}

.tt-cart-popup .tt-cart-qty__badge {
	min-width: 16px;
	padding: 0 2px;
	text-align: center;
	color: var(--tt-title, #3c1c09);
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1;
}

/* ==========================================================================
   04. Footer (request action)
   ========================================================================== */

.tt-cart-foot {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--tt-border-soft, #dbd2c2);
}

.tt-cart-action {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--tt-gold, #997a38);
	border-radius: 5px;
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
	transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.tt-cart-action--primary {
	background: var(--tt-gold, #997a38);
	border-color: var(--tt-gold, #997a38);
	color: #f6f1ed;
}

.tt-cart-action--primary:hover,
.tt-cart-action--primary:focus-visible {
	background: #8f6a34;
	border-color: #8f6a34;
	color: #fff7eb;
	outline: none;
}

/* ==========================================================================
   04b. Tent CTA (shown when an extension has no tent to couple to)
   ========================================================================== */

.tt-cart-tent-cta {
	margin-top: 8px;
	padding-top: 4px;
}

.tt-cart-tent-cta__label {
	margin: 0 0 6px;
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.58rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--tt-muted, #86796a);
	opacity: 0.85;
}

.tt-cart-tent-cta__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border: 1px solid var(--tt-gold, #997a38);
	border-radius: 8px;
	text-decoration: none;
	color: var(--tt-gold, #997a38);
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.74rem;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 500;
	transition: background-color 180ms ease, color 180ms ease;
}

.tt-cart-tent-cta__link:hover,
.tt-cart-tent-cta__link:focus-visible {
	background: var(--tt-gold, #997a38);
	color: #f6f1ed;
	outline: none;
}

.tt-cart-tent-cta__arrow {
	flex-shrink: 0;
	transition: transform 180ms ease;
}

.tt-cart-tent-cta__link:hover .tt-cart-tent-cta__arrow,
.tt-cart-tent-cta__link:focus-visible .tt-cart-tent-cta__arrow {
	transform: translateX(3px);
}

/* ==========================================================================
   05. Recommendations (cross-/up-sells)
   ========================================================================== */

.tt-cart-recos {
	margin-top: 8px;
	padding-top: 4px;
}

.tt-cart-recos__label {
	margin: 0 0 6px;
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.58rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--tt-muted, #86796a);
	opacity: 0.85;
}

.tt-cart-recos__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tt-cart-reco {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 4px;
	border-radius: 8px;
	transition: background-color 180ms ease;
}

.tt-cart-reco:hover {
	background: rgba(153, 122, 56, 0.07);
}

.tt-cart-reco__link {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	text-decoration: none;
	color: var(--tt-copy-mid, #5f5344);
}

.tt-cart-reco__media {
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	overflow: hidden;
	border-radius: 6px;
	background: var(--tt-card-fallback, #d8d0c3);
}

.tt-cart-reco__media img,
.tt-cart-reco__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tt-cart-reco__name {
	min-width: 0;
	font-family: "TT Chocolates", sans-serif;
	font-size: 0.74rem;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tt-cart-reco__link:hover .tt-cart-reco__name,
.tt-cart-reco__link:focus-visible .tt-cart-reco__name {
	color: var(--tt-gold, #997a38);
}

.tt-cart-reco__add {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid var(--tt-gold, #997a38);
	border-radius: 50%;
	background: transparent;
	color: var(--tt-gold, #997a38);
	font-size: 0.95rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.tt-cart-reco__add:hover,
.tt-cart-reco__add:focus-visible {
	background: var(--tt-gold, #997a38);
	color: #f6f1ed;
	outline: none;
}

.tt-cart-reco__add.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Product page add-to-cart loading state */
.tt-product-add-to-cart {
	cursor: pointer;
}

.tt-product-add-to-cart.is-loading,
.tt-product-add-to-cart.is-disabled,
.tt-product-add-to-cart:disabled {
	opacity: 0.7;
	pointer-events: none;
}

.tt-product-add-to-cart.is-disabled,
.tt-product-add-to-cart:disabled {
	cursor: not-allowed;
}

/* ==========================================================================
   06. Responsive
   ========================================================================== */

@media (max-width: 767px) {
	.tt-cart-popup__panel {
		width: 100vw;
		min-width: 0;
		max-width: 100vw;
		border-radius: 0;
		padding: 18px 20px 20px;
	}
}

/* ==========================================================================
   07. Knop-states vs. de parent-theme reset
   --------------------------------------------------------------------------
   Hello Elementor's reset.css vult elke <button> roze (#c36) met witte tekst
   op :hover en :focus. De regels hierboven staan op één class en verliezen
   daarvan zodra een knop focus krijgt — dus bij elke muisklik, bijvoorbeeld op
   het kruisje van een cartregel. Onderstaande regels staan op twee classes en
   zetten de bedoelde styling terug: :focus/:active houdt de rustkleur aan,
   :hover en :focus-visible geven het goud-accent. De hover-regels staan
   bewust ná de focus-regels, zodat hover wint als beide gelden.

   Niet geraakt en dus niet herhaald: .tt-cart-qty__btn (al onder
   .tt-cart-popup gescoped) en .tt-cart-popup__close (heeft hierboven al een
   eigen :focus/:active-regel).
   ========================================================================== */

.tt-cart-popup .tt-cart-item__remove:focus,
.tt-cart-popup .tt-cart-item__remove:active {
	background: transparent;
	color: var(--tt-muted, #86796a);
}

.tt-cart-popup .tt-cart-item__remove:hover,
.tt-cart-popup .tt-cart-item__remove:focus-visible {
	background: rgba(143, 106, 52, 0.12);
	color: #8f6a34;
	outline: none;
}

.tt-cart-popup .tt-cart-reco__add:focus,
.tt-cart-popup .tt-cart-reco__add:active {
	background: transparent;
	border-color: var(--tt-gold, #997a38);
	color: var(--tt-gold, #997a38);
}

.tt-cart-popup .tt-cart-reco__add:hover,
.tt-cart-popup .tt-cart-reco__add:focus-visible {
	background: var(--tt-gold, #997a38);
	border-color: var(--tt-gold, #997a38);
	color: #f6f1ed;
	outline: none;
}
