/**
 * Стили главной страницы маркетплейса
 */

.home-page {
    background: #fff;
    overflow-x: clip;
}

.home-hero__grid > * {
    min-width: 0;
    max-width: 100%;
}

/* —— Hero —— */

.home-hero {
    position: relative;
    z-index: 30;
    padding: 48px 0 40px;
    background: linear-gradient(165deg, #ffffff 0%, #fff8fb 42%, #ffeff5 100%);
    border-bottom: 1px solid var(--gray-100);
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 85% 15%, rgba(255, 107, 157, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 10% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.home-hero .container {
    position: relative;
    z-index: 1;
}

.home-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

@media (min-width: 992px) {
    .home-hero__grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 48px;
    }
}

.home-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(255, 107, 157, 0.1);
    border-radius: 999px;
}

.home-hero__title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--gray-900);
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}

.home-hero__title-accent {
    display: block;
    color: var(--primary-color);
}

.home-hero__lead {
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.55;
    color: var(--gray-600);
    margin-bottom: 24px;
    max-width: 520px;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.home-hero__actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: var(--border-radius-lg);
}

.home-hero__trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.home-hero__trust-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--gray-100);
    border-radius: var(--border-radius);
    backdrop-filter: blur(6px);
}

.home-hero__trust-item i {
    font-size: 22px;
    color: var(--primary-color);
}

.home-hero__trust-item strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-900);
}

.home-hero__trust-item span {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.35;
}

.home-hero__search-panel {
    position: relative;
    z-index: 2;
    overflow: visible;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    padding: 24px;
    box-shadow: var(--box-shadow-md);
}

.home-hero .home-search-wrap {
    z-index: 50;
}

.home-hero .home-search-suggestions {
    z-index: 120;
}

.home-hero__search-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.home-hero .home-search-wrap {
    max-width: none;
    margin: 0;
}

.home-hero .home-search input {
    padding: 18px 56px 18px 18px;
    font-size: 16px;
    border-radius: var(--border-radius-lg);
}

/* —— Quick links —— */

.home-quick {
    position: relative;
    z-index: 10;
    padding: 20px 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
}

.home-quick__track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.home-quick__track::-webkit-scrollbar {
    display: none;
}

.home-quick__chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    text-decoration: none;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    transition: var(--transition);
    white-space: nowrap;
}

.home-quick__chip:hover {
    color: var(--primary-color);
    border-color: rgba(255, 107, 157, 0.35);
    background: rgba(255, 107, 157, 0.06);
}

.home-quick__chip i {
    font-size: 18px;
    color: var(--primary-color);
}

/* —— Sections —— */

.home-section {
    padding: 56px 0;
}

.home-section--alt {
    background: var(--gray-50);
}

.home-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 32px;
}

.home-section-head__intro {
    max-width: 640px;
}

.home-section-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.home-section-head .section-title {
    text-align: left;
    margin-bottom: 8px;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -0.02em;
}

.home-section-head .section-subtitle {
    text-align: left;
    margin: 0;
    font-size: 15px;
}

.home-section-head__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 4px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.home-section-head__link:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover);
}

.home-section__footer {
    margin-top: 36px;
    text-align: center;
}

.home-section__footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--border-radius-lg);
}

/* Магазины на главной — 2 колонки */
.home-page .shops-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.home-page .shop-card {
    height: 100%;
}

.categories-section {
    padding: 48px 0 56px;
    background: #fff;
}

.categories-section .home-section-head {
    margin-bottom: 28px;
}

.category-card {
    box-shadow: var(--box-shadow-sm);
}

.category-card:hover {
    border-color: rgba(255, 107, 157, 0.25);
}

/* Promo CTA */

.home-cta {
    padding: 48px 0;
    background: linear-gradient(135deg, var(--gray-900) 0%, #374151 100%);
    color: #fff;
}

.home-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.home-cta__title {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    margin-bottom: 8px;
}

.home-cta__text {
    margin: 0;
    opacity: 0.85;
    max-width: 480px;
    font-size: 15px;
}

.home-cta .btn-light {
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--border-radius-lg);
}

/* Reviews on home */

.home-reviews .review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.home-reviews .review-text {
    flex: 1;
}

/* —— Hero: планшет и мобильные —— */

