/* =============================================================
   Car Rental Widget – Elementor
   car-rental-widget/assets/css/car-card.css
   ============================================================= */

/* ─── Karta ─────────────────────────────────────────────────── */
.crw-card {
	background: #ffffff;
	border: 1px solid #e8e8e8;
	padding: 24px;
	box-sizing: border-box;
	font-family: inherit;
	position: relative;
}

/* ─── Nagłówek: cennik + nazwa ─────────────────────────────── */
.crw-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 16px;
}

.crw-pricing {
	flex: 0 0 auto;
}

.crw-pricing-item {
	font-size: 14px;
	line-height: 1.6;
	color: #333;
	white-space: nowrap;
}

.crw-days  { font-weight: 600; }
.crw-price { font-weight: 400; }

.crw-name-wrap {
	flex: 1 1 auto;
	text-align: right;
}

.crw-car-name {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	color: #e31414;
	letter-spacing: 0;
}

/* ─── Zdjęcie ────────────────────────────────────────────────── */
.crw-image-wrap {
	margin: 16px 0;
	text-align: center;
}

.crw-image-wrap img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	cursor: zoom-in;
	transition: opacity 0.15s ease;
}

.crw-image-wrap img:hover {
	opacity: 0.88;
}

/* ─── Krótki opis ────────────────────────────────────────────── */
.crw-short-desc {
	font-size: 13px;
	color: #555;
	line-height: 1.6;
	border-top: 1px solid #e8e8e8;
	padding-top: 14px;
	margin-top: 14px;
}

.crw-short-desc p {
	margin: 0 0 6px;
}

/* ─── Specyfikacja – ikony ────────────────────────────────────── */
.crw-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 24px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e8e8e8;
	align-items: stretch;   /* wszystkie komórki tej samej wysokości */
}

.crw-spec-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 5px;
	min-width: 48px;
	flex: 1 1 auto;
	max-width: 80px;
}

.crw-spec-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	/* Stała wysokość – wszystkie ikony wyrównane do tej samej osi */
	height: 36px;
	width: 100%;
}

.crw-spec-icon i,
.crw-spec-icon svg {
	font-size: 28px;
	width: 28px;
	height: 28px;       /* wymusza tę samą wysokość dla każdej ikony */
	line-height: 28px;  /* poprawka dla ikon fontowych (i-tag) */
	display: block;
	color: #e31414;
	fill: #e31414;
	overflow: hidden;   /* obcina ewentualne wystające glify */
}

.crw-spec-label {
	font-size: 11px;
	color: #333;
	text-align: center;
	line-height: 1.3;
}

/* ─── Przycisk szczegółów ─────────────────────────────────────── */
.crw-btn-wrap {
	margin-top: 20px;
}

.crw-btn-details {
	display: block;
	width: 100%;
	padding: 12px 20px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: lowercase;
	color: #e31414;
	background: transparent;
	border: 2px solid #e31414;
	border-radius: 0;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	font-family: inherit;
}

.crw-btn-details:hover,
.crw-btn-details:focus {
	background: #e31414;
	color: #ffffff;
	outline: none;
}

/* ─── MODAL – nakładka ────────────────────────────────────────── */
.crw-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.crw-modal[hidden] {
	display: none !important;
}

.crw-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

/* ─── MODAL – okno ─────────────────────────────────────────────── */
.crw-modal-box {
	position: relative;
	background: #ffffff;
	width: 100%;
	max-width: 680px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 36px 40px;
	box-sizing: border-box;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	border-radius: 2px;
	animation: crwFadeIn .2s ease;
}

@keyframes crwFadeIn {
	from { opacity: 0; transform: translateY(-12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ─── MODAL – przycisk zamknij ────────────────────────────────── */
.crw-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 20px;
	color: #999;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	transition: color .2s;
}

.crw-modal-close:hover { color: #e31414; }

/* ─── MODAL – nagłówek ────────────────────────────────────────── */
.crw-modal-header {
	margin-bottom: 20px;
	padding-bottom: 16px;
	border-bottom: 2px solid #e31414;
}

.crw-modal-header .crw-car-name {
	font-size: 28px;
}

/* ─── MODAL – opis ────────────────────────────────────────────── */
.crw-modal-desc {
	font-size: 14px;
	line-height: 1.8;
	color: #444;
	margin-bottom: 24px;
}

.crw-modal-desc p   { margin: 0 0 12px; }
.crw-modal-desc ul,
.crw-modal-desc ol  { margin: 0 0 12px; padding-left: 20px; }
.crw-modal-desc li  { margin-bottom: 4px; }

/* ─── MODAL – specyfikacja ────────────────────────────────────── */
.crw-modal-specs {
	border-top: 1px solid #e8e8e8;
	padding-top: 20px;
	margin-top: 4px;
}

/* ─── Responsywność ───────────────────────────────────────────── */
@media (max-width: 480px) {
	.crw-header {
		flex-direction: column-reverse;
		gap: 8px;
	}

	.crw-name-wrap {
		text-align: left;
	}

	.crw-modal-box {
		padding: 24px 20px;
	}

	.crw-car-name {
		font-size: 20px;
	}
}

/* ─── Ukryj overflow body gdy modal otwarty ───────────────────── */
body.crw-modal-open {
	overflow: hidden;
}

/* ─── LIGHTBOX – zdjęcie ───────────────────────────────────────── */
.crw-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.crw-lightbox[hidden] {
	display: none !important;
}

.crw-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
	cursor: pointer;
}

.crw-lightbox-box {
	position: relative;
	max-width: 92vw;
	max-height: 90vh;
	animation: crwFadeIn .18s ease;
	line-height: 0; /* usuwa odstęp pod img */
}

.crw-lightbox-box img {
	display: block;
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	box-shadow: 0 24px 80px rgba(0,0,0,.55);
	cursor: default;
}

.crw-lightbox-close {
	position: absolute;
	top: -14px;
	right: -14px;
	background: #fff;
	border: none;
	border-radius: 50%;
	width: 34px;
	height: 34px;
	font-size: 16px;
	color: #333;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0,0,0,.25);
	transition: color .15s, background .15s;
	z-index: 1;
}

.crw-lightbox-close:hover {
	background: #e31414;
	color: #fff;
}

@media (max-width: 480px) {
	.crw-lightbox-close {
		top: 6px;
		right: 6px;
	}
}
