/* ===================================================================
   MOBILE STYLES - Мир Подшипников
   Mobile-First адаптивная верстка

   BREAKPOINTS (min-width):
   - Base: 0px      (mobile — стили без @media)
   - sm:   576px    (большие телефоны)
   - md:   768px    (планшеты portrait)
   - lg:   1024px   (планшеты landscape / малый десктоп)
   - xl:   1280px   (десктоп)
   =================================================================== */

/* ===================================================================
   GLOBAL
   =================================================================== */
html, body {
    overflow-x: hidden;
}

/* ===================================================================
   CONTAINER — Mobile-First
   Base: compact padding for small screens
   =================================================================== */
.container {
    padding-inline: 1rem;
    max-width: 100%;
}

@media (min-width: 576px) {
    .container {
        padding-inline: 1.25rem;
    }
}

/* md: restore desktop container from style.css */
@media (min-width: 768px) {
    .container {
        padding-inline: var(--container-padding);
        max-width: var(--container-max);
        margin: 0 auto;
    }
}

/* ===================================================================
   HEADER — Mobile-First
   Base styles = mobile (smallest screens)
   =================================================================== */

/* --- Header Top Bar --- */
.header-top {
    padding: 0.375rem 0;
}

.header-top-inner {
    justify-content: center;
    gap: 0.75rem;
}

.header-contacts {
    gap: 0.5rem;
}

.header-phone {
    font-size: 0.675rem; /* 14px minimum */
    gap: 0.375rem;
}

.header-phone svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Hidden on mobile — shown via style.css @media (min-width: 768px) */
.header-phone-secondary {
    display: none;
}

/* Hidden on mobile — shown via style.css @media (min-width: 1024px) */
.header-schedule {
    display: none;
}

.header-messengers {
    gap: 0.5rem;
}

/* Touch target: min 44x44px */
.messenger-link {
    width: 40px;
    height: 24px;
}

.messenger-link svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* --- Header Main --- */
.header-main {
    padding: 0.75rem 0;
}

.header-main-inner {
    justify-content: space-between;
}

/* --- Logo --- */
.logo {
    gap: 0.625rem;
}

.logo-icon {
    width: 2.5rem;  /* 40px */
    height: 2.5rem;
}

.logo-title {
    font-size: 1rem;
}

.logo-subtitle {
    font-size: 0.6875rem; /* 11px — smallest allowed for secondary text */
}

/* --- Burger: 44x44 touch target --- */
.burger {
    width: 44px;
    height: 44px;
    padding: 0.5rem;
}

/* Hidden on mobile — shown via style.css @media (min-width: 768px) */
.btn-shop {
    display: none;
}

/* --- Mobile Menu --- */
.mobile-menu {
    max-width: 85vw;
}

.mobile-menu-inner {
    padding: 5rem 1rem 1.5rem;
}

