:root {
  --bg-dark: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f6f7;
  --accent-green: #2d5a4a;
  --accent-green-light: #3d7a64;
  --accent-teal: #0d4f4f;
  --accent-teal-bright: #1a6b6b;
  --text: #1a1a1c;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.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 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 130px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent-green-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-auth-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.header-auth-link:hover {
  color: var(--accent-teal);
  background: rgba(13, 79, 79, 0.06);
}

.header-auth-register {
  padding: 10px 20px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(13, 79, 79, 0.18);
}

.header-actions-sep {
  width: 1px;
  height: 32px;
  margin: 0 18px 0 22px;
  background: var(--border);
  flex-shrink: 0;
  align-self: center;
  border-radius: 1px;
}

.cart-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border: none;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.cart-btn:hover {
  background: var(--accent-teal);
  color: var(--white);
  border-color: var(--accent-teal);
}

.cart-icon {
  width: 22px;
  height: 22px;
}

.cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent-green);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

/* Splash */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.splash-logo {
  height: clamp(200px, 40vw, 320px);
  width: auto;
}

.splash-gears {
  width: clamp(260px, 50vw, 400px);
  height: auto;
  opacity: 0.6;
  /* Align gears under logo */
  transform: translate(-18px, -10px);
}

.splash-gears .gear-rotate {
  animation: animateGears 3.5s linear infinite;
}

.splash-gears .gear-rotate.gear-ccw {
  animation-direction: reverse;
}

/* Hero */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(13, 79, 79, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(45, 90, 74, 0.06) 0%, transparent 50%),
    var(--bg-dark);
}

@keyframes animateGears {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px;
  max-width: 640px;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-subtitle {
  margin: 0 0 28px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-teal-bright);
}

.btn-outline {
  background: transparent;
  color: var(--accent-teal);
  border: 2px solid var(--accent-teal);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(13, 79, 79, 0.08);
  color: var(--accent-teal-bright);
  border-color: var(--accent-teal-bright);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.9rem;
}

/* Sections */
.section-title {
  margin: 0 0 28px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.categories {
  padding: 48px 0 64px;
}

.categories-lead {
  margin: -12px 0 28px;
  max-width: 640px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.categories-grouped {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.categories-section-block {
  margin: 0;
}

.categories-group-title {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-teal);
  line-height: 1.3;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.category-card-name {
  display: block;
  line-height: 1.35;
  font-size: 0.95rem;
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-green);
  transform: translateY(-2px);
}

.category-card.active {
  border-color: var(--accent-teal);
  background: rgba(13, 79, 79, 0.08);
}

/* Головна: акції — ті самі класи, що «Нещодавно переглянуті», ледь тепліший акцент */
.home-sale-section.home-recent-rail {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 48%, var(--bg-card) 100%);
}

.home-sale-section .home-recent-rail-bg {
  background:
    radial-gradient(ellipse 70% 48% at 92% 8%, rgba(234, 88, 12, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 55% 42% at 4% 100%, rgba(13, 79, 79, 0.08) 0%, transparent 50%);
}

.home-sale-section__kicker {
  color: #b45309;
}

.home-sale-section__kicker-icon {
  background: rgba(234, 88, 12, 0.1);
  border-color: rgba(234, 88, 12, 0.22);
  color: #c2410c;
}

/* Карусель акцій: різкі кроки, стрілки, drag / свайп */
.home-sale-carousel {
  position: relative;
  margin-top: 6px;
  padding: 0 52px;
}

.home-sale-carousel-viewport {
  margin: 0 -20px;
  padding: 6px 20px 10px;
  overflow: hidden;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

.home-sale-carousel-viewport--grabbable {
  cursor: grab;
}

.home-sale-carousel-viewport--dragging {
  cursor: grabbing;
}

.home-sale-carousel-viewport:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 4px;
}

.home-sale-carousel-track {
  display: flex;
  gap: 18px;
  width: max-content;
  will-change: transform;
}

.home-sale-carousel-card {
  min-width: 0;
}

.home-sale-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 100%);
  box-shadow: 0 6px 22px rgba(13, 79, 79, 0.12);
  color: var(--accent-teal);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease,
    background 0.2s ease;
}

.home-sale-carousel-arrow:hover {
  border-color: rgba(45, 90, 74, 0.45);
  box-shadow: 0 10px 28px rgba(45, 90, 74, 0.16);
  background: var(--bg-card);
}

.home-sale-carousel-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.home-sale-carousel-arrow--prev {
  left: 4px;
}

.home-sale-carousel-arrow--next {
  right: 4px;
}

@media (max-width: 520px) {
  .home-sale-carousel {
    padding: 0 44px;
  }

  .home-sale-carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .home-sale-carousel-arrow--prev {
    left: 0;
  }

  .home-sale-carousel-arrow--next {
    right: 0;
  }
}

/* Трохи червоніший бейдж знижки саме в блоці акцій */
.home-sale-section .product-sale-badge {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.35);
}

/* Головна: нещодавно переглянуті — той самий ритм, що блок акцій, сітка з 4 карток */
.home-recent-rail {
  position: relative;
  padding: 48px 0 56px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 48%, var(--bg-dark) 100%);
}

.home-recent-rail-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 68% 50% at 8% 0%, rgba(13, 79, 79, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(45, 90, 74, 0.06) 0%, transparent 50%);
}

.home-recent-rail-inner {
  position: relative;
  z-index: 1;
}

.home-recent-rail-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 28px;
  margin-bottom: 28px;
}

.home-recent-rail-intro {
  min-width: 0;
}

.home-recent-rail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-green-light);
  margin-bottom: 8px;
}

.home-recent-rail-kicker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(13, 79, 79, 0.12);
  border: 1px solid rgba(13, 79, 79, 0.2);
  color: var(--accent-teal);
}

.home-recent-rail-kicker-icon svg {
  width: 17px;
  height: 17px;
}

.home-recent-rail-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.12;
}

.home-recent-rail-lead {
  margin: 0;
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.home-recent-rail-cta {
  flex-shrink: 0;
}

.home-recent-rail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}

.home-recent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.home-recent-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(13, 79, 79, 0.35);
}

.home-recent-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 18px 18px 10px;
  text-decoration: none;
  color: inherit;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.home-recent-card-visual {
  position: relative;
  margin: -10px -10px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, var(--bg-dark) 0%, rgba(13, 79, 79, 0.04) 100%);
  border: 1px solid var(--border);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-recent-card-visual img {
  width: 74%;
  height: 74%;
  object-fit: contain;
}

.home-recent-card-cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green-light);
  margin-bottom: 6px;
}

.home-recent-card-name {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.34;
  color: var(--text);
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: 2.68em;
}

.home-recent-card-link:hover .home-recent-card-name,
.home-recent-card-link:focus-visible .home-recent-card-name {
  color: var(--accent-teal);
}

.home-recent-card-price-wrap {
  margin-top: auto;
}

.home-recent-card-footer {
  padding: 4px 18px 18px;
}

.home-recent-card-btn {
  width: 100%;
}

@media (max-width: 1024px) {
  .home-recent-rail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .home-recent-rail {
    padding: 40px 0 48px;
  }

  .home-recent-rail-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-recent-card {
    transition: none;
  }

  .home-recent-card:hover {
    transform: none;
  }
}

/* Catalog search (above categories) */
.catalog-search-section {
  padding: 32px 0 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 100%);
}

.catalog-search-inner {
  max-width: 920px;
  margin: 0 auto;
}

.catalog-search-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalog-search-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.catalog-search-bar:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 4px 20px rgba(13, 79, 79, 0.12);
}

.catalog-search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  background: var(--bg-dark);
}

.catalog-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px 0 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.catalog-search-icon svg {
  width: 22px;
  height: 22px;
}

.catalog-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 16px 18px 16px 8px;
  font-family: var(--font);
  font-size: 1.08rem;
  color: var(--text);
}

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

.catalog-search-input:focus {
  outline: none;
}

.catalog-search-submit {
  flex-shrink: 0;
  padding: 0 28px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--accent-teal);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.catalog-search-submit:hover {
  background: var(--accent-teal-bright);
}

.catalog-search-inner--dropdown {
  position: relative;
  z-index: 30;
}

