/* Public place detail — scoped to .tpl-place / .pd-* only */
.tpl-place {
	--pd-primary: #009ee0;
	--pd-primary-dark: #0284c7;
	--pd-ink: #0f172a;
	--pd-muted: #64748b;
	--pd-border: #e2e8f0;
	--pd-surface: #ffffff;
	--pd-radius: 20px;
	--pd-radius-sm: 12px;
}

.tpl-place .pd-page {
	background: #f8fafc radial-gradient(1100px 360px at 50% -80px, rgba(0, 158, 224, .12), rgba(0, 158, 224, 0) 70%);
}

/* ---------- hero ---------- */
.tpl-place .pd-hero { padding: 18px 0 4px; }
.tpl-place .pd-breadcrumbs {
	color: var(--pd-muted);
	font-size: 13px;
	margin: 0 0 14px;
	padding: 18px 0 0;
}
/* breadcrumb directly precedes gallery — avoid double gap */
.tpl-place .pd-breadcrumbs + .pd-gallery { margin-top: 0; }
.tpl-place .pd-breadcrumbs a { color: var(--pd-primary-dark); text-decoration: none; }
.tpl-place .pd-breadcrumbs a:hover { text-decoration: underline; }

.tpl-place .pd-hero-inner {
	background: var(--pd-surface);
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
	padding: 26px 28px;
}
.tpl-place .pd-cat-chip {
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-radius: 999px;
	color: var(--pd-primary-dark);
	display: inline-flex;
	align-items: center;
	font-size: 13px;
	font-weight: 600;
	gap: 6px;
	padding: 5px 14px;
	text-decoration: none;
}
.tpl-place .pd-cat-chip:hover { background: #e0f2fe; }

.tpl-place .pd-title {
	border: 0;
	color: var(--pd-ink);
	font-size: 38px;
	font-weight: 700;
	line-height: 1.2;
	margin: 12px 0 8px;
	max-height: none;
	overflow: visible;
	padding: 0;
	text-align: left;
	word-break: break-word;
}
.tpl-place .pd-loc {
	align-items: flex-start;
	color: var(--pd-muted);
	display: flex;
	font-size: 14px;
	gap: 8px;
	word-break: break-word;
}
.tpl-place .pd-loc i { color: var(--pd-primary); margin-top: 2px; }
.tpl-place .pd-hero-rating { margin-top: 10px; }
.tpl-place .pd-no-rating { color: var(--pd-muted); font-size: 14px; }

.tpl-place .pd-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}
.tpl-place .pd-btn {
	align-items: center;
	border-radius: 10px;
	display: inline-flex;
	font-size: 14px;
	font-weight: 600;
	gap: 8px;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	text-decoration: none;
}
.tpl-place .pd-btn-primary { background: var(--pd-primary); color: #fff; }
.tpl-place .pd-btn-primary:hover { background: var(--pd-primary-dark); }
.tpl-place .pd-btn-ghost {
	background: #f1f5f9;
	border: 1px solid var(--pd-border);
	color: var(--pd-ink);
}
.tpl-place .pd-btn-ghost:hover { background: #e2e8f0; }
.tpl-place .pd-btn:focus-visible { box-shadow: 0 0 0 3px rgba(0, 158, 224, .3); outline: none; }

/* plugin buttons (claim listing + contact owner) aligned with pd-btn */
.tpl-place .pd-plugin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}
.tpl-place .pd-plugin-actions .btn-contact-owner-trigger {
	border-radius: 10px;
	font-size: 14px;
	min-height: 44px;
	padding: 10px 22px;
}

/* ---------- gallery ---------- */
.tpl-place .pd-gallery {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 18px;
}
/* reset legacy .place-thumb calc(25% - 18px) width */
.tpl-place .pd-gallery-tile {
	border-radius: var(--pd-radius-sm);
	display: block;
	float: none;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	width: auto;
}
.tpl-place .pd-gallery-tile:only-child { grid-column: 1 / -1; grid-row: auto; }
.tpl-place .pd-gallery-tile:only-child .pd-gallery-image { height: 320px; width: 100%; }
.tpl-place .pd-gallery-feature { grid-column: span 2; grid-row: span 2; }
.tpl-place .pd-gallery-tile a { display: block; height: 100%; }
.tpl-place .pd-gallery-image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}
.tpl-place .pd-gallery-tile:not(.pd-gallery-feature):not(:only-child) .pd-gallery-image { height: 160px; }
.tpl-place .pd-gallery-feature .pd-gallery-image { height: 332px; }

