section[data-ad-slug] {
	overflow-x: hidden;
}

.classified-detail-layout {
	display: grid;
	grid-template-columns: 1fr 350px;
	gap: 2.5rem;
	margin-top: 2rem;
}

.classified-gallery {
	background: white;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	margin-bottom: 1.5rem;
}

.gallery-main {
	width: 100%;
	max-height: 380px;
	background: var(--bg-secondary);
	position: relative;
	cursor: zoom-in;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.gallery-main img {
	max-width: 100%;
	max-height: 380px;
	object-fit: contain;
	display: block;
}

.gallery-zoom-hint {
	position: absolute;
	bottom: 8px;
	right: 10px;
	background: rgba(0,0,0,0.45);
	color: #fff;
	font-size: 0.75rem;
	padding: 3px 8px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	gap: 4px;
	pointer-events: none;
}

.gallery-thumbs {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	overflow-x: auto;
	scrollbar-width: thin;
}

.gallery-thumb {
	width: 72px;
	height: 54px;
	object-fit: cover;
	border-radius: 6px;
	cursor: pointer;
	opacity: 0.55;
	transition: all 0.18s ease;
	border: 2px solid transparent;
	flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
	opacity: 1;
	border-color: var(--accent);
}

/* ── Lightbox ── */
.lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9000;
	align-items: center;
	justify-content: center;
}
.lightbox.open {
	display: flex;
}
.lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.92);
}
.lightbox-img-wrap {
	position: relative;
	z-index: 1;
	max-width: 92vw;
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pinch-zoom;
}
.lightbox-img-wrap img {
	max-width: 92vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
	user-select: none;
	-webkit-user-drag: none;
}
.lightbox-close {
	position: absolute;
	top: 14px;
	right: 18px;
	z-index: 2;
	background: none;
	border: none;
	color: #fff;
	font-size: 2.4rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.15s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(255,255,255,0.12);
	border: none;
	color: #fff;
	font-size: 3rem;
	line-height: 1;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	color: rgba(255,255,255,0.75);
	font-size: 0.9rem;
	pointer-events: none;
}

.classified-info-card {
	background: white;
	border-radius: 16px;
	padding: 2rem;
	box-shadow: var(--shadow-sm);
}

.classified-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.classified-header-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	min-width: 0;
}

.classified-header-meta {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	flex-wrap: wrap;
}

.classified-header-meta .meta-item {
	font-size: 0.8rem;
	gap: 0.3rem;
	color: var(--text-secondary);
}

@media (max-width: 640px) {
	.classified-header-meta {
		gap: 0.5rem;
	}
	.classified-header-meta .meta-item {
		font-size: 0.7rem;
		gap: 0.2rem;
	}
	.classified-header-meta .meta-item svg {
		width: 11px;
		height: 11px;
	}

	/* Wrap header on small screens to prevent horizontal overflow */
	.classified-header {
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	.classified-header-left {
		flex: 1 1 100%;
		min-width: 0;
	}
	.classified-actions {
		flex: 1 1 100%;
		justify-content: flex-end;
		margin-top: 0.25rem;
	}

	/* Stack price row on very small screens */
	.classified-price-row {
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	.classified-price-row .classified-price {
		flex: 1 1 100%;
	}
}

.classified-actions {
	display: flex;
	gap: 0.5rem;
}

.btn-icon {
	width: 40px;
	height: 40px;
	border: 2px solid var(--border);
	background: white;
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-secondary);
	transition: all 0.2s ease;
}

.btn-icon:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.classified-title {
	font-family: 'Sora', sans-serif;
	font-size: 1.75rem;
	font-weight: 600;
	color: var(--primary-dark);
	margin-top: 0;
	margin-bottom: 1rem;
	line-height: 1.3;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.classified-status-banner {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1.2rem;
	border-radius: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

.classified-status-banner.status-expired {
	background: #FEF3C7;
	color: #92400E;
	border: 1px solid #FCD34D;
}

.classified-status-banner.status-sold {
	background: #D1FAE5;
	color: #065F46;
	border: 1px solid #34D399;
}

.classified-status-banner svg {
	flex-shrink: 0;
}

.classified-price-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.classified-price-row .classified-price {
	font-family: 'Sora', sans-serif;
	font-size: 2rem;
	font-weight: 700;
	color: var(--accent);
	position: static;
	top: auto;
	right: auto;
	background: transparent;
	padding: 0;
	border-radius: 0;
	box-shadow: none;
}

.price-note {
	background: var(--bg-secondary);
	padding: 0.4rem 0.8rem;
	border-radius: 6px;
	font-size: 0.85rem;
	color: var(--text-secondary);
}

.classified-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border);
	margin-bottom: 1.5rem;
}

.meta-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--text-secondary);
	font-size: 0.95rem;
}

.meta-item svg {
	color: var(--primary);
}

.classified-description h2 {
	font-family: 'Sora', sans-serif;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--primary-dark);
	margin-bottom: 1rem;
}

