/* LozaCentr каталог 2026 — преміальна природна тема */

:root {
  --bg: #f4efe5;
  --bg-alt: #ece7dc;
  --bg-card: #faf8f4;
  --text: #1f2e22;
  --text-muted: #687a6c;
  --text-light: #96a898;
  --accent: #456b51;
  --accent-hover: #2e4f3a;
  --accent-dim: rgba(69, 107, 81, 0.18);
  --accent-light: #eaf1eb;
  --border: #d5cec4;
  --border-card: #e6e0d6;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --font-sans: "DM Sans", "Inter", system-ui, sans-serif;
  --font-brand: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --header-h: 5rem;
  --shadow-sm: 0 1px 4px rgba(31, 46, 34, 0.06);
  --shadow-card: 0 2px 14px rgba(31, 46, 34, 0.07), 0 1px 4px rgba(31, 46, 34, 0.04);
  --shadow-card-hover: 0 12px 40px rgba(31, 46, 34, 0.13), 0 3px 12px rgba(31, 46, 34, 0.07);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  z-index: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Header ─────────────────────────────────────────────── */

.site-header--floating {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 0 1.5rem;
  height: var(--header-h);
  background: rgba(244, 239, 229, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(31, 46, 34, 0.07);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-brand-link:hover {
  text-decoration: none;
  opacity: 0.85;
}

.header-brand-text {
  font-family: var(--font-brand);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1;
  transition: color 0.2s ease;
}

.header-brand-link:hover .header-brand-text {
  color: var(--accent);
}

.header-contacts {
  display: flex;
  align-items: center;
  gap: 0.4rem 1rem;
  flex-wrap: wrap;
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  font-weight: 500;
  color: var(--text-muted);
}

.header-contact-link {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.header-contact-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.header-contact-sep {
  color: var(--border);
  font-size: 1.1rem;
  font-weight: 300;
}

@media (max-width: 680px) {
  .header-contacts {
    display: none;
  }
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.search-panel {
  flex: 1;
  max-width: 300px;
  animation: search-in 0.3s ease both;
}

@keyframes search-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.search-panel[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .search-panel:not([hidden]) {
    position: absolute;
    top: calc(var(--header-h) + 0.5rem);
    left: 1rem;
    right: 1rem;
    max-width: none;
    z-index: 210;
  }
}

.search-input {
  width: 100%;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.glass-icon-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.glass-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 2px 12px var(--accent-dim);
}

.glass-icon-btn[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero-immersive {
  padding-top: var(--header-h);
  text-align: center;
  background: var(--bg);
}

.hero-visual {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, #ede8de 0%, #e6dfd3 100%);
  overflow: hidden;
  padding: 2rem 0 0;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(244, 239, 229, 0.85), transparent),
    radial-gradient(ellipse 30% 20% at 0% 0%, rgba(69, 107, 81, 0.04), transparent);
  pointer-events: none;
}

.hero-main-photo {
  display: block;
  width: 100%;
  max-width: min(680px, 84vw);
  height: auto;
  max-height: min(56vh, 560px);
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-cta-block {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  opacity: 0;
}

.hero-cta-block.is-visible {
  opacity: 1;
}

.hero-kinetic-title {
  font-family: var(--font-brand);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--text);
}

.hero-lead {
  margin: 0 auto 2rem;
  max-width: 30rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem 1rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  text-decoration: none;
}

.hero-cta--primary {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}

.hero-cta--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(69, 107, 81, 0.25);
  text-decoration: none;
}

.btn-pdf-download {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.73rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.btn-pdf-download:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 6px 20px rgba(69, 107, 81, 0.12);
}

.btn-pdf-download:disabled {
  cursor: wait;
  opacity: 0.65;
}

.btn-pdf-download.is-loading .btn-pdf-label {
  opacity: 0.6;
}

.btn-pdf-download.is-loading .btn-pdf-spinner {
  opacity: 1;
  visibility: visible;
}

.btn-pdf-icon {
  display: flex;
  opacity: 0.75;
}

.btn-pdf-spinner {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  animation: pdf-spin 0.7s linear infinite;
}

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

/* ─── Catalog ────────────────────────────────────────────── */

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* ─── Filters ────────────────────────────────────────────── */

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.75rem;
  padding: 0.9rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--border-card);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .filter-divider { display: none; }
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  white-space: nowrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(69, 107, 81, 0.22);
}


.filter-reset {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-light);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-reset:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.filter-reset[hidden] {
  display: none !important;
}

.filter-sort-btns {
  display: flex;
  gap: 0.35rem;
}

.filter-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  white-space: nowrap;
}

.filter-sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.filter-sort-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.catalog-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.catalog-meta--inline {
  margin-left: auto;
}

@media (max-width: 640px) {
  .catalog-filters {
    padding: 0.85rem 1rem;
  }
  .catalog-meta--inline {
    margin-left: 0;
  }
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ─── Product Card ───────────────────────────────────────── */

.product-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.3s ease;
  will-change: transform;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(69, 107, 81, 0.22);
}

.product-media {
  aspect-ratio: 1;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 600px;
}

.product-media-tilt {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.product-media.is-placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 8px,
      rgba(69, 107, 81, 0.04) 8px,
      rgba(69, 107, 81, 0.04) 9px
    ),
    repeating-linear-gradient(
      18deg,
      transparent,
      transparent 10px,
      rgba(31, 46, 34, 0.025) 10px,
      rgba(31, 46, 34, 0.025) 11px
    ),
    radial-gradient(ellipse at 50% 40%, rgba(69, 107, 81, 0.06), transparent 60%),
    var(--bg-alt);
}

