* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --red: #ff002b;
    --black: #050505;
    --dark: #0f0f0f;
    --white: #ffffff;
    --line: rgba(255,255,255,0.1);
}

html,
body {
    width: 100%;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--black);
    color: var(--white);
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    width: 100%;
    background: rgba(5,5,5,0.96);
    border-bottom: 1px solid var(--line);
}

.header-main {
    width: 100%;
    padding: 16px 5%;
    display: grid;
    grid-template-columns: 90px 150px minmax(300px, 1fr) 120px 80px;
    align-items: center;
    gap: 14px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    display: block;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
}

.catalog-btn,
.city-btn,
.account-btn {
    height: 54px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--white);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
}

.catalog-btn {
    width: 150px;
}

.city-btn {
    width: 120px;
}

.account-btn {
    width: 80px;
}

.catalog-btn:hover,
.city-btn:hover,
.account-btn:hover {
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 12px 30px rgba(255,0,43,0.28);
}

/* SEARCH */

.search {
    width: 100%;
    height: 54px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.035);
    display: flex;
    align-items: center;
}

.search input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    padding: 0 22px;
    background: transparent;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.search input::placeholder {
    color: rgba(255,255,255,0.38);
}

/* SLIDER */

.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(320px, 38vw, 620px);
    overflow: hidden;
    background: var(--black);
    border-bottom: 1px solid var(--line);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slider1 {
    background-image: url("/app/assets/img/slider1.png");
}

.slider2 {
    background-image: url("/app/assets/img/slider2.png");
}

.slider3 {
    background-image: url("/app/assets/img/slider3.png");
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.18), rgba(0,0,0,0.05)),
        linear-gradient(0deg, rgba(0,0,0,0.28), transparent 45%);
    pointer-events: none;
}

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 20;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.slider-dots button {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255,255,255,0.55);
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    transition: 0.25s;
}

.slider-dots button.active {
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 0 14px rgba(255,0,43,0.75);
}

/* NEWS */

.home-news {
    width: 100%;
    padding: 46px 5% 26px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.news-card {
    height: clamp(120px, 12vw, 220px);
    overflow: hidden;
    border-radius: 18px;
    background: var(--dark);
    border: 1px solid var(--line);
    transition: 0.25s;
}

.news-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,0,43,0.45);
}

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* FRANCHISE */

.franchise-block {
    width: 100%;
    padding: 18px 5% 54px;
    display: flex;
    justify-content: center;
}

.franchise-btn {
    width: min(680px, 100%);
    min-height: 64px;
    border: 1px solid rgba(255,0,43,0.45);
    border-radius: 999px;
    background: rgba(255,0,43,0.08);
    color: var(--white);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
}

.franchise-btn:hover {
    background: var(--red);
    box-shadow: 0 18px 44px rgba(255,0,43,0.3);
}

/* CATALOG GRID */

.catalog-grid {
    width: 100%;
    padding: 0 5% 80px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.catalog-card {
    height: clamp(160px, 18vw, 300px);
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(180deg, #111111, #050505);
    border: 1px solid rgba(255,255,255,0.12);
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-card:hover {
    transform: translateY(-7px);
    border-color: rgba(255,0,43,0.45);
    box-shadow: 0 14px 36px rgba(255,0,43,0.18);
}

.catalog-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 16px;
}

/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,0.82);
}

.modal.active {
    display: flex;
}

.modal-box {
    position: relative;
    width: min(500px, 100%);
    padding: 34px;
    border-radius: 22px;
    background: #0f0f0f;
    border: 1px solid var(--line);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 20px;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: 34px;
}

.modal-list {
    display: grid;
    gap: 12px;
}

.modal-list a,
.modal-list button {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    color: var(--white);
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-list a:hover,
.modal-list button:hover {
    background: var(--red);
    border-color: var(--red);
}

/* TABLET */

@media (max-width: 1000px) {
    .header-main {
        padding: 14px 4%;
        grid-template-columns: 70px 110px minmax(0, 1fr) 90px 58px;
        gap: 10px;
    }

    .logo img {
        width: 58px;
        height: 58px;
    }

    .catalog-btn {
        width: 110px;
    }

    .city-btn {
        width: 90px;
    }

    .account-btn {
        width: 58px;
    }

    .catalog-btn,
    .city-btn,
    .account-btn,
    .search {
        height: 46px;
        font-size: 11px;
    }

    .home-news {
        gap: 14px;
    }

    .catalog-grid {
        gap: 18px;
    }
}

/* MOBILE */

@media (max-width: 640px) {
    .header-main {
        padding: 10px 8px;
        grid-template-columns: 46px 72px minmax(0, 1fr) 64px 42px;
        gap: 6px;
    }

    .logo img {
        width: 42px;
        height: 42px;
    }

    .catalog-btn {
        width: 72px;
    }

    .city-btn {
        width: 64px;
    }

    .account-btn {
        width: 42px;
    }

    .catalog-btn,
    .city-btn,
    .account-btn,
    .search {
        height: 36px;
        font-size: 8px;
        letter-spacing: 0.5px;
    }

    .search input {
        padding: 0 8px;
        font-size: 9px;
    }

    .hero-slider {
        height: 260px;
    }

    .slider-dots {
        bottom: 14px;
        gap: 8px;
    }

    .slider-dots button {
        width: 9px;
        height: 9px;
    }

    .home-news {
        padding: 22px 8px 16px;
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
    }

    .news-card {
        height: 82px;
        border-radius: 9px;
    }

    .franchise-block {
        padding: 10px 8px 30px;
    }

    .franchise-btn {
        min-height: 46px;
        font-size: 13px;
        letter-spacing: 1px;
    }

    .catalog-grid {
        padding: 0 8px 38px;
        gap: 10px;
    }

    .catalog-card {
        height: 122px;
        border-radius: 12px;
    }

    .modal {
        padding: 12px;
    }

    .modal-box {
        padding: 30px 18px 20px;
        border-radius: 16px;
    }
}