/*
Theme Name:   Bahamian Boat Trader
Theme URI:    https://bahamianboattrader.com
Description:  Child theme of Hello Elementor with the boat listing system (listings, categories, filters, gallery).
Author:       Syed Talal Ali
Template:     hello-elementor
Version:      1.0.7
Text Domain:  bbt-child
*/

/* ==========================================================
   Design tokens (match Elementor > Site Settings)
   ========================================================== */
:root {
	--bbt-navy: #0B2545;
	--bbt-teal: #139CB0;
	--bbt-teal-dark: #0E7A8A;
	--bbt-sand: #F5F1E8;
	--bbt-sand-line: #E4DCCB;
	--bbt-coral: #E4572E;
	--bbt-text: #1F2937;
	--bbt-muted: #5B6472;
	--bbt-white: #FFFFFF;

	--bbt-font-head: "Outfit", "Segoe UI", Arial, sans-serif;
	--bbt-font-body: "Inter", "Segoe UI", Arial, sans-serif;

	--bbt-wrap: 1240px;
	--bbt-gap: clamp(16px, 2.2vw, 28px);
}

/* ==========================================================
   Layout helpers
   ========================================================== */
.bbt-wrap {
	max-width: var(--bbt-wrap);
	margin: 0 auto;
	padding: 0 20px;
}

.bbt-single,
.bbt-archive {
	font-family: var(--bbt-font-body);
	color: var(--bbt-text);
	padding-bottom: 72px;
}

.bbt-single h1,
.bbt-single h2,
.bbt-archive h1,
.bbt-card__title,
.bbt-cat__label {
	font-family: var(--bbt-font-head);
	color: var(--bbt-navy);
	letter-spacing: -0.01em;
}

.bbt-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	color: var(--bbt-muted);
	padding: 20px 0 12px;
}
.bbt-crumbs a { color: var(--bbt-muted); text-decoration: none; }
.bbt-crumbs a:hover { color: var(--bbt-teal-dark); text-decoration: underline; }

/* ==========================================================
   Buttons
   ========================================================== */
.bbt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border-radius: 4px;
	border: 2px solid transparent;
	font-family: var(--bbt-font-body);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.bbt-btn--primary { background: var(--bbt-navy); color: var(--bbt-white); }
.bbt-btn--primary:hover { background: var(--bbt-teal-dark); color: var(--bbt-white); }
.bbt-btn--ghost { background: transparent; color: var(--bbt-navy); border-color: var(--bbt-navy); }
.bbt-btn--ghost:hover { background: var(--bbt-navy); color: var(--bbt-white); }

.bbt-single a:focus-visible,
.bbt-archive a:focus-visible,
.bbt-cats a:focus-visible,
.bbt-grid a:focus-visible,
.bbt-single button:focus-visible,
.bbt-filters select:focus-visible,
.bbt-filters button:focus-visible {
	outline: 3px solid var(--bbt-teal);
	outline-offset: 2px;
}

/* ==========================================================
   Badge
   ========================================================== */
.bbt-badge {
	display: inline-block;
	padding: 5px 10px;
	border-radius: 2px;
	background: var(--bbt-coral);
	color: var(--bbt-white);
	font-family: var(--bbt-font-body);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}
.bbt-badge--now_only { background: var(--bbt-navy); }

/* ==========================================================
   Listing grid + card
   ========================================================== */
.bbt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: var(--bbt-gap);
}

.bbt-card {
	background: var(--bbt-white);
	border: 1px solid var(--bbt-sand-line);
	border-radius: 6px;
	overflow: hidden;
	transition: border-color .15s ease;
}
.bbt-card:hover { border-color: var(--bbt-teal); }

.bbt-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.bbt-card__media {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--bbt-sand);
}
.bbt-card .bbt-card__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
}
.bbt-card__media .bbt-badge {
	position: absolute;
	top: 12px;
	left: 12px;
}

.bbt-card__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--bbt-muted);
	font-size: 14px;
}

.bbt-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px 18px 18px;
}

