/*
 * Ajtha Project Units — cards, status tabs and details modal.
 * Tunable via CSS variables on .ajtha-units / .ajtha-unit-modal.
 */

.ajtha-units {
	--au-radius: 16px;
	--au-card-radius: 16px;
	--au-gap: 20px;
	--au-accent: #4b3b28;
	--au-ink: #4b3b28;
	--au-muted: #6b7280;
	--au-line: #e5e7eb;

	width: 100%;
}

.ajtha-units__heading {
	font-size: clamp( 20px, 2.2vw, 26px );
	font-weight: 700;
	margin: 0 0 18px;
	color: var( --au-ink );
}

/* Filter tabs ------------------------------------------------------------- */
.ajtha-units__tabs {
	display: inline-flex;
	gap: 4px;
	padding: 5px;
	border-radius: 999px;
	background: #f3f4f6;
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.ajtha-units__tab {
	border: 0;
	background: transparent;
	padding: 8px 20px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	color: var( --au-muted );
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.ajtha-units__tab:hover {
	background: rgba( 255, 255, 255, 0.6 );
	color: var( --au-ink );
}

.ajtha-units__tab.is-active,
.ajtha-units__tab.is-active:hover {
	background: #fff;
	color: var( --au-ink );
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.1 );
}

/* Cards grid -------------------------------------------------------------- */
.ajtha-units__grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: var( --au-gap );
}

.ajtha-unit-card {
	display: flex;
	flex-direction: column;
	text-align: start;
	padding: 0;
	border: 1px solid var( --au-line );
	border-radius: var( --au-card-radius );
	overflow: hidden;
	background: #fff;
	color: var( --au-ink ); /* stop the theme's white button text colour. */
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Hover: subtle lift + accent border + gentle image zoom (no blue fill). */
.ajtha-unit-card:hover,
.ajtha-unit-card:focus-visible {
	background: #fff;
	border-color: var( --au-accent );
	box-shadow: 0 14px 32px #4b3b2819;
	transform: translateY( -4px );
}

.ajtha-unit-card:focus {
    background: none;
    border: 1px solid var( --au-accent );
}

.ajtha-unit-card__img {
	transition: transform 0.45s ease;
}

.ajtha-unit-card:hover .ajtha-unit-card__img {
	transform: scale( 1.05 );
}

.ajtha-unit-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: #eef1f4;
}

.ajtha-unit-card__img,
.ajtha-unit-card__ph {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.ajtha-unit-card__status {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	padding: 4px 14px;
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.ajtha-unit-card__body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ajtha-unit-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.ajtha-unit-card__type {
	font-size: 12px;
	font-weight: 600;
	color: var( --au-muted );
	border: 1px solid var( --au-line );
	padding: 2px 10px;
	border-radius: 999px;
}

.ajtha-unit-card__title {
	font-size: 16px;
	font-weight: 700;
	color: var( --au-ink );
}

.ajtha-unit-card__price {
	font-size: 18px;
	font-weight: 800;
	color: var( --au-accent );
}

.ajtha-unit-card__cur {
	font-size: 13px;
	font-weight: 600;
}

.ajtha-unit-card__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	color: var( --au-muted );
	font-size: 13px;
	border-top: 1px solid var( --au-line );
	padding-top: 12px;
}

.ajtha-unit-card__stats span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.ajtha-unit-ic {
	color: var( --au-accent );
	flex: none;
}

/* Modal ------------------------------------------------------------------- */
html.ajtha-modal-open {
	overflow: hidden;
}

.ajtha-unit-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ajtha-unit-modal.is-open {
	display: flex;
}

.ajtha-unit-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 15, 23, 42, 0.55 );
	backdrop-filter: blur( 2px );
}

.ajtha-unit-modal__dialog {
	position: relative;
	z-index: 1;
	width: min( 960px, 100% );
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 20px;
	padding: 26px;
	box-shadow: 0 30px 80px rgba( 0, 0, 0, 0.35 );
}

.ajtha-unit-modal__close {
	position: absolute;
	top: 13px;
	inset-inline-end: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 0; /* override theme button min-width. */
	padding: 0;   /* override theme button padding (was making it an oval). */
	margin: 0;
	box-sizing: border-box;
	border: 0;
	border-radius: 50%;
	background: #f3f4f6;
	color: #374151;
	font-size: 22px;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
	z-index: 3;
}


@media screen and ( max-width: 767px ){
	.ajtha-unit-modal__close {
		top: 5px;
		inset-inline-end: 5px;

		width: 30px;
    	height: 30px;
    	font-size: 16px ;
	}
}

.ajtha-unit-modal__close:hover,
.ajtha-unit-modal__close:focus {
	background: #e5e7eb;
	color: #111827;
	box-shadow: none;
}

.ajtha-unit-modal__cols {
	display: grid;
	/* minmax(0,…) stops the slider's flex content from blowing the track up. */
	grid-template-columns: minmax( 0, 1fr ) minmax( 0, 0.9fr );
	gap: 24px;
	align-items: start;
}

.ajtha-unit-modal__media {
	min-width: 0; /* allow the Swiper track to be measured against the column. */
	overflow: hidden;
}

.ajtha-unit-modal__spectitle {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 14px;
	color: var( --au-ink, #1f2937 );
}

.ajtha-unit-specs__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid #eef0f2;
	font-size: 14px;
}

