/* Preisz – Használtautó.hu szinkron */
:root { --phx-accent: #111; } /* a beállításokban megadott szín ezt felülírja */
.phx-grid, .phx-detail, .phx-empty {
	--phx-text: #1a1a1a;
	--phx-muted: #6b6b6b;
	--phx-line: #e6e6e6;
	--phx-bg: #fff;
	--phx-soft: #f5f5f5;
	--phx-radius: 14px;
}

.phx-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 24px;
}

.phx-card {
	display: flex;
	flex-direction: column;
	background: var(--phx-bg);
	border: 1px solid var(--phx-line);
	border-radius: var(--phx-radius);
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}
.phx-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.08); transform: translateY(-2px); }

/* Slider */
.phx-slider { position: relative; aspect-ratio: 4 / 3; background: var(--phx-soft); }
.phx-track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.phx-track::-webkit-scrollbar { display: none; }
.phx-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; display: block; }
.phx-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phx-noimg { text-decoration: none; display: flex; align-items: center; justify-content: center; color: var(--phx-muted); width: 100%; height: 100%; aspect-ratio: 4 / 3; background: var(--phx-soft); }

.phx-nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 36px; height: 36px; border-radius: 50%;
	border: 0; padding: 0; cursor: pointer;
	background: rgba(255,255,255,.9); color: #111;
	font-size: 24px; line-height: 34px; text-align: center;
	opacity: 0; transition: opacity .2s;
	box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.phx-slider:hover .phx-nav, .phx-gallery-main:hover .phx-nav, .phx-nav:focus-visible { opacity: 1; }
@media (hover: none) { .phx-nav { opacity: 1; } }
.phx-prev { left: 10px; }
.phx-next { right: 10px; }
.phx-count {
	position: absolute; right: 10px; bottom: 10px;
	background: rgba(0,0,0,.6); color: #fff; font-size: 12px;
	padding: 2px 8px; border-radius: 20px;
}

/* Body */
.phx-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; flex: 1; }
.phx-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }
.phx-title a { color: var(--phx-text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.phx-specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.phx-spec { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--phx-muted); margin: 0; }
.phx-ico { width: 16px; height: 16px; fill: currentColor; flex: 0 0 16px; }

.phx-price { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.phx-price-main { font-size: 22px; font-weight: 800; color: var(--phx-accent); }
.phx-price-vat { font-size: 14px; font-weight: 600; color: var(--phx-muted); }
.phx-price-old { width: 100%; font-size: 14px; color: var(--phx-muted); text-decoration: line-through; }

.phx-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 12px 18px; border-radius: 10px;
	background: var(--phx-accent); color: #fff !important;
	font-weight: 600; text-decoration: none !important; text-align: center;
	border: 2px solid var(--phx-accent);
	transition: filter .2s;
}
.phx-btn:hover { filter: brightness(1.12); }
.phx-btn-ghost { background: transparent; color: var(--phx-accent) !important; }
.phx-btn-ha { background: #ff6600; border-color: #ff6600; }

/* Kártyakép mindig fix 4:3 keretben (Elementor img felülírás ellen) */
.phx-card .phx-slider { overflow: hidden; }
.phx-card .phx-track { height: 100%; }
.phx-card .phx-slide { position: relative; overflow: hidden; }
.phx-card .phx-slide img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; }
.phx-card .phx-spec { min-width: 0; }
.phx-card .phx-spec span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.phx-empty, .phx-admin-note { padding: 20px; border-radius: var(--phx-radius, 14px); background: #f5f5f5; text-align: center; }
.phx-admin-note { background: #fff4e5; border: 1px solid #f0c36d; margin-bottom: 16px; font-size: 14px; text-align: left; }

/* ---------- Adatlap ---------- */
.phx-detail { color: var(--phx-text); }
.phx-detail-inner { max-width: 1200px; margin: 0 auto; padding: 32px 20px 60px; }
.phx-back { display: inline-block; margin-bottom: 20px; color: var(--phx-muted); text-decoration: none; }
.phx-back:hover { color: var(--phx-accent); }

.phx-detail-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.phx-gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: var(--phx-radius); overflow: hidden; background: var(--phx-soft); }
.phx-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phx-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 10px; }
.phx-thumb { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; aspect-ratio: 4 / 3; }
.phx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phx-thumb.is-active { border-color: var(--phx-accent); }

.phx-summary { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 18px; padding: 24px; border: 1px solid var(--phx-line); border-radius: var(--phx-radius); background: var(--phx-bg); }
.phx-detail-title { margin: 0; font-size: 26px; line-height: 1.25; }
.phx-price-lg .phx-price-main { font-size: 30px; }
.phx-cta { display: flex; flex-direction: column; gap: 10px; }
.phx-code { margin: 0; font-size: 13px; color: var(--phx-muted); }

.phx-section { margin-top: 40px; }
.phx-section h2 { font-size: 22px; margin: 0 0 16px; }
.phx-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.phx-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--phx-line); }
.phx-row dt { color: var(--phx-muted); margin: 0; }
.phx-row dd { margin: 0; text-align: right; font-weight: 600; }
.phx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.phx-chips li { margin: 0; padding: 6px 12px; border-radius: 20px; background: var(--phx-soft); font-size: 14px; }
.phx-desc { line-height: 1.7; }

@media (max-width: 900px) {
	.phx-detail-top { grid-template-columns: 1fr; }
	.phx-summary { position: static; }
	.phx-table { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
	.phx-grid { grid-template-columns: 1fr; gap: 18px; }
	.phx-detail-inner { padding: 20px 16px 40px; }
	.phx-detail-title { font-size: 22px; }
}