.bbt-card__title {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
}
.bbt-card:hover .bbt-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.bbt-card__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
}
.bbt-card__facts li {
	padding: 3px 8px;
	background: var(--bbt-sand);
	border-radius: 3px;
	font-size: 13px;
	color: var(--bbt-muted);
}

.bbt-card__price {
	margin: auto 0 0;
	font-family: var(--bbt-font-head);
	font-size: 22px;
	font-weight: 700;
	color: var(--bbt-navy);
}

.bbt-empty {
	padding: 32px;
	background: var(--bbt-sand);
	border-radius: 6px;
	text-align: center;
}
.bbt-empty p { margin: 0 0 6px; }

/* ==========================================================
   Category cards: [boat_sizes] and [boat_categories]
   The size figure is the signature element of the site.
   ========================================================== */
.bbt-cats {
	display: grid;
	gap: var(--bbt-gap);
}
.bbt-cats--sizes { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.bbt-cats--other { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.bbt-cat {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 220px;
	padding: 18px;
	overflow: hidden;
	border-radius: 6px;
	background: var(--bbt-navy);
	color: var(--bbt-white);
	text-decoration: none;
	isolation: isolate;
}
.bbt-cats--other .bbt-cat { min-height: 150px; }

.bbt-cat img.bbt-cat__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	z-index: -2;
}
.bbt-cat::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(11, 37, 69, 0) 30%, rgba(11, 37, 69, .88) 100%);
	transition: background-color .2s ease;
}
.bbt-cat:hover::after { background-color: rgba(19, 156, 176, .25); }

.bbt-cat__label {
	color: var(--bbt-white);
	font-weight: 700;
	line-height: 1;
}
.bbt-cats--sizes .bbt-cat__label { font-size: clamp(34px, 4vw, 46px); }
.bbt-cats--other .bbt-cat__label { font-size: 21px; font-weight: 600; }

.bbt-cat__count {
	margin-top: 8px;
	font-size: 14px;
	color: rgba(255, 255, 255, .85);
}

/* ==========================================================
   Archive (category) page
   ========================================================== */
.bbt-archive__head {
	background: var(--bbt-sand);
	border-bottom: 1px solid var(--bbt-sand-line);
	padding-bottom: 28px;
	margin-bottom: 28px;
}
.bbt-archive__title {
	margin: 4px 0 8px;
	font-size: clamp(34px, 5vw, 56px);
	font-weight: 700;
	line-height: 1.05;
}
.bbt-archive__intro { max-width: 68ch; color: var(--bbt-muted); }

.bbt-sizejump {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}
.bbt-sizejump a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--bbt-navy);
	border-radius: 4px;
	color: var(--bbt-navy);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}
.bbt-sizejump a:hover,
.bbt-sizejump a[aria-current="page"] { background: var(--bbt-navy); color: var(--bbt-white); }

.bbt-archive__count { margin: 20px 0 16px; color: var(--bbt-muted); font-size: 15px; }

/* Filters */
.bbt-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	align-items: end;
	padding: 18px;
	background: var(--bbt-white);
	border: 1px solid var(--bbt-sand-line);
	border-radius: 6px;
}
.bbt-filters__field span {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--bbt-navy);
}
.bbt-filters select {
	width: 100%;
	min-height: 46px;
	padding: 8px 10px;
	border: 1px solid #C9CED6;
	border-radius: 4px;
	background: var(--bbt-white);
	font: inherit;
	font-size: 15px;
	color: var(--bbt-text);
}
.bbt-filters__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}
.bbt-filters__reset { font-size: 14px; color: var(--bbt-muted); }

/* Pagination */
.bbt-archive .navigation.pagination { margin-top: 40px; }
.bbt-archive .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.bbt-archive .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--bbt-sand-line);
	border-radius: 4px;
	color: var(--bbt-navy);
	text-decoration: none;
	font-weight: 600;
}
.bbt-archive .page-numbers.current { background: var(--bbt-navy); color: var(--bbt-white); border-color: var(--bbt-navy); }

/* ==========================================================
   Single listing
   ========================================================== */
.bbt-single__top {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: clamp(20px, 3vw, 44px);
	align-items: start;
}