.ajtha-unit-specs__row dt {
	color: #6b7280;
	margin: 0;
}

.ajtha-unit-specs__row dd {
	margin: 0;
	font-weight: 700;
	color: #111827;
}

.ajtha-unit-modal__pricebox {
	margin-top: 16px;
	padding: 16px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.06 );
}

.ajtha-unit-modal__pricelabel {
	font-size: 13px;
	color: #6b7280;
}

.ajtha-unit-modal__price {
	font-size: 26px;
	font-weight: 800;
	color: #111827;
}

.ajtha-unit-modal__price small {
	font-size: 14px;
	font-weight: 600;
}

.ajtha-unit-modal__actions {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ajtha-unit-modal__contact {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.ajtha-unit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 13px 18px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.4s ease;
	color: #fff;

}

.ajtha-unit-btn:hover {
	transform: translateY( -1px );
	color: white !important;
}

.ajtha-unit-btn--dark {
	background: #111827;
	color: #fff;
}

.ajtha-unit-btn--dark:hover {
	background: #2e3952;
	
}

.ajtha-unit-btn--wa {
	background: #25d366;
	color: #fff;
	transition: all 0.4s;
}

.ajtha-unit-btn--wa:hover {
	background: #1c9b4b;

}

.ajtha-unit-btn--call {
	background: #fff;
	color: #111827;
	border-color: #e5e7eb;
}

.ajtha-unit-btn--call:hover {
	background-color: #111827;
}

/* Lower info block -------------------------------------------------------- */
.ajtha-unit-modal__info {
	margin-top: 26px;
	padding-top: 22px;
	border-top: 1px solid #eef0f2;
}

.ajtha-unit-modal__titlerow {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* The status badge reuses the card class (position:absolute); keep it inline
   here so it sits next to the title instead of jumping to the dialog corner. */
.ajtha-unit-modal__titlerow .ajtha-unit-card__status {
	position: static;
	top: auto;
	inset-inline-start: auto;
}

.ajtha-unit-modal__unittitle {
	font-size: 22px;
	font-weight: 800;
	margin: 0;
	color: #111827;
}

.ajtha-unit-modal__typebadge {
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 3px 12px;
}

.ajtha-unit-modal__quickstats {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 14px 0;
	color: #4b5563;
	font-size: 14px;
}

.ajtha-unit-modal__quickstats span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ajtha-unit-modal__desc {
	color: #4b5563;
	line-height: 1.8;
	margin: 0 0 18px;
}

.ajtha-unit-modal__features {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 24px;
}

.ajtha-unit-modal__features li {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #374151;
	font-size: 14px;
}

.ajtha-unit-modal__features .ajtha-unit-ic {
	color: #16a34a;
}

.ajtha-unit-modal__amtitle {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #111827;
	margin-bottom: 10px;
}

.ajtha-unit-modal__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ajtha-unit-pill {
	background: #f3f4f6;
	color: #374151;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
}

/* Responsive -------------------------------------------------------------- */
@media ( max-width: 900px ) {
	.ajtha-units__grid {
		grid-template-columns: repeat( 2, 1fr );
	}
	.ajtha-unit-modal__cols {
		grid-template-columns: 1fr;
	}
}

@media ( max-width: 560px ) {
	.ajtha-units__grid {
		grid-template-columns: 1fr;
	}
	.ajtha-unit-modal__features {
		grid-template-columns: 1fr;
	}
	.ajtha-unit-modal__dialog {
		padding: 18px;
	}
}

/* Theme reset ------------------------------------------------------------- */
/* Astra/Elementor style every <button> (blue background, white text, padding,
   shadow). Neutralise that on our button-based components so only our own
   styles apply. */
.ajtha-unit-card,
.ajtha-units__tab,
.ajtha-unit-modal__close {
	-webkit-appearance: none;
	appearance: none;
	background-image: none;
	text-shadow: none;
	letter-spacing: normal;
	text-transform: none;
}

.ajtha-unit-card:focus,
.ajtha-units__tab:focus {
	outline: none;
}

/* Typography -------------------------------------------------------------- */
/* Fonts are variables so they can be swapped in one place.
   heading + labels = "Doran VF"; body text (p / spans) = "29LT Bukra". */
.ajtha-units,
.ajtha-unit-modal {
	--apg-font-heading: "Doran VF", Sans-serif;
	--apg-font-body: "29LT Bukra", Sans-serif;
	--apg-font-label: "Doran VF", Sans-serif;

	font-family: var( --apg-font-body ); /* base: paragraphs & spans */
}

/* Headings / titles / prices */
.ajtha-units__heading,
.ajtha-unit-card__title,
.ajtha-unit-card__price,
.ajtha-unit-modal__spectitle,
.ajtha-unit-modal__price,
.ajtha-unit-modal__unittitle {
	font-family: var( --apg-font-heading );
}

/* Labels: tabs, status/type badges, spec labels, buttons, section labels */
.ajtha-units__tab,
.ajtha-unit-card__status,
.ajtha-unit-card__type,
.ajtha-unit-card__cur,
.ajtha-unit-specs__row dt,
.ajtha-unit-modal__pricelabel,
.ajtha-unit-modal__typebadge,
.ajtha-unit-modal__amtitle,
.ajtha-unit-btn {
	font-family: var( --apg-font-label );
}