.catalog-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: catalog-dropdown-in 0.2s ease;
}

@keyframes catalog-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalog-search-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 10px;
  max-height: min(400px, 58vh);
  overflow-y: auto;
}

.catalog-search-dropdown-empty {
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

.catalog-search-suggestion {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  padding: 10px 10px 10px 10px;
  margin-bottom: 8px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.15s;
}

.catalog-search-suggestion:last-child {
  margin-bottom: 0;
}

.catalog-search-suggestion:hover,
.catalog-search-suggestion:focus-visible {
  border-color: var(--accent-teal);
  background: var(--bg-card);
  box-shadow: 0 6px 22px rgba(13, 79, 79, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.catalog-search-suggestion:hover .catalog-search-price-pill,
.catalog-search-suggestion:focus-visible .catalog-search-price-pill {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: var(--white);
}

.catalog-search-suggestion:hover .catalog-search-price-unit,
.catalog-search-suggestion:focus-visible .catalog-search-price-unit {
  color: rgba(255, 255, 255, 0.88);
}

.catalog-search-suggestion-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  align-self: center;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-search-suggestion-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.catalog-search-suggestion-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 2px 4px 2px 0;
}

.catalog-search-suggestion-name {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text);
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.catalog-search-suggestion-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}

.catalog-search-suggestion-sku {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.catalog-search-sku-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.catalog-search-sku-val {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.catalog-search-price-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(13, 79, 79, 0.11) 0%, rgba(45, 90, 74, 0.09) 100%);
  border: 1px solid rgba(13, 79, 79, 0.28);
  color: var(--accent-teal);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.catalog-search-price-num {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.catalog-search-price-unit {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-teal);
  opacity: 0.85;
  transition: color 0.2s;
}

.catalog-search-price-pill--sale {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 14px;
  background: linear-gradient(145deg, rgba(234, 88, 12, 0.12) 0%, rgba(45, 90, 74, 0.08) 100%);
  border-color: rgba(234, 88, 12, 0.35);
}

.catalog-search-suggestion:hover .catalog-search-price-pill--sale,
.catalog-search-suggestion:focus-visible .catalog-search-price-pill--sale {
  border-color: rgba(234, 88, 12, 0.5);
}

.catalog-search-price-was {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  line-height: 1;
}

.catalog-search-price-pill--sale .catalog-search-price-num {
  color: var(--accent-teal);
}

.catalog-search-dropdown-footer {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
}

.catalog-search-see-all {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-teal);
  background: transparent;
  border: 1px solid var(--accent-teal);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.catalog-search-see-all:hover {
  background: rgba(13, 79, 79, 0.08);
}

/* Catalog */
.catalog {
  padding: 48px 0 80px;
}

.catalog-page {
  padding-top: 32px;
}

.catalog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.catalog-breadcrumb a {
  color: var(--accent-green-light);
  text-decoration: none;
  font-weight: 500;
}

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

.catalog-breadcrumb-sep {
  color: var(--text-muted);
  user-select: none;
}

.catalog-breadcrumb-current {
  color: var(--text-muted);
}

.catalog-page-head {
  margin-bottom: 28px;
}

.catalog-page-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.catalog-page-subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.catalog-page-subtitle.muted {
  color: var(--text-muted);
}

.catalog-page-subtitle strong {
  color: var(--accent-teal);
  font-weight: 600;
}

/* Каталог у режимі «Акції та знижки» (/catalog?sale=1) */
.catalog-page--sale-mode {
  position: relative;
  isolation: isolate;
}

/* М’який «mesh» фон: акцент + бірюза бренду + теплий відблиск */
.catalog-page--sale-mode::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -100px;
  width: 100%;
  height: min(480px, 55vh);
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 85% 70% at 8% 35%, rgba(196, 48, 72, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 75% 65% at 92% 25%, rgba(13, 79, 79, 0.11) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 52% 8%, rgba(255, 200, 185, 0.35) 0%, transparent 52%),
    radial-gradient(ellipse 45% 40% at 70% 55%, rgba(61, 122, 100, 0.08) 0%, transparent 50%),
    linear-gradient(
      168deg,
      rgba(255, 252, 251, 0.98) 0%,
      rgba(248, 250, 249, 0.65) 38%,
      rgba(248, 249, 250, 0) 100%
    );
  filter: saturate(1.05);
}

/* Легкий блік + діагональна «тканина», без важких фільтрів */
.catalog-page--sale-mode::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(118deg, rgba(255, 255, 255, 0.55) 0%, transparent 42%),
    repeating-linear-gradient(
      -14deg,
      transparent 0,
      transparent 11px,
      rgba(13, 79, 79, 0.022) 11px,
      rgba(13, 79, 79, 0.022) 12px
    );
  mask-image: linear-gradient(180deg, #000 0%, #000 min(38%, 300px), transparent min(72%, 480px));
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 min(38%, 300px), transparent min(72%, 480px));
}

.catalog-page--sale-mode > .container {
  position: relative;
  z-index: 1;
}

.catalog-sale-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(196, 48, 72, 0.14);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(255, 252, 250, 0.78) 45%,
    rgba(248, 250, 249, 0.72) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 2px 4px rgba(196, 48, 72, 0.04),
    0 20px 50px -20px rgba(13, 79, 79, 0.12),
    0 16px 40px -24px rgba(196, 48, 72, 0.1);
}

.catalog-sale-hero-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #c41e3a, #8b1538);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.35);
}

.catalog-sale-hero-text {
  min-width: 0;
}

.catalog-page-title--sale {
  margin-bottom: 10px;
}

.catalog-page-subtitle--sale {
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}

.catalog-sale-hero-link {
  color: var(--accent-green-light);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.catalog-sale-hero-link:hover {
  text-decoration: underline;
}

@media (max-width: 540px) {
  .catalog-sale-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .catalog-sale-hero-text {
    text-align: center;
  }
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 20px;
}

.catalog-toolbar--top {
  align-items: center;
  margin-bottom: 24px;
}

.catalog-page-search--toolbar {
  flex: 1;
  min-width: min(100%, 280px);
}

.catalog-sale-toggle {
  flex-shrink: 0;
  white-space: nowrap;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) 1fr;
  gap: 32px;
  align-items: start;
}

.catalog-layout-main {
  min-width: 0;
}

.catalog-filter-sidebar {
  position: sticky;
  top: 100px;
  padding: 22px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.catalog-filter-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.catalog-filter-sidebar-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.catalog-filter-reset-all {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--accent-green-light);
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font);
}

.catalog-filter-reset-all:hover {
  color: var(--accent-teal);
}

.catalog-filter-block {
  margin-bottom: 22px;
}

.catalog-filter-block:last-child {
  margin-bottom: 0;
}

.catalog-filter-heading {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-teal);
}

.catalog-filter-radio-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.catalog-filter-radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
}

.catalog-filter-radio input {
  margin-top: 3px;
  accent-color: var(--accent-teal);
}

.catalog-filter-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: var(--font);
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.catalog-filter-chip:hover {
  border-color: var(--accent-green);
}

.catalog-filter-chip.is-active {
  border-color: var(--accent-teal);
  background: rgba(13, 79, 79, 0.1);
  color: var(--accent-teal);
}

.catalog-filter-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.catalog-filter-price-field {
  flex: 1;
  min-width: 0;
}

.catalog-filter-price-field input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  color: var(--text);
}

.catalog-filter-price-sep {
  color: var(--text-muted);
  flex-shrink: 0;
}

.catalog-filter-price-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
}

.catalog-filter-check input {
  accent-color: var(--accent-teal);
}

.catalog-filter-check--dense {
  font-size: 0.86rem;
}

.catalog-filter-brand-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.catalog-filter-sale-note {
  margin: 0 0 18px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Головна: блок категорій — 16 головних */
.container.container--shop-categories {
  max-width: 1280px;
}

 .home-main-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 0 36px;
}

.home-main-category-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px 18px;
  min-height: 88px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    border-color 0.2s,
    transform 0.15s,
    box-shadow 0.2s,
    background 0.2s;
}

.home-main-category-card:hover,
.home-main-category-card:focus-visible {
  border-color: var(--accent-green);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.22);
}

.home-main-category-name {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
}

