/* Carshops — דף הבית. נטען רק בדף הבית כשהעיצוב פעיל. משתמש במשתני העיצוב של ccu.css */

/* השטח הלבן מתחת לתוכן: מקורו ב־padding-bottom של 70px בקבוצה העוטפת של תבנית העמוד,
   ובמרווח של main. בדף הבית התוכן נגמר באזור קולקציות עם ריווח משלו, לכן מאפסים את שניהם. */
body.ccu-home main.wp-block-group { margin-bottom: 0 !important; }
body.ccu-home main > .wp-block-group.alignfull.has-global-padding { padding-bottom: 0 !important; padding-top: 0 !important; }
body.ccu-home .wp-block-post-content > .ccu-home-v3 { margin-block: 0 !important; }

.ccu-home-v3 {
	--ch-gap: clamp(28px, 4vw, 48px);
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ch-gap);
	max-width: var(--wp--style--global--wide-size, 1340px);
	margin: 16px auto var(--ch-gap) !important;
	color: var(--ccu-ink);
}
.ccu-home-v3 > * { margin: 0 !important; }

.ch-btn {
	box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 46px; padding: 0 22px;
	border: 0; border-radius: 12px;
	background: var(--ccu-blue); color: #fff !important;
	font: inherit; font-size: 15px; font-weight: 800; line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: 0 10px 22px -12px rgba(8, 102, 198, .8);
	transition: background .15s, transform .15s var(--ccu-ease), box-shadow .2s;
}
.ch-btn:hover { background: var(--ccu-blue-600); transform: translateY(-1px); }
.ch-btn:focus-visible { outline: 3px solid rgba(8, 102, 198, .4); outline-offset: 3px; }
.ch-btn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; transform: none; }
.ch-btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.ch-btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

.ch-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ch-head__title { margin: 0 !important; font-size: clamp(22px, 1.4vw + 14px, 28px) !important; font-weight: 800; color: var(--ccu-navy); letter-spacing: -.01em; }
.ch-head__link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 800; color: var(--ccu-blue) !important; text-decoration: none !important; white-space: nowrap; }
.ch-head__link:hover { text-decoration: underline !important; }

/* ---------------------------------------------------------------- 1. Hero */

