/* УНИФИЦИРОВАННЫЕ СТИЛИ ДЛЯ КОНТРОЛЬНЫХ СЕКЦИЙ */
/* Белый фон с черными кнопками - гармоничный дизайн */

.control-section {
  position: relative;
  margin: clamp(12px, 2.5vw, 24px) 0;
  padding: clamp(14px, 3vw, 20px);
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  color: #1a1f2e;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.control-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.control-section > * {
  position: relative;
  z-index: 1;
}

/* Minecraft Renders внутри блоков */
.control-section__render {
  position: absolute;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.control-section__render img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
}

.control-section__render--left {
  left: -8%;
  top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  max-width: clamp(180px, 25vw, 350px);
}

.control-section__render--right {
  right: -6%;
  top: 50%;
  transform: translateY(-50%) rotate(8deg);
  max-width: clamp(160px, 22vw, 300px);
}

@media (min-width: 1024px) {
  .control-section__render {
    opacity: 0.18;
  }
  
  .control-section__render--left {
    left: -5%;
  }
  
  .control-section__render--right {
    right: -3%;
  }
}

@media (max-width: 768px) {
  .control-section__render {
    opacity: 0.08;
  }
  
  .control-section__render--left {
    left: -15%;
    max-width: 120px;
  }
  
  .control-section__render--right {
    right: -12%;
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .control-section__render {
    display: none;
  }
}

.control-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: clamp(10px, 2.5vw, 16px);
}

@media (min-width: 768px) {
  .control-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.control-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(0,0,0,0.5);
  text-transform: uppercase;
  margin: 0;
}

.control-head h2 {
  margin: 2px 0 4px 0;
  font-size: clamp(18px, 3.5vw, 24px);
  color: #1a1f2e;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.control-note {
  font-size: 12px;
  color: rgba(0,0,0,0.6);
}

.control-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #1a1f2e;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  flex-wrap: wrap;
  font-size: 12px;
  background: #1a1f2e;
}

.control-cta__price {
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #ff6b35;
}

.control-cta:hover {
  transform: translateY(-1px);
  border-color: #0d1117;
  background: #0d1117;
  box-shadow: 0 4px 12px rgba(26, 31, 46, 0.2);
}

.control-cta:hover .control-cta__price {
  background: rgba(255,107,53,0.15);
  border-color: rgba(255,107,53,0.4);
}

.control-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: rgba(0,0,0,0.6);
}

.control-pills span {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.03);
}

/* STORES / SELLERS */
.stores-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .stores-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .stores-track {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.store-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #f8f9fa;
  color: #1a1f2e;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.store-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,0.015) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0,0,0,0.015) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.store-card:hover,
.seller-btn.active {
  transform: translateY(-1px);
  border-color: rgba(255,107,53,0.4);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.store-card__badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.1);
  color: #1a1f2e;
  width: fit-content;
  position: relative;
  z-index: 1;
}

.store-card__row {
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.store-card__avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.1);
  overflow: hidden;
  background: rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.store-card__avatar img {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(0,0,0,0.02);
}

.store-card__avatar--all {
  background: #ff6b35;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  border-color: rgba(255,107,53,0.3);
}

.store-card__title {
  font-size: 14px;
  font-weight: 800;
  color: #1a1f2e;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.store-card__meta {
  font-size: 11px;
  color: rgba(0,0,0,0.6);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.seller-btn.active {
  background: rgba(26, 31, 46, 0.08);
  border-color: rgba(26, 31, 46, 0.3);
  color: #1a1f2e;
}

.seller-btn.active .store-card__title,
.seller-btn.active .store-card__meta {
  color: #1a1f2e;
}

.seller-btn.active .store-card__badge {
  background: rgba(26, 31, 46, 0.12);
  color: #1a1f2e;
  border-color: rgba(26, 31, 46, 0.25);
}

/* CATEGORIES */
.control-section--categories {
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.control-section--categories > * {
  position: relative;
  z-index: 2;
}

.control-section--categories .control-section__render {
  z-index: 0 !important;
}

.category-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .category-board {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

.category-board__main,
.category-board__sub {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: visible;
  z-index: 1;
}

.category-board__main::before,
.category-board__sub::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6b35, #ffa726);
  opacity: 0.6;
}

.category-board__header {
  margin-bottom: 12px;
}

.category-board__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.5);
}

.category-board__choices {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1a1f2e;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  flex: 0 0 auto;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 167, 38, 0.02));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.category-card > * {
  position: relative;
  z-index: 1;
}

.category-card:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 107, 53, 0.4);
  background: linear-gradient(135deg, #ffffff, rgba(255, 107, 53, 0.05));
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.15);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card.active {
  transform: translateY(-2px) scale(1.02);
  border-color: #ff6b35;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 167, 38, 0.05));
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
  color: #1a1f2e;
}

