:root {
  --bg: #ffffff;
  --stone: #f3f3f1;
  --ink: #2e2c29;
  --muted: #77736c;
  --line: #e3e0da;
  --gold: #b89a64;
  --gold-deep: #8f7443;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.6 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.top__logo img { width: 237px; height: auto; }
.top__contact { display: flex; gap: 28px; font-size: 15px; }
.top__contact a { text-decoration: none; color: var(--muted); transition: color .2s; }
.top__contact a:hover { color: var(--gold-deep); }

/* Intro */
.intro { padding: 72px 0 40px; }
.intro h1 {
  font: 500 clamp(44px, 7vw, 84px)/1 var(--serif);
  letter-spacing: -.01em;
  margin: 0 0 20px;
  color: var(--ink);
}
.intro p { max-width: 56ch; margin: 0; color: var(--muted); }

/* Package switcher */
.packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
}
.pkg {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 30px 32px 28px;
  text-decoration: none;
  background: var(--bg);
  transition: background .25s, color .25s;
}
.pkg + .pkg { border-left: 1px solid var(--line); }
.pkg:hover { background: var(--stone); }
.pkg__name { font-size: 15px; letter-spacing: .06em; color: var(--muted); }
.pkg__price { font: 600 clamp(30px, 3.2vw, 40px)/1.1 var(--serif); color: var(--gold-deep); margin-bottom: 8px; }
.pkg__text { font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 34ch; }
.pkg__count { margin-top: auto; padding-top: 16px; font-size: 14px; color: var(--muted); }

.pkg.is-active { background: var(--ink); color: #fff; }
.pkg.is-active .pkg__name,
.pkg.is-active .pkg__text,
.pkg.is-active .pkg__count { color: rgba(255,255,255,.72); }
.pkg.is-active .pkg__price { color: var(--gold); }
.pkg.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -9px;
  width: 16px; height: 16px;
  background: var(--ink);
  transform: translateX(-50%) rotate(45deg);
}

/* Catalog */
.catalog { padding: 56px 0 96px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip {
  border: 1px solid var(--line);
  background: none;
  padding: 8px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--gold); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 40px 28px;
}
.card__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.card__img {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--stone);
  margin-bottom: 16px;
}
/* Zdjęcia to próbka na ścianie – przybliżamy, żeby w siatce było widać sam materiał */
.card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.85);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.card__btn:hover .card__img img { transform: scale(1.95); }
.card__cat { display: block; font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.card__name { display: block; font: 600 24px/1.2 var(--serif); }

.empty {
  border: 1px solid var(--line);
  padding: 56px 40px;
  text-align: center;
}
.empty .empty__title { color: var(--ink); font: 500 30px/1.25 var(--serif); margin: 0 0 12px; }
.empty p { max-width: 52ch; margin-inline: auto; color: var(--muted); }
.empty__cta {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 26px;
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  transition: background .2s;
}
.empty__cta:hover { background: var(--gold-deep); }

/* Footer */
.foot { background: var(--stone); padding: 44px 0; font-size: 14px; color: var(--muted); }
.foot__in { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.foot p { margin: 0; max-width: 70ch; }
.foot__brand { text-align: right; }
.foot__brand a { color: var(--gold-deep); }

/* Modal */
body.has-modal { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(46,44,41,.72); }
.modal__box {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: var(--bg);
  animation: pop .28s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px); } }
.modal__fig { margin: 0; background: var(--stone); display: grid; place-items: center; min-height: 0; }
.modal__fig img { width: 100%; height: 100%; max-height: calc(100vh - 48px); object-fit: contain; }
.modal__info { padding: 48px 40px 36px; display: flex; flex-direction: column; }
.modal__cat { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.modal__name { font: 500 clamp(34px, 4vw, 48px)/1.05 var(--serif); margin: 0 0 28px; }
.modal__brand { margin: -18px 0 24px; color: var(--muted); font-size: 15px; }
.modal__pkg {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
}
#modal-pkg { font-weight: 500; }
.modal__price { font: 600 22px/1 var(--serif); color: var(--gold-deep); }
.modal__nav { margin-top: auto; padding-top: 32px; display: flex; gap: 10px; }
.modal__nav button {
  flex: 1;
  border: 1px solid var(--line);
  background: none;
  padding: 10px;
  cursor: pointer;
  font-size: 15px;
}
.modal__nav button:hover { border-color: var(--gold); }
.modal__close {
  position: absolute; top: 8px; right: 12px; z-index: 2;
  width: 44px; height: 44px;
  border: 0; background: none;
  font-size: 34px; line-height: 1;
  cursor: pointer; color: var(--muted);
}
.modal__close:hover { color: var(--ink); }

/* Responsive */
@media (max-width: 900px) {
  .top__contact a:not(:first-child) { display: none; }
  .packages { grid-template-columns: 1fr; }
  .pkg + .pkg { border-left: 0; border-top: 1px solid var(--line); }
  .pkg { padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; }
  .pkg__price { margin: 0; font-size: 26px; }
  .pkg__text, .pkg__count { grid-column: 1 / -1; }
  .pkg:not(.is-active) .pkg__text { display: none; }
  .pkg__count { padding-top: 6px; }
  .pkg.is-active::after { display: none; }
  .modal { padding: 0; }
  .modal__box { grid-template-columns: 1fr; max-height: 100vh; height: 100%; overflow-y: auto; }
  .modal__fig img { max-height: 60vh; }
  .modal__info { padding: 28px 24px; }
  .foot__in { grid-template-columns: 1fr; gap: 20px; }
  .foot__brand { text-align: left; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .top__in { min-height: 72px; }
  .top__logo img { width: 170px; }
  .intro { padding: 44px 0 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
  .card__name { font-size: 20px; }
  .card__cat { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
