/* GHome Category Grid - Shop By Category */
.ghm-category-grid-section {
    width: 100vw;
    max-width: 100vw;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #ffffff;
    padding: 62px max(16px, env(safe-area-inset-left)) 64px max(16px, env(safe-area-inset-right));
    box-sizing: border-box;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .ghm-category-grid-section {
        overflow-x: hidden;
    }
}

@supports (width: 100dvw) {
    .ghm-category-grid-section {
        width: 100dvw;
        max-width: 100dvw;
        margin-left: calc(50% - 50dvw);
        margin-right: calc(50% - 50dvw);
    }
}

.ghm-category-grid-section *,
.ghm-category-grid-section *::before,
.ghm-category-grid-section *::after {
    box-sizing: border-box;
}

.ghm-category-grid-section__inner {
    width: 100%;
    max-width: min(100%, var(--ghm-category-grid-max-width, 1400px));
    margin: 0 auto;
}

.ghm-category-grid-section__header {
    max-width: 780px;
    margin: 0 auto 30px;
    text-align: center;
}

.ghm-category-grid-section__title {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #2b2f36;
    font-size: clamp(24px, 2.2vw, 30px);
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: 0;
}

.ghm-category-grid-section__title::after {
    position: absolute;
    left: 50%;
    bottom: -12px;
    width: 86px;
    height: 4px;
    border-radius: 999px;
    background: #2563eb;
    content: "";
    transform: translateX(-50%);
}

.ghm-category-grid-section__subtitle {
    margin: 20px 0 0;
    color: #526071;
    font-size: 15px;
    line-height: 1.6;
}

.ghm-category-grid {
    display: grid;
    grid-template-columns: repeat(var(--ghm-category-grid-desktop, 6), var(--ghm-category-card-width, 220px));
    gap: var(--ghm-category-grid-gap, 16px);
    align-items: stretch;
    justify-content: center;
}

.ghm-category-grid-strip {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    margin-top: 34px;
    margin-left: 0;
    padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
    color: #ffffff;
    background: #000000;
    transform: translateX(-50%);
}

@supports (width: 100dvw) {
    .ghm-category-grid-strip {
        width: 100dvw;
        max-width: 100dvw;
    }
}

.ghm-category-grid-strip__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(100%, var(--ghm-category-strip-content-width, 1400px));
    min-height: 34px;
    margin: 0 auto;
    padding: 7px 12px;
    text-align: center;
}

.ghm-category-grid-strip__text {
    display: block;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.ghm-category-card {
    position: relative;
    isolation: isolate;
    display: flex;
    width: var(--ghm-category-card-width, 220px);
    height: var(--ghm-category-card-height, 209px);
    min-width: 0;
    min-height: var(--ghm-category-card-height, 209px);
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px 14px;
    color: #111827;
    text-align: center;
    text-decoration: none;
    background: #e8e8e8;
    border: 1px solid #d9d9d9;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transform: translateY(0) translateZ(0);
    transition:
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        border-color 180ms ease,
        color 180ms ease,
        background-color 180ms ease;
    will-change: transform, box-shadow;
}

.ghm-category-card::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.ghm-category-card:hover,
.ghm-category-card:focus {
    color: #2563eb;
    text-decoration: none;
    background: #eef4ff;
    border-color: #93c5fd;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.16);
    transform: translateY(-6px);
    outline: none;
}

.ghm-category-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.34);
    outline-offset: 4px;
}

.ghm-category-card__image-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(var(--ghm-category-card-height, 209px) - 70px);
    min-height: 110px;
    margin: 0;
    padding: 4px 6px 0;
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ghm-category-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: var(--ghm-category-image-fit, contain);
    filter: drop-shadow(0 10px 12px rgba(15, 23, 42, 0.12));
    transform: translateZ(0) scale(1);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease;
}

.ghm-category-card:hover .ghm-category-card__image-wrap,
.ghm-category-card:focus .ghm-category-card__image-wrap {
    transform: translateY(-2px);
}

.ghm-category-card:hover .ghm-category-card__image,
.ghm-category-card:focus .ghm-category-card__image {
    filter: drop-shadow(0 14px 16px rgba(37, 99, 235, 0.18));
    transform: scale(1.045);
}

