/*
Theme Name: Manistone
Theme URI: https://manistone.pl
Author: Manistone
Description: Classic PHP theme for Manistone — hurtownia kamienia naturalnego. Bespoke 1:1 design ported from the static HTML prototype; content editable via ACF + WP menus/customizer.
Version: 0.7.7
Requires at least: 6.5
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: manistone
*/

/* ── RESET / BASE (ported from prototype index.html) ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Montserrat', sans-serif;
  background: #EDE5D8;
  color: #1A1614;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
::selection { background: #1A1614; color: #fff; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #6B7A8D; }
h1, h2, h3, .font-display { font-family: 'Playfair Display', serif; }

:root {
  --gold:   #B09A7A;
  --dark:   #1A1614;
  --mid:    #6B6259;
  --border: #D4C8BB;
  --bg:     #EDE5D8;
}

/* Screen-reader-only (dostępne dla czytników, niewidoczne) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── HEADER ── */
.header {
  position: fixed; left: 0; right: 0; top: 0; z-index: 50;
  width: 100%;
  background: #FAF8F5;
  border-bottom: 1px solid #E4DDD5;
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 0 32px; height: 100px;
}
.header-logo { display: inline-flex; align-items: center; }
.header-logo img, .header-logo .custom-logo {
  height: 85px; width: auto; max-width: none; object-fit: contain; mix-blend-mode: multiply;
}
.header-logo:hover img { opacity: .75; }
.header-nav { justify-self: center; }
.header-nav ul { display: flex; align-items: center; gap: 40px; }
.header-nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 500; color: var(--dark); transition: color .3s;
}
.header-nav a:hover { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 16px; justify-self: end; }
.header-cta {
  display: inline-flex; align-items: center;
  background: var(--dark); color: #fff;
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  padding: 10px 24px; transition: opacity .3s;
}
.header-cta:hover { opacity: .8; }
.burger { display: none; padding: 8px; color: var(--dark); }
.burger svg { display: block; }
.mobile-menu {
  display: none; flex-direction: column;
  background: #FAF8F5; border-top: 1px solid #E4DDD5;
  padding: 16px 24px; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu ul { display: flex; flex-direction: column; }
.mobile-menu a {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 500; color: var(--dark); padding: 12px 0;
  border-bottom: 1px solid #E4DDD5; display: block;
}
.mobile-menu li:last-child a { border-bottom: none; }
.mobile-cta {
  margin-top: 12px; text-align: center;
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  padding: 12px; border: 1px solid var(--gold); color: var(--gold); display: block;
}
@media (max-width: 1024px) {
  .header-nav, .header-cta { display: none; }
  .burger { display: block; }
  .header-inner { display: flex; justify-content: space-between; }
}

/* ── FOOTER ── */
.footer { background: #0a0a0a; border-top: 1px solid rgba(255,255,255,.05); padding: 20px 32px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-logo img { height: 121px; width: auto; object-fit: contain; opacity: .8; transition: opacity .3s; }
.footer-logo:hover img { opacity: 1; }
.footer-nav ul { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px 32px; }
.footer-nav a { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.25); transition: color .3s; }
.footer-nav a:hover { color: var(--gold); }
.footer-fb { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.25); flex-shrink: 0; transition: all .3s; }
.footer-fb:hover { color: var(--gold); border-color: var(--gold); }
.footer-bottom { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.05); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-copy { font-size: 10px; letter-spacing: .15em; color: rgba(255,255,255,.2); }

/* ── WHATSAPP FAB ── */
.wa-fab { position: fixed; bottom: 32px; right: 32px; z-index: 50; display: flex; align-items: center; gap: 12px; }
.wa-label { opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .3s; background: #1A1614; color: #fff; font-size: 12px; letter-spacing: .1em; padding: 8px 16px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.wa-fab:hover .wa-label { opacity: 1; transform: translateX(0); }
.wa-btn-wrap { position: relative; width: 56px; height: 56px; flex-shrink: 0; }
.wa-pulse { position: absolute; inset: 0; border-radius: 50%; background: rgba(37,211,102,.25); animation: wa-ping 1.5s cubic-bezier(0,0,.2,1) infinite; }
.wa-btn { position: relative; width: 56px; height: 56px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,.35); transition: transform .3s, box-shadow .3s; }
.wa-fab:hover .wa-btn { transform: scale(1.1); box-shadow: 0 4px 30px rgba(37,211,102,.55); }
@keyframes wa-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===================================================================
   HOME SECTIONS (Phase 02) — ported 1:1 from prototype index.html
   =================================================================== */