.mobile-nav a {
    padding: 0.75rem;
    font-size: 0.9375rem; /* 15px */
    /* Touch target: padding gives us 44px+ height */
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-phone {
    font-size: 1.125rem;
    /* Touch target */
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* --- sm: 576px — larger phones --- */
@media (min-width: 576px) {
    .header-top-inner {
        justify-content: space-between;
        gap: 1rem;
    }

    .header-contacts {
        gap: 1rem;
    }

    .header-phone {
        gap: 0.5rem;
    }

    .logo-icon {
        width: 2.75rem; /* 44px */
        height: 2.75rem;
    }

    .logo-title {
        font-size: 1.125rem;
    }

    .mobile-menu {
        max-width: 20rem; /* 320px */
    }

    .mobile-menu-inner {
        padding: 5rem 1.25rem 1.5rem;
    }
}

/* --- md: 768px — tablets --- */
@media (min-width: 768px) {
    .header-top {
        padding: 0.5rem 0;
    }

    /* Restore elements hidden on mobile */
    .header-phone-secondary {
        display: flex;
    }

    .btn-shop {
        display: inline-flex;
    }

    /* Restore desktop gaps/sizing */
    .header-contacts {
        gap: var(--space-6);
    }

    .header-phone {
        font-size: 11px;
        gap: var(--space-2);
    }

    .header-messengers {
        gap: var(--space-2);
    }

    .header-main {
        padding: 1rem 0;
    }

    .logo-icon {
        width: 3rem; /* 48px */
        height: 3rem;
    }

    .logo-title {
        font-size: 1.25rem;
    }

    .logo-subtitle {
        font-size: 0.75rem;
    }

    .mobile-menu {
        max-width: 25rem; /* 400px */
    }

    .mobile-menu-inner {
        padding: calc(100px + 2rem) 1.5rem 2rem;
    }
}

/* --- lg: 1024px — desktop: restore all style.css values --- */
@media (min-width: 1024px) {
    /* Restore schedule */
    .header-schedule {
        display: flex;
    }

    /* Restore desktop logo sizing */
    .logo {
        gap: var(--space-2);
    }

    .logo-icon {
        width: 44px;
        height: 44px;
    }

    .logo-title {
        font-size: 1.125rem;
    }

    .logo-subtitle {
        font-size: var(--text-xs);
    }

    /* Nav links — compact at lg to prevent wrapping */
    .nav-link {
        padding: var(--space-2) var(--space-2);
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .nav-menu {
        gap: 0;
    }

    /* Compact shop button at lg */
    .btn-shop {
        padding: var(--space-2) var(--space-3);
        font-size: 0.75rem;
    }

    /* Restore header padding */
    .header-main {
        padding: var(--space-3) 0;
    }

    .header-main-inner {
        gap: var(--space-4);
    }

    .header-top {
        padding: var(--space-1) 0;
    }
}

/* --- xl: 1280px — restore full desktop sizes --- */
@media (min-width: 1280px) {
    .logo {
        gap: var(--space-3);
    }

    .logo-icon {
        width: 52px;
        height: 52px;
    }

    .logo-title {
        font-size: var(--text-xl);
    }

    .nav-link {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }

    .nav-menu {
        gap: var(--space-1);
    }

    .btn-shop {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }

    .header-main {
        padding: var(--space-2) 0;
    }

    .header-main-inner {
        gap: var(--space-8);
    }
}


/* ===================================================================
   HERO SECTION — Mobile-First
   Base styles = mobile (smallest screens)
   =================================================================== */

/* --- Hero container --- */
.hero {
    min-height: auto;
    padding: 8rem 0 1.75rem; /* ~128px top for fixed header + breathing room */
    flex-direction: column; /* stack container + slider vertically when slider is static */
}

/* --- Single column on mobile --- */
.hero-content {
    grid-template-columns: 1fr;
    gap: 0;
}

/* --- Text centered on mobile --- */
.hero-text {
    text-align: center;
}

/* --- Hide video visual on mobile --- */
.hero-video-visual {
    display: none;
}

/* --- Hero Badge centered --- */
.hero-badge {
    padding: 0.375rem 0.875rem;
    font-size: 0.6875rem; /* 11px */
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    margin-inline: auto;
}

.hero-badge .badge-icon {
    width: 1rem;
    height: 1rem;
}

.hero-badge .badge-icon svg {
    width: 1rem;
    height: 1rem;
}

/* --- Hero Title — fluid sizing --- */
.hero-title {
    font-size: clamp(1.75rem, 6vw + 0.5rem, 2.25rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Override style.css !important — required because style.css sets these with !important */
.hero-title-accent {
    font-size: clamp(2rem, 7vw + 0.5rem, 2.5rem);
}

.hero-title-city {
    font-size: clamp(0.875rem, 2vw + 0.5rem, 1.125rem);
    margin-top: 0.5rem;
}

/* --- Hero Description --- */
.hero-description {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    margin-inline: auto;
    max-width: 100%;
}

/* --- Hero Actions (Buttons) — stacked on mobile --- */
.hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    /* Touch target guaranteed by padding */
    min-height: 44px;
}

.hero-actions .btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* --- Hide scroll indicator on mobile --- */
.hero-scroll {
    display: none;
}

/* --- sm: 576px --- */
@media (min-width: 576px) {
    .hero {
        padding: 8.25rem 0 2rem; /* ~132px top */
    }

    .hero-badge {
        padding: 0.5rem 0.875rem;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 5vw + 0.5rem, 2.5rem);
    }

    .hero-title-accent {
        font-size: clamp(2.25rem, 6vw + 0.5rem, 3rem);
    }

    .hero-title-city {
        font-size: clamp(1rem, 2.5vw + 0.25rem, 1.25rem);
    }

    .hero-description {
        font-size: 0.9375rem;
        margin-bottom: 1.75rem;
    }

    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .hero-actions .btn {
        width: auto;
    }
}

/* --- md: 768px — tablets --- */
@media (min-width: 768px) {
    .hero {
        padding: 6.25rem 0 2.5rem; /* ~100px top */
    }

    .hero-text {
        text-align: left;
    }

    .hero-badge {
        margin-inline: 0;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2.25rem, 4vw + 0.5rem, 3rem);
        margin-bottom: 1.25rem;
    }

    .hero-title-accent {
        font-size: clamp(2.5rem, 5vw + 0.5rem, 3.5rem);
    }

    .hero-title-city {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.75rem;
        margin-inline: 0;
    }

    .hero-actions {
        gap: 1rem;
        margin-bottom: 2rem;
    }
}

/* --- lg: 1024px — show video, two-column layout, restore desktop --- */
@media (min-width: 1024px) {
    .hero {
        padding: calc(140px + var(--space-4)) 0 var(--space-8);
    }

    /* CRITICAL: restore two-column grid from style.css */
    .hero-content {
        grid-template-columns: 1.2fr 1.0fr;
        gap: var(--space-4);
        align-items: start;
    }

    .hero-video-visual {
        display: block;
        transform: translateY(0); /* Reset desktop translateY(-40px) */
    }

    .video-card {
        min-height: 240px;
        margin-top: 1.5rem;
    }

    /* Restore desktop typography from style.css */
    .hero-title {
        font-size: var(--text-4xl);
        line-height: 1.1;
        margin-bottom: var(--space-4);
    }

    .hero-title-accent {
        font-size: inherit;
    }

    .hero-title-city {
        font-size: 0.45em;
        margin-top: var(--space-2);
    }

    /* Restore badge desktop values */
    .hero-badge {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
        margin-bottom: var(--space-4);
        margin-inline: 0;
    }

    /* Restore description desktop values */
    .hero-description {
        font-size: var(--text-sm);
        max-width: 650px;
        margin-bottom: var(--space-4);
        margin-inline: 0;
    }

    /* Restore actions desktop values */
    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: var(--space-3);
        margin-bottom: var(--space-6);
    }

    .hero-actions .btn {
        width: auto;
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }

    .hero-scroll {
        display: block;
    }
}

/* --- xl: 1280px — full-height hero with absolute slider --- */
@media (min-width: 1280px) {
    .hero {
        min-height: 100vh;
        /* Bottom padding = slider height (30vh) + generous clearance (12rem) */
        padding-bottom: calc(30vh + 12rem);
    }

    .hero-content {
        gap: var(--space-6);
    }

    /* Restore desktop video card sizing */
    .hero-video-visual {
        transform: translateY(-40px);
    }

    .video-card {
        min-height: 310px;
        margin-top: 50px;
    }
}


/* ===================================================================
   HERO SLIDER — Mobile-First
   Base styles = mobile (smallest screens)
   =================================================================== */

/* --- Base: static slider on mobile --- */
.hero-slider-container {
    position: static;
    height: 12.5rem; /* 200px */
    min-height: 11.25rem; /* 180px */
    max-height: none;
    aspect-ratio: auto; /* Reset desktop 18/5 */
    margin: 1rem 1rem 0;
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Reset desktop absolute positioning */
    transform: none;
    left: auto;
    bottom: auto;
    width: calc(100% - 2rem);
}

.hero-slide-content {
    max-width: 100%;
    padding: 1rem;
    background: linear-gradient(0deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 70%,
        transparent 100%
    );
    justify-content: flex-end;
}

.slide-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Hide description on smallest screens to save space */
.slide-desc {
    display: none;
}

/* Slider buttons: ensure 44px touch target */
.slide-actions .btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Hide arrows on mobile (too small a target area) */
.hero-slider-arrow {
    display: none;
}

/* Slider dots: visual size stays small, but 44px touch target via ::before */
.hero-slider-dots {
    bottom: 0.625rem;
    /* Extra gap to prevent overlapping touch areas */
    gap: 1rem;
}

.slider-dot {
    width: 0.625rem;  /* 10px visual */
    height: 0.625rem;
    padding: 0;
    margin: 0;
    /* Touch target via invisible ::before pseudo-element */
    position: relative;
}

/* Invisible touch area extends the tap target to 44x44px */
.slider-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
}