.ghm-category-card__title {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    min-height: 28px;
    color: currentColor;
    font-size: 18px;
    font-weight: 750;
    line-height: 1.24;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ghm-category-card__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    color: #2563eb;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 20px;
}

@media (max-width: 1024px) {
    .ghm-category-grid-section {
        padding-top: 52px;
        padding-bottom: 56px;
    }

    .ghm-category-grid {
        grid-template-columns: repeat(var(--ghm-category-grid-tablet, 3), minmax(0, var(--ghm-category-card-width, 220px)));
        justify-content: center;
    }

    .ghm-category-card {
        width: min(100%, var(--ghm-category-card-width, 220px));
        height: var(--ghm-category-card-height, 209px);
        min-height: var(--ghm-category-card-height, 209px);
    }
}

@media (max-width: 640px) {
    .ghm-category-grid-section {
        padding: 42px 14px 46px;
    }

    .ghm-category-grid-section__header {
        margin-bottom: 28px;
    }

    .ghm-category-grid-section__title {
        font-size: clamp(22px, 6.4vw, 27px);
    }

    .ghm-category-grid-section__title::after {
        bottom: -10px;
        width: 68px;
        height: 3px;
    }

    .ghm-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: min(max(10px, var(--ghm-category-grid-gap, 16px)), 16px);
    }

    .ghm-category-grid-strip {
        margin-top: 28px;
    }

    .ghm-category-grid-strip__inner {
        min-height: 32px;
        padding: 6px 10px;
    }

    .ghm-category-grid-strip__text {
        font-size: 13px;
    }

    .ghm-category-card {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 220 / 209;
        padding: 10px 8px 9px;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    }

    .ghm-category-card:hover,
    .ghm-category-card:focus {
        transform: translateY(-4px);
    }

    .ghm-category-card__image-wrap {
        height: calc(100% - 32px);
        min-height: 68px;
        padding: 0 2px;
    }

    .ghm-category-card__title {
        min-height: 20px;
        font-size: clamp(11px, 3.1vw, 13px);
        line-height: 1.2;
    }

    .ghm-category-card__placeholder {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 22px;
    }
}

@media (max-width: 360px) {
    .ghm-category-grid {
        gap: 8px;
    }

    .ghm-category-card {
        padding: 9px 6px 8px;
        border-radius: 10px;
    }

    .ghm-category-card__title {
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ghm-category-card,
    .ghm-category-card__image-wrap,
    .ghm-category-card__image {
        transition: none;
    }

    .ghm-category-card:hover,
    .ghm-category-card:focus,
    .ghm-category-card:hover .ghm-category-card__image-wrap,
    .ghm-category-card:focus .ghm-category-card__image-wrap,
    .ghm-category-card:hover .ghm-category-card__image,
    .ghm-category-card:focus .ghm-category-card__image {
        transform: none;
    }
}

/* v2.5.40 refined category shopping entry */
.ghm-category-grid-section {
    background: #ffffff;
    padding-top: clamp(46px, 5vw, 70px);
    padding-bottom: clamp(48px, 5vw, 72px);
}

.ghm-category-grid-section__header {
    margin-bottom: 34px;
}

.ghm-category-grid-section__title {
    color: #111827;
    font-weight: 760;
    letter-spacing: -0.03em;
}

.ghm-category-grid-section__title::after {
    width: 58px;
    height: 3px;
    background: #1f4ed8;
}

.ghm-category-grid-section__subtitle {
    color: #667085;
    font-weight: 500;
}

.ghm-category-card {
    background: #f5f7fb;
    border-color: rgba(17, 24, 39, 0.08);
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.ghm-category-card:hover,
.ghm-category-card:focus {
    color: #1f4ed8;
    background: #ffffff;
    border-color: rgba(31, 78, 216, 0.24);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
}

.ghm-category-card__title {
    font-weight: 820;
}

.ghm-category-grid-strip {
    background: #111827;
}

.ghm-category-grid-strip__inner {
    min-height: 40px;
}

@media (max-width: 640px) {
    .ghm-category-grid-section {
        padding-top: 38px;
        padding-bottom: 42px;
    }

    .ghm-category-card {
        border-radius: 16px;
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    }
}
