/* home.css — стили главной страницы интернет-магазина запчастей */

/* ========== Hero Section ========== */
.home-hero-section {
    background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
    position: relative;
    overflow: hidden;
    padding: 60px 0;
    min-height: 220px;
}

.home-hero-side {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22%;
    max-width: 260px;
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    z-index: 0;
}

.home-hero-side-left {
    left: 0;
    background-image: url('https://exotico2.ru/img/index_s_1.jpg');
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
}

.home-hero-side-right {
    right: 0;
    background-image: url('https://exotico2.ru/img/index_s_2.jpg');
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
}

.home-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.home-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 28px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.home-hero-search-block {
    max-width: 680px;
    margin: 0 auto 16px;
}

.home-hero-search {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 50px !important;
    font-size: 15px;
    background: var(--color-white);
    position: relative;
    transition: box-shadow 0.3s;
}

.home-hero-search:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.home-hero-search::placeholder {
    color: #999;
}

.home-hero-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.home-hero-search-wrap .home-hero-search {
    flex: 1;
    padding-right: 56px;
}

.home-hero-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: none;
    background: var(--main-orange);
    color: var(--color-white);
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.home-hero-search-btn:hover {
    background: #0d47a1;
    transform: translateY(-50%) scale(1.05);
}

.home-hero-search-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.home-hero-search-btn i {
    font-size: 1rem;
}

/* ========== Новые товары (карусель) ========== */
.home-new-products {
    padding: 48px 0 64px;
    background: #fafafa;
}

.home-new-products-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 24px;
}

.home-new-products-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-black);
    margin: 0;
}

.home-new-products-arrows {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.home-carousel-arrow {
    width: 40px;
    height: 40px;
    background: var(--main-blue);
    border: none;
    border-radius: 6px !important;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.home-carousel-arrow:hover {
    background: #0056b3;
    color: var(--color-white);
    transform: scale(1.05);
}

.home-carousel-arrow i {
    font-size: 0.9rem;
}

.home-product-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray);
    border-radius: 8px !important;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.home-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--color-gray-dark);
}

.home-product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.home-product-card-inner {
    display: flex;
    padding: 16px;
    gap: 14px;
    min-height: 140px;
}

.home-product-card-left {
    flex-shrink: 0;
}

.home-product-card-img {
    width: 88px;
    height: 88px;
    min-width: 88px;
    min-height: 88px;
    background: #d1d5db;
    border-radius: 6px !important;
    overflow: hidden;
}

.home-product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-product-card-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-black);
    margin-top: 6px;
}

.home-product-card-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-product-card-name {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--color-black);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-product-card-btn {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    background: transparent;
    color: var(--color-gray-dark);
    border: 1px solid var(--color-gray);
    border-radius: 6px !important;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s;
}

.home-product-card-btn:hover {
    border-color: var(--main-orange);
    color: var(--main-orange);
}

.home-new-products .carousel {
    overflow: hidden;
}

.home-new-products .carousel-inner {
    overflow: visible;
}

@media (max-width: 576px) {
    .home-new-products-header {
        flex-wrap: wrap;
        justify-content: center;
    }

    .home-new-products-arrows {
        position: static;
        transform: none;
        margin-top: 12px;
    }

    .home-product-card-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-height: 160px;
    }

    .home-product-card-img {
        width: 100%;
        height: 100px;
        min-height: 100px;
    }

    .home-product-card-right {
        align-items: center;
    }
}

/* ========== Сетка категорий ========== */
.home-categories {
    padding: 48px 0 64px;
}

.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 24px;
}

.home-category-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    text-decoration: none;
    color: var(--color-black);
    transition: all 0.3s;
    border-radius: 8px;
}

.home-category-item:hover {
    color: var(--main-blue);
}

.home-category-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--main-blue);
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.25rem;
    transition: background 0.3s, transform 0.3s;
}

.home-category-item:hover .home-category-icon {
    background: #0056b3;
    transform: scale(1.05);
}

.home-category-name {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

/* Адаптивная сетка */
@media (max-width: 992px) {
    .home-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-nav {
        display: none;
    }
    
    .home-hero-title {
        font-size: 1.5rem;
    }
    
    .home-hero-section {
        padding: 40px 16px;
    }
}

@media (max-width: 576px) {
    .home-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .home-category-item {
        padding: 14px 0;
        border-bottom: 1px solid var(--color-gray);
    }
    
    .home-category-item:last-child {
        border-bottom: none;
    }
}
