/* Self-hosted brand fonts */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/quicksand-700.woff2') format('woff2');
}

:root {
  /* Palette taken from branco.pl's CSS custom properties */
  --bg: #e8e7e7; /* warm light grey page */
  --surface: #ffffff; /* cards / image tiles sit on white */
  --fg: #040000; /* near-black text */
  --muted: #6e7d91; /* neutral grey */
  --line: #d6d5d5; /* hairline on grey bg */
  --accent: #121212; /* primary actions (buttons) */
  --accent-hover: #000000;
  --red: #cd1916; /* brand red accent */
  --maxw: 1200px;
  --gap: clamp(1rem, 2vw, 2rem);
  --radius: 12px; /* cards */
  --radius-sm: 8px; /* buttons */
  --font: "Inter", Arial, sans-serif;
  --font-display: "Quicksand", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}
h2 {
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
}
h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gap);
}

.muted {
  color: var(--muted);
}

.section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

/* Buttons (match branco.pl: rounded, sentence-case, Inter 600) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.5em 1.2em;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.25s ease, transform 0.08s ease;
}
.btn:hover {
  text-decoration: none;
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn:active {
  transform: translateY(1px);
}

/* Eyebrow label */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.25em;
  font-size: 1.15rem;
}
.brand:hover {
  text-decoration: none;
}
.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: 0.95rem;
}
.nav a:hover,
.site-footer a:hover {
  color: var(--red);
  text-decoration: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding-top: 3rem;
  font-size: 0.92rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
}
.site-footer__brand .brand {
  margin-bottom: 0.5rem;
}
.site-footer__h {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.site-footer__bar {
  border-top: 1px solid var(--line);
  margin-top: 2.5rem;
  padding-block: 1.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}
@media (max-width: 760px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 440px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

/* Product grid (cards) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}
.card {
  display: block;
  transition: transform 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  text-decoration: none;
}
.card__media {
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  transition: box-shadow 0.25s ease;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card__media img {
  transform: scale(1.04);
}
.card:hover .card__media {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.card__title {
  margin-top: 0.7rem;
  font-weight: 600;
}

/* Section heading helper */
.section--tight {
  padding-block: clamp(2rem, 4vw, 3rem);
}

/* Generic prose */
.prose {
  max-width: 65ch;
}
.prose p {
  margin-block: 1em;
}

/* Product gallery: main image + thumbnail strip */
.pgallery {
  display: grid;
  gap: 0.75rem;
}
.pgallery__main {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.pgallery__main img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.pgallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.pgallery__nav--prev {
  left: 0.5rem;
}
.pgallery__nav--next {
  right: 0.5rem;
}
.pgallery__thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.pgallery__thumb {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.pgallery__thumb:hover {
  opacity: 0.85;
}
.pgallery__thumb.is-active {
  opacity: 1;
  outline: 2px solid var(--red);
  outline-offset: -2px;
}
.pgallery__thumb img {
  width: 60px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 2rem;
  overflow: hidden;
}
.lightbox.is-open {
  display: flex;
}
.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 0.18s ease;
  will-change: transform;
}
.lightbox__img.is-zoomed {
  cursor: zoom-out;
  transition: none;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
  z-index: 2;
}
.lightbox__close {
  top: 0.5rem;
  right: 0.5rem;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
}
.lightbox__nav--prev {
  left: 0.5rem;
}
.lightbox__nav--next {
  right: 0.5rem;
}
.lightbox__count {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  pointer-events: none;
}

/* Focus + motion polish */
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
