/* Назначение файла: Стили главной страницы магазина. */
.home-page .cont {
    float: none;
    width: auto;
}

.catalog-page.home-page .home-main {
    max-width: 1180px;
    margin: 14px auto 0;
    padding: 0 18px 42px;
    text-align: left;
}

.home-main,
.home-main * {
    box-sizing: border-box;
}

.home-main p {
    margin: 0;
    font-family: Arial, sans-serif;
}

.home-section {
    margin-bottom: 24px;
    padding: clamp(23px, 3.3vw, 38px);
    border: 1px solid var(--catalog-line);
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 13px 34px rgba(31, 54, 82, 0.075);
}

.home-categories-section {
    background: rgba(255, 255, 255, 0.20);
}

.home-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 440px);
    gap: 32px;
    align-items: end;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e7edf4;
}

.home-section-kicker {
    color: #1675d1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-section-kicker a,
.home-section-kicker a:link,
.home-section-kicker a:visited {
    color: inherit;
    text-decoration: none;
}

.home-section-kicker a:hover {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-section-kicker a:focus-visible {
    outline: 3px solid rgba(22, 117, 209, 0.32);
    outline-offset: 3px;
}

.home-section-heading h1,
.home-section-heading h2 {
    margin: 5px 0 0;
    color: var(--catalog-ink);
    font-family: Arial, sans-serif;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.home-main .home-section-heading > p {
    color: var(--catalog-muted);
    font-size: 14px;
    line-height: 1.55;
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 11px;
}

.home-category-card,
.home-category-card:link,
.home-category-card:visited {
    position: relative;
    display: flex;
    min-height: 238px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    overflow: hidden;
    color: #172033;
    border: 1px solid #c7d9e7;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff 0%, #fff 58%, #f1f8ff 100%);
    box-shadow: 0 7px 18px rgba(32, 58, 88, 0.055);
    transition: transform 0.18s ease, border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.home-category-card:hover {
    color: #172033;
    border-color: #a8cee9;
    box-shadow: 0 13px 26px rgba(24, 89, 140, 0.13);
    transform: translateY(-3px);
}

.home-category-card:focus-visible,
.home-vendor-link:focus-visible,
.home-vendor-more > summary:focus-visible {
    outline: 3px solid rgba(22, 117, 209, 0.32);
    outline-offset: 3px;
}

.home-category-content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.home-category-label {
    margin-bottom: 5px;
    color: #778397;
    font: 700 14px/1.2 Arial, sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-category-content strong {
    color: #1d2d43;
    font: 750 16px/1.24 Arial, sans-serif;
    overflow-wrap: anywhere;
}

.home-category-action {
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    margin-top: 0;
    padding-top: 10px;
    color: #1469b3;
    font: 700 14px/1.2 Arial, sans-serif;
    align-self: center;
}

.home-category-action > span {
    min-width: 0;
}

.home-category-action::after {
    font-size: 17px;
    line-height: 0.8;
    content: "\2192";
    transition: transform 0.16s ease;
}

.home-category-card:hover .home-category-action::after {
    transform: translateX(3px);
}

.home-category-visual {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 124px;
    align-content: center;
    justify-items: center;
    margin-top: auto;
}

.home-category-example {
    position: absolute;
    z-index: 1;
    bottom: 2px;
    left: 50%;
    max-width: calc(100% - 12px);
    padding: 3px 6px;
    color: #40536a;
    font: 600 11px/1.15 Arial, sans-serif;
    text-align: center;
    text-transform: none;
    white-space: nowrap;
    border: 1px solid rgba(180, 205, 224, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 2px 6px rgba(31, 54, 82, 0.09);
    transform: translateX(-50%);
}

.home-category-visual img {
    display: block;
    width: 75%;
    max-width: none;
    height: auto;
    max-height: 136px;
    object-fit: contain;
    filter: drop-shadow(0 7px 8px rgba(41, 67, 91, 0.14));
    transition: transform 0.18s ease;
}

.home-category-card:hover .home-category-visual img {
    transform: scale(1.035);
}

.home-category-placeholder {
    position: relative;
    display: block;
    width: 82px;
    height: 82px;
    border: 12px solid #d7e8f5;
    border-radius: 50%;
}

.home-category-placeholder::after {
    position: absolute;
    inset: 11px;
    border: 7px solid #bdd8eb;
    border-radius: 50%;
    content: "";
}

.home-empty-state {
    padding: 28px;
    color: #5f6e82;
    font: 14px/1.6 Arial, sans-serif;
    text-align: center;
    border: 1px dashed #c9d8e5;
    border-radius: 14px;
    background: #f8fbfe;
}

.home-vendor-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.home-vendor-link,
.home-vendor-link:link,
.home-vendor-link:visited {
    display: flex;
    min-width: 0;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px 10px 13px;
    color: #334a65;
    font: 700 14px/1.2 Arial, sans-serif;
    border: 1px solid #d8e3ed;
    border-radius: 11px;
    background: #f8fbfe;
    transition: color 0.15s ease, border-color 0.15s ease,
        background 0.15s ease, transform 0.15s ease;
}

.home-vendor-list-featured .home-vendor-link,
.home-vendor-more .home-vendor-link {
    min-height: 64px;
    gap: 8px;
    padding: 8px 10px;
}

.home-vendor-list-featured .home-vendor-link small,
.home-vendor-more .home-vendor-link small {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 12px;
}

.home-vendor-list-featured .home-vendor-name,
.home-vendor-more .home-vendor-name {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-vendor-logo {
    display: grid;
    width: 58px;
    height: 44px;
    padding: 3px;
    flex: 0 0 58px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #c8d4de;
    border-radius: 8px;
    background: #e8eef3;
}

.home-vendor-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 50px;
    max-height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(12, 38, 60, 0.58));
}

.home-vendor-logo img:not([src]) {
    visibility: hidden;
}

.home-vendor-logo-placeholder {
    position: relative;
    display: block;
    width: 26px;
    height: 20px;
    border: 2px solid #91a4b5;
    border-radius: 5px;
}

.home-vendor-logo-placeholder::before {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #91a4b5;
    content: "";
}

.home-vendor-logo-placeholder::after {
    position: absolute;
    right: 4px;
    bottom: 3px;
    left: 4px;
    height: 8px;
    border-bottom: 2px solid #91a4b5;
    border-left: 2px solid #91a4b5;
    content: "";
    transform: skewY(-28deg);
}

.home-vendor-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-vendor-link small,
.home-vendor-more summary small {
    display: inline-grid;
    min-width: 25px;
    height: 25px;
    padding: 0 6px;
    flex: 0 0 auto;
    place-items: center;
    color: #5a7691;
    font: 700 14px/1 Arial, sans-serif;
    border-radius: 999px;
    background: #e6f1fa;
}

.home-vendor-link:hover {
    color: #0c5c9f;
    border-color: #abd0ea;
    background: #eef8ff;
    transform: translateY(-1px);
}

.home-vendor-more {
    margin-top: 13px;
    overflow: hidden;
    border: 1px solid #dce5ee;
    border-radius: 13px;
    background: #fff;
}

.home-vendor-more > summary {
    position: relative;
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    padding: 12px 46px 12px 15px;
    color: #34516e;
    font: 700 14px/1.3 Arial, sans-serif;
    list-style: none;
    cursor: pointer;
    background: #f7fafc;
}

.home-vendor-more > summary::-webkit-details-marker {
    display: none;
}

.home-vendor-more > summary::after {
    position: absolute;
    right: 17px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid #5a7691;
    border-bottom: 2px solid #5a7691;
    content: "";
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.16s ease;
}

.home-vendor-more[open] > summary::after {
    transform: translateY(-25%) rotate(225deg);
}

.home-vendor-more[open] > summary {
    border-bottom: 1px solid #e3eaf1;
}

.home-vendor-more .home-vendor-list {
    padding: 13px;
}

@media (max-width: 1080px) {
    .home-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .home-vendor-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .home-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .home-page .site-header__contact,
    .home-page .site-header__cart small,
    .home-page .footerd2,
    .home-page .footerd2 a {
        font-size: 14px;
    }

    .catalog-page.home-page .home-main {
        margin: 10px auto 0;
        padding: 0 10px 30px;
    }

    .home-section {
        padding: 22px 18px;
        border-radius: 17px;
    }

    .home-section-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
        margin-bottom: 19px;
        padding-bottom: 16px;
    }

    .home-vendor-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-vendor-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-vendor-name {
        overflow: visible;
        overflow-wrap: anywhere;
        text-overflow: clip;
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .home-category-card,
    .home-category-card:link,
    .home-category-card:visited {
        min-height: 224px;
        padding: 13px;
    }

    .home-category-content strong {
        font-size: 15px;
    }

    .home-category-visual img {
        max-width: none;
        max-height: 120px;
    }
}

@media (max-width: 400px) {
    .home-section {
        padding-right: 10px;
        padding-left: 10px;
    }

    .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .home-category-card,
    .home-category-card:link,
    .home-category-card:visited {
        padding: 10px;
    }

    .home-category-content strong {
        font-size: 14px;
    }

    .home-category-visual {
        min-height: 106px;
    }

    .home-category-visual img {
        max-width: none;
        max-height: 110px;
    }

    .home-category-example {
        max-width: 100%;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-category-card,
    .home-category-action::after,
    .home-category-visual img,
    .home-vendor-link,
    .home-vendor-more > summary::after {
        transition: none;
    }
}
