/*
 * Home page styles.
 * Вынесено из inline <style> в pages/index.html (аудит 2026-04-18).
 * Причина: −30 KB из каждого HTML-ответа на /, + внешний CSS кэшируется
 * браузером между навигациями.
 *
 * Если правишь styles для главной — здесь. Первое время после деплоя
 * возможен один cache miss; повторные заходы — hit.
 */

/* Homepage Bootstrap subset moved to css/bootstrap-home-subset.css so the
   route can keep Bootstrap-consistent rendering without the external CDN
   stylesheet or a hand-maintained compatibility block in this file. */

/* ==== Survey V3 styles migrated from inline <style> in pages/index.html ==== */
    /* NEW SURVEY CSS V3 */
.survey-container-v3 {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}
@media (min-width: 900px) {
  .survey-container-v3 {
    grid-template-columns: 280px 1fr;
  }
}


.sl-panel-light {
  background: linear-gradient(135deg, #5A2714, #2A1107);
  border-radius: 20px;
  padding: 1rem;
  border: 1px solid rgba(255, 140, 66, 0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.survey-panel-dark {
  background: linear-gradient(135deg, #38160d, #1c0602);
  border-radius: 20px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 140, 66, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Left Panel */
.sl-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.sl-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,140,66,0.3), rgba(255,209,140,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff9b55;
  position: relative;
}
.sl-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 28px; height: 28px;
  background: #1a0c06;
  border-radius: 50%;
  z-index: 1;
}
.sl-icon svg {
  position: relative;
  z-index: 2;
}
.sl-bonus-info {
  display: flex;
  flex-direction: column;
}
.sl-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}
.sl-amount {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.sl-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.sl-tags {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sl-tag {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Right Panel */
.survey-right-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sr-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.sr-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sr-brand-wrapper {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25em;
  white-space: nowrap;
}
.sr-brand-logo {
  height: 0.85em;
  width: auto;
  transform: translateY(0.05em);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}
.sr-brand-text {
  background: linear-gradient(110deg, #ffffff 10%, #ffe3c2 50%, #ff9e5e 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.sr-subtitle {
  margin: 0.25rem 0 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}
.sr-dismiss {
  background: rgba(255, 163, 102, 1);
  color: #1a0c06;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.sr-dismiss:hover { opacity: 0.9; }

.sr-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.sr-banner-text {
  position: relative;
  z-index: 2;
  max-width: 28rem;
}
.sr-banner-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.sr-banner-desc {
  margin: 0.5rem 0 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.4;
}
.sr-banner-icon {
  position: relative;
  z-index: 1;
}

.sr-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.sr-footer-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sr-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}
.sr-pill-dot {
  width: 5px; height: 5px;
  background: #ffaa55;
  border-radius: 50%;
}
.sr-cta {
  background: linear-gradient(135deg, #ff9b55, #ffb347);
  color: #1a0c06;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
  transition: transform 0.2s ease;
  white-space: nowrap;
}
.sr-cta:hover { transform: translateY(-2px); }

@media (max-width: 899px) {
  .sl-panel-light, .survey-panel-dark:not(.sr-banner) {
    display: none !important;
  }
  .survey-container-v3 { display: block; margin: 0.5rem 0; gap: 0; }
  
  .sr-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  .sr-title { font-size: 1.15rem; }
  .sr-subtitle { font-size: 0.8rem; }
  .sr-dismiss {
    align-self: center !important;
    margin: 0 !important;
    padding: 0.5rem 1.25rem !important;
  }

  .sr-banner {
    flex-direction: row !important;
    align-items: center !important;
    padding: 1.25rem 1rem !important;
    gap: 0.5rem !important;
  }
  .sr-banner-text {
    flex: 1;
    min-width: 0;
  }
  .sr-banner-title {
    font-size: clamp(1rem, 4.5vw, 1.3rem) !important;
    line-height: 1.15;
  }
  .sr-banner-desc {
    font-size: 0.75rem !important;
    margin-top: 0.4rem;
  }
  .sr-banner-icon {
    margin: 0 !important;
    flex-shrink: 0;
    width: 85px !important; 
    height: 85px !important;
  }

  .sr-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .sr-footer-pills {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
  }
  .sr-pill {
    flex: 1;
    justify-content: center;
    text-align: center;
    font-size: 0.6rem !important;
    padding: 0.35rem 0.2rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sr-cta {
    width: 100%;
    justify-content: center;
    padding: 0.85rem !important;
    font-size: 1rem !important;
  }
}
.survey-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.survey-modal.open {
  display: flex;
}

.survey-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.65);
  backdrop-filter: blur(6px);
}

.survey-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 92vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(20, 22, 27, 0.98), rgba(10, 12, 17, 0.95));
  border: 1px solid rgba(255, 140, 66, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.survey-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 12px;
  padding: 0.4rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.survey-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.survey-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 140, 66, 0.2);
  color: #ffb98a;
  border: 1px solid rgba(255, 140, 66, 0.2);
  margin-bottom: 0.5rem;
}

.survey-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem 0;
}

.survey-modal-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

.survey-modal-privacy {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.survey-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.survey-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.survey-soft-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.survey-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.survey-btn {
  border-radius: 12px;
  padding: 0.65rem 1.2rem;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
}

.survey-btn:hover {
  transform: translateY(-1px);
}

.survey-btn-primary {
  background: linear-gradient(135deg, #ff8c42, #ffb347);
  color: #1d130a;
  border: none;
  box-shadow: 0 8px 24px rgba(255, 140, 66, 0.35);
}

.survey-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}

.survey-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.survey-question-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fff;
}

.survey-question-help {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1rem;
}

.survey-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.survey-option {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.survey-option.selected {
  border-color: rgba(255, 140, 66, 0.8);
  background: rgba(255, 140, 66, 0.15);
  color: #fff;
}

.survey-option-info {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.survey-option-tooltip {
  position: absolute;
  margin-top: 0.4rem;
  background: rgba(10, 12, 17, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.75rem;
  max-width: 240px;
  display: none;
  z-index: 2;
}

.survey-option-tooltip.open {
  display: block;
}

.survey-slider {
  width: 100%;
}

.survey-slider-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.survey-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.survey-text {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1rem;
}

.survey-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
}

.survey-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ff8c42;
  animation: survey-spin 0.9s linear infinite;
}

.survey-error {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

.survey-thanks {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.survey-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.survey-code {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.survey-option.shake {
  animation: survey-shake 0.3s ease;
}

body.survey-modal-open {
  overflow: hidden;
}

@keyframes survey-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes survey-shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.category-card-custom {
  min-height: 164px;
  padding: 0;
  border-color: rgba(255, 205, 118, 0.16);
  background:
    radial-gradient(circle at top left, rgba(255, 205, 118, 0.1), transparent 28%),
    radial-gradient(circle at right center, rgba(255, 140, 66, 0.12), transparent 30%);
}

.category-card-custom:hover {
  border-color: rgba(255, 205, 118, 0.26);
}

.categories-stack {
  display: grid;
  gap: clamp(1rem, 1.55vw, 1.2rem);
}

.categories-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(12rem, 17vw, 16rem), 1fr));
  gap: clamp(0.9rem, 1.45vw, 1.15rem);
  align-items: stretch;
}

.categories-top-grid--exact {
  grid-template-columns: repeat(var(--category-count), minmax(0, 1fr));
}

.categories-top-grid > .category-card-balanced {
  min-width: 0;
  min-height: clamp(6.5rem, 8vw, 7.5rem);
}

.categories-top-grid > .category-card-balanced .card-content-compact {
  min-height: 100%;
  justify-content: center;
}

.categories-top-grid > .category-card-balanced:hover {
  transform: translateY(-5px) scale(1.03);
}

.categories-cta-wrap {
  width: 100%;
}

.categories-header-unified .d-flex {
  gap: clamp(0.75rem, 1.4vw, 1.35rem);
}

.categories-header-unified .categories-toggle-btn,
.categories-header-unified .catalog-link-compact {
  min-width: clamp(10.5rem, 12vw, 13rem);
  justify-content: center;
  padding-inline: clamp(1rem, 1.8vw, 1.45rem);
}

.category-card-custom-content {
  display: block;
  width: 100%;
  padding: clamp(0.9rem, 1vw, 1rem);
}

.category-card-custom-panel {
  width: 100%;
}

.category-card-custom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  width: 100%;
  min-height: 100%;
  padding: clamp(1.05rem, 1.5vw, 1.2rem) clamp(1.1rem, 1.8vw, 1.4rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 214, 143, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 216, 154, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(11, 12, 17, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.category-card-custom-copy {
  display: grid;
  gap: 0.5rem;
  text-align: left;
  flex: 1 1 28rem;
  min-width: min(100%, 20rem);
}

.category-card-custom-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.36rem 0.68rem;
  border-radius: 999px;
  background: rgba(255, 216, 154, 0.08);
  border: 1px solid rgba(255, 216, 154, 0.14);
  color: #f3cf8a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-card-custom-title {
  margin: 0;
  color: #f6f1e8;
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.category-card-custom-text {
  margin: 0;
  max-width: 54ch;
  color: rgba(246, 241, 232, 0.74);
  line-height: 1.58;
  font-size: 0.93rem;
}

.category-card-custom-action-wrapper {
  margin-left: auto;
  flex: 0 1 clamp(20rem, 28vw, 28rem);
  width: min(100%, clamp(20rem, 28vw, 28rem));
  min-width: clamp(18rem, 24vw, 24rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.category-card-custom-helptext {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  line-height: 1.2;
}

.category-card-custom-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  color: #1c1208;
  background: linear-gradient(135deg, #f5ce7d, #e7b45f 55%, #cb8736);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(203, 135, 54, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.category-card-custom-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(203, 135, 54, 0.32);
  filter: saturate(1.06);
}

.pagination-showcase {
  --pagination-mobile-scale: 1;
  --pagination-mobile-height: auto;
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin-top: 1.1rem;
  padding-inline: clamp(0.12rem, 1vw, 0.35rem);
  overflow: clip;
}

.pagination-showcase::before {
  content: '';
  position: absolute;
  inset: auto 12% 0;
  height: 56px;
  background: radial-gradient(ellipse at center, rgba(255, 169, 74, 0.16), transparent 72%);
  filter: blur(24px);
  pointer-events: none;
}

#home-pagination-shell {
  width: 100%;
  min-width: 0;
}

.pagination-rail {
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding:
    0.12rem
    max(0.72rem, env(safe-area-inset-left))
    0.5rem
    max(0.72rem, env(safe-area-inset-right));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding-inline:
    max(1rem, env(safe-area-inset-left))
    max(1rem, env(safe-area-inset-right));
}

.pagination-rail::-webkit-scrollbar {
  display: none;
}

.pagination-premium {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 0.45rem;
  padding: 0.48rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(37, 40, 51, 0.98), rgba(17, 20, 29, 0.98)),
    rgba(24, 27, 34, 0.92);
  border: 1px solid rgba(255, 222, 182, 0.16);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  width: max-content;
  min-width: max-content;
  max-width: 100%;
  isolation: isolate;
  scroll-snap-type: x proximity;
}

.pagination-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 196, 122, 0.12), transparent 42%, rgba(77, 124, 255, 0.08));
  pointer-events: none;
  opacity: 0.9;
}

.pagination-premium .page-item {
  display: flex;
  position: relative;
  scroll-snap-align: center;
}

.pagination-premium .page-link {
  min-width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  color: rgba(248, 242, 232, 0.95);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.pagination-premium .page-item-number .page-link {
  min-width: 3rem;
  padding-inline: 0;
}

.pagination-premium .page-item-nav .page-link {
  min-width: clamp(7.4rem, 12vw, 8.8rem);
  padding-inline: 1rem;
  background: linear-gradient(135deg, rgba(255, 208, 140, 0.14), rgba(255, 148, 68, 0.08));
  border-color: rgba(255, 211, 156, 0.18);
  color: rgba(255, 239, 220, 0.98);
}

.pagination-premium .page-item-nav-prev .page-link {
  border-radius: 999px 16px 16px 999px;
  padding-left: 1.12rem;
  padding-right: 0.92rem;
}

.pagination-premium .page-item-nav-next .page-link {
  border-radius: 16px 999px 999px 16px;
  padding-left: 0.92rem;
  padding-right: 1.12rem;
}

.page-link-icon {
  font-size: 1rem;
  line-height: 1;
}

.page-link-label {
  white-space: nowrap;
}

.pagination-premium .page-link:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 224, 186, 0.24);
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.pagination-premium .page-item.active .page-link {
  background: linear-gradient(135deg, #ffd18c, #ffb347 55%, #ff8c42);
  color: #201207;
  border-color: rgba(255, 216, 164, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 12px 28px rgba(255, 140, 66, 0.3),
    0 0 0 1px rgba(255, 222, 175, 0.18);
}

.pagination-premium .page-item.active::after {
  content: '';
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: -0.42rem;
  height: 0.34rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 209, 140, 0.9), rgba(255, 140, 66, 0.9));
  filter: blur(8px);
  opacity: 0.8;
  pointer-events: none;
}

.pagination-premium .page-item.disabled .page-link {
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.pagination-premium .page-item-ellipsis .page-link {
  min-width: 2.6rem;
  padding-inline: 0.55rem;
  color: rgba(255, 241, 221, 0.72);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  box-shadow: none;
}

@media (max-width: 768px) {
  .pagination-showcase {
    min-height: var(--pagination-mobile-height);
    padding-inline: clamp(0.55rem, 3vw, 0.85rem);
  }

  .survey-card {
    grid-template-columns: 1fr;
  }

  .survey-signal {
    min-height: auto;
  }

  .survey-dialog {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: none;
  }

  .survey-body {
    padding: 1.2rem 1.2rem;
  }

  .survey-footer {
    padding: 1rem 1.2rem 1.2rem;
  }

  .survey-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .survey-reward-panel {
    grid-template-columns: 1fr;
  }

  .survey-reward-amount {
    justify-self: start;
    text-align: left;
  }

  .survey-actions {
    align-items: stretch;
  }

  .survey-actions-meta {
    order: 2;
  }

  .categories-header-unified .categories-toggle-btn {
    width: min(100%, 16rem);
  }

  .categories-top-grid:not(.categories-top-grid--exact) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .categories-top-grid > .category-card-balanced {
    min-height: 6rem;
  }

  .categories-top-grid--exact > .category-card-balanced {
    min-height: 5.5rem;
  }

  .categories-top-grid--exact .category-card-compact {
    padding: 0.7rem;
    border-radius: 12px;
  }

  .categories-top-grid--exact .card-content-compact {
    gap: 0.5rem;
  }

  .categories-top-grid--exact .card-icon-compact {
    width: 36px;
    height: 36px;
  }

  .categories-top-grid--exact .card-icon-compact img {
    width: 18px;
    height: 18px;
  }

  .categories-top-grid--exact .card-title-compact {
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .category-card-custom-inner {
    align-items: stretch;
  }

  .category-card-custom-action-wrapper {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
  .category-card-custom-action {
    width: 100%;
  }

  .pagination-premium .page-link {
    min-width: 2.85rem;
    height: 2.85rem;
    font-size: 0.84rem;
  }

  .pagination-premium .page-item-nav .page-link {
    min-width: 3.15rem;
    padding-inline: 0.9rem;
  }
}

@media (max-width: 768px) {
  .pagination-rail.is-scaled {
    justify-content: flex-start;
    overflow-x: hidden;
    scroll-padding-inline: 0;
  }

  .pagination-rail.is-scaled .pagination-premium {
    margin-inline: 0;
    transform: translateX(var(--pagination-mobile-offset, 0px)) scale(var(--pagination-mobile-scale, 1));
    transform-origin: left top;
    will-change: transform;
    scroll-snap-type: none;
  }
}

@media (max-width: 640px) {
  .pagination-premium {
    gap: 0.38rem;
    padding: 0.4rem;
  }

  .pagination-premium .page-link {
    min-width: 2.65rem;
    height: 2.65rem;
    padding-inline: 0.72rem;
  }

  .pagination-premium .page-item-nav .page-link {
    min-width: 2.9rem;
    padding-inline: 0.72rem;
  }

  .pagination-premium .page-item-nav-prev .page-link {
    padding-left: 0.82rem;
    padding-right: 0.62rem;
  }

  .pagination-premium .page-item-nav-next .page-link {
    padding-left: 0.62rem;
    padding-right: 0.82rem;
  }

  .page-link-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .categories-header-unified .categories-toggle-btn {
    width: 100%;
  }

  .categories-stack {
    gap: 0.75rem;
  }

  .categories-top-grid:not(.categories-top-grid--exact) {
    grid-template-columns: 1fr;
  }

  .categories-top-grid > .category-card-balanced {
    min-height: 5.5rem;
  }

  .categories-top-grid--exact {
    gap: 0.55rem;
  }

  .categories-top-grid--exact > .category-card-balanced {
    min-height: 5rem;
  }

  .categories-top-grid--exact .category-card-compact {
    padding: 0.55rem;
    border-radius: 10px;
  }

  .categories-top-grid--exact .card-content-compact {
    gap: 0.4rem;
  }

  .categories-top-grid--exact .card-icon-compact {
    width: 32px;
    height: 32px;
  }

  .categories-top-grid--exact .card-icon-compact img {
    width: 16px;
    height: 16px;
  }

  .categories-top-grid--exact .card-title-compact {
    font-size: 0.66rem;
    line-height: 1.14;
  }

  .category-card-custom-content {
    padding: 0.75rem;
  }

  .category-card-custom-inner {
    padding: 1rem;
  }

  .pagination-premium .page-link {
    min-width: 2.48rem;
    height: 2.55rem;
    padding-inline: 0.65rem;
  }

  .pagination-premium .page-item-nav .page-link {
    min-width: 2.7rem;
  }
}

@media (min-width: 769px) {
  .pagination-rail:not(.is-scrollable) {
    justify-content: center;
    overflow-x: visible;
  }

  .pagination-rail:not(.is-scrollable) .pagination-premium {
    margin-inline: auto;
  }
}

@media (min-width: 1400px) {
  .categories-top-grid--exact {
    gap: clamp(0.95rem, 1.1vw, 1.1rem);
  }

  .categories-top-grid--exact > .category-card-balanced {
    min-height: clamp(6rem, 7vw, 7rem);
  }

  .categories-top-grid--exact .category-card-compact {
    padding: 0.85rem;
  }

  .categories-top-grid--exact .card-content-compact {
    gap: 0.65rem;
  }

  .categories-top-grid--exact .card-icon-compact {
    width: 50px;
    height: 50px;
  }

  .categories-top-grid--exact .card-icon-compact img {
    width: 24px;
    height: 24px;
  }

  .categories-top-grid--exact .card-title-compact {
    font-size: 0.94rem;
  }

  .categories-header-unified .categories-toggle-btn,
  .categories-header-unified .catalog-link-compact {
    min-width: clamp(9.75rem, 10vw, 11.5rem);
  }

  .category-card-custom-action-wrapper {
    width: min(100%, clamp(17rem, 20vw, 21rem));
    min-width: clamp(17rem, 20vw, 21rem);
  }
  .category-card-custom-action {
    min-height: 50px;
    padding-block: 0.82rem;
  }
}
  


.category-card-custom {
  min-height: 164px;
  padding: 0;
  border-color: rgba(255, 205, 118, 0.16);
  background:
    radial-gradient(circle at top left, rgba(255, 205, 118, 0.1), transparent 28%),
    radial-gradient(circle at right center, rgba(255, 140, 66, 0.12), transparent 30%);
}

.category-card-custom:hover {
  border-color: rgba(255, 205, 118, 0.26);
}

.categories-stack {
  display: grid;
  gap: clamp(1rem, 1.55vw, 1.2rem);
}

.categories-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(12rem, 17vw, 16rem), 1fr));
  gap: clamp(0.9rem, 1.45vw, 1.15rem);
  align-items: stretch;
}

.categories-top-grid--exact {
  grid-template-columns: repeat(var(--category-count), minmax(0, 1fr));
}

.categories-top-grid > .category-card-balanced {
  min-width: 0;
  min-height: clamp(6.5rem, 8vw, 7.5rem);
}

.categories-top-grid > .category-card-balanced .card-content-compact {
  min-height: 100%;
  justify-content: center;
}

.categories-top-grid > .category-card-balanced:hover {
  transform: translateY(-5px) scale(1.03);
}

.categories-cta-wrap {
  width: 100%;
}

.categories-header-unified .d-flex {
  gap: clamp(0.75rem, 1.4vw, 1.35rem);
}

.categories-header-unified .categories-toggle-btn,
.categories-header-unified .catalog-link-compact {
  min-width: clamp(10.5rem, 12vw, 13rem);
  justify-content: center;
  padding-inline: clamp(1rem, 1.8vw, 1.45rem);
}

.category-card-custom-content {
  display: block;
  width: 100%;
  padding: clamp(0.9rem, 1vw, 1rem);
}

.category-card-custom-panel {
  width: 100%;
}

.category-card-custom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  width: 100%;
  min-height: 100%;
  padding: clamp(1.05rem, 1.5vw, 1.2rem) clamp(1.1rem, 1.8vw, 1.4rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 214, 143, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 216, 154, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(11, 12, 17, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.category-card-custom-copy {
  display: grid;
  gap: 0.5rem;
  text-align: left;
  flex: 1 1 28rem;
  min-width: min(100%, 20rem);
}

.category-card-custom-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.36rem 0.68rem;
  border-radius: 999px;
  background: rgba(255, 216, 154, 0.08);
  border: 1px solid rgba(255, 216, 154, 0.14);
  color: #f3cf8a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-card-custom-title {
  margin: 0;
  color: #f6f1e8;
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.category-card-custom-text {
  margin: 0;
  max-width: 54ch;
  color: rgba(246, 241, 232, 0.74);
  line-height: 1.58;
  font-size: 0.93rem;
}

.category-card-custom-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  color: #1c1208;
  background: linear-gradient(135deg, #f5ce7d, #e7b45f 55%, #cb8736);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(203, 135, 54, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.category-card-custom-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(203, 135, 54, 0.32);
  filter: saturate(1.06);
}

@media (max-width: 768px) {
  .survey-card {
    grid-template-columns: 1fr;
  }

  .survey-signal {
    min-height: auto;
  }

  .survey-dialog {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: none;
  }

  .survey-body {
    padding: 1.2rem 1.2rem;
  }

  .survey-footer {
    padding: 1rem 1.2rem 1.2rem;
  }

  .survey-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .survey-reward-panel {
    grid-template-columns: 1fr;
  }

  .survey-reward-amount {
    justify-self: start;
    text-align: left;
  }

  .survey-actions {
    align-items: stretch;
  }

  .survey-actions-meta {
    order: 2;
  }

  .categories-header-unified .categories-toggle-btn {
    width: min(100%, 16rem);
  }

  .categories-top-grid:not(.categories-top-grid--exact) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .categories-top-grid > .category-card-balanced {
    min-height: 6rem;
  }

  .categories-top-grid--exact > .category-card-balanced {
    min-height: 5.5rem;
  }

  .categories-top-grid--exact .category-card-compact {
    padding: 0.7rem;
    border-radius: 12px;
  }

  .categories-top-grid--exact .card-content-compact {
    gap: 0.5rem;
  }

  .categories-top-grid--exact .card-icon-compact {
    width: 36px;
    height: 36px;
  }

  .categories-top-grid--exact .card-icon-compact img {
    width: 18px;
    height: 18px;
  }

  .categories-top-grid--exact .card-title-compact {
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .category-card-custom-inner {
    align-items: stretch;
  }

  .category-card-custom-action-wrapper {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
  .category-card-custom-action {
    width: 100%;
  }

}

@media (max-width: 480px) {
  .categories-header-unified .categories-toggle-btn {
    width: 100%;
  }

  .categories-stack {
    gap: 0.75rem;
  }

  .categories-top-grid:not(.categories-top-grid--exact) {
    grid-template-columns: 1fr;
  }

  .categories-top-grid > .category-card-balanced {
    min-height: 5.5rem;
  }

  .categories-top-grid--exact {
    gap: 0.55rem;
  }

  .categories-top-grid--exact > .category-card-balanced {
    min-height: 5rem;
  }

  .categories-top-grid--exact .category-card-compact {
    padding: 0.55rem;
    border-radius: 10px;
  }

  .categories-top-grid--exact .card-content-compact {
    gap: 0.4rem;
  }

  .categories-top-grid--exact .card-icon-compact {
    width: 32px;
    height: 32px;
  }

  .categories-top-grid--exact .card-icon-compact img {
    width: 16px;
    height: 16px;
  }

  .categories-top-grid--exact .card-title-compact {
    font-size: 0.66rem;
    line-height: 1.14;
  }

  .category-card-custom-content {
    padding: 0.75rem;
  }

  .category-card-custom-inner {
    padding: 1rem;
  }

}

@media (min-width: 1400px) {
  .categories-top-grid--exact {
    gap: clamp(0.95rem, 1.1vw, 1.1rem);
  }

  .categories-top-grid--exact > .category-card-balanced {
    min-height: clamp(6rem, 7vw, 7rem);
  }

  .categories-top-grid--exact .category-card-compact {
    padding: 0.85rem;
  }

  .categories-top-grid--exact .card-content-compact {
    gap: 0.65rem;
  }

  .categories-top-grid--exact .card-icon-compact {
    width: 50px;
    height: 50px;
  }

  .categories-top-grid--exact .card-icon-compact img {
    width: 24px;
    height: 24px;
  }

  .categories-top-grid--exact .card-title-compact {
    font-size: 0.94rem;
  }

  .categories-header-unified .categories-toggle-btn,
  .categories-header-unified .catalog-link-compact {
    min-width: clamp(9.75rem, 10vw, 11.5rem);
  }

  .category-card-custom-action {
    min-height: 50px;
    padding-block: 0.82rem;
  }
}

/* =========================================================================
   Phase 3.2 — визуальные эффекты по data-device-class.
   Цель: на слабых устройствах (low) убрать то, что жжёт GPU, но сохранить
   образ страницы. high — без ограничений, mid — промежуточный компромисс.
   ========================================================================= */

/* --- LOW: максимальная разгрузка ---------------------------------------- */
html[data-device-class="low"] .hero-particles,
html[data-device-class="low"] .featured-particles,
html[data-device-class="low"] .categories-particles,
html[data-device-class="low"] .particle,
html[data-device-class="low"] .toggle-btn-glow,
html[data-device-class="low"] .toggle-btn-ripple,
html[data-device-class="low"] .floating-logo {
  display: none !important;
}

html[data-device-class="low"] *,
html[data-device-class="low"] *::before,
html[data-device-class="low"] *::after {
  /* блюр — самая дорогая операция на mobile GPU. На low — всегда off. */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-device-class="low"] .hero-section,
html[data-device-class="low"] .featured-section,
html[data-device-class="low"] .categories-section {
  /* box-shadow-стеки заменяем одной дешёвой тенью. */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

html[data-device-class="low"] .product-card,
html[data-device-class="low"] .category-card {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.15s ease !important;
}

html[data-device-class="low"] .product-card:hover,
html[data-device-class="low"] .category-card:hover {
  transform: translateY(-2px) !important;
}

/* --- MID: частичная разгрузка ------------------------------------------- */
html[data-device-class="mid"] .hero-particles .particle:nth-child(n+3),
html[data-device-class="mid"] .featured-particles .particle:nth-child(n+3),
html[data-device-class="mid"] .categories-particles .particle:nth-child(n+3) {
  display: none !important;
}

html[data-device-class="mid"] .hero-section,
html[data-device-class="mid"] .featured-section {
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

/* --- prefers-reduced-motion — поверх всего ------------------------------ */
html[data-reduced-motion="1"] *,
html[data-reduced-motion="1"] *::before,
html[data-reduced-motion="1"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* =========================================================================
   Phase 3.3 — content-visibility для offscreen секций главной.
   Браузер скипает layout/paint для секций вне viewport до первого scroll.
   Hero/первая складка — не трогаем (LCP). Fix 2026-04-20: селекторы
   выровнены по фактической разметке (#featured-section, #new-products-section,
   .categories-section — это реальные id/class в pages/index.html).
   contain-intrinsic-size резервирует высоту, чтобы scrollbar не прыгал.
   ========================================================================= */
#featured-section,
#new-products-section,
.categories-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 520px;
}

/* Для карточек в products-grid вне initial viewport — отложенная отрисовка. */
#new-products-section .col.product-card-wrap:nth-child(n+5) {
  content-visibility: auto;
  contain-intrinsic-size: 1px 460px;
}
