@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --crema: #f5efe3;
  --crema-alt: #ece2cf;
  --wosk: #8c2f39;
  --wosk-dark: #6d2029;
  --orzech: #5a3e2b;
  --oliwka: #707b4a;
  --ink: #241f1a;
  --line: rgba(36, 31, 26, 0.14);
  --radius: 4px;
  --maxw: 1180px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--crema);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

img {
  max-width: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

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

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  color: var(--orzech);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--crema);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--wosk);
  white-space: nowrap;
}

.logo em {
  font-style: italic;
  color: var(--orzech);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--orzech);
  color: var(--crema);
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.cart-btn:hover {
  background: var(--wosk);
}

.cart-count {
  background: var(--wosk);
  color: var(--crema);
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-btn .cart-count {
  background: var(--crema);
  color: var(--wosk);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--ink);
}

.nav-close {
  display: none;
  position: fixed;
  top: 20px;
  right: calc(min(300px, 80vw) - 44px);
  z-index: 86;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--orzech);
  cursor: pointer;
}

.nav-close.open {
  display: block;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 26, 0.4);
  z-index: 84;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Hero (split) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  min-height: 86vh;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px 48px 32px;
  max-width: 560px;
  margin: 0 auto 0 0;
}

.hero-kicker {
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  color: var(--oliwka);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.hero-text h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  margin-bottom: 22px;
}

.hero-text h1 .accent {
  font-style: italic;
  color: var(--wosk);
}

.hero-text p {
  font-size: 1.08rem;
  color: var(--orzech);
  max-width: 46ch;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--orzech);
  cursor: pointer;
  background: none;
}

.btn-primary {
  background: var(--wosk);
  border-color: var(--wosk);
  color: var(--crema);
}

.btn-primary:hover {
  background: var(--wosk-dark);
}

.btn-ghost {
  color: var(--orzech);
}

.btn-ghost:hover {
  background: rgba(90, 62, 43, 0.08);
}

.hero-img {
  position: relative;
  overflow: hidden;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 31, 26, 0) 60%, rgba(36, 31, 26, 0.35) 100%);
}

/* ---------- Promo strip ---------- */
.promo-strip {
  background: var(--orzech);
  color: var(--crema);
}

.promo-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.promo-label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.1rem;
}

.promo-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
}

.promo-price-old {
  text-decoration: line-through;
  opacity: 0.6;
}

.promo-price-new {
  font-weight: 700;
  color: #f0c419;
}

.promo-inner a.btn {
  border-color: var(--crema);
  color: var(--crema);
  padding: 9px 18px;
}

/* ---------- Sections ---------- */
section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 24px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
}

.section-head p {
  color: var(--orzech);
  max-width: 50ch;
}

/* ---------- Category teasers ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cat-card {
  background: var(--crema);
  padding: 28px 20px;
  text-align: center;
  transition: background 0.2s ease;
}

.cat-card:hover {
  background: var(--crema-alt);
}

.cat-card .num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--oliwka);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 10px;
}

.cat-card h3 {
  font-size: 1.05rem;
}

/* ---------- Product grid (crate style) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.crate {
  border: 1px solid var(--line);
  background: #fffdf8;
  display: flex;
  flex-direction: column;
  position: relative;
}

.crate-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.crate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.crate:hover .crate-img img {
  transform: scale(1.04);
}

.crate-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  background: var(--crema);
  border: 1px solid var(--orzech);
  color: var(--orzech);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.badge-promo {
  background: var(--wosk);
  border-color: var(--wosk);
  color: var(--crema);
}

.crate-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.crate-cat {
  font-size: 0.72rem;
  color: var(--oliwka);
  font-weight: 600;
}

.crate-body h3 {
  font-size: 1.08rem;
}

.crate-body h3 a:hover {
  color: var(--wosk);
}

.crate-desc {
  font-size: 0.86rem;
  color: #5a4e40;
  flex: 1;
}

.crate-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.price {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--ink);
}

.price .unit {
  font-family: 'Work Sans', sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  color: #7a6e5e;
}

.price .old {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.8rem;
  text-decoration: line-through;
  color: #9a8d7a;
  margin-right: 6px;
}

.add-btn {
  background: var(--orzech);
  color: var(--crema);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
}

.add-btn:hover {
  background: var(--wosk);
}

/* ---------- Shop page filters ---------- */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  border: 1px solid var(--orzech);
  background: none;
  color: var(--orzech);
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--orzech);
  color: var(--crema);
}

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 56px 0 24px;
}

