/* Best4Hotels - Frontend Styles */

/* === Room features on product page === */
.b4h-room-features {
	margin: 1em 0;
	padding: 1em;
	background: #fafafa;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
}
.b4h-feature-list {
	list-style: none;
	padding: 0;
	margin: 0 0 0.5em 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 6px 18px;
}
.b4h-feature-list li {
	font-size: 0.95em;
}
.b4h-amenities {
	margin-top: 0.6em;
	font-size: 0.95em;
}
.b4h-amenities-list {
	list-style: none;
	padding: 0;
	margin: 6px 0 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.b4h-amenities-list li {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 14px;
	padding: 3px 10px;
	font-size: 0.85em;
}

.b4h-per-night {
	font-size: 0.75em;
	color: #777;
	font-weight: normal;
}

/* === Booking form === */
.b4h-booking-form-wrapper {
	margin: 1.5em 0;
	padding: 1.2em;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.b4h-form-title {
	margin-top: 0;
	margin-bottom: 1em;
	font-size: 1.25em;
}
.b4h-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 1em;
}
.b4h-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 0.9em;
}
.b4h-form-field input,
.b4h-form-field select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #cccccc;
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
}
.b4h-form-field .required {
	color: #c0392b;
}

/* Child age inputs */
.b4h-child-ages-wrapper {
	margin-bottom: 1em;
}
.b4h-child-ages-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}
.b4h-child-age-item label {
	font-size: 0.85em;
	font-weight: normal;
}
.b4h-child-age-item input {
	width: 70px;
}

/* Addons */
.b4h-addons-wrapper {
	margin: 1em 0;
	padding: 0.8em;
	background: #fafafa;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
}
.b4h-addons-wrapper h4 {
	margin: 0 0 0.6em 0;
}
.b4h-addon-item {
	display: grid;
	grid-template-columns: 24px 1fr auto;
	grid-template-rows: auto auto;
	gap: 4px 10px;
	padding: 6px 0;
	border-bottom: 1px solid #eee;
	cursor: pointer;
	font-weight: normal;
}
.b4h-addon-item:last-child {
	border-bottom: none;
}
.b4h-addon-item input {
	grid-row: 1;
	margin-top: 4px;
}
.b4h-addon-item .b4h-addon-name {
	font-weight: 600;
}
.b4h-addon-item .b4h-addon-price {
	text-align: right;
	font-size: 0.9em;
	color: #555;
}
.b4h-addon-item .b4h-addon-desc {
	grid-column: 2 / 4;
	font-size: 0.85em;
	color: #666;
}

/* Summary */
.b4h-summary-wrapper {
	margin: 1em 0;
	padding: 0.8em 1em;
	background: #f0f7ff;
	border: 1px solid #cfe0f5;
	border-radius: 6px;
}
.b4h-price-breakdown {
	width: 100%;
	border-collapse: collapse;
}
.b4h-price-breakdown td {
	padding: 4px 0;
	border-bottom: 1px solid #e0eaf3;
	font-size: 0.92em;
}
.b4h-price-breakdown td:last-child {
	text-align: right;
}
.b4h-price-breakdown tr.b4h-total td {
	border-top: 2px solid #4a90e2;
	border-bottom: none;
	font-size: 1.05em;
	padding-top: 8px;
}

/* Messages */
.b4h-form-messages {
	margin: 0.6em 0;
}
.b4h-form-messages .b4h-error {
	background: #fdecea;
	color: #b71c1c;
	border: 1px solid #f5c6cb;
	padding: 8px 12px;
	border-radius: 4px;
}
.b4h-form-messages .b4h-success {
	background: #e8f7ed;
	color: #1b5e20;
	border: 1px solid #b6e0c1;
	padding: 8px 12px;
	border-radius: 4px;
}

/* Actions */
.b4h-form-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.b4h-form-actions .button {
	flex: 1 1 auto;
}
.b4h-add-to-cart-button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* === Search & results (v1.2.1 yeniden tasarım) === */
.b4h-search-form-wrap,
.b4h-search-results,
.b4h-rooms-grid,
.b4h-no-results {
	--b4h-navy:    #0e1f37;
	--b4h-gold:    #c9a96e;
	--b4h-gold-d:  #a9883f;
	--b4h-ink:     #243043;
	--b4h-muted:   #7b8089;
	--b4h-surface: #ffffff;
	--b4h-panel:   #faf8f2;
	--b4h-line:    #e8e3d6;
	--b4h-radius:  14px;
	--b4h-shadow:  0 20px 45px -28px rgba(14, 31, 55, 0.45);
}