/* ---------- section nav ---------- */
.tpl-place .pd-section-nav { margin-top: 18px; overflow-x: auto; }
.tpl-place .pd-section-nav ul {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 2px;
}
.tpl-place .pd-section-nav li { list-style: none; margin: 0; padding: 0; }
.tpl-place .pd-section-nav a {
	background: var(--pd-surface);
	border: 1px solid var(--pd-border);
	border-radius: 999px;
	color: var(--pd-ink);
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 16px;
	text-decoration: none;
	white-space: nowrap;
}
.tpl-place .pd-section-nav a:hover {
	border-color: var(--pd-primary);
	color: var(--pd-primary-dark);
}

/* ---------- detail body ---------- */
.tpl-place .pd-detail-body { background: transparent; padding: 20px 0 10px; }
.tpl-place .pd-card {
	background: var(--pd-surface);
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
	box-sizing: border-box;
	margin: 0 0 20px;
	min-width: 0;
	padding: 22px 24px;
}
.tpl-place .pd-card h2, .tpl-place .pd-card h3 {
	border: 0;
	color: var(--pd-ink);
	font-weight: 700;
	margin: 0 0 12px;
	padding: 0;
}
.tpl-place .pd-card h2 { font-size: 20px; }
.tpl-place .pd-card h3 { font-size: 16px; }

.tpl-place .pd-overview-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.tpl-place .place-details-left,
.tpl-place .place-details-right { float: none; margin: 0; min-width: 0; width: auto; }
.tpl-place .info-block { margin: 0 0 20px; }
.tpl-place .info-block:last-child { margin-bottom: 0; }

.tpl-place .pd-card address { font-style: normal; margin: 0 0 8px; }
.tpl-place .pd-card .block { margin-bottom: 14px; }
.tpl-place .pd-card .block:last-child { margin-bottom: 0; }
.tpl-place .pd-card a { color: var(--pd-primary-dark); word-break: break-word; }
.tpl-place .pd-card .btn-contact-owner-trigger { color: #fff; }
.tpl-place .custom-field { margin-bottom: 8px; word-break: break-word; }
.tpl-place .timeframes-row { padding: 4px 0; }
.tpl-place .social-button { display: inline-block; margin-right: 8px; }
.tpl-place .social-button a { font-size: 20px; }

/* ---------- map ---------- */
.tpl-place .pd-map-card { margin-top: 15px; }
.tpl-place .pd-map-card #place-map-wrapper {
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius-sm);
	height: 320px;
	overflow: hidden;
}

/* ---------- products ---------- */
.tpl-place .pd-products .place-products {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tpl-place .pd-products .place-products .product-item {
	align-items: flex-start;
	background: #f8fafc;
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius-sm);
	display: flex;
	float: none;
	gap: 14px;
	margin: 0;
	min-width: 0;
	padding: 14px;
	width: auto;
}
/* override legacy .product-pic float+120px and .product-info calc(100% - 144px);
   image sits under the title, full card width */
.tpl-place .pd-products .place-products .product-item .product-pic {
	flex: none;
	float: none;
	margin: 10px 0 4px;
	width: 100%;
}
.tpl-place .pd-products .place-products .product-item .product-info {
	flex: 1;
	float: none;
	margin: 0;
	min-width: 0;
	width: auto;
}
.tpl-place .pd-products .place-products .product-item > .clear { display: none; }
.tpl-place .pd-products .product-pic img {
	aspect-ratio: 16 / 10;
	border-radius: 8px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}