.category-card.active::before {
  opacity: 1;
}

.category-card.active .category-card__title,
.category-card.active .category-card__desc {
  color: #1a1f2e;
}

.category-card.active .category-card__chevron {
  color: #ff6b35;
}

.category-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,0,0,0.06), rgba(0,0,0,0.03));
  border: 1.5px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1f2e;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.category-card__icon svg {
  width: 18px;
  height: 18px;
}

.category-card__icon--accent {
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  border-color: rgba(255,107,53,0.4);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.category-card__icon--dark {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 167, 38, 0.05));
  border-color: rgba(255,107,53,0.3);
  color: #ff6b35;
}

.category-card:hover .category-card__icon {
  transform: scale(1.1) rotate(5deg);
}

.category-card.active .category-card__icon {
  transform: scale(1.1);
}

.category-card__title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1f2e;
  letter-spacing: -0.01em;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.category-card.active .category-card__title {
  color: #ff6b35;
  font-weight: 800;
}

.category-card__desc {
  display: none;
}

.category-card__chevron {
  display: none;
}


.sub-head {
  display: none;
}

.sub-head h3 {
  margin: 2px 0 0 0;
  font-size: 16px;
  color: #1a1f2e;
}

.sub-head__note {
  font-size: 11px;
  color: rgba(0,0,0,0.5);
  max-width: 180px;
}

.subcategories-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow: visible;
}

.subcategories-wrapper {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow: visible;
}

@media (min-width: 1024px) {
  .subcategories-container,
  .subcategories-wrapper {
    overflow-x: visible;
    overflow-y: visible;
  }
}

.subcategories-container .category-btn {
  border-radius: 20px;
  border: 1.5px solid rgba(0,0,0,0.12);
  padding: 6px 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  color: #1a1f2e;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.subcategories-container .category-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 167, 38, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.subcategories-container .category-btn:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: rgba(255,107,53,0.4);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 167, 38, 0.03));
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.subcategories-container .category-btn:hover::before {
  opacity: 1;
}

.subcategories-container .category-btn.active {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 167, 38, 0.08));
  border-color: #ff6b35;
  color: #ff6b35;
  transform: translateY(-2px) scale(1.05);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.25);
}

.subcategories-container .category-btn.active::before {
  opacity: 1;
}

/* SORT */
.control-section--sort {
  margin-top: 20px;
}

.sort-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .sort-tabs {
    display: flex;
    gap: 6px;
  }
}

.sort-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(0,0,0,0.12);
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1a1f2e;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  flex: 1;
  min-width: 120px;
}

.sort-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 167, 38, 0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.sort-tab > * {
  position: relative;
  z-index: 1;
}

.sort-tab span {
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.sort-tab:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255,107,53,0.4);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(255, 167, 38, 0.03));
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.15);
}

.sort-tab:hover::before {
  opacity: 1;
}

.sort-tab.active {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 167, 38, 0.08));
  border-color: #ff6b35;
  color: #ff6b35;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.25);
}

.sort-tab.active::before {
  opacity: 1;
}

/* MOBILE */
@media (max-width: 640px) {
  .control-section {
    padding: clamp(12px, 3vw, 18px);
    border-radius: 14px;
    margin: clamp(10px, 2.5vw, 20px) 0;
  }
  
  .control-head {
    gap: 6px;
    margin-bottom: clamp(8px, 2.5vw, 14px);
  }
  
  .control-head h2 {
    font-size: clamp(16px, 3.5vw, 20px);
  }
  
  .control-cta {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 11px;
  }
  
  .stores-track {
    gap: 8px;
  }
  
  .store-card {
    padding: 12px;
    gap: 10px;
  }
  
  .store-card__avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  
  .store-card__title {
    font-size: 13px;
  }
  
  .store-card__meta {
    font-size: 10px;
  }
  
  .category-board {
    gap: 10px;
  }
  
  .category-card {
    padding: 12px;
    gap: 10px;
  }
  
  .category-card__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  
  .category-card__title {
    font-size: 13px;
  }
  
  .category-card__desc {
    font-size: 11px;
  }
  
  .category-board__sub {
    padding: 12px;
    margin-top: 10px;
  }
  
  .sub-head {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }
  
  .sub-head h3 {
    font-size: 15px;
  }
  
  .sub-head__note {
    font-size: 10px;
    max-width: 100%;
  }
  
  .subcategories-container {
    gap: 6px;
  }
  
  .subcategories-container .category-btn {
    padding: 5px 12px;
    font-size: 11px;
  }
  
  .sort-tabs {
    gap: 8px;
  }
  
  .sort-tab {
    padding: 10px 14px;
    font-size: 12px;
  }
}
