/* ============================================================================
   TBS Rent a Car — Front público
   Prefijo .tbsr- para no colisionar con el tema ni con transfers/tours.
   Variables con valores por defecto (el tema hijo de Divi podrá sobreescribir).
   ========================================================================== */
.tbsr {
	--tbsr-primary: #c59d5f;
	--tbsr-secondary: #25d366;
	--tbsr-text: #1e293b;
	--tbsr-muted: #64748b;
	--tbsr-bg: #ffffff;
	--tbsr-card: #ffffff;
	--tbsr-border: #e2e8f0;
	--tbsr-radius: 14px;
	color: var(--tbsr-text);
	box-sizing: border-box;
}
.tbsr *, .tbsr *::before, .tbsr *::after { box-sizing: border-box; }

/* ── Formularios / campos ─────────────────────────────────────────────────── */
.tbsr-field { margin-bottom: 12px; }
.tbsr-field > label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.tbsr select,
.tbsr input[type="text"],
.tbsr input[type="email"],
.tbsr input[type="date"],
.tbsr input[type="time"],
.tbsr textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--tbsr-border);
	border-radius: 10px;
	font-size: 14px;
	background: #fff;
	color: var(--tbsr-text);
}
.tbsr .tbsr-dt { display: flex; gap: 6px; }
.tbsr .tbsr-dt input[type="date"] { flex: 2; }
.tbsr .tbsr-dt input[type="time"] { flex: 1; }
.tbsr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .tbsr-row { grid-template-columns: 1fr; } }

