/**
 * WEBPC — Single Oferty Nieruchomości
 * Stylesheet: brand palette + układ 55/45 + wszystkie komponenty
 */

/* ============================================================
   PALETA + ZMIENNE
   ============================================================ */
.webpc-oferta-page {
	--c-cream: #f4ebd8;
	--c-cream-light: #faf3e3;
	--c-cream-dark: #ede2cd;
	--c-text-primary: #1c2330;
	--c-text-secondary: #5a6678;
	--c-text-tertiary: #8a96a8;
	--c-accent: #c97a4d;
	--c-accent-hover: #b86a3d;
	--c-gold: #c8a878;
	--c-card: #ffffff;
	--c-border-soft: rgba(28, 35, 48, 0.10);
	--c-border-medium: rgba(28, 35, 48, 0.20);
	--c-border-strong: rgba(28, 35, 48, 0.40);

	--c-status-new: #c97a4d;
	--c-status-discount: #5a8c6a;
	--c-status-special: #1c2330;

	--font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--font-mono: 'JetBrains Mono', 'Courier New', monospace;

	--gallery-row-h: 180px;
	--gallery-big-h: 320px;
	--gallery-gap: 8px;

	font-family: var(--font-sans);
	color: var(--c-text-primary);
	line-height: 1.6;
}

/* ============================================================
   KONTENERY
   ============================================================ */
.webpc-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
}
.webpc-container-narrow {
	max-width: 920px;
}

/* ============================================================
   TYPOGRAFIA
   ============================================================ */
.webpc-oferta-page h1, .webpc-oferta-page h2, .webpc-oferta-page h3 {
	margin: 0;
	color: var(--c-text-primary);
	font-weight: 500;
}

.webpc-h2 {
	font-family: var(--font-serif);
	font-size: 28px;
	font-weight: 500;
	margin-bottom: 24px;
	letter-spacing: -0.01em;
}

.webpc-section-title {
	font-family: var(--font-sans);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	color: var(--c-text-primary);
	text-transform: uppercase;
}

/* ============================================================
   HERO — taby + 2-kolumnowy układ
   ============================================================ */
.webpc-oferta-hero {
	padding: 32px 0 48px;
}

.webpc-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.webpc-tab {
	background: transparent;
	color: var(--c-text-secondary);
	border: none;
	padding: 8px 16px;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 0.15s, background 0.15s;
	font-family: var(--font-sans);
}

.webpc-tab:hover {
	color: var(--c-text-primary);
}

.webpc-tab.active {
	background: var(--c-text-primary);
	color: var(--c-cream);
	font-weight: 500;
}

.webpc-oferta-grid {
	display: grid;
	grid-template-columns: 55fr 45fr;
	gap: 24px;
	align-items: start;
}

@media (max-width: 900px) {
	.webpc-oferta-grid {
		grid-template-columns: 1fr;
	}
}

/* ============================================================
   GALERIA — auto-balans
   ============================================================ */
.webpc-oferta-galeria {
	min-width: 0;
}

.webpc-tab-pane {
	display: none;
}

.webpc-tab-pane.active {
	display: block;
}

.webpc-gallery-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--gallery-gap);
}

.webpc-gallery-item {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	background: var(--c-cream-dark);
	height: var(--gallery-row-h);
	transition: opacity 0.15s;
}

.webpc-gallery-item.big {
	grid-column: 1 / -1;
	height: var(--gallery-big-h);
}

.webpc-gallery-item a,
.webpc-gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.webpc-gallery-item.hidden {
	display: none;
}

.webpc-gallery-item.more-overlay::after {
	content: "+" attr(data-morecount) "\A zdjęć";
	white-space: pre;
	position: absolute;
	inset: 0;
	background: rgba(28, 35, 48, 0.6);
	color: var(--c-cream);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	font-family: var(--font-serif);
	font-size: 32px;
	font-weight: 500;
	pointer-events: none;
	letter-spacing: 0.05em;
}