.home-main-category-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.home-categories-main {
  min-width: 0;
}

.home-categories-main-title {
  margin-bottom: 10px;
}

.home-categories-main-lead {
  margin-bottom: 24px;
}

.home-categories-quick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.home-categories-quick--single {
  grid-template-columns: 1fr;
  max-width: 520px;
  margin: 0 auto;
}

.home-categories-quick-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--bg-card) 0%, var(--bg-dark) 100%);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.home-categories-quick-card:hover {
  border-color: var(--accent-green);
  transform: translateY(-2px);
}

.home-categories-quick-card--sale {
  border-color: rgba(196, 48, 72, 0.25);
  background: linear-gradient(
    165deg,
    rgba(255, 252, 251, 0.98) 0%,
    rgba(255, 248, 246, 0.6) 100%
  );
}

.home-categories-quick-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-categories-quick-card--sale .home-categories-quick-kicker {
  color: #a31d2d;
}

.home-categories-quick-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.home-categories-quick-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-filter-sidebar {
    position: relative;
    top: auto;
    max-height: none;
  }

  .home-main-categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.catalog-page-search {
  flex: 1;
  min-width: 260px;
}

.catalog-page-search-inner {
  display: flex;
  align-items: center;
  min-height: 46px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.catalog-page-search-inner:focus-within {
  border-color: var(--accent-teal);
}

.catalog-page-search-inner .catalog-search-icon {
  padding-left: 14px;
}

.catalog-page-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 14px 10px 8px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
}

.catalog-page-search-input::placeholder {
  color: var(--text-muted);
}

.catalog-page-search-input:focus {
  outline: none;
}

.catalog-results-count {
  margin: 0 0 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.catalog-results-count strong {
  color: var(--text);
  font-weight: 600;
}

.catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-select {
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  min-width: 200px;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-teal);
}

.filter-select--catalog {
  min-width: min(100%, 340px);
  max-width: 100%;
}

.search-wrap {
  position: relative;
}

.search-input {
  padding: 10px 16px 10px 40px;
  font-family: var(--font);
  font-size: 0.95rem;
  width: 280px;
  max-width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.2s;
}

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

.search-input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

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

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  /* Явно як звичайний текст: інакше UA / успадкування для <a><h3> дають менший або «чужий» шрифт */
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.product-card-link:hover .product-name,
.product-card-link:focus-visible .product-name {
  color: var(--accent-teal);
}

