/*
 * Store Design System v1 — Step 4 listing cards (Option A).
 *
 * Discovery cards stay intentionally light: cover, kind, title, a few reliable
 * facts, price and one detail CTA. Purchase decisions remain on Product Detail.
 */

.pt-store-wrapper .pt-product-card {
    background: var(--pt-store-surface, #fff);
    border: 1px solid var(--pt-store-line, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
    overflow: hidden;
    font-family: var(--pt-store-font, inherit);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pt-store-wrapper .pt-product-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
    transform: translateY(-2px);
}

/* Cover-first desktop card. The real cover remains portrait and contained;
   listing cards never crop the top/bottom just to fill a wide hero area. */
.pt-store-wrapper .pt-product-card-hero {
    height: 194px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pt-store-page, #f8fafc);
    border-bottom: 1px solid var(--pt-store-line, #e2e8f0);
}

.pt-store-wrapper .pt-product-card-hero-img {
    width: auto;
    height: 100%;
    max-width: 138px;
    object-fit: contain;
    object-position: center;
    border-radius: 9px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}

.pt-store-wrapper .pt-card-status-chip {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    z-index: 3;
}

.pt-store-wrapper .pt-card-status-chip--owned {
    background: var(--pt-store-success-soft, #f0fdf4);
    color: var(--pt-store-success, #15803d);
}

.pt-store-wrapper .pt-card-status-chip--free {
    background: var(--pt-store-info-soft, #eff6ff);
    color: var(--pt-store-info, #1d4ed8);
}

.pt-store-wrapper .pt-card-status-chip--discount {
    background: #fef2f2;
    color: var(--pt-store-danger, #dc2626);
}

.pt-store-wrapper .pt-product-card-body {
    padding: 14px 15px 10px;
}

.pt-store-wrapper .pt-product-card--no-hero .pt-product-card-body {
    padding: 18px 15px 10px;
    padding-right: 76px;
}

.pt-store-wrapper .pt-card-mode-row {
    margin: 0 0 5px;
    color: var(--pt-store-brand-hover, #0f766e);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.35;
    text-transform: none;
}

.pt-store-wrapper .pt-product-card-title {
    min-height: 45px;
    margin: 0 0 9px;
    color: var(--pt-store-ink, #0f172a);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.pt-store-wrapper .pt-product-card-meta {
    min-height: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 12px;
    color: var(--pt-store-muted, #64748b);
    font-size: 11.5px;
    line-height: 1.45;
}

.pt-store-wrapper .pt-product-card-meta > span {
    white-space: nowrap;
}

/* Step 4 JS replaces the legacy dot/PDF-badge markup with simple facts. These
   rules keep a card tidy even for markup rendered just before enhancement. */
.pt-store-wrapper .pt-meta-dot {
    display: none;
}

.pt-store-wrapper .pt-card-pdf-badge {
    padding: 0;
    background: transparent;
    color: inherit;
    border: 0;
    font-size: inherit;
    font-weight: inherit;
}

.pt-store-wrapper .pt-card-pdf-badge svg {
    display: none;
}

.pt-store-wrapper .pt-product-card-footer {
    min-height: 58px;
    padding: 11px 15px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: transparent;
    border-top: 1px solid var(--pt-store-line-soft, #eef2f7);
}

.pt-store-wrapper .pt-product-price {
    min-width: 0;
    justify-content: flex-start;
    gap: 5px;
}

.pt-store-wrapper .pt-product-price-current,
.pt-store-wrapper .pt-product-price-free {
    color: var(--pt-store-ink, #0f172a);
    font-size: 20px;
    font-weight: 850;
}

.pt-store-wrapper .pt-product-price-mrp {
    color: #94a3b8;
    font-size: 11px;
}

.pt-store-wrapper .pt-product-price-tax {
    display: none;
}

.pt-store-wrapper .pt-product-card-actions {
    position: relative;
    z-index: 3;
    width: auto;
    flex: 0 0 auto;
}

.pt-store-wrapper .pt-listing-detail-btn {
    min-width: 112px;
    min-height: 36px;
    padding: 8px 12px;
    background: var(--pt-store-brand, #0d8478);
    color: #fff;
    border: 1px solid var(--pt-store-brand-border, #0b7268);
    border-radius: var(--pt-store-radius-sm, 8px);
    box-shadow: none;
    font-size: 12px;
    font-weight: 750;
}

.pt-store-wrapper .pt-listing-detail-btn:hover,
.pt-store-wrapper .pt-listing-detail-btn:focus-visible {
    background: var(--pt-store-brand-hover, #0f766e);
    color: #fff;
}

.pt-store-wrapper .pt-listing-state-btn {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: var(--pt-store-radius-sm, 8px);
    font-size: 11px;
    font-weight: 700;
}

/* Option A mobile: cover stays visible but the card becomes a compact horizontal
   row instead of a tall stack. This is intentionally scoped to Store listing. */
@media (max-width: 600px) {
    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: stretch;
        min-height: 156px;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-card-hero {
        grid-column: 1;
        grid-row: 1 / span 2;
        height: auto;
        min-height: 156px;
        padding: 10px;
        border-right: 1px solid var(--pt-store-line, #e2e8f0);
        border-bottom: 0;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-card-hero-img {
        width: 88px;
        height: auto;
        max-height: 132px;
        max-width: 100%;
        aspect-ratio: 3 / 4;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-card-body {
        grid-column: 2;
        grid-row: 1;
        padding: 12px 12px 8px;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-card-title {
        min-height: 40px;
        margin-bottom: 7px;
        font-size: 14px;
        line-height: 1.4;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-card-meta {
        gap: 4px 9px;
        font-size: 10.5px;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-card-footer {
        grid-column: 2;
        grid-row: 2;
        min-height: 52px;
        padding: 9px 12px 12px;
        flex-direction: row;
        align-items: center;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-price-current,
    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-price-free {
        font-size: 18px;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-listing-detail-btn {
        min-width: 106px;
        min-height: 36px;
        padding: 8px 9px;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-card-status-chip {
        top: 8px;
        right: 8px;
    }

    /* Products without a usable cover should not reserve an empty left rail. */
    .pt-store-wrapper .pt-product-card--no-hero:not(.pt-bundle-card) {
        grid-template-columns: minmax(0, 1fr);
    }

    .pt-store-wrapper .pt-product-card--no-hero:not(.pt-bundle-card) .pt-product-card-body,
    .pt-store-wrapper .pt-product-card--no-hero:not(.pt-bundle-card) .pt-product-card-footer {
        grid-column: 1;
    }

    .pt-store-wrapper .pt-product-card--no-hero:not(.pt-bundle-card) .pt-product-card-body {
        padding: 14px 12px 8px;
        padding-right: 72px;
    }
}

@media (max-width: 360px) {
    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card):not(.pt-product-card--no-hero) {
        grid-template-columns: 102px minmax(0, 1fr);
    }

    .pt-store-wrapper .pt-product-card--no-hero:not(.pt-bundle-card) {
        grid-template-columns: minmax(0, 1fr);
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-product-card-hero-img {
        width: 80px;
    }

    .pt-store-wrapper .pt-product-card:not(.pt-bundle-card) .pt-listing-detail-btn {
        min-width: 92px;
        font-size: 11px;
    }
}