.webpc-gallery-item.more-overlay {
	cursor: pointer;
}

.webpc-gallery-empty {
	background: var(--c-cream);
	padding: 80px 20px;
	text-align: center;
	border-radius: 4px;
	color: var(--c-text-tertiary);
}

.webpc-gallery-empty svg {
	width: 56px;
	height: 56px;
	stroke: var(--c-gold);
	margin-bottom: 12px;
}

.webpc-gallery-empty p {
	margin: 0;
	font-size: 13px;
	letter-spacing: 0.05em;
}

/* ============================================================
   GALERIA — pozostałe taby (wideo, plan, mapa, spacer)
   ============================================================ */
.webpc-video-wrap, .webpc-spacer-wrap {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 4px;
	background: #000;
}

.webpc-video-wrap iframe,
.webpc-spacer-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.webpc-plan-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.webpc-plan-grid img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	background: var(--c-cream);
}

.webpc-mapa-placeholder, .webpc-mapa-mini {
	background: var(--c-cream);
	border-radius: 4px;
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0.5px solid var(--c-border-soft);
}

.webpc-mapa-mini {
	min-height: 360px;
}

.webpc-mapa-loader {
	text-align: center;
	color: var(--c-text-tertiary);
}

.webpc-mapa-loader svg {
	width: 48px;
	height: 48px;
	stroke: var(--c-gold);
	margin-bottom: 10px;
}

.webpc-mapa-loader p {
	margin: 0 0 4px;
	font-size: 13px;
}

.webpc-mapa-loader small {
	font-size: 11px;
	color: var(--c-text-tertiary);
	font-style: italic;
}

/* ============================================================
   INFO PANEL
   ============================================================ */
.webpc-oferta-info {
	background: var(--c-card);
	border-radius: 4px;
	padding: 24px;
	border: 0.5px solid var(--c-border-soft);
}

.webpc-info-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}

.webpc-breadcrumb {
	font-size: 11px;
	color: var(--c-text-tertiary);
}

.webpc-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.webpc-breadcrumb a:hover {
	color: var(--c-text-primary);
}

.webpc-breadcrumb .sep {
	margin: 0 4px;
	color: var(--c-text-tertiary);
}

.webpc-info-actions {
	display: flex;
	gap: 4px;
}

.webpc-action {
	background: transparent;
	border: none;
	padding: 6px;
	cursor: pointer;
	color: var(--c-text-secondary);
	transition: color 0.15s;
	border-radius: 4px;
}

.webpc-action:hover {
	color: var(--c-accent);
}

.webpc-action svg {
	width: 16px;
	height: 16px;
}

.webpc-action.active svg {
	fill: var(--c-accent);
	color: var(--c-accent);
}

.webpc-info-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.webpc-meta-type {
	font-size: 11px;
	letter-spacing: 0.1em;
	color: var(--c-text-tertiary);
	font-weight: 500;
}

.webpc-meta-number {
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	background: var(--c-cream);
	color: var(--c-text-primary);
	padding: 2px 8px;
	border-radius: 4px;
	letter-spacing: 0;
}

.webpc-info-title {
	font-family: var(--font-serif);
	font-size: 28px;
	font-weight: 500;
	line-height: 1.15;
	margin-bottom: 16px;
	color: var(--c-text-primary);
	letter-spacing: -0.01em;
}