.product-detail-img {
  border: 1px solid var(--line);
  overflow: hidden;
}

.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--oliwka);
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.product-info h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 12px;
}

.product-info .price {
  font-size: 1.6rem;
  display: block;
  margin: 18px 0 20px;
}

.product-info .desc {
  color: #5a4e40;
  margin-bottom: 28px;
  max-width: 52ch;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--orzech);
  border-radius: var(--radius);
}

.stepper button {
  width: 38px;
  height: 42px;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--orzech);
}

.stepper button:hover {
  background: var(--crema-alt);
}

.stepper span {
  width: 36px;
  text-align: center;
  font-weight: 600;
}

/* ---------- Cart slide-out panel ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 31, 26, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100vw);
  background: var(--crema);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  z-index: 91;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.cart-head h2 {
  font-size: 1.3rem;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--orzech);
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px 24px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item-info .name {
  font-weight: 600;
  font-size: 0.92rem;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item .stepper button {
  width: 28px;
  height: 30px;
  font-size: 0.95rem;
}

.cart-item .stepper span {
  width: 24px;
  font-size: 0.85rem;
}

.cart-remove {
  background: none;
  border: none;
  color: #9a8d7a;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.cart-empty {
  padding: 40px 0;
  text-align: center;
  color: #8a7c69;
}

.cross-sell {
  padding: 18px 24px 4px;
  border-top: 1px solid var(--line);
}

.cross-sell h3 {
  font-size: 0.82rem;
  text-transform: none;
  color: var(--oliwka);
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 12px;
}

.cross-sell-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.cross-card {
  flex: 0 0 110px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  text-align: center;
}

.cross-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 6px;
}

.cross-card .name {
  font-size: 0.74rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
  min-height: 2.4em;
}

.cross-card button {
  width: 100%;
  background: var(--orzech);
  color: var(--crema);
  border: none;
  border-radius: 3px;
  padding: 5px;
  font-size: 0.7rem;
  cursor: pointer;
}

.cart-foot {
  padding: 20px 24px 26px;
  border-top: 1px solid var(--line);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.cart-foot .btn-primary {
  width: 100%;
  justify-content: center;
}

/* ---------- Footer ---------- */
footer {
  background: var(--orzech);
  color: var(--crema-alt);
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-grid h4 {
  font-family: 'Work Sans', sans-serif;
  font-size: 0.85rem;
  text-transform: none;
  margin-bottom: 14px;
  color: var(--crema);
}

.footer-grid p, .footer-grid a {
  font-size: 0.88rem;
  color: var(--crema-alt);
  display: block;
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(245, 239, 227, 0.2);
  padding-top: 20px;
  font-size: 0.78rem;
  color: rgba(245, 239, 227, 0.6);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--crema);
  padding: 12px 22px;
  border-radius: 20px;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 120;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Order summary (kontakt) ---------- */
.order-summary {
  background: #fffdf8;
  border: 1px solid var(--line);
  padding: 28px;
  margin-bottom: 36px;
}

.order-summary .line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--line);
  background: #fffdf8;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  border-radius: var(--radius);
}

.contact-form label {
  font-size: 0.82rem;
  color: var(--orzech);
  font-weight: 600;
  margin-bottom: -8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  #o-nas > .wrap {
    grid-template-columns: 1fr !important;
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-img {
    order: -1;
    height: 46vh;
  }
  .hero-text {
    padding: 44px 24px;
    max-width: none;
  }
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(300px, 80vw);
    background: var(--crema);
    flex-direction: column;
    padding: 90px 28px 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 85;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .burger {
    display: flex;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .cat-grid {
    grid-template-columns: 1fr;
  }
}
