/**
 * Style aplikacji Jaja z Leśnicy
 * Nowoczesny, ciepły, swojski i ultra-czytelny design (mobile-first)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  --color-farm-bg: #f9f8f4;
  --color-farm-card: #ffffff;
  --color-farm-border: #ede8dc;
  --color-farm-forest: #27522d;
  --color-farm-forest-dark: #1b3b20;
  --color-farm-forest-light: #eef6ef;
  --color-farm-amber: #d97706;
  --color-farm-amber-light: #fef3c7;
  --color-farm-cream: #f4ede1;
  --color-farm-dark: #1f2937;
  --color-farm-muted: #6b7280;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-farm-bg);
  color: var(--color-farm-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typografia */
h1, h2, h3, .font-serif {
  font-family: var(--font-serif);
}

.text-farm-forest { color: var(--color-farm-forest); }
.text-farm-amber { color: var(--color-farm-amber); }
.text-farm-dark { color: var(--color-farm-dark); }
.bg-warm-light { background-color: var(--color-farm-bg); }
.bg-farm-forest { background-color: var(--color-farm-forest); }
.bg-farm-forest-dark { background-color: var(--color-farm-forest-dark); }
.bg-farm-cream { background-color: var(--color-farm-cream); }
.border-farm-cream-dark { border-color: var(--color-farm-border); }

/* Kontener główny */
.container {
  width: 100%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Główny układ i gwarantowane odstępy sekcji */
.site-header {
  padding-top: 4.5rem;
  padding-bottom: 5.5rem;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-farm-border);
}

.site-main {
  padding-top: 5rem;
  padding-bottom: 0;
}

.site-intro {
  margin-bottom: 4rem;
  text-align: center;
}

.products-stack > * + * {
  margin-top: 4rem !important;
}

.site-footer {
  border-top: 1px solid var(--color-farm-border);
  background-color: #ffffff;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  margin-top: 0;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
}

/* Karty Paczek Jajek */
.product-card {
  background: var(--color-farm-card);
  border: 1px solid var(--color-farm-border);
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  margin-bottom: 0;
}

.product-card:hover {
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.09);
}

/* Odznaki / Badges */
.site-location-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: var(--color-farm-cream, #f4ede1);
  color: var(--color-farm-forest, #27522d);
  padding: 0.95rem 2.6rem;
  border-radius: 9999px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--color-farm-border, #ede8dc);
  box-shadow: 0 4px 14px rgba(39, 82, 45, 0.09);
  line-height: 1.4;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-location-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(39, 82, 45, 0.14);
}

@media (max-width: 640px) {
  .site-location-badge {
    padding: 0.75rem 1.6rem;
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-in-stock {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-out-stock {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-feature {
  background-color: var(--color-farm-cream);
  color: var(--color-farm-forest);
}

/* Galeria zdjęć kurek / jajek */
.product-gallery {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
}

.gallery-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  background-color: #f3f4f6;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--color-farm-border);
}

@media (min-width: 640px) {
  .gallery-wrapper {
    height: 340px;
  }
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease-in-out;
  pointer-events: none;
}

.gallery-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.gallery-slide img:hover {
  transform: scale(1.02);
}

/* Lightbox - Powiększenie zdjęcia po kliknięciu */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 14, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.94);
  transition: transform 0.25s ease;
}

.lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-farm-forest);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: bold;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  z-index: 10;
}

.gallery-btn:hover {
  background-color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 10;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.gallery-dot.active {
  background-color: #ffffff;
  width: 22px;
  border-radius: 4px;
}

/* Pola formularzy */
.form-input, .form-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-farm-dark);
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-farm-forest);
  box-shadow: 0 0 0 3px rgba(39, 82, 45, 0.15);
}

textarea.form-input {
  min-height: 110px;
  resize: vertical;
}

.admin-card textarea.form-input {
  min-height: 125px;
}

input[type="checkbox"] {
  accent-color: var(--color-farm-forest);
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
  vertical-align: middle;
}

.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