.product-media.is-placeholder::before {
  content: "?";
  position: absolute;
  z-index: 2;
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 300;
  line-height: 1;
  color: rgba(69, 107, 81, 0.3);
  pointer-events: none;
}

.product-body {
  padding: 1rem 1.15rem 1.2rem;
  border-top: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.product-head {
  /* natural height — no forced stretch */
}

.product-foot {
  margin-top: auto;
  padding-top: 0.75rem;
}

.product-code {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(69, 107, 81, 0.22);
  border-radius: 6px;
  padding: 0.22rem 0.55rem;
  margin-bottom: 0.45rem;
  line-height: 1;
}

.product-name {
  font-family: var(--font-sans);
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.4rem;
  color: var(--text);
  letter-spacing: 0;
}

.catalog-note + .product-foot,
.product-name + .product-foot {
  margin-top: auto;
}

.price-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.price-tag {
  flex: 1 1 calc(50% - 0.2rem);
  max-width: calc(50% - 0.2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.55rem 0.5rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  min-width: 0;
  transition: border-color 0.2s ease;
}

.price-tag span {
  font-size: 0.71rem;
  font-weight: 400;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.price-tag strong {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.price-tag--highlight {
  background: #fff;
  border-color: rgba(69, 107, 81, 0.4);
  box-shadow: 0 1px 6px rgba(69, 107, 81, 0.1);
}

.price-tag--highlight span {
  color: var(--text-muted);
}

.price-tag--highlight strong {
  color: var(--accent-hover);
}

.price-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin: 0 0 0.5rem;
}

.catalog-note {
  font-size: 0.78rem;
  color: #a07a4a;
  margin: 0.3rem 0 0;
  line-height: 1.4;
}

.product-specs-area {
  min-height: 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 0.4rem;
}

details.specs {
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border-card);
}

details.specs summary {
  cursor: pointer;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color 0.2s ease;
}

details.specs summary:hover {
  color: var(--accent);
}

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

details.specs summary::after {
  content: "+";
  font-weight: 400;
  opacity: 0.5;
}

details.specs[open] summary::after {
  content: "−";
}

details.specs .specs-inner {
  padding: 0 0.85rem 0.85rem;
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.65;
}

details.specs dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  align-items: baseline;
}

details.specs dt {
  margin: 0;
  color: var(--text-light);
}

details.specs dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
  font-style: italic;
}

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
  margin-top: 2rem;
  padding: 3rem 1.5rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-brand {
  margin-bottom: 0.5rem;
}

.footer-brand-text {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  display: inline-block;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0 0 0.75rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
}

.site-footer p {
  margin: 0.4rem 0;
}

.site-footer strong {
  color: var(--text);
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-pdf-hint {
  margin-top: 1.25rem !important;
  font-size: 0.8rem !important;
  color: var(--text-light) !important;
  max-width: 28rem;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ─── PDF Export — лише оверлей (PDF збирається pdfmake з даних, без скриншотів) ─── */

#pdf-loading-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(244, 239, 229, 0.97);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: auto;
  cursor: wait;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pdf-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 2.25rem;
  max-width: 22rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
}

/* Кільце: зелена акцентна дуга, обертається */
.pdf-spinner-ring {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 3px solid rgba(69, 107, 81, 0.15);
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: pdf-ring-spin 0.85s linear infinite;
}

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

.pdf-spinner-text {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  animation: pdf-loading-pulse 1.4s ease-in-out infinite;
}

.pdf-spinner-hint {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

@keyframes pdf-loading-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-spinner-ring {
    animation: none;
    border-top-color: var(--accent);
    border-right-color: transparent;
    opacity: 0.85;
  }

  .pdf-spinner-text {
    animation: none;
  }
}

/* ─── Responsive Grid ────────────────────────────────────── */

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1320px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
