/* Lokale usługowe — template-commercial.php */

.page-template-template-commercial {
	--ngc-green: #50a348;
	--ngc-green-dark: #3f8a38;
	--ngc-ink: #272727;
	--ngc-line: #e3e3e3;
	--ngc-panel: #f1f1f1;
}

/* Pełna szerokość: motyw nadrzędny zawęża #primary (układ z sidebarem) i dokłada
   własny pas z tytułem — hero robimy sami. */
.page-template-template-commercial .breadcrumb-wrap {display: none;}
.page-template-template-commercial .col-full {max-width: 100%; width: 100%; padding: 0; margin: 0;}
.page-template-template-commercial #primary.content-area {float: none; width: 100%; max-width: 100%; margin: 0; padding: 0;}
.page-template-template-commercial #secondary {display: none;}
.page-template-template-commercial #page .site-content {margin: 0; padding: 0;}

/* Biały pasek nagłówka od góry, jak na mockupie (strona nie ma jasnego hero pod menu). */
.page-template-template-commercial #page .site-header.header-1 {background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .06);}
.page-template-template-commercial #page .site-header.header-1 .menu-by-id-list .menu-item a {color: #000;}
.page-template-template-commercial #page .site-header.header-1 .logo img.dark {display: block;}
.page-template-template-commercial #page .site-header.header-1 .logo img.light {display: none;}

.commercial-container {width: 1440px; max-width: 100%; margin: 0 auto; padding: 0 30px; box-sizing: border-box;}

