/* ============================================================
   iStore — home.css  (тело главной)
   Зависит от переменных из theme.css.
   ============================================================ */

/* ---------- hero slider (full-bleed image per language) ---------- */
.hero {
    width: 100%;
    background: var(--hero-bg, #fff);   /* фон полей вокруг баннера (настраивается) */
    overflow: hidden;
}
[data-theme="dark"] .hero { --hero-bg: #000; }

.hero__viewport {
    position: relative;
}

.hero__track {
    display: flex;
    transition: transform .4s ease;
}

.hero__slide {
    flex: 0 0 100%;
    aspect-ratio: 16 / 6;              /* стандарт 2560×960; контейнер не прыгает */
    max-height: 68vh;                  /* не даём слайдеру перерасти вьюпорт */
    display: flex;
    align-items: center;
    justify-content: center;
    font: 12px ui-monospace, monospace;
    color: var(--muted);
    text-align: center;
    background: var(--hero-bg, #fff);
}

.hero__slide a { display: block; width: 100%; height: 100%; }
.hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;              /* картинка ЦЕЛИКОМ, любая пропорция, без обрезки */
}

.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    color: var(--text);
    border: 0;
}

.hero__arrow:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
}

.hero__arrow--prev {
    left: 24px;
}

.hero__arrow--next {
    right: 24px;
}

.hero__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px;
}

.hero__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    border: 0;
    padding: 0;
}

.hero__dot.is-active {
    background: var(--accent);
}

/* ---------- about ---------- */
.about {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 56px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.about__badge {
    width: 110px;
    height: 110px;
    border: 1px solid var(--border);
    border-radius: 12px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    padding: 8px;
}

.about__body {
    flex: 1;
    min-width: 260px;
}

.about__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.about__text {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- featured spotlight (dark) ---------- */
.featured {
    width: 100%;
    background: #000;
    color: #f5f5f7;
    padding: 56px 24px;
}

.featured__inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.featured__label {
    font-size: 13px;
    color: #98989d;
    text-align: center;
    margin-bottom: 36px;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.featured__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.feat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.feat__title {
    font-size: 16px;
    font-weight: 700;
}

.feat__spec {
    font-size: 13px;
    color: #98989d;
}

.feat__media {
    height: 220px;
    position: relative;
    background: #1d1d1f;   /* без фото — ровная плитка, без полосатой заглушки */
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 10px ui-monospace, monospace;
    color: #98989d;
    overflow: hidden;
}

a.feat { color: inherit; text-decoration: none; }
a.feat:hover .feat__media img { transform: scale(1.03); }
/* фото товаров обычно на белом фоне — плитка белая, чтобы фото с ней сливалось */
.feat__media--img { background: #fff; padding: 16px; overflow: hidden; }
.feat__media img {
    transition: transform .3s ease;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feat__ribbon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    background: oklch(72% 0.17 25);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    transform: rotate(-6deg);
}

/* ============================================================
   mobile
   ============================================================ */
@media (max-width: 768px) {
    .hero__arrow { width: 38px; height: 38px; font-size: 18px; }
    .hero__arrow--prev { left: 10px; }
    .hero__arrow--next { right: 10px; }
}
@media (max-width: 560px) {
    .about { padding: 20px 16px 40px; gap: 16px; }
    .about__title { font-size: 18px; }
    .featured { padding: 40px 16px; }
    .featured__label { margin-bottom: 24px; }
    .featured__grid { gap: 20px; }
    .feat__media { height: 200px; }

}

/* hero: тянется мышью/пальцем (home.js → iStoreDrag) */
.hero__viewport { touch-action: pan-y; cursor: grab; }
.hero__viewport.is-dragging { cursor: grabbing; }