.product-card:hover {
  border-color: var(--accent-green);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  margin: -24px -24px 16px -24px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: var(--bg-dark);
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-category {
  font-size: 0.8rem;
  color: var(--accent-green-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.product-name {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.35;
  flex-grow: 1;
  letter-spacing: -0.01em;
}

/* Вища специфічність для назви всередині посилання картки */
.product-card-link .product-name {
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
}

.product-volume {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-sku {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.product-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.product-price--sale {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.product-sale-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.35);
}

.product-price-sale-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}

/* Акційна ціна на картці — як звичайна (.product-price), не через загальний span (інакше 0,1,1 б’є класи) */
.product-price-current {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.product-price-old {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.product-price-currency-plain {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.product-card--unavailable {
  opacity: 0.92;
  border-color: rgba(120, 120, 120, 0.35);
}

.product-card--unavailable:hover {
  transform: none;
  border-color: rgba(120, 120, 120, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.product-card--unavailable .product-img-wrap {
  position: relative;
}

.product-card--unavailable .product-img-wrap img {
  filter: grayscale(0.85);
  opacity: 0.72;
}

.product-unavailable-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(30, 35, 40, 0.72);
  backdrop-filter: blur(3px);
}

.add-to-cart:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.catalog-search-suggestion--unavailable {
  opacity: 0.75;
}

.catalog-search-suggestion--unavailable .catalog-search-suggestion-thumb img {
  filter: grayscale(0.9);
  opacity: 0.65;
}

.catalog-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 20px;
}

.catalog-empty.hidden {
  display: none;
}

/* Contacts */
.contacts {
  padding: 64px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.contact-card {
  padding: 24px;
  background: var(--bg-dark);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text);
}

.contact-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.contact-phones {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-card a {
  color: var(--accent-green-light);
  text-decoration: none;
  font-weight: 500;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Cart drawer */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s;
}

.cart-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.cart-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s;
}

.cart-drawer.open .cart-drawer-backdrop {
  opacity: 1;
}

.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}

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

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

.cart-drawer-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.cart-close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.cart-close:hover {
  background: var(--bg-dark);
}

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

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

.cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
}

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

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

.cart-item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.qty-btn:hover {
  background: var(--accent-teal);
  color: var(--white);
}

.qty-btn:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.qty-btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.cart-item-qty-val {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-price {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}

.cart-item-remove {
  margin-top: 8px;
  padding: 4px 8px;
  font-size: 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
}

.cart-item-remove:hover {
  color: #ef4444;
}

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

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.cart-total strong {
  font-size: 1.35rem;
  color: var(--text);
}

.cart-empty-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
}

.cart-pending-banner {
  margin: 0 16px 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(45, 90, 74, 0.12);
  border: 1px solid rgba(45, 90, 74, 0.25);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.cart-pending-banner p {
  margin: 0 0 8px;
}

.cart-pending-banner-link {
  font-weight: 600;
  color: var(--accent, #2d5a4a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cart-pending-banner-link:hover {
  opacity: 0.9;
}

/* Таби: профіль / замовлення (сегментований перемикач) */
.account-hub-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.account-hub-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.account-hub-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
}

.account-hub-nav-link--active {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.account-hub-nav-link--active:hover {
  color: var(--text);
  background: var(--bg-card);
}

.account-profile-orders-hint {
  margin: 20px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.account-profile-orders-link {
  font-weight: 600;
  color: var(--accent, #2d5a4a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-profile-orders-link:hover {
  opacity: 0.9;
}

/* Кабінет: секція зверху (зручніше при довгому контенті) */
.auth-section--hub {
  align-items: flex-start;
  justify-content: center;
  padding-top: 32px;
  padding-bottom: 56px;
}

/* Сторінка «Мої замовлення» — ширина картки як у .account-card-wrap */
.orders-hub-page-head {
  margin-bottom: 20px;
}

.orders-hub-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green, #2d5a4a);
}

.orders-hub-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 10px;
}

.orders-hub-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.orders-hub-lead {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.orders-hub-refresh {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--accent-green, #2d5a4a);
  font-weight: 600;
}

.orders-hub-refresh:hover:not(:disabled) {
  background: rgba(45, 90, 74, 0.08);
  border-color: rgba(45, 90, 74, 0.25);
}

.orders-hub-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

@media (max-width: 520px) {
  .orders-hub-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.orders-hub-stat {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  text-align: center;
}

.orders-hub-stat-val {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.orders-hub-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.orders-hub-stat--pending .orders-hub-stat-val {
  color: #8a5a12;
}

.orders-hub-stat--paid .orders-hub-stat-val {
  color: #2d5a4a;
}

.orders-hub-stat--cancelled .orders-hub-stat-val {
  color: #6b7280;
}

.orders-hub-flash {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.orders-hub-flash--ok {
  background: rgba(45, 90, 74, 0.1);
  border: 1px solid rgba(45, 90, 74, 0.22);
  color: var(--accent-green, #2d5a4a);
}

.orders-hub-flash--err {
  margin-bottom: 0;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #b91c1c;
}

.orders-hub-body {
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  padding: 18px 16px;
  min-height: 120px;
}

.orders-hub-muted {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.orders-hub-muted--block {
  text-align: center;
  padding: 24px 12px;
}

.orders-hub-error {
  margin: 0;
}

.orders-hub-empty {
  text-align: center;
  padding: 16px 8px 8px;
}

.orders-hub-empty-cta {
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.orders-hub-empty-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.orders-hub-empty-text {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.orders-hub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.orders-tile {
  position: relative;
  padding: 16px 16px 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.orders-tile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: rgba(180, 120, 40, 0.55);
}

.orders-tile--pending::before {
  background: linear-gradient(180deg, #c9a227, #a67c00);
}

.orders-tile--paid::before {
  background: linear-gradient(180deg, #3d7a62, #2d5a4a);
}

.orders-tile--cancelled::before {
  background: linear-gradient(180deg, #9ca3af, #6b7280);
}

.orders-tile-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.orders-tile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.orders-tile-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.orders-tile-id {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-dark);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  width: fit-content;
  font-family: ui-monospace, monospace;
}

.orders-tile-note {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.orders-tile-note--muted {
  color: var(--text-muted);
}

.orders-tile-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

.orders-tile-lines li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  border: 1px solid var(--border);
}

.orders-tile-line-name {
  flex: 1;
  min-width: 0;
}

.orders-tile-line-qty {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.orders-tile-receipt {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.orders-tile-paid-at {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.orders-tile-paid-at--muted {
  color: var(--text-muted);
}

.orders-tile-receipt-btn {
  width: 100%;
  max-width: 100%;
}

.orders-hub-footer.account-actions {
  margin-top: 24px;
}

.orders-hub-footer-user {
  margin: 0 0 4px;
  font-size: 0.88rem;
  color: var(--text-muted);
  word-break: break-all;
}

.orders-hub-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.orders-hub-footer-link {
  text-decoration: none;
  text-align: center;
}

.orders-hub-logout {
  margin: 0;
}

.orders-hub-home {
  display: inline-block;
  margin-top: 8px;
}

.account-order-status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.account-order-status-pending {
  background: rgba(180, 120, 40, 0.15);
  color: #8a5a12;
}

.account-order-status-paid {
  background: rgba(45, 90, 74, 0.15);
  color: #2d5a4a;
}

.account-order-status-cancelled {
  background: rgba(107, 114, 128, 0.18);
  color: #4b5563;
}

/* Product detail drawer */
.product-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s;
}

.product-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.product-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s;
}

.product-drawer.open .product-drawer-backdrop {
  opacity: 1;
}

.product-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}

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

.product-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.product-drawer-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.product-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-drawer-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-dark);
  margin: -24px -24px 0 -24px;
}

.product-drawer-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-drawer-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.product-drawer-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.product-drawer-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-drawer-footer .product-price {
  font-size: 1.5rem;
}

/* Product page */
.product-page-main {
  padding: 32px 0 64px;
  min-height: 60vh;
}

.product-page-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
}

.product-page-back:hover {
  color: var(--accent-teal);
}

.product-detail-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}

@media (max-width: 768px) {
  .product-detail-section {
    grid-template-columns: 1fr;
  }
}

.product-detail-img-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-dark);
}

.product-detail-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-detail-section--unavailable .product-detail-img-wrap img {
  filter: grayscale(0.88);
  opacity: 0.7;
}

.product-detail-unavailable-badge {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 14px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(25, 30, 34, 0.82);
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.product-detail-section--unavailable .product-detail-price {
  opacity: 0.85;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-detail-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.product-detail-desc {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.product-detail-subtitle {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.product-detail-specs-block {
  margin-top: 4px;
}

.product-detail-specs {
  margin: 0;
  padding: 14px 16px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.product-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.product-detail-link {
  text-decoration: none;
}

.product-detail-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.product-detail-price-currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.product-detail-price--sale {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.product-detail-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.product-detail-price-current {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.product-detail-sale-badge {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--white);
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  box-shadow: 0 3px 14px rgba(234, 88, 12, 0.35);
}

.product-detail-price-old-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1rem;
}

.product-detail-price-was-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-detail-price-old {
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.product-comments-section {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.product-comment-form {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
}

.product-comments-login,
.product-comments-loading,
.product-comments-empty {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.product-comments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.product-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.product-comment-edited {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.product-comment-edit-btn {
  padding: 2px 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
}

.product-comment-edit-btn:hover {
  color: var(--accent-green);
  text-decoration: underline;
}

.product-comment-own-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.product-comment-rating-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.product-comment-rating-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.star-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(0, 0, 0, 0.25);
}

.star-btn-active {
  color: var(--accent-green);
}

.star-rating-value {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: 6px;
}

.stars-display {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.stars-display-star {
  font-size: 1.25rem;
  color: rgba(0, 0, 0, 0.25);
}

.stars-display-star-active {
  color: var(--accent-green);
}

.stars-display {
  gap: 4px;
}

.product-comment-rating {
  margin-left: 8px;
}

.product-comment-delete-btn {
  padding: 2px 8px;
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.product-comment-delete-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.product-comment-delete-error {
  margin: 0 0 6px;
  font-size: 0.85rem;
}

/* Confirm modal (replace window.confirm) */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 79, 79, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: confirm-modal-fade-in 0.2s ease;
}

@keyframes confirm-modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.confirm-modal {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(165deg, #ffffff 0%, #f8faf9 100%);
  border: 1px solid rgba(13, 79, 79, 0.12);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow:
    0 4px 6px rgba(13, 79, 79, 0.04),
    0 24px 48px -12px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
  animation: confirm-modal-pop 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes confirm-modal-pop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-modal--brand::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-teal) 0%, var(--accent-green-light) 55%, #3d7a64 100%);
}

.confirm-modal--brand {
  padding-top: 26px;
}

.confirm-modal-title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.confirm-modal-body {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.confirm-modal-body--preline {
  white-space: pre-line;
}

.confirm-modal-body-wrap {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.confirm-modal-cancel {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

.confirm-modal-cancel:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: rgba(13, 79, 79, 0.04);
}

.confirm-modal-confirm {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
}

.confirm-modal-confirm--danger {
  background: linear-gradient(145deg, #c41e3a, #9f1239);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.28);
}

.confirm-modal-confirm--danger:hover:not(:disabled) {
  background: linear-gradient(145deg, #b91c1c, #881337);
  filter: brightness(1.03);
}

.confirm-modal-confirm--danger:disabled {
  opacity: 0.55;
}

.confirm-modal-confirm--warn {
  background: linear-gradient(145deg, #b45309, #92400e);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.25);
}

.confirm-modal-confirm--warn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.confirm-modal-confirm--warn:disabled {
  opacity: 0.55;
}

/* Checkout address modal */
.checkout-address-modal {
  max-width: 620px;
}

.checkout-address-modal .auth-form {
  gap: 12px;
}

.checkout-address-modal .account-form-row {
  margin-bottom: 8px;
}

.checkout-address-modal .auth-field + .auth-field {
  margin-top: 8px;
}

/* Перевірка адреси перед оформленням */
.checkout-review-modal {
  max-width: 520px;
}

.checkout-review-modal .checkout-review-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
}

.checkout-review-lead {
  margin: 0 0 18px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-muted);
}

.checkout-review-summary {
  margin: 0 0 22px;
  padding: 4px 0 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  display: flex;
  flex-direction: column;
}

.checkout-review-block {
  margin: 0;
  padding: 14px 18px;
}

.checkout-review-block + .checkout-review-block {
  border-top: 1px solid var(--border);
}

.checkout-review-block--address {
  background: linear-gradient(180deg, rgba(45, 90, 74, 0.04) 0%, transparent 100%);
}

.checkout-review-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8b939e;
  margin-bottom: 8px;
}

.checkout-review-value {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.checkout-review-value--strong {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  color: #14151a;
}

.checkout-review-value--warn {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  color: #9a3412;
  font-style: italic;
}

.checkout-review-value--address {
  white-space: pre-wrap;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.55;
  color: #1a1d24;
}

.checkout-review-block--phone {
  background: linear-gradient(180deg, rgba(13, 79, 79, 0.05) 0%, transparent 100%);
}

.checkout-review-phone-editor {
  margin-top: 2px;
}

.checkout-review-phone-note {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.checkout-review-phone-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(13, 79, 79, 0.22);
  background: var(--bg-card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.checkout-review-phone-row:focus-within {
  border-color: var(--accent-teal);
  box-shadow:
    0 0 0 3px rgba(13, 79, 79, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.checkout-review-phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px 0 14px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-green, #2d5a4a);
  background: linear-gradient(180deg, rgba(45, 90, 74, 0.1) 0%, rgba(45, 90, 74, 0.05) 100%);
  border-right: 1px solid rgba(13, 79, 79, 0.12);
  white-space: nowrap;
}

.checkout-review-phone-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.checkout-review-phone-input::placeholder {
  color: #a8b0ba;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.checkout-review-phone-input:focus {
  outline: none;
}

.checkout-review-phone-intl {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(13, 79, 79, 0.22);
  background: var(--bg-card);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.checkout-review-phone-intl:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(13, 79, 79, 0.12);
}

.checkout-review-phone-toggle {
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-teal);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkout-review-phone-toggle:hover {
  color: var(--accent-green);
}

.checkout-review-phone-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkout-review-phone-error {
  margin: 10px 0 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: #b91c1c;
}

.checkout-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.checkout-review-actions .checkout-review-edit {
  margin-right: auto;
}

@media (max-width: 480px) {
  .checkout-review-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .checkout-review-actions .confirm-modal-cancel:not(.checkout-review-edit) {
    order: 1;
  }

  .checkout-review-actions .checkout-review-edit {
    margin-right: 0;
    order: 2;
  }

  .checkout-review-actions .btn-primary {
    order: 3;
    width: 100%;
  }
}

.suggest-field-wrap {
  position: relative;
}

.suggest-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  z-index: 10050;
  padding: 6px;
}

.suggest-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.35;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.suggest-item:hover {
  background: rgba(45, 90, 74, 0.13);
  color: var(--accent-green);
}

.suggest-list::-webkit-scrollbar {
  width: 10px;
}

.suggest-list::-webkit-scrollbar-thumb {
  background: rgba(45, 90, 74, 0.35);
  border-radius: 999px;
}

.suggest-list::-webkit-scrollbar-track {
  background: transparent;
}

.checkout-save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  color: var(--text-muted);
  font-size: 0.95rem;
  user-select: none;
}

.checkout-save-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-green);
}

.product-comment-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.product-comment-author {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.product-comment-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-comment-text {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
}

.product-comment-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-green);
  background: rgba(45, 90, 74, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.product-comment-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.product-comment-attachment {
  flex-shrink: 0;
}

.comment-attachment-link {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.comment-attachment-btn {
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: none;
  cursor: pointer;
  font: inherit;
  display: block;
}

.comment-attachment-video-open {
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--accent-green);
  background: transparent;
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.comment-attachment-video-open:hover {
  background: var(--accent-green);
  color: var(--white);
}

.comment-attachment-img {
  display: block;
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
}

.comment-attachment-video-wrap {
  max-width: 320px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.comment-attachment-video {
  display: block;
  width: 100%;
  max-height: 240px;
}

.product-comment-reply-form-wrap {
  margin-top: 12px;
}

.product-comment-reply-btn {
  padding: 4px 12px;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--accent-green);
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.product-comment-reply-btn:hover {
  text-decoration: underline;
}

.product-comment-reply-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-comment-reply-textarea {
  min-height: 60px;
  resize: vertical;
}

.product-comment-reply-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.product-comment-file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  position: absolute;
}

.product-comment-file-label .btn {
  cursor: pointer;
}

.product-comment-files-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.product-comment-cancel-reply {
  padding: 6px 12px;
  font-family: var(--font);
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.product-comment-cancel-reply:hover {
  background: var(--bg-dark);
  color: var(--text);
}

.product-comment-reply-error {
  margin: 0;
  font-size: 0.85rem;
}

.product-comments-replies {
  list-style: none;
  margin: 12px 0 0 24px;
  padding: 0;
  border-left: 2px solid var(--border);
  padding-left: 16px;
}

.product-comment-reply {
  margin-top: 12px;
}

.product-comment-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Media viewer (photos/videos in modal) */
.media-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.media-viewer-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-viewer-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--white);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.media-viewer-close:hover {
  background: var(--bg-dark);
}

.media-viewer-img {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.media-viewer-video {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: var(--radius-sm);
}

.checkout-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 14px 24px;
  background: var(--accent-green);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 300;
  animation: toastIn 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.checkout-toast-btn {
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--white);
  color: var(--accent-green);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s;
}

.checkout-toast-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.checkout-toast-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.checkout-toast-error {
  background: #b91c1c;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.footer-logo {
  height: 40px;
  width: auto;
  opacity: 0.9;
}

.footer-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Auth (Login / Register) */
.auth-section {
  position: relative;
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(13, 79, 79, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(45, 90, 74, 0.06) 0%, transparent 50%),
    var(--bg-dark);
}

.auth-card-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.auth-subtitle {
  margin: 0 0 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.auth-input {
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.2s;
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-teal);
}

.auth-error {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.9rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  color: #dc2626;
}

.auth-footer {
  margin: 20px 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-link {
  color: var(--accent-green-light);
  font-weight: 500;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-back {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-back:hover {
  color: var(--accent-teal);
}

.auth-success {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.9rem;
  background: rgba(45, 90, 74, 0.12);
  border: 1px solid rgba(45, 90, 74, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-green);
}

.account-card-wrap {
  max-width: 480px;
}

.account-form {
  gap: 16px;
}

.account-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .account-form-row {
    grid-template-columns: 1fr;
  }
}

.auth-input-readonly {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}

.auth-input-textarea {
  resize: vertical;
  min-height: 80px;
}

.auth-field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.account-actions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-actions .logout-btn.btn-block {
  width: 100%;
  padding: 12px 16px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.user-name:hover {
  color: var(--accent-teal);
  background: rgba(13, 79, 79, 0.06);
}

.logout-btn {
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.logout-btn:hover {
  background: var(--bg-dark);
  color: var(--text);
  border-color: var(--text-muted);
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .header-inner {
    gap: 12px 16px;
    padding: 10px 16px;
  }

  .header-auth {
    gap: 12px;
  }

  .header-auth-link {
    padding: 8px 4px;
    font-size: 0.9rem;
  }

  .header-auth-register {
    padding: 9px 16px;
    min-height: 40px;
    font-size: 0.88rem;
  }

  .header-actions-sep {
    margin: 0 12px;
    height: 28px;
  }

  .user-menu {
    gap: 12px;
  }

  .user-name {
    max-width: 120px;
    font-size: 0.88rem;
  }

  .catalog-header {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-filters {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
    min-width: 0;
  }

  .catalog-search-inner {
    max-width: none;
  }

  .catalog-search-bar {
    flex-direction: column;
  }

  .catalog-search-field {
    min-height: 52px;
  }

  .catalog-search-submit {
    width: 100%;
    padding: 14px 20px;
  }

  .catalog-toolbar {
    flex-direction: column;
  }

  .catalog-page-search {
    min-width: 0;
    width: 100%;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .cart-drawer-panel {
    max-width: 100%;
  }
}

/* Admin panel */
.header-admin-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-teal);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(13, 79, 79, 0.25);
  background: rgba(13, 79, 79, 0.06);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.header-admin-link:hover {
  color: var(--accent-teal-bright);
  border-color: rgba(13, 79, 79, 0.45);
  background: rgba(13, 79, 79, 0.1);
}

.admin-page {
  padding-bottom: 64px;
  min-height: calc(100vh - 80px);
  background: linear-gradient(180deg, rgba(13, 79, 79, 0.04) 0%, var(--bg-dark) 220px);
}

.admin-inner {
  padding-top: 24px;
}

.admin-hero {
  margin-bottom: 28px;
}

.admin-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: -0.02em;
}

.admin-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
}

.admin-banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.admin-banner-ok {
  background: rgba(45, 90, 74, 0.12);
  border: 1px solid rgba(45, 90, 74, 0.35);
  color: var(--accent-green);
}

.admin-banner-err {
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.25);
  color: #b91c1c;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.admin-tab {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.28s ease,
    border-color 0.25s ease,
    box-shadow 0.28s ease,
    transform 0.2s ease;
}

.admin-tab:hover {
  color: var(--text);
  border-color: rgba(45, 90, 74, 0.35);
}

.admin-tab-active {
  color: var(--white);
  background: var(--accent-green);
  border-color: var(--accent-green);
  box-shadow: var(--shadow);
}

/* premium-рядок задає .admin-tab background: transparent з вищою специфічністю — відновлюємо активну вкладку */
.admin-tabs-premium .admin-tab.admin-tab-active {
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-green) 100%);
  color: var(--white);
  border: none;
  box-shadow: 0 4px 14px rgba(45, 90, 74, 0.35);
}

@keyframes adminTabPanelIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-tab-panel {
  animation: adminTabPanelIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.admin-catalog-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: -8px 0 22px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 90, 74, 0.07) 0%, rgba(255, 255, 255, 0.65) 100%);
  border: 1px solid rgba(45, 90, 74, 0.12);
}

.admin-stat-pill {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.admin-stat-pill strong {
  color: var(--accent-teal);
  font-weight: 700;
}

.admin-stat-pill-ok strong {
  color: var(--accent-green);
}

.admin-1c-sync-strip {
  flex-basis: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(45, 90, 74, 0.14);
  background: linear-gradient(105deg, rgba(45, 90, 74, 0.07) 0%, rgba(255, 255, 255, 0.55) 42%, rgba(255, 255, 255, 0.35) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.admin-1c-sync-strip--pending {
  border-style: dashed;
  border-color: rgba(45, 90, 74, 0.22);
  background: rgba(45, 90, 74, 0.035);
  box-shadow: none;
}

.admin-1c-sync-strip__icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-teal);
  opacity: 0.85;
}

.admin-1c-sync-strip--pending .admin-1c-sync-strip__icon {
  opacity: 0.55;
}

.admin-1c-sync-strip__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-1c-sync-strip__title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-1c-sync-strip__line {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
}

.admin-1c-sync-strip__line--soft {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-1c-sync-strip__line time {
  font-weight: 600;
  color: var(--accent-teal);
}

.admin-1c-sync-strip__note {
  font-size: 0.82rem;
  line-height: 1.4;
  color: #9a3412;
  margin-top: 2px;
}

.admin-1c-sync-badge {
  flex-shrink: 0;
  align-self: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.admin-1c-sync-badge--ok {
  color: #166534;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.admin-1c-sync-badge--warn {
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
  border: 1px solid rgba(234, 88, 12, 0.25);
}

@media (max-width: 640px) {
  .admin-1c-sync-strip {
    flex-wrap: wrap;
  }

  .admin-1c-sync-badge {
    align-self: flex-start;
  }
}

.admin-cat-count {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-teal);
  background: rgba(45, 90, 74, 0.1);
  border-radius: 999px;
  vertical-align: middle;
}

@media (prefers-reduced-motion: reduce) {
  .admin-tab-panel {
    animation: none;
  }

  .admin-tab {
    transition: none;
  }
}

.admin-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px 22px 28px;
}

.admin-section h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  color: var(--text);
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-section-head h2 {
  margin: 0;
}

.admin-muted {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.admin-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  background: var(--bg-dark);
}

.admin-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-order-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-badge-paid {
  background: rgba(45, 90, 74, 0.15);
  color: var(--accent-green);
}

.admin-badge-wait {
  background: rgba(234, 179, 8, 0.15);
  color: #a16207;
}

.admin-badge-cancelled {
  background: rgba(107, 114, 128, 0.2);
  color: #4b5563;
}

.admin-order-user {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.admin-order-lines {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.admin-inline-form .auth-input {
  flex: 1;
  min-width: 200px;
}

.admin-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-cat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

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

.admin-cat-id {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-dark);
  padding: 2px 8px;
  border-radius: 4px;
}

.admin-link-danger {
  margin-left: auto;
  font-family: var(--font);
  font-size: 0.85rem;
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  padding: 20px;
  margin-bottom: 24px;
}

.admin-form-card {
  background: linear-gradient(135deg, rgba(45, 90, 74, 0.06) 0%, var(--bg-dark) 100%);
}

.admin-new-product-card {
  padding: 0;
  overflow: hidden;
}

.admin-new-product-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  text-align: left;
  font-family: var(--font);
  cursor: pointer;
  color: inherit;
  background:
    linear-gradient(125deg, rgba(45, 90, 74, 0.1) 0%, transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  border: none;
  border-bottom: 1px solid transparent;
  transition:
    background 0.28s ease,
    border-color 0.28s ease;
}

.admin-new-product-card--open .admin-new-product-toggle {
  border-bottom-color: rgba(45, 90, 74, 0.14);
}

.admin-new-product-toggle:hover {
  background:
    linear-gradient(125deg, rgba(45, 90, 74, 0.14) 0%, transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
}

.admin-new-product-toggle:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: -2px;
}

.admin-new-product-toggle-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.admin-new-product-toggle-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-teal);
  opacity: 0.85;
}

.admin-new-product-toggle-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: 0.01em;
}

.admin-new-product-toggle-meta {
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 36em;
}

.admin-new-product-chevron {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  border-right: 2.5px solid var(--accent-teal);
  border-bottom: 2.5px solid var(--accent-teal);
  transform: rotate(45deg);
  translate: 0 -2px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0.9;
}

.admin-new-product-card--open .admin-new-product-chevron {
  transform: rotate(-135deg);
  translate: 0 2px;
}

.admin-new-product-collapse {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-new-product-card--open .admin-new-product-collapse {
  grid-template-rows: 1fr;
}

.admin-new-product-collapse-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 20px 22px;
}

.admin-new-product-card--open .admin-new-product-collapse-inner {
  overflow: visible;
}

.admin-new-product-intro {
  margin: 4px 0 14px;
}

.admin-field-optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.admin-photo-upload-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
}

.admin-photo-file-status {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 100%;
  text-align: right;
  word-break: break-word;
}

.admin-photo-file-status--ok {
  font-style: normal;
  font-weight: 600;
  color: var(--accent-green);
}

@media (prefers-reduced-motion: reduce) {
  .admin-new-product-collapse {
    transition: none;
  }

  .admin-new-product-chevron {
    transition: none;
  }

  .admin-new-product-toggle {
    transition: none;
  }
}

.admin-card-title {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--accent-teal);
}

.admin-product-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table th {
  background: var(--bg-dark);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-row-inactive {
  opacity: 0.65;
}

.admin-thumb {
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-file-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-teal);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px dashed rgba(13, 79, 79, 0.4);
  transition: background 0.2s;
}

.admin-file-label:hover {
  background: rgba(13, 79, 79, 0.08);
}

.admin-link-btn {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--accent-green);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-edit-panel {
  margin-top: 24px;
  border-color: rgba(45, 90, 74, 0.35);
}

.admin-edit-panel--sticky {
  margin-top: 16px;
  scroll-margin-top: 96px;
}

.admin-products-toolbar {
  margin-bottom: 4px;
}

.admin-filter-label--grow {
  flex: 0 1 300px;
  min-width: 200px;
  max-width: 320px;
}

.admin-catalog-results-count {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.admin-catalog-clear-filters {
  flex-shrink: 0;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  cursor: pointer;
}

.admin-check-inline {
  margin-bottom: 0;
}

.admin-stock-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(45, 90, 74, 0.05);
  border: 1px solid rgba(45, 90, 74, 0.12);
}

.admin-stock-alert {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #7c2d12;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(254, 243, 199, 0.65) 100%);
  border: 1px solid rgba(217, 119, 6, 0.35);
}

.admin-stock-alert strong {
  color: #9a3412;
}

.admin-product-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-prod-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 20px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(45, 90, 74, 0.14);
  background: linear-gradient(145deg, #ffffff 0%, #f8faf9 100%);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.04);
  align-items: start;
}

.admin-prod-card--oos {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(145deg, #fffbeb 0%, #fff7ed 100%);
}

.admin-prod-card--off {
  opacity: 0.88;
  border-style: dashed;
}

.admin-prod-card__visual {
  position: relative;
  width: 64px;
  flex-shrink: 0;
}

.admin-prod-card__img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
}

.admin-prod-photo-fab {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-green) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(45, 90, 74, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-prod-photo-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(45, 90, 74, 0.42);
}

.admin-prod-photo-fab__glyph {
  display: flex;
  pointer-events: none;
}

.admin-prod-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-prod-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
}

.admin-prod-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-teal);
  line-height: 1.35;
  flex: 1 1 200px;
}

.admin-prod-card__id.mono {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.admin-prod-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.admin-prod-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(45, 90, 74, 0.1);
  color: var(--accent-teal);
}

.admin-prod-sku {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-dark);
  padding: 3px 8px;
  border-radius: 6px;
}

.admin-prod-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding-top: 4px;
}

.admin-prod-card__price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.admin-prod-card__price span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-prod-card__price--sale {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.admin-prod-price-sale-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.admin-prod-price-current {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-teal);
}

.admin-prod-price-currency {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-teal);
}

.admin-prod-price-was {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
}

.admin-td-price-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.admin-td-price-sale {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.admin-td-price-was {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.admin-td-price-sep {
  color: var(--text-muted);
  font-weight: 600;
}

.admin-td-price-suffix {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.admin-prod-card__stock {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(13, 79, 79, 0.06);
  border: 1px solid rgba(45, 90, 74, 0.12);
}

.admin-prod-stock-lbl {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-prod-stock-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-teal);
  font-variant-numeric: tabular-nums;
}

.admin-prod-stock-num--unl {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.admin-prod-stock-num--oos {
  color: #b45309;
}

.admin-td-stock {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 0.9rem;
}

.admin-prod-card__pills {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-pill {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
}

.admin-pill-ok {
  background: rgba(45, 90, 74, 0.15);
  color: var(--accent-green);
}

.admin-pill-muted {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}

.admin-pill-warn {
  background: rgba(217, 119, 6, 0.18);
  color: #b45309;
}

.admin-prod-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(45, 90, 74, 0.1);
}

.admin-prod-action {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-prod-action:hover {
  border-color: rgba(45, 90, 74, 0.35);
  color: var(--text);
}

.admin-prod-action--primary {
  border-color: rgba(45, 90, 74, 0.4);
  background: rgba(45, 90, 74, 0.08);
  color: var(--accent-teal);
}

.admin-prod-action--danger {
  border-color: rgba(185, 28, 28, 0.25);
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.35);
}

.admin-prod-action--danger:hover {
  background: rgba(254, 202, 202, 0.5);
}

@media (max-width: 640px) {
  .admin-prod-card {
    grid-template-columns: 1fr;
  }

  .admin-prod-card__visual {
    justify-self: start;
  }

  .admin-prod-card__pills {
    margin-left: 0;
  }
}

.admin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .header-admin-link {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .admin-section {
    padding: 18px 14px 22px;
  }

  /* PDF-експорт: ховаємо ID та категорію (як раніше при постійній колонці PDF) */
  .admin-table--pdf-export th:nth-child(3),
  .admin-table--pdf-export td:nth-child(3) {
    display: none;
  }

  .admin-table--pdf-export th:nth-child(4),
  .admin-table--pdf-export td:nth-child(4) {
    display: none;
  }

  /* Тільки товари: колонки 1=фото, 2=ID, 3=категорія — ховаємо 2 і 3 */
  .admin-table--products-only th:nth-child(2),
  .admin-table--products-only td:nth-child(2) {
    display: none;
  }

  .admin-table--products-only th:nth-child(3),
  .admin-table--products-only td:nth-child(3) {
    display: none;
  }
}

/* Admin premium layout, modals, PDF toolbar, order contacts */
.admin-page-premium {
  position: relative;
  overflow-x: hidden;
}

.admin-bg-mesh {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(45, 90, 74, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 30%, rgba(13, 79, 79, 0.1), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, var(--bg-dark) 45%);
  z-index: 0;
}

.admin-page-premium .admin-inner {
  position: relative;
  z-index: 1;
}

.admin-header-premium {
  border-bottom: 1px solid rgba(45, 90, 74, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.admin-hero-premium {
  padding: 8px 0 8px;
}

.admin-kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.admin-hero-premium .admin-title {
  background: linear-gradient(120deg, var(--accent-teal) 0%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.admin-tabs-premium {
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.admin-tabs-premium .admin-tab {
  border-radius: 10px;
  border: none;
  background: transparent;
}

.admin-tabs-premium .admin-tab:hover:not(.admin-tab-active) {
  background: rgba(45, 90, 74, 0.07);
  color: var(--text);
}

.admin-section-premium {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfa 100%);
  border: 1px solid rgba(45, 90, 74, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.admin-card-glow {
  border-color: rgba(45, 90, 74, 0.2);
  box-shadow: 0 8px 28px rgba(45, 90, 74, 0.08);
}

.admin-hint {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 720px;
}

.admin-hint-tight {
  margin-bottom: 12px;
}

.admin-hint code {
  font-size: 0.8rem;
  background: var(--bg-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-order-card-premium {
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: var(--border);
}

.admin-order-card-premium.admin-order-card--paid {
  border-left-color: var(--accent-green);
}

.admin-order-card-premium.admin-order-card--pending {
  border-left-color: #ca8a04;
}

.admin-order-card-premium.admin-order-card--cancelled {
  border-left-color: #9ca3af;
  background: linear-gradient(180deg, rgba(107, 114, 128, 0.04), var(--bg-dark));
}

/* Розділ «Замовлення» — панель менеджера */
.admin-orders-section-head {
  align-items: flex-start;
}

.admin-orders-section-lead {
  margin: 8px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 760px;
}

.admin-orders-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.admin-orders-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.admin-orders-stat:hover {
  border-color: rgba(13, 79, 79, 0.35);
}

.admin-orders-stat--active {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 1px rgba(13, 79, 79, 0.1);
  background: rgba(13, 79, 79, 0.05);
}

.admin-orders-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-teal);
  line-height: 1.1;
}

.admin-orders-stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.25;
}

.admin-orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.admin-orders-search {
  flex: 1;
  min-width: 220px;
  max-width: 520px;
}

.admin-order-head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-order-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.admin-order-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-order-id-short {
  font-size: 0.8rem;
  font-family: ui-monospace, monospace;
  background: var(--bg-card);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.admin-order-copy-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-green-light);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
}

.admin-order-copy-btn:hover:not(:disabled) {
  color: var(--accent-teal);
}

.admin-order-copy-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-order-paid-line {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--text);
}

.admin-order-paid-line--muted {
  color: var(--text-muted);
}

.admin-order-client {
  margin-bottom: 8px;
}

.admin-order-email-link {
  color: var(--accent-teal);
  font-weight: 600;
  text-decoration: none;
}

.admin-order-email-link:hover {
  text-decoration: underline;
}

.admin-order-name {
  color: var(--text-muted);
  font-weight: 500;
}

.admin-order-phone-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-green-light);
  text-decoration: none;
}

.admin-order-phone-link:hover {
  text-decoration: underline;
}

.admin-order-phone-missing {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.admin-order-client-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 4px;
}

.admin-order-client-row .admin-order-user {
  margin: 0;
}

.btn-admin-customer-card {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--accent-teal);
  background: rgba(13, 79, 79, 0.08);
  border: 1px solid rgba(13, 79, 79, 0.28);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.btn-admin-customer-card:hover {
  background: rgba(13, 79, 79, 0.14);
  border-color: var(--accent-teal);
}

/* Картка клієнта (менеджер) */
.admin-customer-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 48px;
  overflow-y: auto;
  background: rgba(13, 79, 79, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.admin-customer-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-top: 0;
  padding: 26px 24px 24px;
  background: linear-gradient(165deg, #ffffff 0%, #f6faf8 100%);
  border: 1px solid rgba(13, 79, 79, 0.14);
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(13, 79, 79, 0.05),
    0 28px 56px -16px rgba(0, 0, 0, 0.2);
}

.admin-customer-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--accent-teal) 0%, var(--accent-green-light) 55%, #3d7a64 100%);
}

.admin-customer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.admin-customer-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.admin-customer-pad {
  margin: 20px 0 0;
}

.admin-customer-head {
  margin: 0 40px 20px 0;
}

.admin-customer-kicker {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green, #2d5a4a);
}

.admin-customer-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.admin-customer-mail {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent-teal);
  text-decoration: none;
}

.admin-customer-mail:hover {
  text-decoration: underline;
}

.admin-customer-section {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.admin-customer-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.admin-customer-section--orders {
  border-bottom: none;
  padding-bottom: 0;
}

.admin-customer-h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.admin-customer-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  background: var(--accent-teal);
  border-radius: 999px;
}

.admin-customer-muted {
  margin: 0 0 10px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.admin-customer-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 0;
}

.admin-customer-dl dt {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-customer-dl dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.admin-customer-dl--stack {
  grid-template-columns: 1fr;
  gap: 14px;
}

.admin-customer-tel {
  color: var(--accent-green-light);
  font-weight: 600;
  text-decoration: none;
}

.admin-customer-tel:hover {
  text-decoration: underline;
}

.admin-customer-address-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  border: 1px solid var(--border);
}

.admin-customer-address-pre {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text);
}

.admin-customer-details {
  margin-top: 12px;
  font-size: 0.88rem;
}

.admin-customer-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-teal);
  user-select: none;
}

.admin-customer-details summary:hover {
  text-decoration: underline;
}

.admin-customer-details[open] summary {
  margin-bottom: 10px;
}

.admin-customer-orders-scroll {
  max-height: min(320px, 45vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.admin-customer-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.admin-customer-orders-table th,
.admin-customer-orders-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-customer-orders-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-dark);
}

.admin-customer-orders-table tr:last-child td {
  border-bottom: none;
}

.admin-customer-order-id {
  font-size: 0.78rem;
}

.admin-customer-copy-mini {
  display: block;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-teal);
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font);
}

.admin-customer-copy-mini:hover {
  color: var(--accent-green);
}

@media (max-width: 520px) {
  .admin-customer-dl {
    grid-template-columns: 1fr;
  }
}

.admin-order-lines-block {
  margin: 16px 0 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.admin-order-lines-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-order-lines-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.admin-order-sum {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-teal);
}

.admin-order-sum--na {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.admin-order-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
}

.admin-order-items-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-order-items-table th,
.admin-order-items-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-order-items-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.admin-order-items-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.btn-admin-warn {
  background: rgba(234, 179, 8, 0.12);
  color: #92400e;
  border: 1px solid rgba(180, 120, 40, 0.45);
}

.btn-admin-warn:hover:not(:disabled) {
  background: rgba(234, 179, 8, 0.2);
}

.btn-admin-danger {
  background: rgba(220, 38, 38, 0.06);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.btn-admin-danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.11);
}

.btn-admin-reopen {
  background: var(--bg-card);
  color: var(--accent-teal);
  border: 1px solid rgba(13, 79, 79, 0.35);
}

.btn-admin-reopen:hover:not(:disabled) {
  background: rgba(13, 79, 79, 0.07);
}

.btn-admin-receipt {
  background: rgba(13, 79, 79, 0.08);
  color: var(--accent-teal);
  border: 1px solid rgba(13, 79, 79, 0.35);
  font-weight: 600;
}

.btn-admin-receipt:hover:not(:disabled) {
  background: rgba(13, 79, 79, 0.14);
}

.admin-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin: 12px 0 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.admin-contact-grid--single {
  grid-template-columns: 1fr;
}

.admin-contact-span-2 {
  grid-column: span 2;
}

.admin-contact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.admin-contact-val {
  font-size: 0.92rem;
  color: var(--text);
}

.admin-contact-summary .admin-contact-pre,
.admin-contact-delivery .admin-contact-pre {
  margin: 6px 0 0;
  font-family: var(--font);
  font-size: 0.88rem;
  white-space: pre-wrap;
  color: var(--text);
  line-height: 1.45;
}

.admin-export-card {
  margin-top: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(13, 79, 79, 0.06) 0%, var(--bg-dark) 100%);
}

.admin-pdf-workbench {
  padding: 22px 22px 20px;
  border-radius: 16px;
  border: 1px solid rgba(45, 90, 74, 0.18);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 250, 248, 0.98) 45%, rgba(13, 79, 79, 0.04) 100%),
    var(--bg-dark);
  box-shadow: 0 10px 36px rgba(13, 79, 79, 0.08);
}

.admin-pdf-workbench-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(45, 90, 74, 0.12);
}

.admin-pdf-title {
  margin-bottom: 8px;
}

.admin-pdf-tagline {
  margin: 0;
  max-width: 520px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.admin-inline-tab-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--accent-teal);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-inline-tab-link:hover {
  color: var(--accent-green);
}

.admin-pdf-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-pdf-metric {
  min-width: 88px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent-teal) 0%, var(--accent-green) 100%);
  color: var(--white);
  text-align: center;
  box-shadow: 0 6px 18px rgba(45, 90, 74, 0.28);
}

.admin-pdf-metric-soft {
  background: rgba(45, 90, 74, 0.1);
  color: var(--text);
  box-shadow: none;
  border: 1px solid rgba(45, 90, 74, 0.12);
}

.admin-pdf-metric-soft .admin-pdf-metric-val {
  color: var(--accent-teal);
}

.admin-pdf-metric-val {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.admin-pdf-metric-label {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.92;
}

.admin-pdf-metric-soft .admin-pdf-metric-label {
  color: var(--text-muted);
  opacity: 1;
}

.admin-pdf-workbench-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 20px;
}

.admin-pdf-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-pdf-control-grow {
  flex: 1 1 220px;
  min-width: 200px;
}

.admin-pdf-control-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-pdf-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-pdf-select-wide {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.admin-pdf-download-wrap {
  flex: 0 0 auto;
  margin-left: auto;
}

.admin-pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(45, 90, 74, 0.3);
}

.admin-pdf-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(45, 90, 74, 0.35);
}

.admin-pdf-download-icon {
  display: flex;
  opacity: 0.95;
}

.admin-export-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.admin-export-stat {
  font-weight: 600;
  color: var(--accent-teal);
  margin-right: 8px;
}

.admin-export-select {
  min-width: 200px;
  max-width: 280px;
}

.admin-pdf-btn {
  margin-left: auto;
}

.admin-table-toolbar {
  margin-bottom: 14px;
}

.admin-filter-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 320px;
}

