/* Homepage redesign — marketbit.ru */

body.home-page {
    background: #f3f4f6;
    margin-top: 150px;
}

.home-content {
    overflow-x: hidden;
}

.home-page .home-section {
    padding: 32px 0;
}

.home-page .home-section--alt {
    background: #fff;
}

.home-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.home-section__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.home-section__subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.home-section__link {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.home-section__link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Hero */
.home-hero {
    background: #fff;
    padding: 20px 0 8px;
    border-bottom: 1px solid #e5e7eb;
}

.home-hero__carousel {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.home-hero__carousel .carousel-inner {
    border-radius: 16px;
}

.home-hero__carousel .item {
    background: #fff;
    min-height: 320px;
}

.home-hero__carousel .item > .row {
    display: flex;
    align-items: center;
    min-height: 320px;
    margin: 0;
}

.home-hero__carousel .carousel-text {
    padding: 32px 24px 32px 32px;
}

.home-hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
}

.home-hero__badge--hit {
    background: #f59e0b;
    color: #fff;
}

.home-hero__badge--new {
    background: #3b82f6;
    color: #fff;
}

.home-hero__carousel .carousel-text hr {
    margin: 12px 0 16px;
    border: 0;
    border-top: 1px solid #f3f4f6;
}

.home-hero__carousel .carousel-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 280px;
    padding: 24px 32px 24px 16px;
    background: #fff;
}

.home-hero__carousel .carousel-img img {
    max-height: 280px;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 0;
    object-fit: contain;
    display: block;
}

.home-hero__carousel .carousel-text h2 {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin-top: 0;
}

.home-hero__carousel .carousel-text p {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.5;
}

.home-hero__carousel price {
    font-size: 28px !important;
    color: #111827 !important;
    font-weight: 700;
    line-height: 1;
}

.home-hero__carousel .home-hero__offer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.home-hero__carousel .home-hero__cta {
    flex-shrink: 0;
    min-width: 160px;
    padding: 12px 24px;
}

.home-hero__carousel .big-but {
    display: inline-block;
    padding: 10px 24px;
    background: #fbbf24;
    background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
    color: #1f2937 !important;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none !important;
    border: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.home-hero__carousel .big-but:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.home-hero__carousel .carousel-indicators li {
    border-color: #d1d5db;
    background: transparent;
}

.home-hero__carousel .carousel-indicators .active {
    background: #f59e0b;
    border-color: #f59e0b;
}

/* Стрелки без боковых градиентов Bootstrap */
.home-hero__carousel .carousel-control {
    width: 52px;
    background: none !important;
    background-image: none !important;
    filter: none;
    opacity: 1;
    text-shadow: none;
}

.home-hero__carousel .carousel-control.left,
.home-hero__carousel .carousel-control.right {
    background: transparent !important;
    background-image: none !important;
}

.home-hero__carousel .carousel-control:hover,
.home-hero__carousel .carousel-control:focus {
    background: transparent !important;
    background-image: none !important;
    opacity: 1;
    color: #374151;
}

.home-hero__carousel .carousel-control .glyphicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: #374151;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
    text-shadow: none;
}

.home-hero__carousel .carousel-control:hover .glyphicon {
    border-color: #fbbf24;
    color: #b45309;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.home-hero__carousel .carousel-inner > .item.next,
.home-hero__carousel .carousel-inner > .item.prev,
.home-hero__carousel .carousel-inner > .item.active.left,
.home-hero__carousel .carousel-inner > .item.active.right {
    background: #fff;
}

.home-hero__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-hero__pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none !important;
    transition: background 0.15s, border-color 0.15s;
}

.home-hero__pill:hover {
    background: #fff;
    border-color: #f59e0b;
    color: #111827;
}

/* Trust bar */
.home-trust {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 0;
}

.home-trust__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.home-trust__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f9fafb;
}

.home-trust__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.home-trust__icon .icon {
    width: 22px;
    height: 22px;
}

.home-trust__icon--delivery {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.home-trust__icon--warranty {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

.home-trust__icon--pickup {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

.home-trust__icon--support {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #6d28d9;
}

.home-trust__label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
}

.home-trust__hint {
    margin: 2px 0 0;
    font-size: 11px;
    color: #6b7280;
}

/* Categories */
.home-categories__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.home-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none !important;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.home-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #fbbf24;
}

.home-category__img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}

.home-category__img--placeholder {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: #475569;
    margin-bottom: 10px;
}