/* Gallery */
.bbt-gallery__main {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 6px;
	overflow: hidden;
	background: var(--bbt-sand);
	cursor: zoom-in;
	aspect-ratio: 3 / 2;
}
.bbt-gallery__main img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.bbt-gallery__count {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 6px 10px;
	border-radius: 3px;
	background: rgba(11, 37, 69, .85);
	color: var(--bbt-white);
	font-size: 13px;
	font-weight: 600;
}
.bbt-gallery__empty { aspect-ratio: 3 / 2; border-radius: 6px; background: var(--bbt-sand); }

.bbt-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	gap: 8px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}
.bbt-gallery__thumb {
	display: block;
	width: 100%;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	background: none;
	cursor: pointer;
	aspect-ratio: 1;
	opacity: .75;
}
.bbt-gallery__thumb { position: relative; }
.bbt-gallery__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.bbt-gallery__thumb:hover,
.bbt-gallery__thumb.is-active { opacity: 1; border-color: var(--bbt-teal); }

/* Summary */
.bbt-summary { position: sticky; top: 24px; }
.bbt-summary__title {
	margin: 10px 0 6px;
	font-size: clamp(28px, 3.2vw, 40px);
	font-weight: 700;
	line-height: 1.1;
}
.bbt-summary__price {
	margin: 0 0 20px;
	font-family: var(--bbt-font-head);
	font-size: clamp(28px, 3vw, 36px);
	font-weight: 700;
	color: var(--bbt-teal-dark);
}

.bbt-specs { margin: 0 0 24px; border-top: 1px solid var(--bbt-sand-line); }
.bbt-specs__row {
	display: grid;
	grid-template-columns: 42% 1fr;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--bbt-sand-line);
	font-size: 15px;
}
.bbt-specs dt { color: var(--bbt-muted); }
.bbt-specs dd { margin: 0; font-weight: 600; color: var(--bbt-text); }

.bbt-enquire {
	display: grid;
	gap: 10px;
	padding: 20px;
	background: var(--bbt-sand);
	border-radius: 6px;
}
.bbt-enquire__title { margin: 0 0 4px; font-size: 20px; font-weight: 600; }

/* Description + video */
.bbt-single__body {
	display: grid;
	gap: 40px;
	max-width: 820px;
	margin-top: 48px;
}
.bbt-single__body h2 { margin: 0 0 14px; font-size: 26px; font-weight: 600; }
.bbt-desc { font-size: 17px; line-height: 1.7; }
.bbt-desc p { margin: 0 0 1em; }

