/*
 * Happy Camper Usato Garantito
 * Usa le variabili --hc-* del tema Happy Camper quando presenti; altrimenti valori propri.
 */
.hcu-page, .hcu-grid, .hcu-empty, .hcu-lightbox {
	--u-bg: var(--hc-bg, #f3ecdd);
	--u-paper: var(--hc-paper, #fbf7ef);
	--u-ink: var(--hc-ink, #142321);
	--u-muted: var(--hc-muted, #3d4b48);
	--u-line: var(--hc-line, rgb(20 35 33 / .14));
	--u-accent: var(--hc-accent, #de8a2c);
	--u-accent-hover: var(--hc-accent-hover, #e89a40);
	--u-on-accent: var(--hc-on-accent, #142321);
	--u-deep: var(--hc-deep, #0f3d3a);
	--u-on-deep: var(--hc-on-deep, #f3ecdd);
	--u-mustard: var(--hc-mustard, #d9b437);
	--u-red: var(--hc-red, #cf3f2b);
	--u-teal: var(--hc-teal, #2e6a66);
	--u-r: var(--hc-radius, 24px);
	--u-r-sm: var(--hc-radius-sm, 12px);
	--u-display: var(--hc-font-display, inherit);
	--u-shadow: var(--hc-shadow, 0 18px 40px -18px rgb(15 61 58 / .3));
	--u-ease: cubic-bezier(.16, 1, .3, 1);
}
.hcu-icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: middle; }
.hcu-wrap { width: 100%; max-width: calc(1320px + 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.hcu-page { padding-bottom: clamp(48px, 6vw, 96px); color: var(--u-ink); }
.hcu-head { padding: 48px 0 24px; }
.hcu-head h1 { font-family: var(--u-display); font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: .95; margin: 0 0 12px; }

/* Pulsanti */
.hcu-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	min-height: 50px; padding: .8em 1.4em;
	border: 2px solid transparent; border-radius: 999px;
	font-weight: 700; font-size: 1rem; line-height: 1.1; white-space: nowrap;
	text-decoration: none; cursor: pointer;
	transition: transform .35s var(--u-ease), background-color .25s ease, color .25s ease, border-color .25s ease;
}
.hcu-btn .hcu-icon { font-size: 1.2em; }
.hcu-btn:hover { transform: translateY(-2px); text-decoration: none; }
.hcu-btn:active { transform: scale(.98); }
.hcu-btn--accent { background: var(--u-accent); color: var(--u-on-accent); }
.hcu-btn--accent:hover { background: var(--u-accent-hover); }
.hcu-btn--ghost { border-color: currentColor; color: inherit; background: transparent; }
.hcu-btn--dark { background: var(--u-ink); color: var(--u-bg); }
.hcu-btn--block { width: 100%; }

/* Filtri */
.hcu-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
.hcu-filters__types { display: flex; flex-wrap: wrap; gap: 8px; }
.hcu-chip {
	display: inline-flex; align-items: center; gap: 8px;
	padding: .55em 1.05em; border-radius: 999px;
	border: 1.5px solid var(--u-line); background: transparent;
	font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--u-ink);
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.hcu-chip:hover { border-color: var(--u-ink); }
.hcu-chip.is-active { background: var(--u-ink); color: var(--u-bg); border-color: var(--u-ink); }
.hcu-chip__n { font-size: .78em; opacity: .65; }
.hcu-filters__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hcu-select { position: relative; display: inline-flex; }
.hcu-select select {
	appearance: none; -webkit-appearance: none;
	min-height: 46px; padding: .5em 2.6em .5em 1.1em;
	border: 1.5px solid var(--u-line); border-radius: 999px;
	background: var(--u-paper); color: var(--u-ink); font: inherit; font-weight: 600; font-size: .95rem;
	cursor: pointer;
}
.hcu-select select:hover { border-color: var(--u-ink); }
.hcu-select .hcu-icon { position: absolute; right: 1em; top: 50%; transform: translateY(-50%); pointer-events: none; }
.hcu-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 1.1em; border-radius: 999px; border: 1.5px solid var(--u-line); background: var(--u-paper); font-weight: 600; font-size: .95rem; cursor: pointer; }
.hcu-toggle input { width: 18px; height: 18px; accent-color: var(--u-teal); margin: 0; }
.hcu-count { margin: 0 0 18px; font-weight: 600; color: var(--u-muted); }

/* Griglia e card */
.hcu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.hcu-card {
	position: relative; display: flex; flex-direction: column;
	background: var(--u-paper); color: var(--u-ink);
	border-radius: var(--u-r); overflow: hidden;
	box-shadow: var(--u-shadow);
	transition: transform .5s var(--u-ease), box-shadow .5s var(--u-ease);
}
.hcu-card:hover { transform: translateY(-4px); }
.hcu-card:focus-within { outline: 3px solid var(--u-accent); outline-offset: 3px; }
.hcu-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--u-deep); }
.hcu-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s var(--u-ease); }
.hcu-card:hover .hcu-card__img { transform: scale(1.05); }
.hcu-card__noimg { display: grid; place-items: center; height: 100%; color: var(--u-on-deep); font-size: 3rem; opacity: .6; }
.hcu-card--venduto .hcu-card__img { filter: grayscale(.85); opacity: .75; }
.hcu-badge {
	position: absolute; top: 14px; left: 14px; z-index: 1;
	padding: .4em .9em; border-radius: 999px;
	font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.hcu-badge--trattativa { background: var(--u-mustard); color: #142321; }
.hcu-badge--venduto { background: var(--u-red); color: #fff7ec; }
.hcu-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.hcu-card__type { margin: 0; font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--u-teal); }
@media (prefers-color-scheme: dark) { .hcu-card__type { color: var(--u-mustard); } }
.hcu-card__title { margin: 0; font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: 1.6rem; line-height: 1; }
.hcu-card__title a { text-decoration: none; color: inherit; }
.hcu-stretched::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.hcu-stretched:focus-visible { outline: none; }
.hcu-card__specs { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--u-muted); font-size: .92rem; }
.hcu-card__specs li { display: inline-flex; align-items: center; gap: 6px; }
.hcu-card__foot { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--u-line); }
.hcu-card__price { margin: 0; display: flex; flex-direction: column; line-height: 1; }
.hcu-card__price span { font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: 1.85rem; }
.hcu-card__price s { font-size: .9rem; color: var(--u-muted); margin-bottom: 4px; }
.hcu-card__price--text span { font-size: 1.35rem; }
.hcu-card__warranty { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: .35em .8em; border-radius: 999px; background: var(--u-teal); color: #f3ecdd; font-size: .8rem; font-weight: 700; white-space: nowrap; }

/* Vuoto */
.hcu-empty { padding: clamp(28px, 5vw, 56px); border: 2px dashed var(--u-line); border-radius: var(--u-r); text-align: center; color: var(--u-muted); }
.hcu-empty__title { font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: 1.8rem; color: var(--u-ink); margin-bottom: 8px; }

/* Vendi il tuo camper */
.hcu-sell {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
	margin-top: clamp(36px, 5vw, 64px);
	padding: clamp(26px, 4vw, 52px);
	border-radius: var(--u-r);
	background: var(--u-mustard); color: #142321;
}
.hcu-sell__title { margin: 0 0 6px; font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1; }
.hcu-sell__copy p { margin: 0; max-width: 56ch; }
.hcu-sell__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hcu-sell .hcu-btn--accent { background: #142321; color: #f3ecdd; }
.hcu-sell .hcu-btn--ghost { color: #142321; }

/* Scheda */
.hcu-single { padding-top: clamp(20px, 3vw, 36px); }
.hcu-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font-size: .9rem; color: var(--u-muted); }
.hcu-crumbs a { color: inherit; text-decoration: none; }
.hcu-crumbs a:hover { text-decoration: underline; }
.hcu-single__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.hcu-single__side { position: sticky; top: calc(var(--header-h, 78px) + 20px); display: grid; gap: 16px; }
.hcu-gallery-view__main {
	position: relative; display: block; width: 100%; padding: 0; border: 0;
	aspect-ratio: 4 / 3; border-radius: var(--u-r); overflow: hidden;
	background: var(--u-deep); cursor: zoom-in;
}
.hcu-gallery-view__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s ease; }
.hcu-gallery-view__count { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: .45em .9em; border-radius: 999px; background: rgb(20 35 33 / .78); color: #f3ecdd; font-weight: 700; font-size: .88rem; }
.hcu-thumbs { list-style: none; margin: 12px 0 0; padding: 0 0 6px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; }
.hcu-thumbs button { display: block; width: 96px; aspect-ratio: 4 / 3; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; opacity: .7; transition: opacity .2s ease, border-color .2s ease; }
.hcu-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hcu-thumbs button:hover, .hcu-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--u-accent); }
.hcu-h2 { margin: 0 0 18px; font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: clamp(1.7rem, 2.4vw, 2.3rem); line-height: 1; }
.hcu-specs, .hcu-desc, .hcu-extras { margin-top: clamp(32px, 4vw, 52px); }
.hcu-specs__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.hcu-spec { display: grid; gap: 4px; padding: 18px; border-radius: var(--u-r-sm); background: var(--u-paper); }
.hcu-spec__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 50%; background: var(--u-bg); color: var(--u-teal); font-size: 1.3rem; }
.hcu-spec__label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--u-muted); }
.hcu-spec__value { font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: 1.45rem; line-height: 1.05; }
.hcu-prose { max-width: 70ch; color: var(--u-muted); font-size: 1.06rem; }
.hcu-extras__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hcu-extras__list li { display: inline-flex; align-items: center; gap: 8px; padding: .5em 1em; border-radius: 999px; background: var(--u-paper); font-weight: 600; }
.hcu-extras__list .hcu-icon { color: var(--u-teal); }

.hcu-buy { padding: 28px; border-radius: var(--u-r); background: var(--u-paper); box-shadow: var(--u-shadow); }
.hcu-buy__type { margin: 0 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--u-teal); }
.hcu-buy__title { margin: 0 0 16px; font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: clamp(2rem, 2.6vw, 2.6rem); line-height: .98; }
.hcu-buy__price { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.hcu-buy__price span { font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: 2.6rem; line-height: 1; }
.hcu-buy__price s { color: var(--u-muted); font-size: 1.1rem; }
.hcu-buy__price--text span { font-size: 2rem; }
.hcu-buy__state { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; font-weight: 700; }
.hcu-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--u-teal); box-shadow: 0 0 0 4px rgb(46 106 102 / .2); }
.hcu-buy__state--trattativa .hcu-dot { background: var(--u-mustard); box-shadow: 0 0 0 4px rgb(217 180 55 / .25); }
.hcu-buy__state--venduto .hcu-dot { background: var(--u-red); box-shadow: 0 0 0 4px rgb(207 63 43 / .2); }
.hcu-buy__actions { display: grid; gap: 10px; }
.hcu-buy__sold { color: var(--u-muted); }
.hcu-warranty { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 24px; border-radius: var(--u-r); background: var(--u-deep); color: var(--u-on-deep); }
.hcu-warranty p { margin: 0 0 6px; color: rgb(243 236 221 / .85); font-size: .95rem; }
.hcu-warranty__title { font-family: var(--u-display); font-weight: 800; font-stretch: 75%; font-size: 1.6rem !important; line-height: 1; color: var(--u-on-deep) !important; margin-bottom: 8px !important; }
.hcu-warranty__seal { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--u-mustard); color: #142321; font-size: 1.7rem; }
.hcu-warranty__note { font-size: .88rem !important; opacity: .85; }
.hcu-related { margin-top: clamp(48px, 6vw, 88px); }

@media (max-width: 1000px) {
	.hcu-single__grid { grid-template-columns: 1fr; }
	.hcu-single__side { position: static; grid-row: 2; }
	.hcu-single__main { display: contents; }
	.hcu-gallery-view { grid-row: 1; }
	.hcu-specs, .hcu-desc, .hcu-extras { grid-row: auto; }
}

/* Lightbox */
.hcu-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 24px; background: rgb(8 24 22 / .94); color: #f3ecdd; }
.hcu-lightbox[hidden] { display: none; }
.hcu-lightbox__fig { margin: 0; display: grid; justify-items: center; gap: 10px; height: 100%; align-content: center; }
.hcu-lightbox__fig img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 12px; }
.hcu-lightbox__fig figcaption { font-weight: 700; opacity: .8; }
.hcu-lightbox__nav, .hcu-lightbox__close { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgb(243 236 221 / .5); background: transparent; color: inherit; font-size: 1.4rem; cursor: pointer; }
.hcu-lightbox__nav:hover, .hcu-lightbox__close:hover { background: #f3ecdd; color: #142321; }
.hcu-lightbox__close { position: absolute; top: 18px; right: 18px; }
@media (max-width: 700px) {
	.hcu-lightbox { grid-template-columns: 1fr; padding: 70px 10px 90px; }
	.hcu-lightbox__nav { position: absolute; bottom: 20px; }
	.hcu-lightbox__nav--prev { left: calc(50% - 64px); }
	.hcu-lightbox__nav--next { right: calc(50% - 64px); }
}
@media (prefers-reduced-motion: reduce) {
	.hcu-card, .hcu-card__img, .hcu-btn { transition: none; }
	.hcu-card:hover { transform: none; }
}
