:root {
  --cream: #f7f2e8;
  --paper: #fffaf1;
  --ink: #241d18;
  --muted: #66564c;
  --red: #8f241c;
  --red2: #b83225;
  --brown: #2c1711;
  --gold: #f2c97c;
  --line: #dfcdb6;
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(100% - 40px, 1180px);
  margin: 0 auto;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ken Burns Animation */
@keyframes kenburns {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.08) translate(1%, -0.5%);
  }
  100% {
    transform: scale(1) translate(0, 0);
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background: var(--brown);
  color: white;
}

.stoly-hero {
  min-height: 84vh;
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 26s ease-in-out infinite;
  will-change: transform;
}

.product-hero > img {
  filter: brightness(.55) contrast(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 11, 7, 0.65) 0%, rgba(20, 11, 7, 0.78) 100%);
  z-index: 0;
}

.nav, .hero-inner {
  position: relative;
  z-index: 1;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: contain;
  background: white;
  padding: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.brand:hover img {
  transform: rotate(-3deg) scale(1.05);
}

.brand strong {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand strong, .brand span span {
  display: block;
}

.brand span span {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.links {
  display: flex;
  gap: 24px;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  font-weight: 700;
}

.mobile-only {
  display: none;
}

.links a {
  position: relative;
  padding-bottom: 6px;
  transition: color 0.3s ease;
}

.links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.links a:hover {
  color: var(--gold);
}

.links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.links .active {
  color: var(--gold);
}

.links .active::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  padding: 0;
  color: white;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}

.menu-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

body.menu-open .menu-button span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .menu-button span:nth-child(2) {
  opacity: 0;
}

body.menu-open .menu-button span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 0 24px;
  background: white;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  background: #fdfcf9;
  box-shadow: 0 8px 20px rgba(36, 29, 24, 0.15);
}

.btn:active {
  transform: translateY(-1px);
}

.icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.btn:hover .icon {
  transform: scale(1.15);
}

.btn.red {
  background: var(--red2);
  color: white;
}

.btn.red:hover {
  background: #a1281c;
}

.btn.gold {
  background: var(--gold);
  color: var(--brown);
}

.btn.gold:hover {
  background: #dfb566;
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .15);
  color: white;
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, .25);
  border-color: rgba(255, 255, 255, .7);
}

.email-button {
  font-size: 13px;
}

/* Hero Layout */
.hero-inner {
  display: grid;
  min-height: calc(92vh - 96px);
  grid-template-columns: 1fr 360px;
  align-items: center;
  gap: 44px;
  padding: 32px 0 56px;
}

.stoly-hero-inner {
  display: flex;
  min-height: calc(84vh - 96px);
  align-items: center;
  padding: 32px 0 56px;
}

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  max-width: 780px;
  margin-top: 14px;
  font-size: clamp(40px, 6.5vw, 68px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  margin-top: 12px;
  font-size: clamp(32px, 4.5vw, 44px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.lead {
  max-width: 650px;
  margin-top: 24px;
  color: rgba(255, 255, 255, .88);
  font-size: 19px;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.quick {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: rgba(20, 11, 7, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: border-color 0.3s ease;
}

.quick:hover {
  border-color: rgba(242, 201, 124, 0.4);
}

.quick b {
  display: block;
  margin-top: 16px;
  font-size: 34px;
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--gold);
}

.quick p:last-child {
  margin-top: 14px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  line-height: 1.7;
}

/* Sections */
section {
  padding: 90px 0;
}

.paper {
  background: var(--paper);
}

.dark {
  background: var(--brown);
  color: white;
}

.split {
  display: grid;
  grid-template-columns: .82fr 1fr;
  gap: 44px;
  align-items: end;
}

.stoly-split {
  grid-template-columns: .9fr 1fr;
  align-items: center;
}

.body {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.dark .body {
  color: rgba(255, 255, 255, .78);
}

/* Grids */
.grid3, .grid4, .grid2 {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.grid3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid2 {
  grid-template-columns: repeat(2, 1fr);
}

.showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

/* Cards */
.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 12px rgba(36, 29, 24, .04);
  transition: var(--transition);
}

.card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(36, 29, 24, .12);
  border-color: rgba(223, 205, 182, 0.6);
}

.card:hover img {
  transform: scale(1.05);
}

.card .pad {
  padding: 22px;
}

.card h3 {
  font-size: 20px;
  transition: color 0.3s ease;
}

.card:hover h3 {
  color: var(--red);
}

.card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* Stoły Preview */
.stoly-preview {
  display: grid;
  grid-template-columns: 1fr .86fr;
  gap: 44px;
  align-items: center;
}

.stoly-bullets {
  margin: 22px 0 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.8;
}

.stoly-bullets li {
  margin-bottom: 8px;
}

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.photo-pair img {
  height: 300px;
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

.photo-pair img:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

/* Reviews */
.review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 24px;
  transition: var(--transition);
}

.review:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(36, 29, 24, 0.08);
}

.review b {
  color: var(--red2);
}

.stars {
  color: #d99723;
  letter-spacing: 1px;
  margin-left: 6px;
}

.review p {
  margin-top: 14px;
  color: #5f5048;
  font-size: 14px;
  line-height: 1.8;
}

.review small {
  display: block;
  margin-top: 16px;
  color: #8b786a;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: #f4ded0;
  color: var(--red);
  font-weight: 900;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* Hours and Locations */
.hours-box {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(36, 29, 24, .04);
}

.hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #eadccb;
  color: var(--muted);
  font-weight: 800;
}

.hours-row:last-child {
  border-bottom: 0;
}

.hours-row span:last-child {
  color: var(--red);
}

.map-frame {
  width: 100%;
  min-height: 380px;
  border: 0;
  border-radius: 12px;
  margin-top: 32px;
  box-shadow: 0 8px 24px rgba(36, 29, 24, .08);
}

/* Stoły wiejskie specific elements */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature, .contact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 22px;
  color: #5a463b;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(36, 29, 24, .02);
  transition: var(--transition);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(36, 29, 24, .06);
  border-color: var(--gold);
}

.menu-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 36px;
}

