/* Portal Storefront — minimal card grid.
 *
 * Kept theme-agnostic: no colour tokens hardcoded except a fallback brand
 * accent, so the CSS composes cleanly on top of any WP theme.
 */

/* Grid layout — force 2-col via own flex rules so we don't depend on
 * Bootstrap `.col-lg-6` being loaded. Theme's own `.addons-list` uses
 * negative-margin flex row too; when both classes are on the same div
 * we still want the 50/50 split to hold. */
.portal-storefront-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 24px -10px;
}
.portal-storefront-grid > * {
    width: 50%;
    padding: 10px;
    box-sizing: border-box;
}
@media (max-width: 767px) {
    .portal-storefront-grid > * {
        width: 100%;
    }
}
/* Fallback card only — when NOT combined with theme's addons-list-item,
 * apply plugin's own default grid layout (auto-fill columns). */
.portal-storefront-grid:not(.addons-list) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.portal-storefront-grid:not(.addons-list) > * {
    width: auto;
    padding: 0;
}

.portal-storefront-card:not(.addons-list-item) {
    --portal-brand-color: #66c7f4;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.portal-storefront-card:not(.addons-list-item):hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-cover {
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
    overflow: hidden;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-tagline {
    margin: 0;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-price-compare {
    color: #9ca3af;
    font-size: 0.85rem;
    text-decoration: line-through;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-price-current {
    color: #111827;
    font-size: 1.15rem;
    font-weight: 700;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-cta {
    display: inline-block;
    padding: 10px 16px;
    background: var(--portal-brand-color);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: filter 0.15s ease;
}

.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-cta:hover,
.portal-storefront-card:not(.addons-list-item) .portal-storefront-card-cta:focus {
    filter: brightness(0.92);
    color: #fff !important;
    text-decoration: none;
}

.portal-storefront-error,
.portal-storefront-empty {
    padding: 16px;
    border-radius: 8px;
    background: #fef3c7;
    color: #92400e;
    margin: 16px 0;
}

.portal-storefront-empty {
    background: #f3f4f6;
    color: #6b7280;
}
