@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Inter:wght@300;400;500&display=swap');

:root {
  --paper: #f6f3ed;
  --paper-2: #efeae1;
  --matte: #e8e2d7;
  --ink: #1c1a18;
  --ink-soft: #3d3934;
  --muted: #7a736a;
  --line: #ddd6ca;
  --blue: #25399a;
  --yellow: #e2a82b;
  --red: #c4432b;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
p + p { margin-top: 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.8rem, 7.5vw, 5.8rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: 1.6rem; }
h1 em, h2 em { font-style: italic; color: var(--blue); }

.eyebrow {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
}
.lede { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.5; color: var(--ink-soft); max-width: 40ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.link { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--blue); }

/* pięciolinia z trzema "nutami" — znak rozpoznawczy strony */
.stave-rule {
  width: 132px; height: 26px; margin: 30px 0;
  background:
    radial-gradient(circle at 18px 15px, var(--blue) 5.5px, transparent 6px),
    radial-gradient(circle at 52px 8px, var(--yellow) 4px, transparent 4.5px),
    radial-gradient(circle at 88px 19px, var(--red) 5px, transparent 5.5px),
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 6px);
}

/* ---------- nagłówek ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 243, 237, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 40px; height: 26px; flex: none; color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 1.45rem; letter-spacing: 0.01em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: 0.86rem; color: var(--ink-soft); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
.nav .lang { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; }
.nav .lang:hover { border-color: var(--ink); }
.cart-count {
  display: inline-block; min-width: 20px; height: 20px; line-height: 20px;
  margin-left: 7px; padding: 0 6px; border-radius: 10px;
  background: var(--blue); color: #fff; font-size: 0.7rem; text-align: center; font-weight: 500;
}
.cart-count[hidden] { display: none; }
.nav-toggle { display: none; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--ink); transition: transform .25s; }
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 24px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero { position: relative; padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background:
    radial-gradient(closest-side, rgba(37, 57, 154, 0.14), transparent 70%) 10% 20% / 60% 60% no-repeat,
    radial-gradient(closest-side, rgba(226, 168, 43, 0.16), transparent 70%) 70% 10% / 45% 45% no-repeat,
    radial-gradient(closest-side, rgba(196, 67, 43, 0.10), transparent 70%) 60% 70% / 40% 40% no-repeat;
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 0.9fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.hero .lede { margin-top: 4px; }
.hero-obraz a { display: block; }
.hero-obraz img {
  width: 100%; max-height: 72vh; object-fit: contain; margin-left: auto;
  box-shadow: 0 30px 60px -30px rgba(28, 26, 24, 0.45), 0 2px 6px rgba(28, 26, 24, 0.08);
}
.caption { display: block; margin-top: 16px; text-align: right; font-size: 0.85rem; color: var(--muted); }
.caption em { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }

/* ---------- przyciski ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 0.86rem; font-weight: 400; letter-spacing: 0.02em;
  padding: 14px 28px; border: 1px solid var(--ink); border-radius: 999px;
  color: var(--ink); background: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn-row.center { justify-content: center; }

/* ---------- sekcje ---------- */

section { padding: clamp(64px, 9vw, 120px) 0; }
.alt { background: var(--paper-2); }
.dark { background: var(--ink); color: var(--paper); }
.dark .eyebrow, .dark .muted { color: #a59e93; }
.dark h2 em { color: var(--yellow); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 52px; }

.quote { max-width: 860px; margin: 0 auto; text-align: center; }
.quote blockquote {
  margin: 0; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem); line-height: 1.3;
}
.quote .stave-rule { margin: 34px auto; }
.quote p { max-width: 60ch; margin-left: auto; margin-right: auto; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px); }
.trio h3 { margin-bottom: 12px; }
.trio .dot { width: 14px; height: 14px; border-radius: 50%; margin-bottom: 22px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.facts { list-style: none; padding: 0; margin: 34px 0 0; font-size: 0.95rem; }
.facts li { display: flex; gap: 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts b { font-weight: 400; color: var(--muted); min-width: 96px; }
.dark .facts li { border-color: rgba(246, 243, 237, 0.14); }
.dark .facts a:hover { color: var(--yellow); }
.btn-light { border-color: var(--paper); color: var(--paper); }
.btn-light:hover { background: var(--paper); color: var(--ink); }

.opis-long { font-family: var(--serif); font-size: 1.35rem; line-height: 1.6; color: var(--ink-soft); }

/* ---------- siatka obrazów ---------- */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 36px; }
.card { display: block; }
.card-frame {
  position: relative; aspect-ratio: 4 / 5; background: var(--matte);
  display: grid; place-items: center; padding: 10%; overflow: hidden;
}
.card-frame img {
  max-height: 100%; object-fit: contain;
  box-shadow: 0 14px 30px -16px rgba(28, 26, 24, 0.5);
  transition: transform .5s ease;
}
.card:hover .card-frame img { transform: translateY(-4px) scale(1.015); }
.tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; background: var(--paper); color: var(--muted);
}
.tag-zarezerwowany { background: var(--yellow); color: var(--ink); }
.card-body { padding-top: 18px; }
.card-title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; }
.card-meta { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.card-price { font-size: 0.95rem; margin-top: 8px; }

/* ---------- filtry ---------- */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 26px 0; margin: 50px 0 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chip {
  font-family: var(--sans); font-size: 0.84rem; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); background: none; cursor: pointer; transition: all .2s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters .spacer { flex: 1; }

select, input, textarea {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 300; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 14px; width: 100%;
}
select { cursor: pointer; width: auto; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }

/* ---------- szczegóły obrazu ---------- */

.back { display: inline-block; padding-top: 34px; font-size: 0.86rem; color: var(--muted); }
.back:hover { color: var(--ink); }
.work { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(40px, 6vw, 80px); align-items: start; padding: 40px 0 20px; }
.work-img { margin: 0; background: var(--matte); padding: clamp(24px, 6%, 64px); display: grid; place-items: center; }
.work-img img { max-height: 78vh; object-fit: contain; box-shadow: 0 30px 60px -30px rgba(28, 26, 24, 0.5); cursor: zoom-in; }
.work-info { position: sticky; top: 110px; }
.work-info h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); }
.work-info .opis { font-family: var(--serif); font-size: 1.3rem; line-height: 1.55; color: var(--ink-soft); }
.work dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; margin: 32px 0; font-size: 0.95rem; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work dl:not(:has(dt)) { display: none; }
.work dt { color: var(--muted); }
.work dd { margin: 0; }
.price-big { font-family: var(--serif); font-size: 2.2rem; }
.work .small { margin-top: 26px; }