.webpc-info-badges {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.webpc-badge {
	font-size: 11px;
	padding: 4px 10px;
	border: 0.5px solid var(--c-border-medium);
	border-radius: 999px;
	color: var(--c-text-secondary);
	font-weight: 400;
}

.webpc-badge-status {
	border: none;
	color: white;
	font-weight: 500;
}

.webpc-status-new      { background: var(--c-status-new); }
.webpc-status-discount { background: var(--c-status-discount); }
.webpc-status-special  { background: var(--c-status-special); }

.webpc-info-price {
	padding: 14px 0;
	border-top: 0.5px solid var(--c-border-soft);
	border-bottom: 0.5px solid var(--c-border-soft);
	margin-bottom: 16px;
}

.webpc-price-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.webpc-price-main {
	font-family: var(--font-serif);
	font-size: 32px;
	font-weight: 500;
	color: var(--c-text-primary);
	line-height: 1;
}

.webpc-price-main small {
	font-size: 16px;
	color: var(--c-text-secondary);
}

.webpc-price-m2 {
	font-size: 12px;
	color: var(--c-text-tertiary);
}

.webpc-price-negotiable {
	font-size: 12px;
	color: var(--c-accent);
	margin-top: 4px;
	display: block;
}

/* ============================================================
   CTA
   ============================================================ */
.webpc-cta-primary {
	width: 100%;
	background: var(--c-accent);
	color: white;
	border: none;
	padding: 12px 20px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s, transform 0.05s;
	font-family: var(--font-sans);
	margin-bottom: 16px;
}

.webpc-cta-primary:hover {
	background: var(--c-accent-hover);
}

.webpc-cta-primary:active {
	transform: scale(0.99);
}

/* ============================================================
   KALKULATOR RATY
   ============================================================ */
.webpc-kalkulator {
	background: var(--c-cream);
	border-radius: 4px;
	margin-bottom: 18px;
	overflow: hidden;
}

.webpc-kalkulator summary {
	padding: 12px 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	list-style: none;
}

.webpc-kalkulator summary::-webkit-details-marker {
	display: none;
}

.webpc-kalkulator summary .chevron {
	width: 12px;
	height: 12px;
	color: var(--c-text-tertiary);
	transition: transform 0.2s;
}

.webpc-kalkulator[open] summary .chevron {
	transform: rotate(180deg);
}

.webpc-kalk-content {
	padding: 0 14px 14px;
}

.webpc-kalk-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 4px;
	font-size: 12px;
}

.webpc-kalk-row label {
	color: var(--c-text-secondary);
}

.webpc-kalk-row output {
	color: var(--c-text-primary);
	font-weight: 500;
}

.webpc-kalk-content input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 4px;
	background: var(--c-border-soft);
	border-radius: 999px;
	margin: 4px 0 12px;
	cursor: pointer;
}

.webpc-kalk-content input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--c-accent);
	cursor: pointer;
	border: 0;
}

.webpc-kalk-content input[type="range"]::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--c-accent);
	cursor: pointer;
	border: 0;
}

.webpc-kalk-result {
	background: white;
	padding: 10px 12px;
	border-radius: 4px;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: 4px;
}

.webpc-kalk-result span {
	font-size: 12px;
	color: var(--c-text-secondary);
}

.webpc-kalk-result output {
	font-family: var(--font-serif);
	font-size: 18px;
	font-weight: 500;
	color: var(--c-accent);
}

.webpc-kalk-disclaimer {
	font-size: 10px;
	color: var(--c-text-tertiary);
	margin: 8px 0 0;
	text-align: center;
	line-height: 1.5;
}

.webpc-kalk-disclaimer a {
	color: var(--c-accent);
	text-decoration: none;
}

.webpc-kalk-disclaimer a:hover {
	text-decoration: underline;
}

/* ============================================================
   PARAMETRY (tabela)
   ============================================================ */
.webpc-parametry section {
	margin-bottom: 16px;
}

.webpc-parametry section:last-child {
	margin-bottom: 0;
}

.webpc-parametry h3 {
	padding-bottom: 6px;
	border-bottom: 0.5px solid var(--c-gold);
	margin-bottom: 8px;
	font-family: var(--font-sans);
}

.webpc-parametry dl {
	margin: 0;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0;
}

.webpc-parametry dt {
	font-size: 12px;
	color: var(--c-text-secondary);
	padding: 5px 0;
	border-bottom: 0.5px solid var(--c-border-soft);
}

