/* AZIA TECHNO PROGRESS — премиальная мобильная тема */

:root {
  --premium-black: #050505;
  --premium-dark: #0a0a0a;
  --premium-card: #111111;
  --premium-card-deep: #080808;
  --premium-gold: #c9a84c;
  --premium-gold-soft: rgba(201, 168, 76, 0.35);
  --premium-card-border: rgba(201, 168, 76, 0.12);
  --premium-glass: rgba(17, 17, 17, 0.92);
}

/* Главная: по умолчанию — категории (десктоп) */
.home-label-new,
.home-title-new,
.home-sub-new,
.categories-panel-mobile {
  display: none;
}

@media (max-width: 768px) {
  html,
  body {
    background: var(--premium-black) !important;
    color: #f2f2f2;
  }

  body {
    background: var(--premium-black) !important;
  }

  header {
    background: rgba(5, 5, 5, 0.88) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--premium-card-border) !important;
  }

  section {
    padding: 32px 16px !important;
  }

  .section-title {
    font-size: 1.65rem !important;
    letter-spacing: -0.02em;
  }

  /* Scroll reveal */
  .reveal-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .reveal-up:nth-child(2) { transition-delay: 0.05s; }
  .reveal-up:nth-child(3) { transition-delay: 0.1s; }
  .reveal-up:nth-child(4) { transition-delay: 0.14s; }
  .reveal-up:nth-child(5) { transition-delay: 0.18s; }
  .reveal-up:nth-child(6) { transition-delay: 0.22s; }

  @media (prefers-reduced-motion: reduce) {
    .reveal-up {
      opacity: 1;
      transform: none;
      transition: none;
    }
  }

  /* Главная — компактные отступы */
  .hero-content {
    padding: 68px 16px 28px !important;
  }

  .categories-wrap {
    padding: 12px 0 16px !important;
  }

  .categories-header {
    padding: 0 16px 10px !important;
    margin-bottom: 0 !important;
  }

  /* Десктоп: категории */
  .home-label-new,
  .home-title-new,
  .home-sub-new,
  .categories-panel-mobile {
    display: none !important;
  }

  .categories-panel-desktop .categories-scroll-wrap .scroll-arrow,
  .categories-panel-desktop .categories-scroll-hint,
  .categories-panel-desktop .categories-scroll-dots {
    display: none !important;
  }

  .categories-panel-desktop .categories-scroll {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    overflow: visible !important;
    padding: 0 16px !important;
    scroll-snap-type: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Мобильный: новинки вместо категорий */
  .home-label-categories,
  .home-title-categories,
  .home-sub-categories,
  .categories-panel-desktop {
    display: none !important;
  }

  .home-label-new {
    display: none !important;
  }

  .home-title-new,
  .home-sub-new {
    display: block !important;
  }

  .home-sub-new {
    margin-bottom: 0 !important;
  }

  .categories-panel-mobile {
    display: block !important;
  }

  .home-new-arrivals-scroll-wrap .categories-scroll-hint {
    display: flex !important;
    justify-content: center;
    margin: 8px 16px 0 !important;
    padding: 0;
    font-size: 12px !important;
    color: #888888 !important;
    animation: homeNewHintFade 3s ease-in-out forwards;
  }

  .home-new-arrivals-scroll-wrap .categories-scroll-hint__arrow {
    display: none;
  }

  .home-new-arrivals-scroll-wrap .categories-scroll-dots {
    display: none !important;
  }

  @keyframes homeNewHintFade {
    0% {
      opacity: 0;
    }
    18% {
      opacity: 1;
    }
    72% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  .home-new-arrivals-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 16px 4px !important;
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .home-new-arrivals-scroll::-webkit-scrollbar {
    display: none;
  }

  .home-new-arrivals-empty {
    flex: 1 1 auto;
    min-width: 100%;
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 24px 16px;
    margin: 0;
  }

  .home-new-card {
    flex: 0 0 160px;
    min-width: 160px;
    max-width: 160px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: #111111;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 76, 0.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }

  .home-new-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex: 1 1 auto;
  }

  .home-new-card__img {
    height: 140px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .home-new-card__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  .home-new-card__placeholder {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, 0.35);
    font-weight: 600;
  }

  .home-new-card__body {
    padding: 10px 10px 8px;
  }

  .home-new-card__title {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
  }

  .home-new-card__price {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #c9a84c;
    line-height: 1.2;
  }

  .home-new-card__price span {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
  }

  .home-new-card__order {
    width: calc(100% - 16px) !important;
    margin: 0 8px 8px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-height: 0 !important;
    border-radius: 10px !important;
  }

  .cat-card--premium {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 20px !important;
    border: 1px solid var(--premium-card-border) !important;
    background: linear-gradient(165deg, #141414 0%, #080808 100%) !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: #fff !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45) !important;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, border-color 0.3s !important;
  }

  .cat-card--premium:active {
    transform: scale(0.98);
  }

  .cat-card--premium .cat-icon,
  .cat-card--premium .cat-arrow svg {
    display: none !important;
  }

  .cat-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #0a0a0a;
    overflow: hidden;
  }

  .cat-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
  }

  .cat-card__media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 5, 0.5) 100%);
    pointer-events: none;
  }

  .cat-card__body {
    padding: 11px 12px 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .cat-card__body h3 {
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cat-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 2px;
  }

  .cat-card__count {
    font-size: 11px;
    color: rgba(201, 168, 76, 0.88);
    font-weight: 500;
  }

  .cat-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.35);
    color: var(--premium-gold);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
  }

  /* Товары на главной */
  #products .products-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 16px !important;
  }

  #products .product-card {
    border-radius: 18px !important;
    background: linear-gradient(165deg, #141414 0%, #080808 100%) !important;
    border: 1px solid var(--premium-card-border) !important;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  }

  #products .product-img {
    aspect-ratio: 1 / 1;
    background: #0a0a0a !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #products .product-img.icon-svg svg {
    display: none !important;
  }

  #products .product-img.icon-svg::after {
    content: 'Фото';
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, 0.35);
    font-weight: 600;
  }

  #products .product-body {
    padding: 10px 12px 12px !important;
  }

  #products .product-body h3 {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  #products .product-price {
    color: var(--premium-gold) !important;
    font-size: 13px !important;
  }
}

/* Десктоп — только категории на главной */
@media (min-width: 769px) {
  .home-label-new,
  .home-title-new,
  .home-sub-new,
  .categories-panel-mobile {
    display: none !important;
  }

  .home-label-categories,
  .home-title-categories,
  .home-sub-categories,
  .categories-panel-desktop {
    display: block !important;
  }

  .categories-panel-desktop .categories-scroll-wrap {
    overflow: visible !important;
  }

  .categories-panel-desktop .categories-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 20px !important;
    padding: 0 !important;
    scroll-snap-type: none !important;
  }

  .categories-panel-desktop .categories-scroll-wrap.has-scroll-hint::before,
  .categories-panel-desktop .categories-scroll-wrap.has-scroll-hint::after {
    display: none !important;
  }

  .categories-panel-desktop .categories-scroll-hint,
  .categories-panel-desktop .categories-scroll-dots {
    display: none !important;
  }

  .categories-panel-desktop .cat-card.cat-card--premium {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
}
