/**
 * Yatco overrides for The Yacht Collection.
 * Replaces plugin bundled CSS. No yt-* grid dependency.
 */

/* ═══════════════════════════════
   Single yacht – gallery
   ═══════════════════════════════ */
.yatco-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 10px;
}
.yatco-gallery .gallery-item {
	position: relative;
	overflow: hidden;
	margin: 0;
	padding: 0;
}
.yatco-gallery .gallery-item::before {
	content: "";
	display: block;
	padding-top: 56.25%;
}
.yatco-gallery .gallery-item .gallery-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.yatco-gallery .gallery-item.hidden {
	display: none;
}

/* ═══════════════════════════════
   Results grid
   ═══════════════════════════════ */
.tyc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

/* ═══════════════════════════════
   Yacht card
   ═══════════════════════════════ */
.tyc-card-wrap {
	min-width: 0;
}

.tyc-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 1px 4px rgb(0 0 0 / .08);
	transition: box-shadow .2s, transform .2s;
}
.tyc-card:hover {
	box-shadow: 0 4px 16px rgb(0 0 0 / .13);
	transform: translateY(-2px);
}

/* Image */
.tyc-card__img {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: #eee;
}
.tyc-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Body */
.tyc-card__body {
	padding: .85rem 1rem 1rem;
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* Name – double class to beat Elementor heading resets */
.tyc-card .tyc-card__name {
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 .2rem;
	padding: 0;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
}

.tyc-card__meta {
	font-size: .82rem;
	color: #777;
	margin: 0 0 auto;
	padding: 0;
}

.tyc-card__price {
	font-size: 1rem;
	font-weight: 700;
	margin: .6rem 0 0;
	padding: 0;
}

/* ═══════════════════════════════
   Results toolbar (sort + count)
   ═══════════════════════════════ */
.tyc-results__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: .75rem;
	padding: .75rem 0;
	margin-bottom: .5rem;
}
.tyc-results__count {
	font-size: .85rem;
	color: #555;
}
.tyc-results__sort {
	width: auto;
	min-width: 150px;
	padding: .4rem .5rem;
	font-size: .85rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
}

/* ═══════════════════════════════
   Pagination
   ═══════════════════════════════ */
.tyc-pagination {
	margin-top: 2rem;
	text-align: center;
}
.tyc-pagination ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: .3rem;
}
.tyc-pagination li { display: inline-block; }
.tyc-pagination a,
.tyc-pagination span {
	display: inline-block;
	padding: .4rem .75rem;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: .82rem;
	text-decoration: none;
	color: inherit;
	transition: background .15s, border-color .15s;
}
.tyc-pagination a:hover {
	background: #f5f5f5;
	border-color: #bbb;
}
.tyc-pagination .current {
	background: #222;
	color: #fff;
	border-color: #222;
}

/* ═══════════════════════════════
   No results
   ═══════════════════════════════ */
.tyc-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3rem 1rem;
	color: #666;
}

/* ═══════════════════════════════
   Search form – shared
   ═══════════════════════════════ */
.tyc-search {
	margin-bottom: 1.5rem;
}
.tyc-search__form {
	padding: 1.25rem;
	background: #f7f7f7;
	border-radius: 4px;
}

/* Labels */
.tyc-search label {
	display: block;
	font-size: .75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-bottom: .2rem;
	color: #444;
}

/* Inputs & selects */
.tyc-search .yt-input {
	display: block;
	width: 100%;
	padding: .45rem .55rem;
	font-size: .88rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
	color: #333;
	box-sizing: border-box;
	-webkit-appearance: none;
	transition: border-color .15s;
}
.tyc-search .yt-input:focus {
	outline: none;
	border-color: #888;
}
.tyc-search select.yt-input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5' stroke='%23666' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .55rem center;
	padding-right: 1.8rem;
}

/* Range pair (min / max side by side) */
.tyc-search__range {
	display: flex;
	gap: 4px;
}
.tyc-search__range .yt-input {
	flex: 1;
	min-width: 0;
}

/* Unit toggle (FT/M, USD etc.) */
.tyc-search__unit-toggle {
	display: inline-block !important;
	width: auto !important;
	min-width: 55px;
	margin-bottom: .4rem;
	padding: .2rem .35rem !important;
	font-size: .75rem !important;
	line-height: 1.2;
}

/* Field spacing */
.tyc-search__field {
	margin-bottom: .75rem;
}


/* Button */
.tyc-btn {
	display: inline-block;
	padding: .55rem 1.4rem;
	font-size: .88rem;
	font-weight: 600;
	color: #fff;
	background: #222;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: background .15s;
}
.tyc-btn:hover { background: #444; }

/* ═══════════════════════════════
   Quick search layout
   ═══════════════════════════════ */
.tyc-search__row {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	align-items: flex-end;
}
.tyc-search__submit {
	margin-bottom: .75rem;
}
.tyc-search__fields {
	flex: 1 1 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 .75rem;
	align-items: flex-end;
	min-width: 0;
}
.tyc-search__fields > .tyc-search__field {
	flex: 1 1 0;
	min-width: 0;
}
.tyc-search__submit {
	flex: 0 0 auto;
}
.tyc-search__submit .tyc-btn {
	width: 100%;
	white-space: nowrap;
}

/* Toggle link */
.tyc-search__toggle {
	display: inline-block;
	margin-top: .5rem;
	background: none;
	border: none;
	padding: 0;
	font-size: .82rem;
	color: #555;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.tyc-search__toggle:hover { color: #000; background: none; }

/* ═══════════════════════════════
   Advanced search layout
   ═══════════════════════════════ */
.tyc-search__form--adv {
	display: none;  /* toggled by plugin JS */
}
.tyc-search__grid {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0 .75rem;
}
.tyc-search__grid > .tyc-search__field {
	flex: 0 0 calc(25% - .5625rem);
	min-width: 0;
}
.tyc-search__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-top: .5rem;
	flex-wrap: wrap;
}
.tyc-search__secondary {
	font-size: .82rem;
	color: #666;
}
.tyc-search__secondary button,
.tyc-search .close-advandenced-search,
.tyc-search .expand-search {
	background: none;
	border: none;
	color: #666;
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
	padding: 0;
}
.tyc-search__secondary button:focus,
.tyc-search .close-advandenced-search:focus,
.tyc-search .expand-search:focus,
.tyc-search__toggle:focus {
	background: none;
	outline: none;
}
.tyc-search__secondary button:hover { color: #000; background: none; }

/* ═══════════════════════════════
   Responsive
   ═══════════════════════════════ */
@media (max-width: 959px) {
	.tyc-search__fields > .tyc-search__field,
	.tyc-search__grid > .tyc-search__field {
		flex-basis: calc(50% - .375rem);
	}
}
@media (max-width: 599px) {
	.tyc-search__fields > .tyc-search__field,
	.tyc-search__grid > .tyc-search__field {
		flex-basis: 100%;
	}
	.tyc-search__row {
		flex-direction: column;
	}
	.tyc-grid {
		grid-template-columns: 1fr;
	}
}
