.akhome-block,
.akhome-block * {
    box-sizing: border-box;
}

.akhome-block {
    --ak-orange: #ff5a1f;
    --ak-orange2: #ff7a1a;
    --ak-dark: #202632;
    --ak-muted: #667085;
    --ak-border: #e8ebef;
    --ak-bg: #f7f8fa;
    --ak-ui-orange: var(--ak-orange, #ff5a1f);
    --ak-ui-orange-2: var(--ak-orange2, #ff7a1a);
    --ak-ui-dark: var(--ak-dark, #202632);
    --ak-ui-white: #fff;
    --ak-ui-card-radius: 20px;
    --ak-ui-card-radius-mobile: 16px;
    --ak-ui-btn-radius: 14px;
    --ak-ui-btn-radius-small: 12px;
    --ak-ui-focus-ring: 0 0 0 4px rgba(255,90,31,.14);
    --ak-ui-card-shadow: 0 12px 28px rgba(32,38,50,.06);
    --ak-ui-warm-border: var(--akui-color-accent-border, rgba(233,111,68,.28));
    --ak-ui-warm-border-hover: var(--akui-color-accent-border-hover, rgba(233,111,68,.42));
    --ak-ui-hover-shadow: 0 16px 34px rgba(32,38,50,.08), 0 0 20px rgba(255,90,31,.08);
    color: var(--ak-dark);
    width: 100%;
}

.akhome-wrap {
    width: min(var(--ak-container, 1320px), calc(100% - 32px));
    margin: 0 auto;
}

.akhome-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 22px;
}

.akhome-head h2 {
    margin: 0;
    font-size: clamp(24px, 2.1vw, 34px);
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -.02em;
}

.akhome-head p {
    margin: 8px 0 0;
    color: var(--ak-muted);
    line-height: 1.45;
}

.akhome-link {
    font-weight: 800;
    color: var(--ak-orange);
    text-decoration: none;
}

.akhe {
    padding: 38px 0;
    background: var(--ak-ui-white, #fff);
}

/* v1.2.0 — equipment grid rebuilt like brands v1.0.7.
   Auto mode fills module width by selected columns.
   Fixed mode uses exact px size. */
.akhe-grid {
    --akhe-cols-current: var(--akhe-cols-d, 6);
    --akhe-gap-current: var(--akhe-gap, 12px);
    display: flex !important;
    flex-wrap: wrap;
    gap: var(--akhe-gap-current);
    align-items: stretch;
}

.akhe-align-left .akhe-grid {
    justify-content: flex-start;
}

.akhe-align-center .akhe-grid {
    justify-content: center;
}

.akhe-align-right .akhe-grid {
    justify-content: flex-end;
}

.akhe-size-auto .akhe-tile {
    flex: 0 1 calc((100% - ((var(--akhe-cols-current) - 1) * var(--akhe-gap-current))) / var(--akhe-cols-current));
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
}

.akhe-size-fixed .akhe-tile {
    flex: 0 0 var(--akhe-tile, 110px);
    width: var(--akhe-tile, 110px) !important;
    height: var(--akhe-tile, 110px) !important;
    min-width: var(--akhe-tile, 110px) !important;
    min-height: var(--akhe-tile, 110px) !important;
    max-width: var(--akhe-tile, 110px) !important;
    max-height: var(--akhe-tile, 110px) !important;
}

.akhe-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(233,111,68,.16);
    border-radius: var(--ak-ui-card-radius, 20px);
    background: linear-gradient(180deg, #fff 0%, #fffaf7 100%);
    box-shadow:
        0 10px 24px rgba(32,38,50,.045),
        0 6px 16px rgba(255,90,31,.035);
    padding: 14px;
    text-decoration: none;
    color: var(--ak-dark);
    font-weight: 850;
    overflow: hidden;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.akhe-tile--link:hover,
.akhe-tile--link:focus-visible {
    border-color: var(--ak-ui-warm-border-hover);
    box-shadow: var(--ak-ui-hover-shadow, 0 16px 34px rgba(32,38,50,.08), 0 0 20px rgba(255,90,31,.08));
    background: linear-gradient(180deg, #fffdfb 0%, #fff6f0 100%);
    transform: translateY(-2px);
    outline: none;
}

.akhe-tile--plain {
    cursor: default;
}

.akhe-tile img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.akhe-tile span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.15;
    background: transparent;
}

@media (max-width: 640px) {
    .akhome-wrap {
        width: min(100% - 24px, 1320px);
    }

    .akhome-head {
        display: block;
    }

    .akhome-link {
        display: inline-flex;
        margin-top: 10px;
    }

    .akhe-grid {
        --akhe-cols-current: var(--akhe-cols-m, 3);
        --akhe-gap-current: var(--akhe-gap-mobile, 10px);
    }

    .akhe-size-fixed .akhe-tile {
        flex-basis: var(--akhe-tile-mobile, 76px);
        width: var(--akhe-tile-mobile, 76px) !important;
        height: var(--akhe-tile-mobile, 76px) !important;
        min-width: var(--akhe-tile-mobile, 76px) !important;
        min-height: var(--akhe-tile-mobile, 76px) !important;
        max-width: var(--akhe-tile-mobile, 76px) !important;
        max-height: var(--akhe-tile-mobile, 76px) !important;
        border-radius: var(--ak-ui-card-radius-mobile, 16px);
        padding: 10px;
    }

    .akhe-size-auto .akhe-tile {
        border-radius: var(--ak-ui-card-radius-mobile, 16px);
        padding: 10px;
    }

    .akhe-tile span {
        padding: 7px;
        font-size: 11px;
    }

    .akhe-mobile-scroll.akhome-block.akhe,
    .akhe-mobile-scroll .akhome-wrap,
    .akhe-mobile-scroll .akhe-grid {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .ak-native-slot:has(.akhe-mobile-scroll) > .sp-module,
    .ak-native-slot:has(.akhe-mobile-scroll) > .moduletable,
    .ak-native-slot:has(.akhe-mobile-scroll) .sp-module:first-child,
    .ak-native-slot:has(.akhe-mobile-scroll) .moduletable:first-child {
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    .akhe-mobile-scroll.akhome-block.akhe {
        padding: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .akhe-mobile-scroll .akhome-wrap {
        padding: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .akhe-mobile-scroll .akhome-head {
        margin-bottom: 14px;
    }

    .akhe-mobile-scroll .akhe-grid {
        --akhe-gap-current: var(--akhe-gap-mobile, 10px);
        position: relative;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: stretch;
        gap: var(--akhe-gap-current);
        width: 100vw;
        max-width: 100vw;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-left: max(16px, env(safe-area-inset-left));
        padding: 2px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    }

    .akhe-mobile-scroll .akhe-grid::-webkit-scrollbar {
        display: none;
    }

    .akhe-mobile-scroll.akhe-size-auto .akhe-tile,
    .akhe-mobile-scroll.akhe-size-fixed .akhe-tile {
        flex: 0 0 var(--akhe-tile-mobile, 76px);
        width: var(--akhe-tile-mobile, 76px) !important;
        min-width: var(--akhe-tile-mobile, 76px) !important;
        max-width: var(--akhe-tile-mobile, 76px) !important;
        height: var(--akhe-tile-mobile, 76px) !important;
        min-height: var(--akhe-tile-mobile, 76px) !important;
        max-height: var(--akhe-tile-mobile, 76px) !important;
        aspect-ratio: 1 / 1;
        scroll-snap-align: start;
        border-radius: var(--ak-ui-btn-radius, 14px);
    }
}


/* v1.2.1 — equipment logos use the full tile area */
.akhome-block.akhe.akhe-v120 .akhe-tile {
    padding: 0 !important;
}

.akhome-block.akhe.akhe-v120 .akhe-tile img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
}

.akhome-block.akhe.akhe-v120 .akhe-tile span {
    padding: 0 !important;
}


/* v1.2.13 — desktop section shell restored; mobile keeps lightweight edge scroll */
@media (max-width: 767px) {
    .ak-native-slot:has(.akhome-block.akhe) > .sp-module,
    .ak-native-slot:has(.akhome-block.akhe) > .moduletable,
    .ak-native-slot:has(.akhome-block.akhe) .sp-module:first-child,
    .ak-native-slot:has(.akhome-block.akhe) .moduletable:first-child {
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }

    .akhome-block.akhe {
        padding: 22px 0 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}


/* v1.2.4 — hover animation for informational tiles too.
   Links can be disabled, but tiles should still feel alive visually. */
.akhome-block.akhe.akhe-v120 .akhe-tile:hover,
.akhome-block.akhe.akhe-v120 .akhe-tile:focus-visible {
    border-color: rgba(255,90,31,.48);
    box-shadow:
        0 16px 34px rgba(32,38,50,.10),
        0 0 24px rgba(255,90,31,.12);
    transform: translateY(-2px);
    outline: none;
}

.akhome-block.akhe.akhe-v120 .akhe-tile--plain {
    cursor: default;
}
