/* Demangkarta Public Home Commerce V8
 * Separates Lapak discovery from product discovery on the public homepage.
 */

body.page-home.app-context--public .home-commerce-header {
    align-items: flex-end;
    gap: 1rem;
}

body.page-home.app-context--public .home-section-kicker {
    display: block;
    margin: 0 0 .35rem;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.page-home.app-context--public .home-commerce-header h2 {
    margin-bottom: .28rem;
}

body.page-home.app-context--public .home-local-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

body.page-home.app-context--public .local-partner-card {
    min-width: 0;
    overflow: hidden;
    display: block;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + .15rem);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.page-home.app-context--public .local-partner-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
    box-shadow: var(--shadow-md);
}

body.page-home.app-context--public .local-partner-card__visual {
    position: relative;
    height: 8.1rem;
    overflow: visible;
    background: var(--surface-soft);
}

body.page-home.app-context--public .local-partner-card__cover {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--surface-soft);
}

body.page-home.app-context--public .local-partner-card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(10, 35, 31, .42));
    pointer-events: none;
}

body.page-home.app-context--public .local-partner-card__cover :where(img, .media-placeholder) {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease;
}

body.page-home.app-context--public .local-partner-card:hover .local-partner-card__cover img {
    transform: scale(1.035);
}

body.page-home.app-context--public .local-partner-card__logo {
    position: absolute;
    z-index: 2;
    left: 1rem;
    bottom: -1.7rem;
    width: 3.7rem;
    height: 3.7rem;
    overflow: hidden;
    border: 4px solid var(--surface);
    border-radius: 1.15rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

body.page-home.app-context--public .local-partner-card__logo :where(img, .media-placeholder) {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    object-fit: cover;
    font-size: .72rem;
}

body.page-home.app-context--public .local-partner-card__body {
    display: flex;
    min-width: 0;
    min-height: 15.2rem;
    padding: 2.35rem 1rem 1rem;
    flex-direction: column;
}

body.page-home.app-context--public .local-partner-card__eyebrow {
    display: block;
    overflow: hidden;
    margin: 0 0 .32rem;
    color: var(--accent);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .04em;
    line-height: 1.3;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

body.page-home.app-context--public .local-partner-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body.page-home.app-context--public .local-partner-card__facts {
    display: grid;
    gap: .38rem;
    margin: .78rem 0 0;
}

body.page-home.app-context--public .local-partner-card__facts span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .42rem;
    overflow: hidden;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-home.app-context--public .local-partner-card__facts svg {
    width: .95rem;
    height: .95rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

body.page-home.app-context--public .local-partner-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: .75rem 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.48;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body.page-home.app-context--public .local-partner-card__description:empty {
    display: none;
}

body.page-home.app-context--public .local-partner-card__cta {
    display: flex;
    margin-top: auto;
    padding-top: .9rem;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    color: var(--accent);
    font-size: .82rem;
    font-weight: 900;
}

body.page-home.app-context--public .local-partner-card__cta svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

body.page-home.app-context--public .home-mobile-rail-hint {
    display: none;
}

body.page-home.app-context--public .home-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

body.page-home.app-context--public .home-product-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + .05rem);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.page-home.app-context--public .home-product-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
    box-shadow: var(--shadow-md);
}

body.page-home.app-context--public .home-product-card .home-product-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0;
    background: var(--surface-soft);
}

body.page-home.app-context--public .home-product-card .home-product-card__media::before,
body.page-home.app-context--public .home-product-card .home-product-card__media::after {
    content: none;
}

body.page-home.app-context--public .home-product-card .home-product-card__media :where(img, picture, picture > img, .media-placeholder) {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    object-fit: cover;
    transition: transform .35s ease;
}

body.page-home.app-context--public .home-product-card:hover .home-product-card__media img {
    transform: scale(1.04);
}

body.page-home.app-context--public .home-product-card__promo,
body.page-home.app-context--public .home-product-card__type {
    position: absolute;
    z-index: 3;
    top: .68rem;
    display: inline-flex;
    min-height: 1.7rem;
    padding: .28rem .55rem;
    align-items: center;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
}

body.page-home.app-context--public .home-product-card__promo {
    left: .68rem;
    background: var(--danger);
    color: #fff;
}

body.page-home.app-context--public .home-product-card__type {
    right: .68rem;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    color: var(--text);
    backdrop-filter: blur(8px);
}

body.page-home.app-context--public .home-product-card .home-product-card__body {
    display: flex;
    min-width: 0;
    min-height: 10.8rem;
    padding: .9rem;
    flex: 1 1 auto;
    flex-direction: column;
}

