/* GHome Product Grid / Product Sections */
.ghm-product-sections {
    width: 100vw;
    max-width: 100vw;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    box-sizing: border-box;
    background: #ffffff;
    color: #0b1220;
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .ghm-product-sections {
        overflow-x: hidden;
    }
}

@supports (width: 100dvw) {
    .ghm-product-sections {
        width: 100dvw;
        max-width: 100dvw;
        margin-left: calc(50% - 50dvw);
        margin-right: calc(50% - 50dvw);
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

.ghm-product-section {
    width: 100%;
    max-width: min(100%, var(--ghm-sections-max-width, 1400px));
    margin: 56px auto 74px;
}

.ghm-product-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.ghm-product-section__title-wrap {
    position: relative;
    min-width: 0;
    padding-left: 18px;
}

.ghm-product-section__title-wrap::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 5px;
    height: calc(100% - 6px);
    min-height: 46px;
    border-radius: 999px;
    background: #e11d48;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
}

.ghm-product-section__title {
    margin: 0;
    color: #2b2f36;
    font-size: clamp(24px, 2.2vw, 30px);
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.ghm-product-section__subtitle {
    margin: 9px 0 0;
    color: #475569;
    font-size: clamp(14px, 1.2vw, 17px);
    line-height: 1.5;
    font-style: italic;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.ghm-product-section__more {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 25px;
    color: #ffffff;
    background: #070b12;
    border-radius: 999px;
    border: 1px solid #070b12;
    box-shadow: 0 12px 26px rgba(7, 11, 18, 0.22);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.07em;
    text-decoration: none;
    white-space: nowrap;
    overflow: visible;
    isolation: isolate;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.ghm-product-section__more::before,
.ghm-product-section__more::after {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: inherit;
    border: 2px solid rgba(225, 29, 72, 0.55);
    opacity: 0;
    transform: scale(0.86);
    pointer-events: none;
}

.ghm-product-section__more::after {
    inset: -13px;
    border-color: rgba(225, 29, 72, 0.32);
}

.ghm-product-section__more:hover,
.ghm-product-section__more:focus {
    color: #ffffff;
    background: #e11d48;
    border-color: #e11d48;
    box-shadow: 0 16px 32px rgba(225, 29, 72, 0.34), 0 0 0 6px rgba(225, 29, 72, 0.12);
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
    outline: none;
}

.ghm-product-section__more:hover::before,
.ghm-product-section__more:focus::before {
    animation: ghm-more-pulse 820ms ease-out infinite;
}

.ghm-product-section__more:hover::after,
.ghm-product-section__more:focus::after {
    animation: ghm-more-pulse 820ms ease-out 160ms infinite;
}

@keyframes ghm-more-pulse {
    0% {
        opacity: 0.72;
        transform: scale(0.88);
    }
    65% {
        opacity: 0.18;
        transform: scale(1.32);
    }
    100% {
        opacity: 0;
        transform: scale(1.48);
    }
}

.ghm-product-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(var(--ghm-grid-desktop, 4), minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: auto;
    align-items: stretch;
    gap: var(--ghm-grid-gap, 24px);
}

.ghm-product-card {
    position: relative;
    height: 100%;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ghm-product-card:hover,
.ghm-product-card:focus-within {
    transform: translateY(-5px);
    border-color: #e11d48;
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.15);
}

.ghm-product-card__image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 20px 20px 14px 14px;
    background: #f1f5f9;
    aspect-ratio: 1 / 1;
}

.ghm-product-card__image-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    background: #f1f5f9;
}

.ghm-product-card__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transform: none;
    transition: none;
}

.ghm-product-card__image--primary {
    opacity: 1;
    z-index: 1;
}

.ghm-product-card__image--hover {
    display: block;
    opacity: 0;
    visibility: visible;
    z-index: 2;
}

.ghm-product-card.has-hover-image:hover .ghm-product-card__image--primary,
.ghm-product-card.has-hover-image:focus-within .ghm-product-card__image--primary {
    opacity: 0;
    transform: none;
}

.ghm-product-card.has-hover-image:hover .ghm-product-card__image--hover,
.ghm-product-card.has-hover-image:focus-within .ghm-product-card__image--hover {
    opacity: 1;
    transform: none;
}

.ghm-product-card__sale-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 11px;
    color: var(--ghm-sale-badge-color, #ffffff);
    background: var(--ghm-sale-badge-bg, #e11d48);
    border-radius: 4px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
}

.ghm-product-card__sale-badge--top-right {
    right: 14px;
    left: auto;
}

.ghm-product-card__sale-badge--top-left {
    right: auto;
    left: 14px;
}

.ghm-product-card__cart {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.ghm-product-card:hover .ghm-product-card__cart,
.ghm-product-card:focus-within .ghm-product-card__cart {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ghm-product-card__add-to-cart,
.ghm-product-card__add-to-cart.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 138px;
    height: 42px;
    min-height: 42px;
    padding: 0 16px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
    border: 2px solid #111827;
    border-radius: 999px;
    box-shadow: 0 14px 26px rgba(17, 24, 39, 0.26);
    line-height: 1;
    text-decoration: none;
    transform: none;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ghm-product-card__add-to-cart:hover,
.ghm-product-card__add-to-cart.button:hover,
.ghm-product-card__add-to-cart:focus,
.ghm-product-card__add-to-cart.button:focus {
    color: #ffffff;
    background: #e11d48;
    border-color: #e11d48;
    box-shadow: 0 18px 32px rgba(225, 29, 72, 0.36);
    transform: translateY(-2px);
    text-decoration: none;
    outline: none;
}

.ghm-product-card__add-to-cart.added,
.ghm-product-card__add-to-cart.loading {
    background: #070b12;
}

.ghm-product-card__cart-icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.ghm-product-card__cart-icon::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 3px;
    width: 13px;
    height: 10px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 2px 2px 4px 4px;
}

.ghm-product-card__cart-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 0;
    width: 7px;
    height: 7px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.ghm-product-card__cart-text {
    display: inline-block;
    max-width: 150px;
    margin-left: 9px;
    overflow: hidden;
    opacity: 1;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: none;
}

.ghm-product-card .added_to_cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    color: #070b12;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.ghm-product-card .added_to_cart:hover,
.ghm-product-card .added_to_cart:focus {
    color: #e11d48;
    text-decoration: underline;
}

.ghm-product-card__content {
    padding: 16px 16px 17px;
}

.ghm-product-card__title {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 850;
    line-height: 1.38;
    letter-spacing: -0.01em;
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 160ms ease;
}

.ghm-product-card__title:hover,
.ghm-product-card__title:focus {
    color: #e11d48;
    text-decoration: none;
    outline: none;
}

.ghm-product-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    color: #e11d48;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.ghm-product-card__price del {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 650;
    opacity: 1;
}

.ghm-product-card__price ins {
    color: #e11d48;
    text-decoration: none;
    font-weight: 900;
}

.ghm-product-card__price .amount {
    color: inherit;
}

.ghm-product-card__rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
    min-height: 18px;
    color: #070b12;
    font-size: 12px;
}

.ghm-product-card__rating .star-rating {
    float: none;
    margin: 0;
    color: #070b12;
    font-size: 12px;
    letter-spacing: 1px;
}

.ghm-product-card__review-count {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

@media (max-width: 1024px) {
    .ghm-product-grid {
        grid-template-columns: repeat(var(--ghm-grid-tablet, 3), minmax(0, 1fr));
    }

    .ghm-product-section {
        margin: 46px auto 58px;
    }
}

@media (max-width: 640px) {
    .ghm-product-sections {
        padding-left: 14px;
        padding-right: 14px;
    }

    .ghm-product-section {
        margin: 36px auto 50px;
    }

    .ghm-product-section__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 18px;
    }

    .ghm-product-section__title-wrap {
        padding-left: 14px;
    }

    .ghm-product-section__title-wrap::before {
        width: 4px;
        min-height: 38px;
    }

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

    .ghm-product-section__subtitle {
        margin-top: 6px;
        font-size: 14px;
    }

    .ghm-product-section__more {
        align-self: flex-end;
        min-height: 36px;
        padding: 0 18px;
        font-size: 12px;
    }

    .ghm-product-grid {
        grid-template-columns: repeat(var(--ghm-grid-mobile, 2), minmax(0, 1fr));
        gap: min(var(--ghm-grid-gap, 24px), 16px);
    }

    .ghm-product-card {
        border-radius: 16px;
    }

    .ghm-product-card:hover,
    .ghm-product-card:focus-within {
        transform: none;
    }

    .ghm-product-card__image-wrap {
        border-radius: 16px 16px 12px 12px;
    }

    .ghm-product-card__content {
        padding: 12px 12px 14px;
    }

    .ghm-product-card__title {
        min-height: 38px;
        font-size: 13px;
        line-height: 1.42;
    }

    .ghm-product-card__price {
        font-size: 15px;
    }

    .ghm-product-card__cart {
        right: 10px;
        bottom: 10px;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .ghm-product-card__add-to-cart,
    .ghm-product-card__add-to-cart.button,
    .ghm-product-card__add-to-cart:hover,
    .ghm-product-card__add-to-cart.button:hover,
    .ghm-product-card__add-to-cart:focus,
    .ghm-product-card__add-to-cart.button:focus {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        transform: none;
    }

    .ghm-product-card__cart-text,
    .ghm-product-card__add-to-cart:hover .ghm-product-card__cart-text,
    .ghm-product-card__add-to-cart:focus .ghm-product-card__cart-text {
        max-width: 0;
        margin-left: 0;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ghm-product-section__more,
    .ghm-product-section__more::before,
    .ghm-product-section__more::after,
    .ghm-product-card,
    .ghm-product-card__image,
    .ghm-product-card__add-to-cart,
    .ghm-product-card__cart-text,
    .ghm-product-card__title {
        animation: none !important;
        transition: none !important;
    }
}

/* v2.5.11: Product Grid - keep hover image/cart interactions, only remove card jump movement. */
.ghm-product-card:hover,
.ghm-product-card:focus-within {
    transform: none !important;
}

/* v2.5.17: Product Grid - keep Sale badge outside the product photo and reduce title/price gap. */
.ghm-product-card.has-sale-badge .ghm-product-card__image-wrap {
    margin-top: 38px;
    overflow: visible;
}

.ghm-product-card.has-sale-badge .ghm-product-card__image-link {
    overflow: hidden;
    border-radius: 16px 16px 14px 14px;
}

.ghm-product-card.has-sale-badge .ghm-product-card__sale-badge {
    top: -30px;
}

.ghm-product-card__title {
    min-height: 0;
}

.ghm-product-card__price {
    margin-top: 4px;
}

@media (max-width: 640px) {
    .ghm-product-card.has-sale-badge .ghm-product-card__image-wrap {
        margin-top: 34px;
    }

    .ghm-product-card.has-sale-badge .ghm-product-card__sale-badge {
        top: -27px;
    }

    .ghm-product-card__title {
        min-height: 0;
    }

    .ghm-product-card__price {
        margin-top: 3px;
    }
}

/* v2.5.40 refined product grid shopping flow */
.ghm-product-sections {
    background: #ffffff;
    color: #111827;
}

.ghm-product-section {
    margin-top: clamp(44px, 5vw, 66px);
    margin-bottom: clamp(54px, 5.4vw, 78px);
}

.ghm-product-section__header {
    margin-bottom: 26px;
}

.ghm-product-section__title-wrap::before {
    width: 4px;
    background: #1f4ed8;
    box-shadow: 0 0 0 4px rgba(31, 78, 216, 0.08);
}

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

.ghm-product-section__subtitle {
    color: #667085;
    font-style: normal;
    font-weight: 520;
}

.ghm-product-section__more {
    background: #111827;
    border-color: #111827;
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.2);
}

.ghm-product-section__more::before,
.ghm-product-section__more::after {
    content: none;
}

.ghm-product-section__more:hover,
.ghm-product-section__more:focus {
    background: #1f4ed8;
    border-color: #1f4ed8;
    box-shadow: 0 16px 32px rgba(31, 78, 216, 0.24);
    transform: translateY(-2px);
}

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

.ghm-product-card:hover,
.ghm-product-card:focus-within {
    border-color: rgba(31, 78, 216, 0.22);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.12);
    transform: translateY(-4px);
}

.ghm-product-card__add-to-cart,
.ghm-product-card__add-to-cart.button {
    background: #111827;
    border-color: #111827;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.2);
}

.ghm-product-card__add-to-cart:hover,
.ghm-product-card__add-to-cart.button:hover,
.ghm-product-card__add-to-cart:focus,
.ghm-product-card__add-to-cart.button:focus {
    background: #1f4ed8;
    border-color: #1f4ed8;
    box-shadow: 0 16px 30px rgba(31, 78, 216, 0.24);
}

@media (max-width: 767px) {
    .ghm-product-section__header {
        align-items: flex-start;
    }

    .ghm-product-card:hover,
    .ghm-product-card:focus-within {
        transform: none;
    }

    .ghm-product-card__cart {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}