/* ── HERO ── */
.hero { position: relative; overflow: hidden; min-height: 90vh; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.40); }
.hero-gold-line { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold); }
.hero-bottom-line { position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: rgba(255,255,255,.2); }
.hero-content { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: flex-start; padding-top: 100px; padding-left: 7%; padding-right: 5%; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(40px, 6vw, 72px); font-weight: 700; color: #fff; line-height: 1.1; margin-bottom: 32px; text-shadow: 0 2px 8px rgba(0,0,0,1), 0 4px 30px rgba(0,0,0,.9); white-space: nowrap; }
.hero p { font-size: clamp(14px, 1.2vw, 18px); color: #fff; line-height: 1.8; max-width: 600px; margin-bottom: 48px; text-shadow: 0 1px 8px rgba(0,0,0,1), 0 4px 20px rgba(0,0,0,.9); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-primary { display: inline-flex; align-items: center; gap: 12px; background: var(--dark); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; padding: 16px 32px; transition: opacity .3s; }
.btn-primary:hover { opacity: .8; }
.btn-outline { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.6); color: #fff; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; padding: 16px 32px; transition: all .3s; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.hero-btns .btn-primary { background: transparent; border: 1px solid rgba(255,255,255,.6); font-weight: 400; }
.hero-btns .btn-primary:hover { border-color: #fff; background: rgba(255,255,255,.1); opacity: 1; }

/* ── SECTION HEADER (shared) ── */
.section-header { text-align: center; margin-bottom: 80px; }
.eyebrow { font-size: 10px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(32px, 4vw, 48px); font-weight: 700; color: var(--dark); line-height: 1.15; }
.title-ornament { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.title-ornament-line { height: 1px; width: 64px; background: #E4DDD5; }
.title-ornament-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ── FOR WHOM ── */
.forwhom { background: #FAF8F5; padding: 112px 32px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1280px; margin: 0 auto; }
.fw-card { background: #F0EBE3; border: 1px solid #E4DDD5; padding: 40px; transition: border-color .3s, box-shadow .3s; }
.fw-card:hover { border-color: rgba(176,154,122,.5); box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.fw-icon-wrap { width: 56px; height: 56px; border: 1px solid #E4DDD5; display: flex; align-items: center; justify-content: center; margin-bottom: 32px; transition: border-color .3s; }
.fw-card:hover .fw-icon-wrap { border-color: rgba(176,154,122,.5); }
.fw-icon-wrap svg { width: 22px; height: 22px; color: var(--mid); transition: color .3s; }
.fw-card:hover .fw-icon-wrap svg { color: var(--gold); }
.fw-subtitle { font-size: 10px; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.fw-title { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--dark); margin-bottom: 16px; }
.fw-text { font-size: 13px; color: var(--mid); line-height: 1.7; margin-bottom: 24px; }
.fw-accent { display: flex; align-items: center; gap: 12px; padding-top: 24px; border-top: 1px solid #E4DDD5; }
.fw-accent-line { height: 1px; width: 32px; background: var(--gold); flex-shrink: 0; }
.fw-accent-text { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--mid); }

/* ── OFFER ── */
.offer { background: #E8E3D9; padding: 112px 24px; }
.offer-inner { max-width: 1100px; margin: 0 auto; }
.offer-panel { display: flex; overflow: hidden; border: 1px solid var(--border); min-height: 520px; }
.offer-list { width: 288px; flex-shrink: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.offer-item { width: 100%; text-align: left; display: flex; align-items: center; gap: 16px; padding: 20px 28px; transition: background .2s; border-bottom: 1px solid var(--border); position: relative; cursor: pointer; }
.offer-item:last-child { border-bottom: none; }
.offer-item-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; transition: background .2s; }
.offer-item.active .offer-item-bar { background: var(--gold); }
.offer-item-icon { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); transition: all .2s; }
.offer-item.active .offer-item-icon { background: var(--gold); border-color: var(--gold); }
.offer-item-icon svg { width: 15px; height: 15px; color: #A89880; transition: color .2s; }
.offer-item.active .offer-item-icon svg { color: #fff; }
.offer-item-label { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; font-weight: 600; color: var(--dark); transition: color .2s; }
.offer-item.active .offer-item-label { color: #fff; }
.offer-item-desc { font-size: 10px; color: #A89880; margin-top: 4px; line-height: 1.5; transition: color .2s; }
.offer-item.active { background: var(--dark); }
.offer-item.active .offer-item-desc { color: rgba(255,255,255,.5); }
.offer-preview { flex: 1; position: relative; overflow: hidden; }
.offer-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fadeIn .4s ease; }
.offer-preview-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 50%, transparent 100%); }
.offer-preview-num { position: absolute; top: 32px; right: 32px; font-family: 'Playfair Display', serif; font-size: 60px; font-weight: 700; color: rgba(255,255,255,.08); }
.offer-preview-text { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px; }
.offer-preview-line { width: 32px; height: 1px; background: var(--gold); margin-bottom: 20px; }
.offer-preview-tag { font-size: 10px; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.offer-preview-title { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.offer-preview-desc { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.6; max-width: 400px; }

/* ── MATERIALS ── */
.materials { background: #fff; padding: 112px 0; overflow: hidden; }
.materials-header { max-width: 1280px; margin: 0 auto 56px; padding: 0 24px; text-align: center; }
.materials-carousel-wrap { display: flex; align-items: center; gap: 16px; padding: 0 24px; }
.carousel-btn { flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #E4DDD5; box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: border-color .2s; }
.carousel-btn:hover { border-color: #999; }
.carousel-btn svg { width: 20px; height: 20px; color: var(--mid); }
.materials-carousel { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; }
.materials-carousel::-webkit-scrollbar { display: none; }
.mat-card { flex-shrink: 0; width: 320px; height: 480px; position: relative; overflow: hidden; cursor: default; scroll-snap-align: start; }
.mat-card-bg { position: absolute; inset: 0; }
.mat-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 55%, transparent 100%); }
.mat-card-content { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px; display: flex; flex-direction: column; }
.mat-tagline { font-size: 10px; letter-spacing: .4em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); margin-bottom: 8px; min-height: 32px; display: flex; align-items: flex-start; }
.mat-name { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); height: 64px; display: flex; align-items: flex-start; margin-bottom: 12px; }
.mat-desc { font-size: 12px; color: rgba(255,255,255,0); line-height: 1.6; height: 64px; margin-bottom: 16px; transition: color .3s; }
.mat-card:hover .mat-desc { color: rgba(255,255,255,.7); }
.mat-props { display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity .3s; }
.mat-card:hover .mat-props { opacity: 1; }
.mat-prop { font-size: 10px; letter-spacing: .05em; color: #B09A7A; }

/* ── ABOUT ── */
.about { background: #EDE5D8; padding: 128px 32px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; max-width: 1280px; margin: 0 auto; }
.about-eyebrow { font-size: 10px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); margin-bottom: 24px; }
.about-title { font-family: 'Playfair Display', serif; font-size: clamp(32px,4vw,48px); font-weight: 700; color: var(--dark); line-height: 1.15; margin-bottom: 32px; }
.about-title em { font-style: normal; color: var(--gold); }
.about-line { height: 1px; width: 64px; background: var(--border); margin-bottom: 32px; }
.about-text { font-size: 15px; line-height: 1.8; color: var(--mid); margin-bottom: 20px; }
.about-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; padding-top: 32px; border-top: 1px solid #E4DDD5; margin-top: 8px; }
.stat-val { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.stat-lbl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--mid); line-height: 1.4; }
.about-img { aspect-ratio: 4/5; overflow: hidden; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── REVIEWS ── */
.reviews { background: #F0EBE3; padding: 112px 32px; }
.reviews-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; max-width: 1280px; margin: 0 auto; }
.review-card { background: #fff; border: 1px solid #E4DDD5; padding: 32px; transition: border-color .3s, box-shadow .3s; }
.review-card:hover { border-color: rgba(176,154,122,.4); box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.review-stars { display: flex; gap: 4px; margin-bottom: 24px; }
.star { font-size: 14px; }
.star.filled { color: var(--gold); }
.star.empty { color: #D1D5DB; }
.review-text { font-size: 13px; color: var(--mid); line-height: 1.8; margin-bottom: 32px; font-style: italic; }
.review-footer { display: flex; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid #E4DDD5; }
.review-avatar { width: 40px; height: 40px; flex-shrink: 0; background: rgba(176,154,122,.1); border: 1px solid rgba(176,154,122,.3); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 700; color: var(--gold); }
.review-name { font-size: 13px; font-weight: 500; color: var(--dark); }
.review-role { font-size: 12px; color: var(--mid); }
.reviews-note { text-align: center; margin-top: 48px; font-size: 11px; letter-spacing: .1em; color: #C4B8A8; }

/* ── CONTACT CTA ── */
.contact-cta { background: #EDE5D8; padding: 112px 32px; }
.contact-cta-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.contact-cta .eyebrow { margin-bottom: 24px; }
.contact-cta-title { font-family: 'Playfair Display', serif; font-size: clamp(32px,4vw,52px); font-weight: 700; color: var(--dark); line-height: 1.15; margin-bottom: 12px; }
.contact-cta-title em { font-style: normal; color: var(--gold); }
.contact-cta-line { height: 2px; width: 56px; background: var(--gold); margin: 24px auto 32px; }
.contact-cta-text { font-size: 15px; color: var(--mid); line-height: 1.8; margin-bottom: 40px; }
.contact-cta-btn { display: inline-flex; align-items: center; background: var(--dark); color: #fff; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; padding: 16px 40px; transition: opacity .3s; }
.contact-cta-btn:hover { opacity: .8; }

/* ── RESPONSIVE (home sections) ── */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: 1fr; max-width: 500px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .reviews-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
}
@media (max-width: 768px) {
  .hero h1 { white-space: normal; font-size: clamp(32px,8vw,48px); }
  .offer-panel { flex-direction: column; min-height: auto; }
  .offer-preview { height: 280px; order: 0; flex: none; width: 100%; }
  .offer-list { width: 100%; border-right: none; }
  .about-grid { grid-template-columns: 1fr; }
  /* materiały: strzałki POD grafiką, większe karty, widoczny opis (brak hovera na dotyku) */
  .materials-carousel-wrap { flex-wrap: wrap; justify-content: center; }
  .materials-carousel { order: 0; flex-basis: 100%; }
  #matPrev { order: 1; }
  #matNext { order: 2; }
  .mat-card { width: 85vw; max-width: 380px; height: 540px; }
  .mat-tagline { height: auto; min-height: 32px; }
  .mat-name { height: auto; min-height: 56px; }
  .mat-desc { height: auto; color: rgba(255,255,255,.75); }
  .mat-props { opacity: 1; }
}
@media (max-width: 600px) {
  .hero-content { padding-left: 24px; padding-right: 24px; }
  .forwhom, .offer, .materials, .about, .reviews, .contact-cta { padding: 64px 20px; }
}

/* ===================================================================
   SUBPAGES (Phase 04) — O nas, Kontakt, generic page
   Page hero is namespaced .page-hero to avoid clashing with home .hero.
   =================================================================== */

/* ── PAGE HERO ── */
.page-hero { position: relative; min-height: 45vh; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.page-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,.80) 50%, rgba(0,0,0,.3) 100%); }
.page-hero-gold-line { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gold); }
.page-hero-content { position: relative; z-index: 2; padding: 0 32px 40px; text-align: center; width: 100%; }
.page-hero-title { font-family: 'Playfair Display', serif; font-size: clamp(32px, 4vw, 52px); font-weight: 700; color: #fff; line-height: 1.05; text-shadow: 0 2px 8px rgba(0,0,0,.9); }

/* ── O NAS ── */
.subpage .eyebrow { font-size: 9px; letter-spacing: .5em; }
.section { background: var(--bg); padding: 90px 32px; }
.section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.subpage h2.section-title { font-family: 'Playfair Display', serif; font-size: clamp(32px, 4vw, 52px); font-weight: 700; color: var(--dark); line-height: 1.15; margin-bottom: 20px; text-align: left; }
.subpage h2.section-title em { font-style: normal; color: var(--gold); }
.gold-line { height: 2px; width: 56px; background: var(--gold); margin-bottom: 24px; margin-top: 8px; }
.gold-line-sm { height: 1px; width: 40px; background: var(--gold); margin-bottom: 20px; }
.body-text { font-size: 15px; line-height: 1.8; color: var(--mid); margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--dark); color: #fff; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; padding: 14px 32px; margin-top: 16px; transition: opacity .3s; }
.btn:hover { opacity: .8; }
.img-wrap, .img-wrap-landscape { aspect-ratio: 4/5; overflow: hidden; width: 90%; margin: auto; }
.img-wrap img, .img-wrap-landscape img { width: 100%; height: 100%; object-fit: cover; }
.section-text { background: var(--bg); padding: 0 32px 20px; }
.section-text2 { background: var(--bg); padding: 20px 32px 60px; }
.text-title { font-family: 'Playfair Display', serif; font-size: clamp(22px, 3vw, 32px); font-weight: 700; color: var(--dark); line-height: 1.2; margin-bottom: 16px; }
.text-title em { font-style: normal; color: var(--gold); }
.text-subtitle { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--dark); margin-bottom: 12px; margin-top: 8px; }
.dots-section { background: var(--bg); padding: 20px 32px; }
.dot-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.dot-text { font-size: 14px; line-height: 1.7; color: var(--mid); }
.gallery { background: var(--bg); padding: 0 32px 80px; }
.gallery-label { font-size: 9px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); margin-bottom: 32px; }
.gallery-main { aspect-ratio: 16/7; overflow: hidden; margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-main:hover img { transform: scale(1.03); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-thumb { aspect-ratio: 3/2; overflow: hidden; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-thumb:hover img { transform: scale(1.05); }

/* ── KONTAKT ── */
.contact-section { background: var(--bg); padding: 90px 32px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; max-width: 1100px; margin: 0 auto; }
.subpage h3.form-title { font-family: 'Playfair Display', serif; font-size: clamp(20px, 2vw, 26px); font-weight: 700; color: var(--dark); margin-bottom: 32px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--mid); margin-bottom: 8px; }
.form-input { width: 100%; background: #fff; border: 1px solid var(--border); color: var(--dark); font-family: 'Montserrat', sans-serif; font-size: 14px; padding: 12px 16px; outline: none; transition: border-color .3s; }
.form-input:focus { border-color: var(--gold); }
textarea.form-input { resize: none; }
.form-btn { width: 100%; background: var(--dark); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; padding: 16px; border: none; cursor: pointer; transition: opacity .3s; margin-top: 0; 
    height: 43px;}
.form-btn:hover { opacity: .8; }
.info-items { display: flex; flex-direction: column; gap: 24px; }
.info-item { display: flex; gap: 16px; align-items: flex-start; }
.info-icon { width: 40px; height: 40px; flex-shrink: 0; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.info-icon svg { color: var(--gold); }
.info-label { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.info-text { font-size: 14px; line-height: 1.6; color: var(--mid); }
.info-text a { color: inherit; transition: color .2s; }
.info-text a:hover { color: var(--gold); }
.map-embed, .map-placeholder { aspect-ratio: 16/9; border: 1px solid var(--border); background: #EDE8DF; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; margin: 40px 0 24px; overflow: hidden; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-placeholder svg { color: rgba(176,154,122,.5); }
.map-label { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: #C4B8A8; }
.fb-link { display: inline-flex; align-items: center; gap: 12px; padding: 12px 24px; border: 1px solid var(--border); color: var(--mid); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; transition: border-color .3s, color .3s; }
.fb-link:hover { border-color: var(--gold); color: var(--gold); }

/* CF7 form: map plugin markup onto the prototype's form classes */
.wpcf7-form p { margin: 0; }
.wpcf7-spinner { margin: 8px auto 0; display: block; }
.wpcf7 .wpcf7-not-valid-tip { color: #c0392b; font-size: 11px; letter-spacing: .05em; margin-top: 6px; }
.wpcf7 .wpcf7-response-output { display: none !important; } /* replaced by the themed popup */

/* ── SUBMIT POPUP (success / error) ── */
.ms-popup-overlay { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(26,22,20,.55); padding: 24px; }
.ms-popup-overlay.open { display: flex; }
.ms-popup-overlay.open .ms-popup { animation: ms-pop .42s cubic-bezier(.2,.8,.2,1.2) both; }
@keyframes ms-pop { 0% { transform: scale(.85); opacity: 0; } 55% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.ms-popup { background: #FAF8F5; border: 1px solid var(--border); max-width: 420px; width: 100%; padding: 40px 32px; text-align: center; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.ms-popup-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.ms-popup.is-success .ms-popup-icon { background: rgba(176,154,122,.12); color: var(--gold); border: 1px solid rgba(176,154,122,.4); }
.ms-popup.is-error .ms-popup-icon { background: rgba(192,57,43,.08); color: #c0392b; border: 1px solid rgba(192,57,43,.3); }
.ms-popup-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.ms-popup-text { font-size: 14px; line-height: 1.7; color: var(--mid); }
.ms-popup-close { position: absolute; top: 12px; right: 16px; font-size: 22px; line-height: 1; color: var(--mid); background: none; border: none; cursor: pointer; }
.ms-popup-close:hover { color: var(--dark); }

@media (max-width: 1024px) { .section-grid { grid-template-columns: 1fr; gap: 48px; } }
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-thumbs { grid-template-columns: repeat(2, 1fr); }
  .img-wrap, .img-wrap-landscape { width: 100%; }
}
@media (max-width: 600px) {
  .section, .contact-section, .section-text, .section-text2, .dots-section, .gallery { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  .gallery-thumbs { grid-template-columns: 1fr; }
  .page-hero-content { padding: 0 20px 32px; }
}

/* ── MATERIAL SINGLE PAGE ── */
.stones-section { background: var(--bg); padding: 90px 32px; }
.desc-wrap { margin: 0 0 32px; }
.desc-top { max-width: 700px; margin: 0 auto 40px; text-align: center; }
.desc-eyebrow { font-size: 10px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
h2.desc-title { font-family: 'Playfair Display', serif; font-size: clamp(26px,3vw,38px); font-weight: 700; color: var(--dark); line-height: 1.15; margin-bottom: 24px; }
.desc-text { font-size: 14px; color: var(--mid); line-height: 1.9; }
.desc-text + .desc-text { margin-top: 14px; }
.divider { width: 60px; height: 1px; background: var(--border); margin: 0 auto 40px; }
.gallery-header { max-width: 1100px; margin: 0 auto 20px; text-align: center; }
h3.gallery-title { font-family: 'Playfair Display', serif; font-size: clamp(20px,2vw,28px); font-weight: 700; color: var(--dark); }
.stones-grid { display: grid; grid-template-columns: repeat(2,1fr); column-gap: 24px; row-gap: 56px; max-width: 1100px; margin: 0 auto; }
.stone-img-wrap { overflow: hidden; aspect-ratio: 16/9; }
.stone-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; display: block; }
.stone-tile:hover .stone-img-wrap img { transform: scale(1.04); }
.stone-img-placeholder { aspect-ratio: 16/9; background: var(--border); }
.stone-name-wrap { display: flex; align-items: center; justify-content: center; margin-top: 12px; }
.stone-name { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dark); font-weight: 500; text-align: center; }
.mat-card-link { display: contents; }
@media (max-width: 768px) {
  .stones-section { padding: 48px 20px; }
  .stones-grid { grid-template-columns: 1fr; }
}

/* ── KONTAKT BRANCHES ── */
.branches-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; row-gap: 24px; align-items: start; max-width: 1100px; margin: 0 auto 80px; }
.branch-name { font-size: 10px; letter-spacing: .4em; text-transform: uppercase; color: var(--gold); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); min-height: 40px; display: flex; align-items: flex-end; }
.form-section { max-width: 1100px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
#msgCol { display: flex; flex-direction: column; }
#msgCol .form-group { flex: 1 1 auto; display: flex; flex-direction: column; margin-bottom: 16px; }
#msgCol .wpcf7-form-control-wrap { flex: 1 1 auto; display: flex; }
#msgCol [name="your-message"] { flex: 1 1 auto; width: 100%; height: auto;
    min-height: 151px; resize: none; }
@media (max-width: 768px) {
  .branches-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===================================================================
   COOKIE BANNER (CookieYes) — dopasowanie do palety Manistone.
   Wtyczka renderuje kolory inline; nadpisujemy je z !important, więc
   stylowanie jedzie razem z motywem i przeżywa reset ustawień wtyczki.
   Paleta: --dark #1A1614, --gold #B09A7A, --bg #EDE5D8.
   =================================================================== */
.cky-consent-container .cky-consent-bar {
  background-color: #1A1614 !important;
  border-color: rgba(176,154,122,.35) !important;
  font-family: 'Montserrat', sans-serif;
}
.cky-consent-container .cky-title { color: #EDE5D8 !important; font-family: 'Playfair Display', serif; }
.cky-consent-container .cky-notice-des,
.cky-consent-container .cky-notice-des * { color: rgba(237,229,216,.72) !important; }
.cky-consent-container .cky-notice-des a,
.cky-consent-container .cky-link { color: #B09A7A !important; text-decoration: underline; }
.cky-banner-btn-close img { filter: invert(82%) sepia(12%) saturate(420%) hue-rotate(355deg) brightness(92%); }

/* Akceptuj — wypełniony złotem (reużywany też w modalu) */
.cky-btn-accept {
  background-color: #B09A7A !important;
  border-color: #B09A7A !important;
  color: #1A1614 !important;
}
.cky-btn-accept:hover { background-color: #9c876a !important; border-color: #9c876a !important; }

/* Odrzuć / Dostosuj / Zapisz / Anuluj — obrys złoty */
.cky-btn-reject, .cky-btn-customize, .cky-btn-preferences, .cky-btn-cancel {
  background-color: transparent !important;
  border-color: rgba(176,154,122,.6) !important;
  color: #EDE5D8 !important;
}
.cky-btn-reject:hover, .cky-btn-customize:hover,
.cky-btn-preferences:hover, .cky-btn-cancel:hover {
  border-color: #B09A7A !important; color: #B09A7A !important;
}

/* Pływający przycisk powrotu do ustawień zgody */
.cky-btn-revisit-wrapper { background-color: #B09A7A !important; }
.cky-btn-revisit-wrapper .cky-btn-revisit img,
.cky-revisit-bottom-left img, .cky-revisit-bottom-right img { filter: brightness(0) saturate(100%) invert(8%); }

/* Modal preferencji — akcenty złote */
.cky-preference-center .cky-preference-title,
.cky-preference-center .cky-always-active { color: #1A1614 !important; }
.cky-accordion-active .cky-accordion-btn { color: #B09A7A !important; }
.cky-switch input:checked + label,
.cky-preference-center [type="checkbox"]:checked + label { background-color: #B09A7A !important; }

/* Desktop (box 440px): porządkujemy układ przycisków — wtyczka zostawia prawy
   margines na pełnoszerokim „Akceptuj", przez co wychodził poza ramkę banera.
   Mobile (<600px) zostaje nietknięty — tam układ jest poprawny. */
@media (min-width: 600px) {
  .cky-consent-container .cky-notice-btn-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0 !important;
    margin-top: 18px !important;
  }
  .cky-consent-container .cky-notice-btn-wrapper .cky-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 11px 10px !important;
    box-sizing: border-box !important;
  }
  /* „Akceptuj" pełna szerokość wiersza, ale w obrębie banera */
  .cky-consent-container .cky-notice-btn-wrapper .cky-btn-accept {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}