.home-category__img--placeholder .icon {
    width: 32px;
    height: 32px;
}

.home-category:hover .home-category__img--placeholder {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
    color: #b45309;
}

.home-category__name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

/* Product grid */
.home-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.home-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.home-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.home-product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.home-product-card__badge--sale {
    background: #ef4444;
    color: #fff;
}

.home-product-card__badge--hit {
    background: #f59e0b;
    color: #fff;
}

.home-product-card__badge--new {
    background: #3b82f6;
    color: #fff;
}

.home-product-card__media {
    display: block;
    padding: 16px;
    text-decoration: none !important;
}

.home-product-card__image {
    display: block;
    height: 160px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.home-product-card__body {
    flex: 1;
    padding: 0 16px 12px;
}

.home-product-card__title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    text-decoration: none !important;
}

.home-product-card__title:hover {
    color: #2563eb;
}

.home-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid #f3f4f6;
    margin-top: auto;
}

.home-product-card__price {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}

.home-product-card__old-price {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 400;
}

.home-product-card__footer .btn-shop {
    flex-shrink: 0;
}

/* Promo banner — B2B */
.home-promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    color: #111827;
    text-decoration: none !important;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    position: relative;
    overflow: hidden;
}

.home-promo::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
}

.home-promo:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
    color: #111827;
}

.home-promo__content {
    flex: 1;
    min-width: 0;
    padding-left: 8px;
}

.home-promo__badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
}

.home-promo__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111827;
    line-height: 1.25;
}

.home-promo__text {
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
    margin: 0;
    max-width: 560px;
}

.home-promo__action {
    flex-shrink: 0;
    pointer-events: none;
}

/* Services */
.home-services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.home-service {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.home-service:hover {
    border-color: #fbbf24;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.home-service__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.home-service__icon .icon {
    width: 24px;
    height: 24px;
}

.home-service__icon--repair {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.home-service__icon--cartridge {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #be185d;
}

.home-service__icon--network {
    background: linear-gradient(135deg, #cffafe, #a5f3fc);
    color: #0e7490;
}

.home-service__icon--print {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #374151;
}

.home-service__icon img {
    display: none;
}

.home-service__name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1.35;
}

/* Responsive */
@media (max-width: 1199px) {
    .home-categories__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .home-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .home-trust__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .home-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-promo {
        flex-direction: column;
        align-items: stretch;
        padding: 24px 20px 20px 24px;
    }

    .home-promo__action {
        align-self: flex-start;
    }
}

@media (max-width: 767px) {
    body.home-page {
        margin-top: 100px;
    }

    .home-hero__carousel .carousel-indicators {
        display: none !important;
    }

    .home-section {
        padding: 24px 0;
    }
    .home-section__head {
        flex-direction: column;
        align-items: flex-start;
    }
    .home-section__title {
        font-size: 20px;
    }
    .home-hero__carousel .item {
        min-height: auto;
    }

    .home-hero__carousel .item > .row {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
    }

    .home-hero__carousel .item > .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 auto;
        float: none;
    }

    .home-hero__carousel .item > .row > .col-sm-5 {
        order: 1;
    }

    .home-hero__carousel .item > .row > .col-sm-7 {
        order: 2;
    }

    .home-hero__carousel .carousel-img {
        min-height: 220px;
        padding: 16px 20px 8px;
    }

    .home-hero__carousel .carousel-img img {
        max-height: min(52vw, 260px);
        width: auto;
        margin: 0 auto;
    }

    .home-hero__carousel .carousel-text {
        padding: 12px 16px 20px;
        text-align: left;
    }

    .home-hero__carousel .carousel-text h2 {
        font-size: 18px;
    }

    .home-hero__carousel .home-hero__offer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 16px;
    }

    .home-hero__carousel .home-hero__cta {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }
    .home-categories__grid {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .home-category {
        flex: 0 0 120px;
        scroll-snap-align: start;
        padding: 14px 10px;
    }
    .home-category__img,
    .home-category__img--placeholder {
        width: 48px;
        height: 48px;
    }
    .home-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .home-product-card__image {
        height: 120px;
    }
    .home-product-card__footer {
        flex-direction: column;
        align-items: stretch;
    }
    .home-product-card__footer .btn-shop {
        width: 100%;
        justify-content: center;
    }
    .home-trust__grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .home-trust__item {
        padding: 10px;
        flex-direction: column;
        text-align: center;
    }
    .home-services__grid {
        grid-template-columns: 1fr;
    }
}