.webpc-parametry dd {
	font-size: 12px;
	color: var(--c-text-primary);
	font-weight: 500;
	padding: 5px 0;
	margin: 0;
	text-align: right;
	border-bottom: 0.5px solid var(--c-border-soft);
}

.webpc-parametry dl > *:nth-last-child(1),
.webpc-parametry dl > *:nth-last-child(2) {
	border-bottom: 0;
}

/* ============================================================
   TAGI (wyposażenie, media, ogrzewanie)
   ============================================================ */
.webpc-tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}

.webpc-tag {
	font-size: 11px;
	padding: 3px 9px;
	background: var(--c-cream);
	color: var(--c-text-primary);
	border-radius: 999px;
	font-weight: 400;
}

.webpc-tag-warm {
	background: var(--c-cream-dark);
}

/* ============================================================
   OPIS
   ============================================================ */
.webpc-oferta-opis {
	background: var(--c-cream-light);
	padding: 56px 0;
}

.webpc-opis-content {
	font-size: 15px;
	color: var(--c-text-secondary);
	line-height: 1.75;
}

.webpc-opis-content p { margin: 0 0 1em; }

.webpc-opis-content strong {
	color: var(--c-text-primary);
	font-weight: 500;
}

.webpc-opis-content h2, .webpc-opis-content h3, .webpc-opis-content h4 {
	color: var(--c-text-primary);
	font-family: var(--font-serif);
	margin: 1.5em 0 0.5em;
}

/* ============================================================
   MAPA (poniżej hero)
   ============================================================ */
.webpc-oferta-mapa-wrap {
	padding: 56px 0;
	background: white;
}

.webpc-oferta-sasiedztwo {
	padding: 0 0 56px;
	background: white;
}

.webpc-sasiedztwo-placeholder {
	background: var(--c-cream);
	border-radius: 4px;
	padding: 40px;
	text-align: center;
	color: var(--c-text-tertiary);
}

.webpc-sasiedztwo-placeholder p {
	margin: 0 0 4px;
	font-size: 14px;
}

.webpc-sasiedztwo-placeholder small {
	font-size: 11px;
	font-style: italic;
}

/* ============================================================
   KONTAKT
   ============================================================ */
.webpc-oferta-kontakt {
	padding: 56px 0;
	background: var(--c-cream-light);
	scroll-margin-top: 100px;
}

/* Full-width bez paddingu — gdy używamy custom shortcode */
.webpc-oferta-kontakt-fullwidth {
	padding: 0;
	background: transparent;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	max-width: none;
}

.webpc-oferta-kontakt-fullwidth .webpc-container,
.webpc-oferta-kontakt-fullwidth > * {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.webpc-kontakt-intro {
	font-size: 14px;
	color: var(--c-text-secondary);
	margin-bottom: 32px;
}

.webpc-kontakt-grid {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 48px;
	align-items: start;
}

@media (max-width: 768px) {
	.webpc-kontakt-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

.webpc-agent-card {
	text-align: left;
}

.webpc-agent-photo {
	width: 140px;
	height: 140px;
	object-fit: cover;
	border-radius: 50%;
	margin-bottom: 14px;
	border: 2px solid white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.webpc-agent-name {
	font-family: var(--font-serif);
	font-size: 24px;
	font-weight: 500;
	margin-bottom: 4px;
}

.webpc-agent-role {
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--c-text-tertiary);
	text-transform: uppercase;
	margin-bottom: 16px;
}

.webpc-agent-contact {
	margin-bottom: 8px;
	font-size: 14px;
}

.webpc-agent-contact small {
	display: block;
	color: var(--c-text-tertiary);
	font-size: 11px;
	margin-bottom: 2px;
}

.webpc-agent-contact a {
	color: var(--c-text-primary);
	text-decoration: none;
	font-weight: 500;
}

.webpc-agent-contact a:hover {
	color: var(--c-accent);
}

.webpc-kontakt-form input,
.webpc-kontakt-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 0.5px solid var(--c-border-medium);
	border-radius: 4px;
	font-family: var(--font-sans);
	font-size: 14px;
	background: white;
	color: var(--c-text-primary);
	transition: border-color 0.15s;
	box-sizing: border-box;
}

.webpc-kontakt-form input:focus,
.webpc-kontakt-form textarea:focus {
	outline: none;
	border-color: var(--c-accent);
}

.webpc-form-row {
	margin-bottom: 12px;
}

.webpc-form-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}