/* Galeria zdjęć - panel admina (upload i miniatury) */
.admin-gallery-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.admin-gallery-item {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-gallery-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0,0,0,0.65);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.admin-gallery-controls {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.admin-gallery-item:hover .admin-gallery-controls {
  opacity: 1;
}

.admin-gallery-btn-row {
  display: flex;
  gap: 0.3rem;
}

.admin-gallery-btn {
  padding: 0.3rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 0.4rem;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none !important;
  line-height: 1;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-gallery-btn:hover {
  background: #f3f4f6;
}

.admin-gallery-btn-del {
  background: #fee2e2;
  color: #991b1b;
}

.admin-gallery-btn-del:hover {
  background: #fecaca;
}

/* Przyciski */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  width: 100%;
}

.btn-primary {
  background-color: var(--btn-primary-bg, var(--color-farm-forest));
  color: var(--btn-primary-text, #ffffff);
  border: 1.5px solid var(--btn-primary-border, var(--color-farm-forest));
  box-shadow: 0 4px 12px rgba(39, 82, 45, 0.25);
}

.btn-primary:hover {
  background-color: var(--btn-primary-hover-bg, var(--color-farm-forest-dark));
  color: var(--btn-primary-hover-text, #ffffff);
  border-color: var(--btn-primary-hover-border, var(--color-farm-forest-dark));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(39, 82, 45, 0.35);
}

.btn-amber {
  background-color: var(--btn-amber-bg, #d97706);
  color: var(--btn-amber-text, #ffffff);
  border: 1.5px solid var(--btn-amber-border, #d97706);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.btn-amber:hover {
  background-color: var(--btn-amber-hover-bg, #b45309);
  color: var(--btn-amber-hover-text, #ffffff);
  border-color: var(--btn-amber-hover-border, #b45309);
  transform: translateY(-1px);
}

/* Komunikaty Alert */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-danger {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* Lista oczekujących - styl wizualny */
.waitlist-container {
  background-color: #ffffff;
  border: 1px solid var(--color-farm-border);
  border-radius: 1rem;
  overflow: hidden;
}

.waitlist-header {
  background-color: #fdfbf7;
  border-bottom: 1px solid var(--color-farm-border);
  padding: 1rem 1.25rem;
}

.waitlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.9rem;
}

.waitlist-item:last-child {
  border-bottom: none;
}

.waitlist-tag {
  background-color: #fef3c7;
  color: #92400e;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

/* Spinner ładowania */
.spinner {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s ease-in-out infinite;
  margin-right: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Proste klasy pomocnicze CSS (kompatybilne z Tailwind-like markup) */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.hidden { display: none !important; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-black { font-weight: 900; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-white { color: #ffffff !important; }
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-green-100 { background-color: #dcfce7; }
.text-green-800 { color: #166534; }
.bg-amber-100 { background-color: #fef3c7; }
.text-amber-900 { color: #78350f; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Duże odstępy i marginesy pionowe */
.pt-10 { padding-top: 2.5rem; }
.pt-12 { padding-top: 3rem; }
.pt-14 { padding-top: 3.5rem; }
.pt-16 { padding-top: 4rem; }
.pt-20 { padding-top: 5rem; }
.pt-24 { padding-top: 6rem; }

.pb-10 { padding-bottom: 2.5rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-14 { padding-bottom: 3.5rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-20 { padding-bottom: 5rem; }
.pb-24 { padding-bottom: 6rem; }
.pb-28 { padding-bottom: 7rem; }

.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.mt-24 { margin-top: 6rem; }
.mt-32 { margin-top: 8rem; }

.mb-8  { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-20 { margin-bottom: 5rem; }

.space-y-8 > * + * { margin-top: 2rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }
.space-y-12 > * + * { margin-top: 3rem; }
.space-y-16 > * + * { margin-top: 4rem; }
.space-y-20 > * + * { margin-top: 5rem; }

@media (min-width: 768px) {
  .md\:pt-20 { padding-top: 5rem; }
  .md\:pt-24 { padding-top: 6rem; }
  .md\:pb-24 { padding-bottom: 6rem; }
  .md\:pb-28 { padding-bottom: 7rem; }
  .md\:mt-20 { margin-top: 5rem; }
  .md\:mt-24 { margin-top: 6rem; }
  .md\:mt-32 { margin-top: 8rem; }
  .md\:mb-16 { margin-bottom: 4rem; }
  .md\:mb-20 { margin-bottom: 5rem; }
  .md\:space-y-20 > * + * { margin-top: 5rem; }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:text-left { text-align: left; }
}

/* ============================================================= */
/* STYLE DEDYKOWANE DLA PANELU GOSPODARZA                         */
/* ============================================================= */
.admin-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
}

.admin-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid var(--color-farm-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.admin-stock-counter {
  background-color: #fbfaf6;
  border: 1px solid #f0ede4;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
  margin: 1.25rem 0;
}

.admin-btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.btn-stock-delta {
  min-width: 64px;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0.6rem;
  border: 1px solid #dcfce7;
  background-color: #f0fdf4;
  color: #166534;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-stock-delta:hover {
  background-color: #dcfce7;
  transform: translateY(-1px);
}

.btn-stock-minus {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fee2e2;
}

.btn-stock-minus:hover {
  background-color: #fee2e2;
}

.admin-stock-manual {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.stock-manual-box {
  display: inline-flex;
  align-items: center;
  background: #fdfbf7;
  border: 1.5px solid #e7e3d8;
  border-radius: 0.85rem;
  padding: 0.25rem 0.35rem 0.25rem 0.5rem;
  gap: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stock-manual-input {
  width: 70px;
  height: 38px;
  border: 1.5px solid #d5cebf;
  border-radius: 0.6rem;
  background: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  color: var(--color-farm-forest);
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.stock-manual-input:focus {
  border-color: var(--color-farm-forest);
  box-shadow: 0 0 0 3px rgba(39, 82, 45, 0.15);
}

.stock-manual-btn {
  height: 38px;
  padding: 0 1.1rem;
  background-color: var(--color-farm-forest);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 0.6rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(39, 82, 45, 0.2);
}

.stock-manual-btn:hover {
  background-color: var(--color-farm-forest-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(39, 82, 45, 0.3);
}

.stock-manual-btn:active {
  transform: translateY(0);
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--color-farm-border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.admin-table th {
  background-color: var(--color-farm-cream);
  color: var(--color-farm-forest);
  padding: 0.65rem 0.65rem;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.admin-table td {
  padding: 0.65rem 0.65rem;
  border-top: 1px solid #f3f4f6;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: #fcfbf9;
}

.btn-sm-action {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.45rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease;
}

.btn-sm-action:hover {
  opacity: 0.85;
}

.btn-sm-green { background-color: #166534; color: #ffffff; }
.btn-sm-red { background-color: #fee2e2; color: #991b1b; }
.btn-sm-gray { background-color: #f3f4f6; color: #4b5563; }

/* Sekcja Jak to u mnie działa */
.section-how-it-works {
  border-radius: 1.5rem !important;
  border: 1px solid var(--color-farm-border) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
  overflow: hidden;
  margin-top: 4rem !important;
  margin-bottom: 4rem !important;
}

/* Uniwersalne klasy pomocnicze dla kart i layoutów (login, rezygnacja, alerty) */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01); }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-6 { margin-top: 1.5rem; }
.w-8 { width: 2rem; max-width: 2rem; }
.h-8 { height: 2rem; max-height: 2rem; }
.w-16 { width: 4rem; max-width: 4rem; }
.h-16 { height: 4rem; max-height: 4rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.block { display: block; }
.inline-block { display: inline-block; }
.bg-white { background-color: #ffffff; }
.bg-green-100 { background-color: #dcfce7; }
.text-green-700 { color: #15803d; }
.bg-amber-100 { background-color: #fef3c7; }
.text-amber-700 { color: #b45309; }
.bg-red-50 { background-color: #fef2f2; }
.text-red-700 { color: #b91c1c; }
.border-red-500 { border-color: #ef4444; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.object-contain { object-fit: contain; }

/* Wygodna nawigacja w panelu gospodarza */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  padding: 0;
}

.admin-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.admin-nav-item:hover {
  background-color: #f9fafb;
  border-color: var(--color-farm-forest, #27522d);
  color: var(--color-farm-forest, #27522d);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(39, 82, 45, 0.12);
}

.admin-nav-item.admin-nav-highlight {
  background-color: #fdfbf7;
  border-color: #ede5d8;
  color: var(--color-farm-forest, #27522d);
}

.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  background-color: #fef3c7;
  color: #92400e;
}

/* Szybka nawigacja do poszczególnych artykułów na stronie głównej */
.products-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding: 0;
}

.products-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  background-color: var(--prod-nav-bg, #ffffff);
  color: var(--prod-nav-text, #374151);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1.5px solid var(--prod-nav-border, #e5e7eb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
  cursor: pointer;
}

.products-nav-item:hover {
  background-color: var(--prod-nav-hover-bg, var(--color-farm-forest, #27522d));
  border-color: var(--prod-nav-hover-border, var(--color-farm-forest, #27522d));
  color: var(--prod-nav-hover-text, #ffffff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(39, 82, 45, 0.16);
}

.products-nav-item:active {
  transform: translateY(0);
}

.products-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.45rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  background-color: var(--prod-nav-badge-bg, #eef6ef);
  color: var(--prod-nav-badge-text, #27522d);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.product-card,
.admin-card {
  scroll-margin-top: 2rem;
}

details summary::-webkit-details-marker {
  display: none;
}

details[open] > summary .product-toggle-icon,
details[open] > summary .section-toggle-icon {
  transform: rotate(90deg);
}

/* Pigułki wyboru produktów w powiadomieniach (duże odstępy i wyraźny biały tekst przy zaznaczeniu) */
.broadcast-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.broadcast-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.75rem;
  border: 1.5px solid #d1d5db;
  background-color: #ffffff;
  color: #1f2937;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.broadcast-pill:hover {
  border-color: #27522d;
  background-color: #f9fbf9;
}

.broadcast-pill input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #27522d;
  cursor: pointer;
}

/* Stan zaznaczony: ciemne tło i CZYSTY BIAŁY TEKST */
.broadcast-pill:has(input:checked),
.broadcast-pill.active {
  background-color: #234627 !important;
  color: #ffffff !important;
  border-color: #172e1a !important;
  box-shadow: 0 3px 8px rgba(35, 70, 39, 0.28);
}

.broadcast-pill:has(input:checked) span,
.broadcast-pill.active span {
  color: #ffffff !important;
  font-weight: 700;
}

/* Przełącznik kanału powiadomień E-mail / SMS (zaokrąglone kafelki z białym tekstem po zaznaczeniu) */
.broadcast-channel-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.broadcast-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  border: 1.5px solid #d1d5db;
  background-color: #ffffff;
  color: #1f2937;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.broadcast-channel-pill:hover {
  border-color: #27522d;
  background-color: #f9fbf9;
}

.broadcast-channel-pill:has(input:checked),
.broadcast-channel-pill.active {
  background-color: #234627 !important;
  color: #ffffff !important;
  border-color: #172e1a !important;
  box-shadow: 0 3px 8px rgba(35, 70, 39, 0.28);
}

.broadcast-channel-pill:has(input:checked) span,
.broadcast-channel-pill.active span {
  color: #ffffff !important;
  font-weight: 700;
}

/* ========================================================= */
/* MODALE W PANELU GOSPODARZA (SMS & E-MAIL DLA DESKTOP/PWA)  */
/* ========================================================= */
.custom-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.25rem !important;
  box-sizing: border-box !important;
  overflow-y: auto;
}

.custom-modal-backdrop.hidden {
  display: none !important;
}

.custom-modal-box {
  background: #ffffff;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 520px;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  animation: customModalZoomIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes customModalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.custom-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  padding: 0;
  z-index: 10;
}

.custom-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

/* Nowoczesne przyciski akcji SMS i E-mail w tabelach */
.btn-action-sms {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  background-color: #fef3c7;
  color: #92400e !important;
  border: 1px solid #fde68a;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-action-sms:hover {
  background-color: #fde68a;
  color: #78350f !important;
  border-color: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-action-email {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  background-color: #eff6ff;
  color: #1e40af !important;
  border: 1px solid #bfdbfe;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-action-email:hover {
  background-color: #dbeafe;
  color: #1e3a8a !important;
  border-color: #60a5fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