/* Hero */
.commercial-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 420px;
	padding: 120px 0 60px;
	background: #2b2b2b center / cover no-repeat;
	color: #fff;
}
.commercial-hero:before {content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15));}
.commercial-hero__inner {position: relative; width: 1440px; max-width: 100%; margin: 0 auto; padding: 0 30px 0 140px; box-sizing: border-box;}
.commercial-hero h1 {margin: 0 0 20px; color: #fff; font-size: 64px; line-height: 1.05; font-weight: 400; letter-spacing: .08em; text-transform: uppercase;}
.commercial-hero p {margin: 0; font-size: 16px; letter-spacing: .4em; text-transform: uppercase; color: #fff;}

.commercial-intro {padding: 40px 0 0;}

/* Lista */
.commercial {padding: 50px 0 60px; background: #fafafa;}
.commercial-heading {text-align: center;}
.commercial-heading h2 {margin-bottom: 40px;}
.commercial-none {text-align: center; padding: 40px 0; font-size: 18px; color: var(--ngc-ink);}

.commercial-section {margin: 0 0 40px; background: #fff; border: 1px solid var(--ngc-line);}
.commercial-section__head {display: flex; justify-content: space-between; align-items: stretch; min-height: 76px; background: var(--ngc-panel);}
.commercial-section__intro {padding: 12px 12px 8px; align-self: center;}
.commercial-section__title {margin: 0; font-size: 32px; line-height: 1.1; font-weight: 400; text-transform: uppercase; color: #000;}
.commercial-section__caption {margin: 2px 0 0; font-size: 17px; line-height: 1.2; color: var(--ngc-green);}
.commercial-section__visual {margin: 0; flex: 0 0 28%; max-width: 280px; overflow: hidden;}
.commercial-section__visual img {display: block; width: 100%; height: 100%; object-fit: cover;}

.commercial-table {width: 100%; margin: 0; border-collapse: collapse; border: 0; table-layout: fixed;}
.commercial-table thead th {
	background: var(--ngc-green);
	color: #fff;
	padding: 9px 12px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .14em;
	line-height: 1.4;
	text-transform: uppercase;
	text-align: center;
	border: 0;
}
.commercial-table thead th:first-child {text-align: left; padding-left: 24px;}
.commercial-table tbody td {
	padding: 9px 12px;
	border: 0;
	border-top: 1px solid var(--ngc-line);
	font-size: 14px;
	line-height: 1.5;
	color: var(--ngc-ink);
	text-align: center;
	background: #fff;
	vertical-align: middle;
}
.commercial-table tbody td:first-child {text-align: left; padding-left: 24px;}
.commercial-table tbody tr:first-child td {border-top: 0;}
.commercial-table .commercial-cell--area strong {font-weight: 700; color: #000;}
.commercial-table .commercial-cell--rent {font-weight: 300;}
.commercial-table .commercial-cell--action {text-align: center;}

.commercial-btn {
	display: inline-block;
	min-width: 98px;
	padding: 5px 14px;
	border: 1px solid var(--ngc-ink);
	background: #fff;
	color: var(--ngc-ink);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	transition: background .25s, color .25s, border-color .25s;
}
.commercial-btn__arrow {margin-left: 6px;}
.commercial-btn:hover, .commercial-btn:focus-visible {background: var(--ngc-green); border-color: var(--ngc-green); color: #fff;}

/* Formularz (fallback bez JS) */
.commercial-form {padding: 50px 0; background: #fff;}
.commercial-form__title {text-align: center; font-weight: 400; text-transform: uppercase; margin: 0 0 30px;}

/* Modal */
.commercial-modal {position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .6); overflow-y: auto;}
.commercial-modal[hidden] {display: none;}
.commercial-modal__dialog {position: relative; width: 560px; max-width: 100%; max-height: 100%; overflow-y: auto; padding: 36px 30px 30px; background: #fff; border-top: 4px solid var(--ngc-green);}
.commercial-modal__title {margin: 0 0 6px; font-size: 24px; line-height: 1.2; text-transform: uppercase; color: #000;}
.commercial-modal__unit {margin: 0 0 20px; font-size: 14px; color: var(--ngc-green);}
.commercial-modal__close {position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;}
.commercial-modal__close span:before, .commercial-modal__close span:after {content: ''; position: absolute; left: 8px; top: 17px; width: 20px; height: 2px; background: var(--ngc-ink);}
.commercial-modal__close span:before {transform: rotate(45deg);}
.commercial-modal__close span:after {transform: rotate(-45deg);}
.commercial-modal .commercial-form__body {margin: 0;}
body.commercial-modal-open {overflow: hidden;}

/* Pas kontaktowy */
.commercial-cta {position: relative; padding: 50px 0; background: #1f2a1e; color: #fff;}
.commercial-cta__inner {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 30px;}
.commercial-cta__text {padding-left: 80px;}
.commercial-cta h2 {display: inline-block; margin: 0 0 18px; color: #fff; font-size: 30px; font-weight: 400; text-transform: uppercase;}
.commercial-cta h2:after {content: ''; display: block; width: 100%; height: 2px; margin-top: 12px; background: var(--ngc-green);}
.commercial-cta p {margin: 0; color: #fff; font-size: 18px; font-weight: 300;}
.commercial-cta__phone {display: inline-flex; align-items: center; gap: 18px; margin-right: 80px; padding: 14px 40px; border: 2px solid #fff; color: #fff; font-size: 28px; line-height: 1.2; text-decoration: none; transition: background .25s, color .25s;}
.commercial-cta__phone svg {width: 28px; height: 28px; fill: currentColor;}
.commercial-cta__phone:hover {background: #fff; color: #000;}

@media (max-width: 991px) {
	.commercial-hero__inner {padding-left: 30px;}
	.commercial-hero h1 {font-size: 44px;}
	.commercial-cta__text {padding-left: 0;}
	.commercial-cta__phone {margin-right: 0;}
}

/* Tabela → karty */
@media (max-width: 767px) {
	.commercial-container {padding: 0 16px;}
	.commercial-hero {min-height: 320px; padding-top: 100px;}
	.commercial-hero h1 {font-size: 34px;}
	.commercial-hero p {letter-spacing: .2em; font-size: 13px;}
	.commercial-section__title {font-size: 24px;}
	.commercial-section__visual {flex-basis: 40%;}
	.commercial-table, .commercial-table tbody, .commercial-table tr, .commercial-table td {display: block; width: 100%;}
	.commercial-table thead {position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);}
	.commercial-table tbody tr {padding: 12px 16px; border-top: 1px solid var(--ngc-line);}
	.commercial-table tbody tr:first-child {border-top: 0;}
	.commercial-table tbody td, .commercial-table tbody td:first-child {display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right;}
	.commercial-table tbody td[data-label]:before {content: attr(data-label); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #777; text-align: left;}
	.commercial-table .commercial-cell--action {justify-content: flex-start; padding-top: 10px;}
	.commercial-table .commercial-btn {min-width: 140px;}
	.commercial-cta__phone {font-size: 22px; padding: 12px 24px;}
}

/* ───────── Liczniki, zakładki, filtr ───────── */
.commercial [hidden] {display: none !important;}

.commercial-counters {display: flex; flex-wrap: wrap; gap: clamp(24px, 3vw, 64px); margin: 0 0 24px; padding: 0 0 24px; border-bottom: 1px solid var(--ngc-line);}
.commercial-counter {display: flex; flex-direction: column-reverse; gap: 4px; margin: 0;}
.commercial-counter dd {margin: 0; color: #000; font-size: 34px; line-height: 1.1; font-weight: 400; white-space: nowrap;}
.commercial-counter dt {color: #777; font-size: 12px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase;}
.commercial-lead {margin: 0; color: #000; font-size: 22px; letter-spacing: .5px;}

.commercial-tabs {display: flex; flex-wrap: wrap; margin: 36px 0 0; border-bottom: 1px solid var(--ngc-line);}
.commercial-tab {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	flex: 1 1 0; width: auto; min-height: 56px; margin: 0; padding: 0 20px 0 0;
	border: 0; border-bottom: 2px solid transparent; border-radius: 0;
	background: transparent; color: #777; font-size: 13px; font-weight: 500;
	letter-spacing: 1.5px; text-transform: uppercase; text-align: left; white-space: nowrap;
	cursor: pointer; transition: color .15s, border-color .15s;
}
.commercial-tab + .commercial-tab {padding-left: 20px; box-shadow: inset 1px 0 0 var(--ngc-line);}
.commercial-tab:hover {color: #000; background: transparent;}
.commercial-tab.is-active {color: #000; border-bottom-color: var(--ngc-green); background: transparent;}
.commercial-tab__count {flex-shrink: 0; color: #777; font-size: 12px; letter-spacing: 1px;}

.commercial-toolbar {display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0;}
.commercial-summary {margin: 0; color: #000; font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;}
.commercial-filter {display: flex; align-items: center; gap: 12px; margin: 0;}
.commercial-filter__label {color: #777; font-size: 12px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;}
.commercial-select {
	min-width: 210px; height: 44px; margin: 0; padding: 0 38px 0 14px;
	border: 1px solid var(--ngc-line); border-radius: 2px; background-color: #fff;
	background-image: linear-gradient(45deg, transparent 50%, var(--ngc-ink) 50%), linear-gradient(135deg, var(--ngc-ink) 50%, transparent 50%);
	background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
	background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
	-webkit-appearance: none; appearance: none;
	color: var(--ngc-ink); font-size: 14px; text-transform: none; letter-spacing: 0;
}
.commercial-select:hover, .commercial-select:focus {border-color: var(--ngc-green); outline: 0;}

/* ───────── Pełny opis inwestycji i przypisy ───────── */
.commercial-section__intro {padding: 18px 24px;}
.commercial-section__index {margin: 0 0 8px; color: var(--ngc-green); font-size: 12px; font-weight: 500; letter-spacing: .25em; text-transform: uppercase;}
.commercial-section__meta {margin: 6px 0 0; color: #777; font-size: 16px;}
.commercial-section__note {margin: 0; padding: 16px 24px; border-top: 1px solid var(--ngc-line); color: #555; font-size: 13px;}
.commercial-note {margin: 40px 0 0; color: #555; font-size: 14px;}
.commercial-empty {margin: 0; padding: 30px 0; color: #777; text-align: center;}

@media (max-width: 767px) {
	.commercial-tabs {flex-direction: column;}
	.commercial-tab, .commercial-tab + .commercial-tab {padding: 0; box-shadow: none; border-bottom: 1px solid var(--ngc-line);}
	.commercial-tab.is-active {border-bottom-color: var(--ngc-green);}
	.commercial-counter dd {font-size: 26px;}
	.commercial-lead {font-size: 17px;}
	.commercial-section__intro {padding: 14px 16px;}
}

/* ───────── Przyciski i status w tabeli (styl urocza10) ───────── */
.commercial-id {display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;}
.commercial-id__label {font-weight: 700; color: #000;}
.commercial-badge {
	display: inline-block; padding: 2px 12px; border: 1px solid #e3a9a9; border-radius: 999px;
	background: #f8dede; color: #a53a3a; font-size: 11px; font-weight: 500; line-height: 1.6;
	letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.commercial-badge--sold {border-color: #cfcfcf; background: #eee; color: #666;}

.commercial-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 0; width: 100%; max-width: 190px; padding: 10px 16px;
	border: 1px solid rgba(80, 163, 72, .45); border-radius: 2px;
	background: rgba(80, 163, 72, .16); color: #1f3d1c;
	font-size: 14px; font-style: italic; line-height: 1.3; text-decoration: none;
	transition: background .2s, border-color .2s, color .2s;
}
.commercial-btn--contact {border-color: rgba(244, 184, 111, .8); background: rgba(244, 184, 111, .3); color: #5a3a10;}
.commercial-btn:hover, .commercial-btn:focus-visible {background: var(--ngc-green); border-color: var(--ngc-green); color: #fff;}
.commercial-btn--contact:hover, .commercial-btn--contact:focus-visible {background: #f4b86f; border-color: #f4b86f; color: #000;}
.commercial-btn__arrow {margin: 0; font-style: normal; font-size: 12px;}

.commercial-table tbody td {padding-top: 14px; padding-bottom: 14px;}

@media (max-width: 767px) {
	.commercial-btn {max-width: none; width: auto; min-width: 150px;}
}

/* Kolumny tekstowe (budynek, lokal) wyrównane do lewej, liczby i przyciski na środku. */
@media (min-width: 768px) {
	.commercial-table thead th:nth-child(2), .commercial-table tbody td:nth-child(2) {text-align: left;}
}