body.page-home.app-context--public .home-product-card__shop {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .35rem;
    overflow: hidden;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-home.app-context--public .home-product-card__shop svg {
    width: .9rem;
    height: .9rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

body.page-home.app-context--public .home-product-card .home-product-card__body h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: .45rem 0 0;
    color: var(--text);
    font-size: .96rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body.page-home.app-context--public .home-product-card .card-price {
    display: flex;
    margin: .65rem 0 0;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .26rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.2;
}

body.page-home.app-context--public .home-product-card .price-old {
    margin: 0;
    font-size: .68rem;
}

body.page-home.app-context--public .home-product-card__footer {
    display: flex;
    min-width: 0;
    margin-top: auto;
    padding-top: .72rem;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    border-top: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    font-size: .7rem;
    line-height: 1.25;
}

body.page-home.app-context--public .home-product-card__footer > span {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-home.app-context--public .home-product-card__footer strong {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: .72rem;
    white-space: nowrap;
}

@media (max-width: 767px) {
    body.page-home.app-context--public .home-commerce-header {
        align-items: flex-start;
    }

    body.page-home.app-context--public .home-commerce-header .section-link {
        font-size: .76rem;
        white-space: nowrap;
    }

    body.page-home.app-context--public .home-local-grid {
        display: flex !important;
        grid-template-columns: none !important;
        gap: .75rem;
        margin-inline: calc(var(--page-gutter, 1rem) * -1);
        padding: .12rem var(--page-gutter, 1rem) .45rem;
        overflow-x: auto !important;
        overflow-y: visible;
        scroll-padding-inline: var(--page-gutter, 1rem);
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    body.page-home.app-context--public .home-local-grid::-webkit-scrollbar {
        display: none;
    }

    body.page-home.app-context--public .local-partner-card {
        display: grid !important;
        width: min(86vw, 22rem) !important;
        min-width: min(86vw, 22rem) !important;
        grid-template-columns: 6.8rem minmax(0, 1fr);
        scroll-snap-align: start;
    }

    body.page-home.app-context--public .local-partner-card__visual {
        width: 100%;
        height: 100%;
        min-height: 12.6rem;
        overflow: hidden;
    }

    body.page-home.app-context--public .local-partner-card__cover::after {
        background: linear-gradient(180deg, transparent 30%, rgba(10, 35, 31, .5));
    }

    body.page-home.app-context--public .local-partner-card__logo {
        left: 50%;
        bottom: .8rem;
        width: 3.35rem;
        height: 3.35rem;
        transform: translateX(-50%);
        border-width: 3px;
        border-radius: 1rem;
    }

    body.page-home.app-context--public .local-partner-card__body {
        min-height: 12.6rem;
        padding: .85rem;
    }

    body.page-home.app-context--public .local-partner-card__eyebrow {
        font-size: .65rem;
    }

    body.page-home.app-context--public .local-partner-card h3 {
        font-size: .98rem;
    }

    body.page-home.app-context--public .local-partner-card__facts {
        gap: .3rem;
        margin-top: .58rem;
    }

    body.page-home.app-context--public .local-partner-card__facts span {
        font-size: .68rem;
    }

    body.page-home.app-context--public .local-partner-card__description {
        margin-top: .55rem;
        font-size: .72rem;
        -webkit-line-clamp: 2;
    }

    body.page-home.app-context--public .local-partner-card__cta {
        padding-top: .62rem;
        font-size: .72rem;
    }

    body.page-home.app-context--public .home-mobile-rail-hint {
        display: block;
        margin: .42rem 0 0;
        color: var(--muted);
        font-size: .68rem;
    }

    body.page-home.app-context--public .home-product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: .68rem !important;
        overflow: visible !important;
    }

    body.page-home.app-context--public .home-product-card {
        width: auto !important;
        min-width: 0 !important;
    }

    body.page-home.app-context--public .home-product-card__promo,
    body.page-home.app-context--public .home-product-card__type {
        top: .48rem;
        min-height: 1.45rem;
        padding: .24rem .42rem;
        font-size: .6rem;
    }

    body.page-home.app-context--public .home-product-card__promo {
        left: .48rem;
    }

    body.page-home.app-context--public .home-product-card__type {
        right: .48rem;
    }

    body.page-home.app-context--public .home-product-card .home-product-card__body {
        min-height: 9.7rem;
        padding: .7rem;
    }

    body.page-home.app-context--public .home-product-card__shop {
        font-size: .64rem;
    }

    body.page-home.app-context--public .home-product-card .home-product-card__body h3 {
        font-size: .84rem;
    }

    body.page-home.app-context--public .home-product-card .card-price {
        margin-top: .5rem;
        font-size: .88rem;
    }

    body.page-home.app-context--public .home-product-card__footer {
        padding-top: .55rem;
        font-size: .61rem;
    }

    body.page-home.app-context--public .home-product-card__footer strong {
        font-size: .63rem;
    }
}

@media (min-width: 768px) and (max-width: 1099px) {
    body.page-home.app-context--public .home-local-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.page-home.app-context--public .home-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    body.page-home.app-context--public .local-partner-card,
    body.page-home.app-context--public .home-product-card,
    body.page-home.app-context--public .local-partner-card__cover img,
    body.page-home.app-context--public .home-product-card__media img {
        transition: none;
    }
}