/* description excerpt -> read more (native details) */
.tpl-place .pd-products .product-description-toggle { margin-top: 6px; }
.tpl-place .pd-products .product-description-toggle summary {
	cursor: pointer;
	list-style: none;
	min-width: 0;
}
.tpl-place .pd-products .product-description-toggle summary::-webkit-details-marker { display: none; }
.tpl-place .pd-products .product-description-toggle summary:focus-visible {
	border-radius: 6px;
	box-shadow: 0 0 0 3px rgba(0, 158, 224, .3);
	outline: none;
}
.tpl-place .pd-products .product-description-preview { display: block; word-break: break-word; }
.tpl-place .pd-products .product-description-ellipsis { color: var(--pd-muted); }
.tpl-place .pd-products .product-description-more,
.tpl-place .pd-products .product-description-less {
	align-items: center;
	color: var(--pd-primary-dark);
	display: block;
	font-size: 13px;
	font-weight: 600;
	gap: 4px;
	min-height: 44px;
	padding: 6px 0;
}
.tpl-place .pd-products .product-description-more { display: block; }
.tpl-place .pd-products .product-description-less { display: none; }
.tpl-place .pd-products .product-description-toggle[open] .product-description-preview,
.tpl-place .pd-products .product-description-toggle[open] .product-description-more { display: none; }
.tpl-place .pd-products .product-description-toggle[open] .product-description-less { display: block; }
.tpl-place .pd-products .product-description-full { margin: 4px 0 0; }

.tpl-place .pd-products .products-pagination { margin-top: 14px; }
.tpl-place .pd-products .products-pagination li {
	display: inline-block;
	list-style: none;
	margin: 0 4px 0 0;
}
.tpl-place .pd-products .products-pagination a,
.tpl-place .pd-products .products-pagination span {
	border: 1px solid var(--pd-border);
	border-radius: 8px;
	display: inline-block;
	padding: 5px 12px;
	text-decoration: none;
}
.tpl-place .pd-products .products-pagination .active span {
	background: var(--pd-primary);
	border-color: var(--pd-primary);
	color: #fff;
}

/* ---------- reviews ---------- */
.tpl-place #place-reviews .review-item {
	align-items: flex-start;
	border-bottom: 1px solid var(--pd-border);
	display: flex;
	gap: 14px;
	padding: 14px 0;
}
.tpl-place #place-reviews .review-item > .clear { display: none; }
.tpl-place #place-reviews .review-item .profile-pic {
	flex: 0 0 48px;
	float: none;
	margin: 0;
	max-width: none;
	width: 48px;
}
.tpl-place #place-reviews .review-item .review-text {
	flex: 1;
	float: none;
	margin: 0;
	min-width: 0;
	width: auto;
}
.tpl-place #place-reviews .review-item:last-of-type { border-bottom: 0; }
.tpl-place #place-reviews .profile-pic { max-width: 56px; }
.tpl-place #place-reviews .review-author-name a { color: var(--pd-ink); font-weight: 600; }
.tpl-place #place-reviews .review-pubdate { color: var(--pd-muted); font-size: 12px; }
.tpl-place #place-reviews .review-text { min-width: 0; word-break: break-word; }
.tpl-place #place-reviews textarea {
	border: 1px solid var(--pd-border);
	border-radius: 10px;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 120px;
	padding: 10px 12px;
	width: 100%;
}
.tpl-place #place-reviews textarea:focus {
	border-color: var(--pd-primary);
	box-shadow: 0 0 0 3px rgba(0, 158, 224, .15);
	outline: none;
}

/* ---------- carousels: spacing only, markup/styles shared ---------- */
.tpl-place .place-carousel-section { margin-top: 12px; }

/* ---------- hero entrance ---------- */
@keyframes pd-hero-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}
.tpl-place .pd-hero-inner { animation: pd-hero-in .3s ease-out; }
@media (prefers-reduced-motion: reduce) {
	.tpl-place .pd-hero-inner { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
	.tpl-place .pd-overview-grid { grid-template-columns: minmax(0, 1fr); }
	.tpl-place .pd-title { font-size: 28px; }
	.tpl-place .pd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tpl-place .pd-products .place-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.tpl-place .pd-gallery { grid-template-columns: minmax(0, 1fr); }
	.tpl-place .pd-gallery-feature { grid-column: auto; grid-row: auto; }
	.tpl-place .pd-page .pd-gallery .pd-gallery-tile .pd-gallery-image { height: 200px; }
	.tpl-place .pd-products .place-products { grid-template-columns: minmax(0, 1fr); }
	.tpl-place .pd-hero-inner { padding: 20px 18px; }
	.tpl-place .pd-actions .pd-btn { flex: 1 1 100%; }
}