.description-text {
	color: var(--text-secondary);
	line-height: 1.8;
	white-space: pre-line;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.classified-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.contact-card {
	background: white;
	border-radius: 16px;
	padding: 1.5rem;
	box-shadow: var(--shadow-sm);
}

.seller-info {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.seller-avatar {
	width: 50px;
	height: 50px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: 700;
	font-size: 1.25rem;
}

.seller-details {
	display: flex;
	flex-direction: column;
}

.seller-name {
	font-weight: 600;
	color: var(--primary-dark);
}

.seller-since {
	font-size: 0.85rem;
	color: var(--text-light);
}

.btn-phone,
.btn-message {
	width: 100%;
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.btn-outline {
	background: white;
	border: 2px solid var(--primary);
	color: var(--primary);
}

.btn-outline:hover {
	background: var(--primary);
	color: white;
}

.contact-note {
	font-size: 0.85rem;
	color: var(--text-light);
	text-align: center;
	margin-top: 0.5rem;
}

.safety-tips {
	background: #FFF9E6;
	border-radius: 16px;
	padding: 1.5rem;
	border: 1px solid #FFE066;
}

.safety-tips h2 {
	font-family: 'Sora', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	color: #996600;
	margin-bottom: 1rem;
}

.safety-tips ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.safety-tips li {
	padding: 0.5rem 0;
	padding-left: 1.5rem;
	position: relative;
	font-size: 0.9rem;
	color: #996600;
}

.safety-tips li::before {
	content: '\2713';
	position: absolute;
	left: 0;
	color: #25D366;
	font-weight: 600;
}

.btn-link {
	background: none;
	border: none;
	color: var(--text-light);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 0.9rem;
	transition: color 0.2s ease;
}

.btn-link:hover {
	color: var(--accent);
}

.related-section {
	margin-top: 4rem;
	padding-top: 3rem;
	border-top: 1px solid var(--border);
}

.related-section .classifieds-grid {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
	.related-section .classifieds-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.related-section .classifieds-grid {
		grid-template-columns: 1fr;
	}
}

.subsection-title {
	font-family: 'Sora', sans-serif;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--primary-dark);
	margin-bottom: 1.5rem;
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.modal-content {
	position: relative;
	background: white;
	border-radius: 16px;
	width: 90%;
	max-width: 500px;
	box-shadow: var(--shadow-lg);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.modal-header h3 {
	font-family: 'Sora', sans-serif;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--primary-dark);
}

.modal-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--text-light);
}

.modal-body {
	padding: 1.5rem;
}

.modal-classified-title {
	margin-bottom: 1rem;
	color: var(--text-secondary);
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
	padding: 1.5rem;
	border-top: 1px solid var(--border);
}

.form-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 2px solid var(--border);
	border-radius: 10px;
	font-size: 1rem;
	transition: border-color 0.2s ease;
}

.form-input:focus {
	outline: none;
	border-color: var(--primary);
}

.guest-fields {
	background: var(--bg-secondary);
	padding: 1rem;
	border-radius: 10px;
	margin-bottom: 1rem;
}

.guest-fields-note {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-bottom: 1rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-group {
	margin-bottom: 0.75rem;
}

.form-label {
	display: block;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text-primary);
	margin-bottom: 0.4rem;
}

.form-label .required {
	color: var(--accent);
}

@media (max-width: 600px) {
	.form-row {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 1024px) {
	.classified-detail-layout {
		grid-template-columns: 1fr;
	}

	.classified-sidebar {
		order: 1;
	}

	.classified-main {
		order: 0;
	}

	.classified-title {
		font-size: 1.4rem;
	}

	.classified-price-row .classified-price {
		font-size: 1.5rem;
	}

	.classified-meta {
		flex-direction: column;
		gap: 0.75rem;
	}

}

@media (max-width: 480px) {
	.classified-info-card {
		padding: 1rem;
	}

	.gallery-thumbs {
		padding: 0.5rem 0.75rem;
		gap: 0.4rem;
		flex-wrap: wrap;
		overflow-x: visible;
	}

	.gallery-thumb {
		width: 74px;
		height: 56px;
	}

	.contact-card {
		padding: 1.25rem;
	}

	.modal-content {
		width: 95%;
		margin: 1rem;
	}

	.modal-body,
	.modal-header,
	.modal-footer {
		padding: 1rem;
	}

	/* Further reduce header elements on tiny screens */
	.classified-header {
		gap: 0.375rem;
	}
.classified-category {
	display: inline-block;
	background: var(--bg-secondary);
	color: var(--primary);
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.4rem 0.9rem;
	border-radius: 8px;
	margin-bottom: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	word-break: break-word;
	max-width: 100%;
}
	.meta-item {
		font-size: 0.75rem;
	}
	.meta-item svg {
		width: 12px;
		height: 12px;
	}
	.btn-icon {
		width: 36px;
		height: 36px;
	}

	/* Smaller title and price on tiny screens */
	.classified-title {
		font-size: 1.25rem;
	}
	.classified-price-row .classified-price {
		font-size: 1.25rem;
	}
}