.menu-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 16px 18px;
  color: #5a463b;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 8px rgba(36, 29, 24, .02);
  transition: var(--transition);
}

.menu-list span:hover {
  background: #fdfcf9;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(36, 29, 24, .05);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 10px rgba(36, 29, 24, .03);
  transition: var(--transition);
}

figure img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

figure:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(36, 29, 24, .1);
}

figure:hover img {
  transform: scale(1.05);
}

figcaption {
  padding: 14px;
  color: #5a463b;
  font-size: 14px;
  font-weight: 800;
}

.contact {
  border-color: rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .1);
  color: white;
  box-shadow: none;
}

/* CTA */
.cta {
  background: var(--red);
  color: white;
}

.cta .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Footer */
footer {
  background: #1f1511;
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
  padding: 40px 0;
  border-top: 2px solid #2d1e18;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 28px;
}

.footer-brand strong {
  font-family: 'Playfair Display', Georgia, serif;
  display: block;
  color: white;
  font-size: 20px;
}

.footer-brand span, .footer-meta p {
  display: block;
  margin-top: 8px;
  line-height: 1.6;
}

.footer-meta {
  align-self: flex-end;
  text-align: right;
}

.footer-data {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.footer-data span {
  display: block;
  line-height: 1.5;
}

/* Back to top button */
.top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(36, 29, 24, .25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, background-color 0.3s ease;
}

.top-button:hover {
  background: var(--red2);
  transform: translateY(-2px);
}

.top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Focus styling */
a:focus-visible, .menu-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Responsive / Mobile Styles & Carousels */
@media (max-width: 900px) {
  .wrap {
    width: min(100% - 28px, 1180px);
  }

  section {
    padding: 60px 0;
  }

  .quick {
    display: none;
  }

  .brand > span {
    display: none;
  }

  .nav {
    justify-content: space-between;
    padding: 14px 0;
    z-index: 1003;
  }

  .menu-button {
    display: inline-flex;
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 1002;
    margin-left: auto;
    background: rgba(31, 21, 17, .96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(242, 201, 124, .7);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  }

  .nav-call {
    display: none;
  }

  .links {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1001;
    flex-direction: column;
    gap: 0;
    max-height: none;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: rgba(31, 21, 17, .985);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 88px 18px 28px;
    box-shadow: none;
    pointer-events: auto;
  }

  .links a {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 16px 8px;
    color: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 18px;
  }

  .links a:hover,
  .links a:focus-visible {
    background: rgba(242, 201, 124, .12);
    color: var(--gold);
  }

  .links .mobile-only {
    display: block;
    color: var(--gold);
    overflow-wrap: anywhere;
  }

  .links a:last-child {
    border-bottom: 0;
  }

  .links a::after {
    display: none; /* Hide hover line on mobile links */
  }

  body.menu-open .links {
    display: flex;
  }

  body.menu-open .nav {
    z-index: 1003;
  }

  body.menu-open .hero-inner {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .hero-inner, .split, .stoly-preview, .cta .wrap, footer .wrap, .features {
    display: block;
  }

  .stoly-hero-inner {
    padding: 24px 0 44px;
  }

  .lead {
    font-size: 17px;
  }

  .btn {
    width: 100%;
  }

  .email-button {
    min-height: 52px;
    padding: 0 12px;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .email-button .icon {
    flex: 0 0 17px;
  }

  .body, .split > *, .stoly-preview > *, .card, .review, .features > *, figure, .contact {
    margin-top: 18px;
  }

  .photo-pair {
    margin-top: 22px;
    grid-template-columns: 1fr;
  }

  .footer-meta {
    align-self: auto;
    text-align: left;
    margin-top: 16px;
  }

  /* Przebudowa siatek na mobilne karuzele dotykowe z CSS scroll-snap */
  .showcase, .gallery, .grid4 {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 16px !important;
    padding: 10px 4px 24px !important; /* bottom padding for card shadow and scroll */
    margin-top: 24px !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    
    /* Ukrycie domyślnego paska przewijania */
    scrollbar-width: none; /* Firefox */
  }

  .showcase::-webkit-scrollbar, 
  .gallery::-webkit-scrollbar, 
  .grid4::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
  }

  /* Dostosowanie kart i elementów do szerokości karuzeli mobilnej */
  .showcase .card, .gallery figure, .grid4 .review {
    flex: 0 0 85% !important;
    width: 85% !important;
    scroll-snap-align: start !important;
    margin-top: 0 !important;
    box-shadow: 0 6px 16px rgba(36, 29, 24, 0.07) !important;
  }

  /* Usunięcie reguł ukrywania kart w celu udostępnienia całej zawartości w karuzeli */
  .showcase .card:nth-child(n+4),
  #opinie .review:nth-child(n+4),
  .gallery figure:nth-child(n+4) {
    display: block !important;
  }

  /* Usprawnienia dla menu-list na podstronie stołów */
  .menu-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .menu-list span {
    padding: 12px 14px !important;
    font-size: 13px !important;
  }
}