/* --- Arama formu --- */
.b4h-search-form-wrap {
	position: relative;
	margin: 1.5em 0;
	padding: 1.6em 1.7em 1.7em;
	background: var(--b4h-panel);
	border: 1px solid var(--b4h-line);
	border-radius: var(--b4h-radius);
	box-shadow: var(--b4h-shadow);
}
.b4h-search-form-wrap::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--b4h-gold), var(--b4h-gold-d));
	border-radius: var(--b4h-radius) var(--b4h-radius) 0 0;
}
.b4h-search-eyebrow {
	display: block;
	font-size: 0.72em;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--b4h-gold-d);
}
.b4h-search-title {
	margin: 0.15em 0 1.05em;
	color: var(--b4h-navy);
	font-size: 1.5em;
	line-height: 1.2;
}
.b4h-search-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
}
.b4h-search-field {
	flex: 1 1 150px;
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.b4h-search-field--date { flex: 1.3 1 180px; }
.b4h-search-field--submit { flex: 1 1 190px; }
.b4h-field-label {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 7px;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--b4h-ink);
}
.b4h-field-label svg { width: 15px; height: 15px; color: var(--b4h-gold-d); flex: none; }
.b4h-search-field input,
.b4h-search-field select {
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 12px 13px;
	font-size: 0.98em;
	line-height: 1.3;
	color: var(--b4h-ink);
	background-color: var(--b4h-surface);
	border: 1px solid var(--b4h-line);
	border-radius: 9px;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
.b4h-search-field select {
	padding-right: 34px;
	background-image: 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='%23a9883f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}
.b4h-search-field input:focus,
.b4h-search-field select:focus {
	outline: none;
	border-color: var(--b4h-gold);
	box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.22);
}
.b4h-search-submit-btn {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	box-sizing: border-box;
	margin: 0;
	padding: 13px 20px;
	font-size: 0.95em;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #fff;
	background: var(--b4h-navy);
	border: 1px solid var(--b4h-navy);
	border-radius: 9px;
	cursor: pointer;
	transition: background 0.18s, color 0.18s, transform 0.1s;
}
.b4h-search-submit-btn svg { width: 17px; height: 17px; flex: none; }
.b4h-search-submit-btn:hover {
	background: var(--b4h-gold);
	border-color: var(--b4h-gold);
	color: var(--b4h-navy);
}
.b4h-search-submit-btn:active { transform: translateY(1px); }

/* --- Sonuç özeti --- */
.b4h-search-results { margin-top: 1.8em; }
.b4h-search-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 1.1em;
	padding: 14px 18px;
	background: var(--b4h-navy);
	border-radius: 11px;
	color: #ece7da;
}
.b4h-summary-seg {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 0.95em;
}
.b4h-summary-seg svg { width: 16px; height: 16px; color: var(--b4h-gold); flex: none; }
.b4h-summary-seg strong { color: #fff; font-weight: 700; }
.b4h-summary-divider {
	width: 1px;
	height: 16px;
	background: rgba(255, 255, 255, 0.22);
}
.b4h-results-count {
	margin: 0 0 1.1em;
	font-size: 0.92em;
	color: var(--b4h-muted);
}
.b4h-results-count strong { color: var(--b4h-navy); }

/* --- Boş durum --- */
.b4h-no-results {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 2.6em 1.5em;
	text-align: center;
	background: var(--b4h-panel);
	border: 1px solid var(--b4h-line);
	border-radius: var(--b4h-radius);
	color: var(--b4h-muted);
}
.b4h-no-results svg { width: 42px; height: 42px; color: var(--b4h-gold-d); }
.b4h-no-results strong { color: var(--b4h-navy); font-size: 1.1em; }

/* --- Oda kartları grid --- */
.b4h-rooms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 22px;
}
.b4h-rooms-grid.b4h-rooms-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.b4h-rooms-grid.b4h-rooms-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.b4h-rooms-grid.b4h-rooms-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.b4h-room-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--b4h-surface);
	border: 1px solid var(--b4h-line);
	border-radius: var(--b4h-radius);
	overflow: hidden;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}