/* ---------- koszyk ---------- */

.cart-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(40px, 6vw, 80px); align-items: start; padding: 56px 0 100px; }
.cart-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cart-row img { width: 96px; height: 120px; object-fit: contain; background: var(--matte); padding: 10px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 28px 0 14px; font-family: var(--serif); font-size: 2rem; }
.remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-family: var(--sans); font-size: 0.84rem; }
.remove:hover { color: var(--red); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(22px, 4vw, 36px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label > span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 0; }

/* ---------- stopka ---------- */

.site-foot { border-top: 1px solid var(--line); padding: 64px 0 36px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-grid .muted { margin-top: 14px; max-width: 34ch; font-size: 0.92rem; }
.foot-links { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.foot-links a:hover { color: var(--blue); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 13px 24px; border-radius: 999px; font-size: 0.88rem;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsywność ---------- */

@media (max-width: 960px) {
  .hero-grid, .split, .work, .cart-layout { grid-template-columns: 1fr; }
  .hero-obraz img { max-height: 60vh; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 40px 22px; }
  .trio, .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .work-info { position: static; }
}

@media (max-width: 680px) {
  .site-head .wrap { height: 64px; }
  .brand-name { font-size: 1.25rem; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0 clamp(16px, 4vw, 40px); background: var(--paper); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .nav.open { max-height: 320px; }
  .nav a { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav .lang { align-self: flex-start; margin: 14px 0; padding: 4px 12px; border: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 80px 1fr; }
  .cart-row img { width: 80px; height: 100px; }
  .cart-row .remove { grid-column: 2; justify-self: start; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .caption { text-align: left; }
}

/* ---------- panel admina ---------- */

.admin main { padding: 40px clamp(16px, 4vw, 40px) 100px; }
.admin-nav { display: flex; align-items: center; gap: 24px; font-size: 0.88rem; }
.login { max-width: 400px; margin: 60px auto; display: grid; gap: 20px; }
.login label > span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.hp { position: absolute; left: -9999px; }
.form-error { color: var(--red); font-size: 0.9rem; min-height: 1.2em; margin: 0; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.admin-grid > form { position: sticky; top: 100px; }
.drop {
  position: relative; display: grid; place-items: center; min-height: 200px; padding: 16px;
  border: 1.5px dashed var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; text-align: center;
  transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--blue); background: #fff; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { max-height: 260px; width: auto; object-fit: contain; }
.drop img:not([hidden]) + .drop-hint { display: none; }
.drop-hint { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.a-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.a-row.edytowany { background: #fff; box-shadow: -12px 0 0 #fff, 12px 0 0 #fff; }
.a-row img { width: 72px; height: 88px; object-fit: contain; background: var(--matte); padding: 6px; }
.a-row .card-title { font-size: 1.25rem; }
.a-akcje { display: flex; gap: 14px; }
.a-akcje button { font-size: 0.86rem; }
.a-akcje .edytuj { color: var(--blue); }
.a-akcje .potwierdz { color: var(--red); font-weight: 500; }
.pill { display: inline-block; font-size: 0.72rem; padding: 2px 10px; border-radius: 999px; margin-left: 8px; background: var(--matte); color: var(--muted); vertical-align: middle; }
.pill-dostepny { background: #e3e8f8; color: var(--blue); }
.pill-zarezerwowany { background: #f7e7bf; color: #7a5a10; }
.a-rezerwacja { margin-top: 8px; flex-wrap: wrap; }
.brak-en { color: var(--red); }
.a-rezerwacja .status { color: var(--blue); }

@media (max-width: 960px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-grid > form { position: static; }
}
@media (max-width: 680px) {
  .a-row { grid-template-columns: 60px 1fr; }
  .a-row img { width: 60px; height: 74px; }
  .a-akcje { grid-column: 2; }
}