/* --- sm: 576px --- */
@media (min-width: 576px) {
    .hero-slider-container {
        height: 15rem; /* 240px */
        min-height: 12.5rem;
        margin: 1.25rem 1.25rem 0;
        width: calc(100% - 2.5rem);
    }

    .hero-slide-content {
        padding: 1.25rem 1.5rem;
    }

    .slide-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    /* Show description on larger phones */
    .slide-desc {
        display: -webkit-box;
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* --- md: 768px — slider stays static --- */
@media (min-width: 768px) {
    .hero-slider-container {
        height: 18.75rem; /* 300px */
        min-height: 15rem;
        margin: 2rem auto 0;
        border-radius: var(--radius-xl);
        max-width: calc(var(--container-max) - 2 * var(--container-padding));
        width: calc(100% - 2 * var(--container-padding));
    }

    .hero-slide-content {
        max-width: 50%;
        padding: 2rem 3rem;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
        justify-content: center;
    }

    .slide-title {
        font-size: 1.25rem;
        margin-bottom: 0.625rem;
    }

    .slide-desc {
        font-size: 0.875rem;
        margin-bottom: 1rem;
        -webkit-line-clamp: 3;
    }

    .slide-actions .btn-sm {
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px;
    }

    /* Show arrows on tablet */
    .hero-slider-arrow {
        display: flex;
        /* Touch target */
        width: 44px;
        height: 44px;
    }
}

/* --- lg: 1024px — slider stays static, bigger text & controls --- */
@media (min-width: 1024px) {
    .slide-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .slide-desc {
        display: block;
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .hero-slider-dots {
        bottom: 1rem;
        gap: 0.5rem;
    }

    .hero-slider-arrow {
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* --- xl: 1280px — slider becomes absolute (enough viewport height) --- */
@media (min-width: 1280px) {
    .hero-slider-container {
        position: absolute;
        bottom: 7.125rem;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 2 * var(--container-padding));
        max-width: calc(var(--container-max) - 2 * var(--container-padding));
        aspect-ratio: 18 / 5;
        max-height: 30vh;
        height: auto;
        min-height: auto;
        margin: 0;
        border-radius: var(--radius-xl);
    }

    .hero-slide-content {
        padding: 2.5rem 3.625rem;
    }
}

/* Height-based adjustments for desktop (xl+) viewport */
@media (min-width: 1280px) and (min-height: 900px) {
    .hero-slider-container {
        max-height: 340px;
    }
}

@media (min-width: 1280px) and (min-height: 1100px) {
    .hero-slider-container {
        max-height: none;
    }
}


/* ===================================================================
   TODO: Other sections will be added step by step
   - About
   - Catalog
   - Brands
   - Advantages
   - Wholesale
   - Request
   - Contacts
   - Footer
   =================================================================== */