.b4h-room-card:hover {
	transform: translateY(-6px);
	box-shadow: var(--b4h-shadow);
	border-color: #ddd5c0;
}
.b4h-room-thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #ece8df;
}
.b4h-room-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}
.b4h-room-card:hover .b4h-room-thumb img { transform: scale(1.07); }
.b4h-price-chip {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: flex;
	flex-direction: column;
	padding: 7px 13px;
	background: rgba(14, 31, 55, 0.92);
	border-radius: 9px;
	color: #fff;
	line-height: 1.25;
}
.b4h-price-chip .b4h-chip-label {
	font-size: 0.62em;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--b4h-gold);
}
.b4h-price-chip .b4h-chip-amount { font-size: 1.05em; font-weight: 700; }

.b4h-room-info {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 15px 16px 16px;
	flex: 1;
}
.b4h-room-name {
	margin: 0;
	font-size: 1.15em;
	line-height: 1.3;
}
.b4h-room-name a {
	color: var(--b4h-navy);
	text-decoration: none;
	transition: color 0.15s;
}
.b4h-room-name a:hover { color: var(--b4h-gold-d); }
.b4h-room-meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}
.b4h-room-meta li {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 4px 10px;
	font-size: 0.8em;
	color: var(--b4h-ink);
	background: var(--b4h-panel);
	border: 1px solid var(--b4h-line);
	border-radius: 999px;
}
.b4h-room-meta svg { width: 13px; height: 13px; color: var(--b4h-gold-d); flex: none; }
.b4h-room-price {
	margin-top: 2px;
	font-size: 0.88em;
	color: var(--b4h-muted);
}
.b4h-room-price strong {
	display: block;
	margin-top: 1px;
	font-size: 1.55em;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--b4h-navy);
}
.b4h-book-now {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	font-size: 0.92em;
	font-weight: 700;
	text-decoration: none;
	color: #fff;
	background: var(--b4h-navy);
	border: 1px solid var(--b4h-navy);
	border-radius: 9px;
	transition: background 0.18s, color 0.18s;
}
.b4h-book-now svg { width: 16px; height: 16px; flex: none; transition: transform 0.18s; }
.b4h-book-now:hover {
	background: var(--b4h-gold);
	border-color: var(--b4h-gold);
	color: var(--b4h-navy);
}
.b4h-book-now:hover svg { transform: translateX(3px); }

/* --- Kademeli giriş animasyonu --- */
@keyframes b4hRise {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}
.b4h-rooms-grid .b4h-room-card { animation: b4hRise 0.5s ease both; }
.b4h-rooms-grid .b4h-room-card:nth-child(2) { animation-delay: 0.06s; }
.b4h-rooms-grid .b4h-room-card:nth-child(3) { animation-delay: 0.12s; }
.b4h-rooms-grid .b4h-room-card:nth-child(4) { animation-delay: 0.18s; }
.b4h-rooms-grid .b4h-room-card:nth-child(5) { animation-delay: 0.24s; }
.b4h-rooms-grid .b4h-room-card:nth-child(6) { animation-delay: 0.30s; }
.b4h-rooms-grid .b4h-room-card:nth-child(n+7) { animation-delay: 0.34s; }

@media (max-width: 600px) {
	.b4h-search-field,
	.b4h-search-field--date,
	.b4h-search-field--submit { flex: 1 1 100%; }
	.b4h-rooms-grid,
	.b4h-rooms-grid.b4h-rooms-grid-cols-2,
	.b4h-rooms-grid.b4h-rooms-grid-cols-3,
	.b4h-rooms-grid.b4h-rooms-grid-cols-4 { grid-template-columns: 1fr; }
	.b4h-form-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.b4h-rooms-grid .b4h-room-card,
	.b4h-room-thumb img,
	.b4h-book-now svg { animation: none !important; transition: none !important; }
}

/* === Checkout custom fields === */
.b4h-checkout-fields {
	margin-top: 1.5em;
	padding: 1em;
	background: #f8f9fb;
	border: 1px solid #dde3ec;
	border-radius: 6px;
}
.b4h-checkout-fields h3 {
	margin-top: 0;
}

/* === Order detail (My Account) === */
.b4h-order-bookings {
	margin-top: 1em;
}