.bbt-video { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.bbt-video iframe,
.bbt-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Related */
.bbt-related { margin-top: 64px; }
.bbt-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.bbt-related__head h2 { margin: 0; font-size: 26px; font-weight: 600; }
.bbt-related__head a { color: var(--bbt-teal-dark); font-weight: 600; }

/* Lightbox */
.bbt-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(6, 18, 34, .95);
}
.bbt-lightbox[hidden] { display: none; }
.bbt-lightbox__img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.bbt-lightbox button {
	position: absolute;
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 4px;
	background: rgba(255, 255, 255, .12);
	color: var(--bbt-white);
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
}
.bbt-lightbox button:hover { background: rgba(255, 255, 255, .25); }
.bbt-lightbox__close { top: 16px; right: 16px; }
.bbt-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.bbt-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.bbt-lightbox__pos { position: absolute; bottom: 16px; margin: 0; color: rgba(255, 255, 255, .8); font-size: 14px; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 900px) {
	.bbt-single__top { grid-template-columns: 1fr; }
	.bbt-summary { position: static; }
}
@media (max-width: 600px) {
	.bbt-filters { grid-template-columns: 1fr 1fr; }
	.bbt-filters__actions { grid-column: 1 / -1; }
	.bbt-filters__actions .bbt-btn { flex: 1; }
	.bbt-lightbox__prev,
	.bbt-lightbox__next { top: auto; bottom: 10px; transform: none; }
	.bbt-cats--other { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.bbt-card, .bbt-btn, .bbt-cat::after { transition: none; }
}

/* ==========================================================
   Fluent Forms (Sell Your Boat + Contact)
   ========================================================== */
.fluentform .ff-el-group { margin-bottom: 18px; }
.fluentform .ff-el-input--label label {
	font-family: var(--bbt-font-body);
	font-size: 14px;
	font-weight: 600;
	color: var(--bbt-navy);
}
.fluentform .ff-el-form-control {
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid #C9CED6;
	border-radius: 4px;
	font-family: var(--bbt-font-body);
	font-size: 16px;
	color: var(--bbt-text);
	background: var(--bbt-white);
}
.fluentform textarea.ff-el-form-control { min-height: 140px; }
.fluentform .ff-el-form-control:focus {
	border-color: var(--bbt-teal);
	box-shadow: 0 0 0 3px rgba(19, 156, 176, .2);
	outline: none;
}
.fluentform .ff-el-section-break .ff-el-section-title {
	margin: 12px 0 4px;
	font-family: var(--bbt-font-head);
	font-size: 20px;
	font-weight: 600;
	color: var(--bbt-navy);
}
.fluentform .ff-el-section-break hr { border-color: var(--bbt-sand-line); }
.fluentform .ff-btn-submit {
	min-height: 50px;
	padding: 14px 28px !important;
	border: 0 !important;
	border-radius: 4px !important;
	background: var(--bbt-coral) !important;
	color: var(--bbt-white) !important;
	font-family: var(--bbt-font-body) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
}
.fluentform .ff-btn-submit:hover { background: var(--bbt-navy) !important; }
.fluentform .ff-message-success {
	padding: 20px;
	border: 0;
	border-left: 4px solid var(--bbt-teal);
	background: var(--bbt-sand);
	color: var(--bbt-text);
	box-shadow: none;
}

/* ==========================================================
   Content pages (Importing, Marine Services, Tips)
   ========================================================== */
.bbt-prose h2 {
	margin: 1.6em 0 .5em;
	font-family: var(--bbt-font-head);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bbt-navy);
}
.bbt-prose h2:first-child { margin-top: 0; }
.bbt-prose p { margin: 0 0 1em; }
.bbt-prose ul,
.bbt-prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.bbt-prose li { margin-bottom: .45em; padding-left: .2em; }
.bbt-prose li::marker { color: var(--bbt-teal-dark); font-weight: 600; }

.bbt-prose table {
	width: 100%;
	max-width: 520px;
	margin: 0 0 1.4em;
	border-collapse: collapse;
	font-size: 16px;
}
.bbt-prose th,
.bbt-prose td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--bbt-sand-line);
	text-align: left;
}
.bbt-prose th { background: var(--bbt-sand); color: var(--bbt-navy); font-weight: 600; }
.bbt-prose td:last-child { font-weight: 600; }

.bbt-page-img img {
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: 6px;
}

.bbt-hub-card { color: inherit; text-decoration: none; }
.bbt-hub-card .bbt-hub-img img {
	width: 100%;
	height: 220px;
	max-width: none;
	object-fit: cover;
	display: block;
}
.bbt-hub-card:hover h2 { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ==========================================================
   WhatsApp
   ========================================================== */
.bbt-btn--whatsapp { gap: 8px; background: #1EBE5A; color: #FFFFFF; }
.bbt-btn--whatsapp:hover { background: #179A49; color: #FFFFFF; }

.bbt-wa-float {
	position: fixed;
	right: 20px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 20px 0 16px;
	border-radius: 999px;
	background: #1EBE5A;
	color: #FFFFFF;
	font-family: var(--bbt-font-body);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(11, 37, 69, .25);
	transition: background-color .15s ease;
}
.bbt-wa-float:hover,
.bbt-wa-float:focus-visible { background: #179A49; color: #FFFFFF; }
.bbt-wa-float:focus-visible { outline: 3px solid var(--bbt-navy); outline-offset: 3px; }
.bbt-wa-icon { flex: none; }

@media (max-width: 600px) {
	.bbt-wa-float { right: 14px; padding: 0 14px; min-height: 54px; }
	.bbt-wa-float span { display: none; }
}