@media (max-width: 480px) {
	.webpc-form-cols { grid-template-columns: 1fr; }
}

.webpc-form-rodo {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 11px;
	color: var(--c-text-secondary);
	line-height: 1.5;
	margin-bottom: 16px;
	cursor: pointer;
}

.webpc-form-rodo input[type="checkbox"] {
	width: auto;
	margin-top: 2px;
}

.webpc-form-rodo a {
	color: var(--c-accent);
}

.webpc-form-msg {
	margin-top: 10px;
	font-size: 13px;
	min-height: 18px;
}

.webpc-form-msg.success { color: #2c6b3f; }
.webpc-form-msg.error   { color: #b8462e; }

/* ============================================================
   POI / SĄSIEDZTWO
   ============================================================ */
.webpc-oferta-sasiedztwo {
	padding: 0 0 56px;
	background: white;
}

.webpc-poi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.webpc-poi-cat {
	background: var(--c-cream-light);
	padding: 18px;
	border-radius: 4px;
	border: 0.5px solid var(--c-border-soft);
}

.webpc-poi-cat h3 {
	font-family: var(--font-sans);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--c-text-primary);
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 0.5px solid var(--c-gold);
}

.webpc-poi-cat ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.webpc-poi-cat li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 4px 0;
	font-size: 13px;
	border-bottom: 0.5px solid var(--c-border-soft);
}

.webpc-poi-cat li:last-child {
	border-bottom: 0;
}

.webpc-poi-name {
	color: var(--c-text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.webpc-poi-dist {
	color: var(--c-text-tertiary);
	font-size: 11px;
	white-space: nowrap;
	font-family: var(--font-mono);
}

.webpc-poi-zrodlo {
	margin-top: 16px;
	font-size: 11px;
	color: var(--c-text-tertiary);
	font-style: italic;
}

/* Mapa mini (pod hero) i mapa single (w tabie) */
.webpc-mapa-mini, .webpc-mapa-single {
	width: 100%;
	height: 400px;
	background: var(--c-cream);
	border-radius: 4px;
	border: 0.5px solid var(--c-border-soft);
}

.webpc-mapa-uwaga {
	margin-top: 12px;
	padding: 10px 14px;
	background: var(--c-cream-light);
	border-left: 3px solid var(--c-gold);
	font-size: 13px;
	color: var(--c-text-secondary);
}

/* ============================================================
   PODOBNE OFERTY (używają .webpc-card z base.css)
   ============================================================ */
.webpc-oferta-podobne {
	padding: 56px 0 72px;
	background: white;
}

.webpc-podobne-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	justify-content: start;
}

.webpc-podobne-grid .webpc-card {
	max-width: 320px;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 900px) {
	.webpc-info-title { font-size: 24px; }
	.webpc-price-main { font-size: 26px; }
	.webpc-h2 { font-size: 24px; }

	.webpc-gallery-item.big { height: 240px; }
	.webpc-gallery-item { height: 140px; }
}

@media (max-width: 480px) {
	.webpc-tabs { gap: 2px; }
	.webpc-tab { padding: 6px 10px; font-size: 10px; }
	.webpc-oferta-info { padding: 18px; }
	.webpc-info-title { font-size: 20px; }
}