.admin-filter-select {
  width: 100%;
}

.admin-table-premium {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(45, 90, 74, 0.15);
}

.admin-th-check {
  width: 40px;
  text-align: center;
}

.admin-link-danger-text {
  font-family: var(--font);
  font-size: 0.8rem;
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

.admin-file-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

.admin-file-row-label {
  font-weight: 600;
  color: var(--text-muted);
}

.admin-file-name {
  font-size: 0.82rem;
  color: var(--accent-green);
}

.admin-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.admin-photo-upload-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
}

.admin-photo-upload-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-photo-upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 112px;
  padding: 18px 20px;
  border-radius: 16px;
  cursor: pointer;
  border: 2px dashed rgba(45, 90, 74, 0.35);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 250, 247, 0.98) 100%),
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(45, 90, 74, 0.08), transparent 55%);
  box-shadow: 0 6px 24px rgba(13, 79, 79, 0.07);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.admin-photo-upload-btn:hover {
  border-color: rgba(45, 90, 74, 0.55);
  box-shadow: 0 10px 32px rgba(45, 90, 74, 0.12);
  transform: translateY(-1px);
}

.admin-photo-upload-btn:focus-within {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
}

.admin-photo-upload-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-green) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(45, 90, 74, 0.35);
}

.admin-photo-upload-btn-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-teal);
  letter-spacing: 0.02em;
}