@media (max-width: 991.98px) {
    .home-hero {
        padding: 28px 0 24px;
    }

    .home-hero__grid {
        gap: 20px;
    }

    .home-hero__lead {
        max-width: none;
        margin-bottom: 18px;
    }

    .home-hero__actions {
        margin-bottom: 18px;
    }

    .home-hero__trust {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .home-hero__trust-item {
        min-width: 0;
        padding: 10px 8px;
    }

    .home-hero__trust-item i {
        font-size: 18px;
    }

    .home-hero__trust-item strong {
        font-size: 11px;
        line-height: 1.25;
    }

    .home-hero__trust-item span {
        font-size: 10px;
        line-height: 1.3;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: calc(20px + env(safe-area-inset-top, 0px)) 0 20px;
    }

    .home-hero .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .home-hero__grid {
        gap: 16px;
    }

    .home-hero__eyebrow {
        margin-bottom: 12px;
        padding: 5px 12px;
        font-size: 12px;
    }

    .home-hero__title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 10px;
        word-break: break-word;
    }

    .home-hero__title-accent {
        display: block;
        margin-top: 4px;
    }

    .home-hero__title-accent::before {
        content: none;
    }

    .home-hero__lead {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    .home-hero__search-panel {
        padding: 16px;
        border-radius: var(--border-radius-lg);
        box-shadow: var(--box-shadow-sm);
    }

    .home-hero__search-label {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .home-hero .home-search,
    .home-hero .home-search-wrap {
        width: 100%;
        max-width: 100%;
    }

    .home-hero .home-search input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px 46px 12px 14px;
        font-size: 16px;
        min-height: 44px;
    }

    .home-hero .home-search button {
        width: 38px;
        height: 38px;
    }

    .home-hero__actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 14px;
    }

    .home-hero__actions .btn {
        flex: 1 1 calc(50% - 5px);
        width: auto;
        min-width: 0;
        justify-content: center;
        padding: 11px 14px;
        font-size: 14px;
    }

    .home-hero__trust {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
        margin: 0;
        padding: 0;
    }

    .home-hero__trust-item {
        flex: unset;
        min-width: 0;
        padding: 10px 6px;
    }
}

@media (max-width: 400px) {
    .home-hero__actions .btn {
        flex: 1 1 100%;
    }

    .home-hero__trust {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .home-hero__trust-item {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    }

    .home-hero__trust-item strong,
    .home-hero__trust-item span {
        font-size: 12px;
    }
}

@media (max-width: 768px) {

    .home-section {
        padding: 40px 0;
    }

    .home-section-head {
        margin-bottom: 24px;
    }

    .home-section-head__link {
        width: 100%;
        justify-content: flex-start;
        padding-left: 0;
    }

    .categories-section {
        padding: 36px 0 40px;
    }

    .home-search-wrap {
        margin-bottom: 0;
    }

    .home-search-suggestions {
        max-height: 280px;
    }

    .home-search input {
        padding: 14px 52px 14px 16px;
        font-size: 15px;
    }

    .home-search button {
        width: 40px;
        height: 40px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-image-container {
        aspect-ratio: 1;
    }

    .product-info {
        padding: 12px !important;
    }

    .product-title {
        font-size: 13px !important;
        margin-bottom: 6px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .product-price {
        font-size: 16px !important;
    }

    .product-old-price {
        font-size: 12px !important;
    }

    .product-price-stock {
        font-size: 11px !important;
    }

    .add-to-cart-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .add-to-cart-btn i {
        font-size: 18px !important;
    }

    .home-page .shops-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .home-page .shop-card {
        padding: 14px !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .home-page .shop-logo {
        width: 56px !important;
        height: 56px !important;
    }

    .home-page .shop-name {
        font-size: 14px !important;
    }

    .home-page .shop-meta {
        flex-wrap: wrap;
        gap: 6px !important;
        font-size: 11px !important;
    }

    .review-card {
        padding: 16px !important;
    }

    .category-swiper {
        padding: 0 40px;
    }

    .category-swiper-prev,
    .category-swiper-next {
        width: 32px !important;
        height: 32px !important;
    }

    .category-card {
        padding: 16px 12px !important;
        min-height: 160px !important;
    }

    .category-icon {
        width: 70px !important;
        height: 70px !important;
    }

    .category-icon i {
        font-size: 32px !important;
    }

    .category-name {
        font-size: 13px !important;
    }

    .home-section__footer .btn-outline-primary,
    .home-section__footer .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .home-cta__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-cta .btn-light {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .home-section {
        padding: 32px 0;
    }

    .home-section-head .section-title {
        font-size: 22px !important;
    }

    .category-swiper {
        padding: 0 30px;
    }

    .category-swiper-prev,
    .category-swiper-next {
        display: none;
    }
}