/* ── Botones ──────────────────────────────────────────────────────────────── */
.tbsr-btn {
	display: inline-block;
	padding: 11px 18px;
	border: none;
	border-radius: 10px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: filter .15s ease, transform .05s ease;
}
.tbsr-btn:hover { filter: brightness(1.05); }
.tbsr-btn:active { transform: translateY(1px); }
.tbsr-btn:disabled { opacity: .6; cursor: default; }
.tbsr-btn-primary { background: var(--tbsr-primary); color: #fff; }
.tbsr-btn-secondary { background: #f1f5f9; color: var(--tbsr-text); }
.tbsr-btn-wa { background: var(--tbsr-secondary); color: #fff; width: 100%; margin-top: 10px; }
.tbsr-btn-sm { padding: 8px 12px; font-size: 13px; }

/* ── Buscador ─────────────────────────────────────────────────────────────── */
.tbsr-search-form {
	display: grid;
	grid-template-columns: repeat(5, 1fr) auto;
	gap: 12px;
	align-items: end;
	background: var(--tbsr-card);
	border: 1px solid var(--tbsr-border);
	border-radius: var(--tbsr-radius);
	padding: 16px;
}
@media (max-width: 900px) { .tbsr-search-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tbsr-search-form { grid-template-columns: 1fr; } }
.tbsr-field-submit .tbsr-btn { width: 100%; }
.tbsr-search-status { margin: 14px 0 8px; font-size: 14px; color: var(--tbsr-muted); }

/* ── Grid de tarjetas ─────────────────────────────────────────────────────── */
.tbsr-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 18px;
	margin-top: 6px;
}
.tbsr-card {
	background: var(--tbsr-card);
	border: 1px solid var(--tbsr-border);
	border-radius: var(--tbsr-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
/* El filtro por categoría usa el atributo nativo hidden. Esta regla debe
   prevalecer sobre el display de la tarjeta. */
.tbsr-card[hidden] { display: none !important; }
.tbsr-card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: #f1f5f9;
	overflow: hidden;
}
.tbsr-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tbsr-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
.tbsr-badge { position: absolute; top: 10px; left: 10px; background: var(--tbsr-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.tbsr-card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tbsr-card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--tbsr-muted); }
.tbsr-card-title { margin: 0; font-size: 17px; line-height: 1.25; }
.tbsr-specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--tbsr-muted); }
.tbsr-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.tbsr-price { font-size: 14px; }
.tbsr-price strong { font-size: 18px; color: var(--tbsr-text); }
.tbsr-price-from { font-size: 11px; color: var(--tbsr-muted); }
.tbsr-price-quote { color: var(--tbsr-primary); font-weight: 700; }

/* ── Filtro de categorías ─────────────────────────────────────────────────── */
.tbsr-cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tbsr-chip { padding: 7px 14px; border: 1px solid var(--tbsr-border); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--tbsr-text); background: #fff; }
.tbsr-chip.is-active { background: var(--tbsr-primary); color: #fff; border-color: var(--tbsr-primary); }

/* ── Vitrina del modelo ───────────────────────────────────────────────────── */
.tbsr-model-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
@media (max-width: 880px) { .tbsr-model-top { grid-template-columns: 1fr; } }
.tbsr-gallery-main { aspect-ratio: 16 / 10; background: #f1f5f9; border-radius: var(--tbsr-radius); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tbsr-gallery-img { width: 100%; height: 100%; object-fit: cover; }
.tbsr-gallery-empty { font-size: 64px; }
.tbsr-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tbsr-thumb { width: 72px; height: 54px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer; background: none; }
.tbsr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbsr-thumb.is-active { border-color: var(--tbsr-primary); }
.tbsr-video { margin-top: 14px; aspect-ratio: 16 / 9; border-radius: var(--tbsr-radius); overflow: hidden; background: #000; }
.tbsr-video iframe, .tbsr-video video { width: 100%; height: 100%; border: 0; display: block; }
.tbsr-model-title { margin: 6px 0 12px; font-size: 26px; }
.tbsr-specs-lg { gap: 14px; font-size: 14px; margin-bottom: 16px; }

/* ── Panel de reserva ─────────────────────────────────────────────────────── */
.tbsr-book-panel {
	background: var(--tbsr-card);
	border: 1px solid var(--tbsr-border);
	border-radius: var(--tbsr-radius);
	padding: 16px;
}
.tbsr-extras { display: flex; flex-direction: column; gap: 6px; }
.tbsr-check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; }
.tbsr-check input { width: auto; }
.tbsr-actions { display: flex; gap: 10px; margin-top: 8px; }
.tbsr-actions .tbsr-btn { flex: 1; }

/* ── Caja de cotización ───────────────────────────────────────────────────── */
.tbsr-quote-box { margin: 12px 0; }
.tbsr-qtable { border: 1px solid var(--tbsr-border); border-radius: 10px; overflow: hidden; }
.tbsr-qrow { display: flex; justify-content: space-between; padding: 9px 12px; font-size: 14px; border-bottom: 1px solid var(--tbsr-border); }
.tbsr-qrow:last-child { border-bottom: none; }
.tbsr-qrow.tbsr-total { background: #f8fafc; font-size: 16px; }
.tbsr-qrow.tbsr-muted { color: var(--tbsr-muted); font-size: 13px; }
.tbsr-qrow.tbsr-ok span:last-child { color: #15803d; }
.tbsr-qrow.tbsr-warn span:last-child { color: #b45309; }
.tbsr-customer { margin-top: 14px; padding-top: 16px; border-top: 1px dashed var(--tbsr-border); }
.tbsr-customer h3 { margin: 0 0 4px; font-size: 17px; }
.tbsr-customer-help { margin: 0 0 12px; color: var(--tbsr-muted); font-size: 13px; }
.tbsr-insurance-help { margin: 5px 0 0; color: var(--tbsr-muted); font-size: 13px; line-height: 1.45; }

/* ── Avisos y resultados ──────────────────────────────────────────────────── */
.tbsr-notice { background: #f1f5f9; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 8px 0; }
.tbsr-notice-warn { background: #fef3c7; color: #92400e; }
.tbsr-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.tbsr-success code { background: rgba(0,0,0,.06); padding: 2px 6px; border-radius: 4px; }
.tbsr-muted { color: var(--tbsr-muted); }

/* ── Secciones inferiores (descripción / specs / reseñas) ─────────────────── */
.tbsr-section { margin-top: 32px; }
.tbsr-section h2 { font-size: 20px; margin-bottom: 12px; }
.tbsr-spec-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tbsr-spec-list li { background: #f8fafc; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.tbsr-reviews { display: grid; gap: 12px; }
.tbsr-review { border: 1px solid var(--tbsr-border); border-radius: 10px; padding: 12px 14px; }
.tbsr-stars { color: #f59e0b; letter-spacing: 2px; }

/* ── Checkout ─────────────────────────────────────────────────────────────── */
.tbsr-checkout-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.tbsr-checkout-img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; }

/* ── Comparador ───────────────────────────────────────────────────────────── */
.tbsr-cmp-check { margin-top: 4px; font-size: 13px; color: var(--tbsr-muted); }
.tbsr-compare-picker {
	background: var(--tbsr-card); border: 1px solid var(--tbsr-border);
	border-radius: var(--tbsr-radius); padding: 16px; margin-bottom: 20px;
}
.tbsr-compare-hint { margin: 0 0 12px; font-size: 14px; color: var(--tbsr-muted); }
.tbsr-compare-options {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 8px; margin-bottom: 14px;
}
.tbsr-compare-scroll { overflow-x: auto; }
.tbsr-compare-table { width: 100%; border-collapse: collapse; min-width: 520px; background: #fff; }
.tbsr-compare-table th, .tbsr-compare-table td {
	border: 1px solid var(--tbsr-border); padding: 12px; text-align: center; font-size: 14px; vertical-align: middle;
}
.tbsr-compare-rowhead { text-align: left !important; font-weight: 700; background: #f8fafc; white-space: nowrap; }
.tbsr-compare-head { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tbsr-compare-head img { width: 130px; height: 84px; object-fit: cover; border-radius: 10px; }
.tbsr-compare-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.tbsr-compare-list li { padding: 2px 0; }

/* Bandeja flotante de comparación (grid) */
.tbsr-cmp-tray {
	position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 9998;
	background: var(--tbsr-text); color: #fff; border-radius: 999px;
	padding: 10px 12px 10px 20px; display: flex; align-items: center; gap: 14px;
	box-shadow: 0 16px 36px -12px rgba(0,0,0,.5);
}
.tbsr-cmp-count { font-size: 14px; font-weight: 600; }
.tbsr-cmp-clear {
	background: rgba(255,255,255,.2); color: #fff; border: none; border-radius: 50%;
	width: 28px; height: 28px; cursor: pointer; font-size: 14px; line-height: 1;
}