.admin-photo-upload-btn-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-photo-upload-filename {
  margin: 0;
  font-size: 0.85rem;
  color: var(--accent-green);
  font-weight: 600;
}

.admin-photo-url-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}

.admin-photo-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-photo-url-row .auth-input {
  flex: 1;
  min-width: min(100%, 220px);
}

.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 20, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  padding: 24px 22px 22px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal-wide {
  max-width: 560px;
}

.admin-modal-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--accent-teal);
}

.admin-modal-sub {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-modal-text {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-modal-preview {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 0 auto 16px;
}

.admin-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font);
  font-size: 0.85rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text-muted);
}

.admin-modal-close:hover {
  color: var(--text);
}

.admin-comment-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-comment-admin-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.admin-comment-admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.admin-comment-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-comment-text {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .admin-contact-grid {
    grid-template-columns: 1fr;
  }

  .admin-contact-span-2 {
    grid-column: span 1;
  }

  .admin-export-toolbar .admin-pdf-btn {
    margin-left: 0;
    width: 100%;
  }

  .admin-pdf-download-wrap {
    margin-left: 0;
    width: 100%;
  }

  .admin-pdf-download-btn {
    width: 100%;
    justify-content: center;
  }

  .admin-pdf-workbench-top {
    flex-direction: column;
  }

  .admin-catalog-stats {
    flex-direction: column;
    align-items: flex-start;
  }
}