.ch-hero {
	position: relative; isolation: isolate;
	box-sizing: border-box;
	display: grid; align-items: center; justify-items: end;
	min-height: 360px;
	padding: 30px clamp(24px, 4vw, 60px) 86px;
	border-radius: 24px;
	overflow: hidden;
	background: #0b1626;
	color: #fff;
}
.ch-hero__bg { position: absolute; inset: 0; z-index: -2; }
.ch-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; display: block; }
.ch-hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(to right, rgba(8, 16, 30, .95) 0%, rgba(8, 16, 30, .86) 36%, rgba(8, 16, 30, .3) 60%, rgba(8, 16, 30, 0) 76%),
		linear-gradient(to top, rgba(8, 16, 30, .5), rgba(8, 16, 30, 0) 45%);
}
.ch-hero__text { max-width: min(540px, 48%); text-align: end; }
.ch-hero__title {
	margin: 0 !important;
	font-size: clamp(30px, 2.2vw + 12px, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -.015em;
	color: #fff !important;
	text-wrap: balance;
}
.ch-hero__title span {
	display: block; margin-top: 6px;
	font-size: .78em;
	background: linear-gradient(90deg, #4aa6ff, #1f7fe6);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.ch-hero__desc { margin: 12px 0 20px !important; margin-inline-start: auto !important; max-width: 46ch; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .85); }

/* ---------------------------------------------------------------- 2. חיפוש לפי רכב */

.ch-search {
	position: relative; z-index: 2;
	margin-top: calc(-1 * var(--ch-gap) - 64px) !important;
	margin-inline: clamp(12px, 2.5vw, 32px) !important;
	padding: 22px 24px;
	border: 1px solid var(--ccu-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: var(--ccu-shadow-lg);
}
.ch-search__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ch-search__icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--ccu-blue-050); color: var(--ccu-blue); }
.ch-search__title { margin: 0 !important; font-size: 20px !important; font-weight: 800; color: var(--ccu-navy); }
.ch-search__sub { margin: 2px 0 0 !important; font-size: 14px; color: var(--ccu-muted); }

.ch-search__form { display: grid; gap: 14px; }
.ch-seg { display: inline-flex; justify-self: start; gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: 12px; background: var(--ccu-soft); }
.ch-seg label { position: relative; margin: 0; }
.ch-seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.ch-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; box-sizing: border-box; padding: 0 18px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ccu-muted); transition: background .15s, color .15s, box-shadow .15s; }
.ch-seg input:checked + span { background: #fff; color: var(--ccu-blue); box-shadow: 0 1px 3px rgba(15, 30, 51, .12); }
.ch-seg input:focus-visible + span { outline: 3px solid rgba(8, 102, 198, .3); }

.ch-search__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 12px; }
.ch-field { display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 700; color: var(--ccu-navy); }
.ch-field select {
	width: 100%; height: 52px;
	padding: 0 14px 0 38px;
	border: 1px solid var(--ccu-line); border-radius: 12px;
	background: var(--ccu-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6b80' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center;
	appearance: none; -webkit-appearance: none;
	font: inherit; font-size: 15px; font-weight: 400; color: var(--ccu-ink);
}
.ch-field select:focus-visible { outline: none; border-color: var(--ccu-blue); background-color: #fff; box-shadow: 0 0 0 4px rgba(8, 102, 198, .16); }
.ch-field select:disabled { opacity: .6; cursor: not-allowed; }
.ch-search__btn { height: 52px; white-space: nowrap; }
.ch-search__status:empty { display: none; }
.ch-search__status { margin: 0 !important; font-size: 13px; color: var(--ccu-muted); }

/* ---------------------------------------------------------------- 3. קטגוריות */

.ch-cats__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0 !important; padding: 0 !important; list-style: none; }
.ch-cat {
	position: relative; isolation: isolate;
	display: block; aspect-ratio: 5 / 4;
	border-radius: 18px; overflow: hidden;
	background: #0b1626;
	text-decoration: none !important; color: #fff !important;
	box-shadow: 0 1px 2px rgba(15, 30, 51, .08);
	transition: transform .3s var(--ccu-ease), box-shadow .3s var(--ccu-ease);
}
.ch-cat img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ccu-ease); }
.ch-cat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(6, 14, 28, .92) 0%, rgba(6, 14, 28, .55) 38%, rgba(6, 14, 28, 0) 70%); }
.ch-cat:hover { transform: translateY(-4px); box-shadow: var(--ccu-shadow-lg); }
.ch-cat:hover img { transform: scale(1.05); }
.ch-cat:focus-visible { outline: 3px solid rgba(8, 102, 198, .5); outline-offset: 3px; }
.ch-cat__body { position: absolute; inset: auto 0 0 0; display: grid; justify-items: center; gap: 10px; padding: 16px 12px; text-align: center; }
.ch-cat__name { font-size: 16px; font-weight: 800; line-height: 1.25; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.ch-cat__cta { padding: 6px 16px; border-radius: 999px; background: #fff; color: var(--ccu-navy); font-size: 13px; font-weight: 800; transition: background .15s, color .15s; }
.ch-cat:hover .ch-cat__cta { background: var(--ccu-blue); color: #fff; }

/* ---------------------------------------------------------------- 4. יתרונות */

.ch-trust { margin: 0 !important; }

/* ---------------------------------------------------------------- 5. מוצרים נבחרים */

.ch-products__list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 0 !important; padding: 0 !important; list-style: none; }
.ch-card {
	display: flex; flex-direction: column;
	padding: 12px;
	border: 1px solid var(--ccu-line); border-radius: 16px;
	background: #fff;
	transition: border-color .2s, box-shadow .25s var(--ccu-ease), transform .25s var(--ccu-ease);
}
.ch-card:hover { border-color: #cbd9ea; box-shadow: var(--ccu-shadow); transform: translateY(-3px); }
.ch-card__img { display: block; aspect-ratio: 1; margin-bottom: 10px; border-radius: 12px; overflow: hidden; background: var(--ccu-soft); }
.ch-card__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .4s var(--ccu-ease); }
.ch-card:hover .ch-card__img img { transform: scale(1.04); }
.ch-card__title { margin: 0 !important; font-size: 14px !important; line-height: 1.4; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.ch-card__title a { color: var(--ccu-ink) !important; text-decoration: none !important; }
.ch-card__title a:hover { color: var(--ccu-blue) !important; }
.ch-card__price { margin-top: auto; padding-top: 10px; font-size: 19px; font-weight: 800; color: var(--ccu-navy); font-variant-numeric: tabular-nums; }
.ch-card__price del { font-size: 13px; font-weight: 500; color: var(--ccu-muted); }
.ch-card__price ins { text-decoration: none; }
.ch-card__btn { width: 100%; min-height: 42px; margin-top: 10px; font-size: 14px; gap: 8px; }
.ch-card__btn.loading { opacity: .7; }
.ch-card__btn.added::after { content: "✓"; }
.ch-card .added_to_cart { display: block; margin-top: 6px; text-align: center; font-size: 13px; font-weight: 700; color: var(--ccu-blue) !important; }

/* ---------------------------------------------------------------- 6. יצרנים */

.ch-makes .ccu-makes { margin: 0 !important; }

/* ---------------------------------------------------------------- 7. באנרים משניים */

.ch-promos__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 !important; padding: 0 !important; list-style: none; }
.ch-promo {
	position: relative; isolation: isolate;
	display: flex; align-items: center;
	min-height: 168px; padding: 22px 24px;
	border-radius: 18px; overflow: hidden;
	background: #0b1626;
	color: #fff !important; text-decoration: none !important;
	transition: transform .3s var(--ccu-ease), box-shadow .3s var(--ccu-ease);
}
.ch-promo img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; transition: transform .6s var(--ccu-ease); }
.ch-promo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, rgba(8, 16, 30, .94) 0%, rgba(8, 16, 30, .8) 45%, rgba(8, 16, 30, .15) 100%); }
.ch-promo:hover { transform: translateY(-3px); box-shadow: var(--ccu-shadow-lg); }
.ch-promo:hover img { transform: scale(1.04); }
.ch-promo__body { display: grid; justify-items: start; gap: 6px; margin-inline-start: auto; text-align: end; justify-items: end; }
.ch-promo__title { margin: 0 !important; font-size: 21px !important; font-weight: 800; color: #fff !important; }
.ch-promo__desc { font-size: 14px; color: rgba(255, 255, 255, .82); margin-bottom: 8px; }

/* ---------------------------------------------------------------- טאבלט */

@media (max-width: 1180px) {
	.ch-products__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
	.ch-search__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ch-search__btn { grid-column: 1 / -1; }
	.ch-cats__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ch-promos__list { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- מובייל */

@media (max-width: 781px) {
	.ccu-home-v3 { margin-top: 10px !important; }
	.ch-hero { min-height: 300px; padding: 22px 18px 76px; border-radius: 18px; justify-items: stretch; align-items: end; }
	.ch-hero::after { background: linear-gradient(to top, rgba(8, 16, 30, .95) 0%, rgba(8, 16, 30, .75) 50%, rgba(8, 16, 30, .2) 100%); }
	.ch-hero__bg img { object-position: 60% 30%; }
	.ch-hero__text { max-width: none; text-align: start; }
	.ch-hero__desc { margin: 10px 0 16px !important; font-size: 14px; }
	.ch-hero .ch-btn--lg { width: 100%; min-height: 48px; }

	.ch-search { margin-top: calc(-1 * var(--ch-gap) - 50px) !important; margin-inline: 8px !important; padding: 16px; border-radius: 16px; }
	.ch-search__icon { width: 44px; height: 44px; }
	.ch-search__title { font-size: 18px !important; }
	.ch-seg { justify-self: stretch; }
	.ch-seg label { flex: 1; }
	.ch-seg span { text-align: center; }
	.ch-search__fields { grid-template-columns: 1fr; gap: 10px; }

	.ch-cats__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ch-cats__list > li:first-child { grid-column: 1 / -1; }
	.ch-cats__list > li:first-child .ch-cat { aspect-ratio: 16 / 9; }
	.ch-cat__name { font-size: 14px; }
	.ch-cat__cta { padding: 5px 12px; font-size: 12px; }

	.ch-products__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ch-card { padding: 8px 8px 10px; }
	.ch-card__price { font-size: 17px; }
	.ch-card__btn { font-size: 13px; padding: 0 8px; }

	.ch-promo { min-height: 140px; padding: 18px; }
	.ch-promo::after { background: linear-gradient(to right, rgba(8, 16, 30, .95) 0%, rgba(8, 16, 30, .85) 60%, rgba(8, 16, 30, .35) 100%); }
	.ch-promo__title { font-size: 18px !important; }
}

@media (max-width: 359px) {
	.ch-products__list { grid-template-columns: 1fr; }
	.ch-cats__list { grid-template-columns: 1fr; }
}


/* ---- Carshops QA 2026-10-30: חיפוש לפי רכב ברוחב ביניים (901-1250px) ותוצאות ברוחב מלא ---- */
html body.ccu-home .ch-search > .ch-home-results,
html body.ccu-home .ch-search > .ch-home-more{grid-area:auto!important;grid-column:1/-1!important}
@media (min-width:901px) and (max-width:1250px){
 html body.ccu-home .ch-search{grid-template-columns:minmax(0,1fr)!important;gap:16px!important}
 html body.ccu-home .ch-search .ch-search__form{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"seg" "car" "fields" "status" "results"!important}
 html body.ccu-home .ch-search .csm-car__txt{white-space:normal!important;flex-wrap:wrap}
 html body.ccu-home .ch-search .ch-search__fields{grid-auto-flow:row!important;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(190px,auto)!important}
 html body.ccu-home .ch-search .ch-seg{flex-wrap:nowrap!important;overflow-x:auto}
}
