.product-card--marketplace {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-color: #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / .05);
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.product-card--marketplace:hover {
    border-color: #d1d5db;
    box-shadow: 0 5px 14px rgb(15 23 42 / .1);
    transform: translateY(-2px);
}

.product-card--marketplace:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
}

.product-card--marketplace .product-card-media {
    aspect-ratio: 1;
    background: #f8faf9;
}

.product-card--marketplace .product-card-content {
    gap: 0;
    padding: 12px;
}

.product-card--marketplace .product-card-category-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-card--marketplace .product-card-category {
    min-width: 0;
    color: #6b7280;
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.product-card--marketplace .product-card-rating {
    flex: 0 0 auto;
    color: #6b7280;
    font-size: .62rem;
    font-weight: 600;
}

.product-card--marketplace .product-card-stars {
    color: #fbbf24;
    font-size: .68rem;
    letter-spacing: .02em;
}

.product-card--marketplace .product-card-title {
    margin-top: 7px;
    color: #1f2937;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.45;
}

.product-card--marketplace .product-card-description {
    margin-top: 6px;
    color: #6b7280;
    font-size: .72rem;
    line-height: 1.45;
}

/* Shared by storefront cards and the style examples in product settings. */
.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) {
    min-width: 0;
    box-shadow: none;
    border-radius: 4px;
}

.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog):hover {
    transform: none;
    box-shadow: none;
    border-color: #a1a1aa;
}

.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-title {
    font-weight: 600;
    line-height: 1.5;
}

.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-price {
    color: #18181b;
    font-weight: 700;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-footer {
    margin-top: auto;
    padding-top: 12px;
}

.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal) .product-card-price-label,
.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered) .product-card-action,
.product-card:is(.product-card--minimal, .product-card--framed, .product-card--centered, .product-card--catalog) .product-card-description {
    display: none;
}

.product-card--minimal,
.product-card--centered {
    border: 0;
    background: transparent;
}

.product-card--minimal .product-card-content {
    padding: 10px 0 0;
}

.product-card--minimal .product-card-category,
.product-card--minimal .product-card-meta,
.product-card--minimal .product-card-featured {
    display: none;
}

.product-card--minimal .product-card-title {
    margin-top: 0;
}

.product-card--framed {
    padding: 8px;
}

.product-card--framed .product-card-media {
    background: #f5f5f4;
}

.product-card--framed .product-card-media > img {
    padding: 14px;
    object-fit: contain;
}

.product-card--framed .product-card-content {
    padding: 12px 4px 6px;
}

.product-card--framed .product-card-category {
    color: #71717a;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.product-card--centered .product-card-media {
    aspect-ratio: 4 / 5;
    background: #f5f5f4;
}

.product-card--centered .product-card-content {
    padding: 14px 6px 0;
    text-align: center;
}

.product-card--centered .product-card-category {
    color: #71717a;
    font-size: .6rem;
    font-weight: 500;
    letter-spacing: .03em;
}

.product-card--centered .product-card-meta,
.product-card--centered .product-card-footer {
    justify-content: center;
}

.product-card--horizontal {
    flex-direction: row;
    padding: 10px;
    gap: 12px;
    align-items: flex-start;
}

.product-card--horizontal .product-card-media {
    width: 38%;
    flex: 0 0 38%;
    border-radius: 2px;
    background: #f5f5f4;
}

.product-card--horizontal .product-card-media > img {
    object-fit: contain;
}

.product-card--horizontal .product-card-content {
    padding: 2px 0;
    min-width: 0;
    align-self: stretch;
}

.product-card--horizontal .product-card-category {
    color: #71717a;
    font-weight: 500;
}

.product-card--horizontal .product-card-action,
.product-card--catalog .product-card-action {
    width: 26px;
    height: 26px;
    border-radius: 0;
    background: transparent;
    color: #52525b;
}

.product-card--horizontal .product-card-action:hover,
.product-card--catalog .product-card-action:hover {
    color: var(--brand-primary);
    background: #f4f4f5;
}

.product-grid:has(.product-card--horizontal) {
    grid-template-columns: minmax(0, 1fr);
}

.product-card--catalog {
    border-radius: 0;
}

.product-card--catalog .product-card-media {
    aspect-ratio: 4 / 3;
    border-bottom: 1px solid #e4e4e7;
}

.product-card--catalog .product-card-media > img {
    padding: 8px;
    object-fit: contain;
}

.product-card--catalog .product-card-content {
    padding: 12px;
}

.product-card--catalog .product-card-category {
    color: #71717a;
    font-weight: 500;
}

.product-card--catalog .product-card-footer {
    margin: auto -12px -12px;
    padding: 10px 12px;
    border-top: 1px solid #e4e4e7;
    background: #fafafa;
}

.product-card--catalog .product-card-title,
.product-card--catalog .product-card-meta {
    margin-bottom: 10px;
}

@media (min-width: 640px) {
    .product-grid:has(.product-card--horizontal) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .product-grid:has(.product-card--horizontal) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* All storefront variants retain the same Marketplace card information.
   Each choice changes composition only, never hides the category, rating, or description. */
.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / .05);
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog):hover {
    border-color: #d1d5db;
    box-shadow: 0 5px 14px rgb(15 23 42 / .1);
    transform: translateY(-2px);
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-media {
    position: relative;
    display: block;
    width: auto;
    aspect-ratio: 1;
    margin: 0;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 0;
    background: #f8faf9;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-content {
    display: flex;
    min-height: 0;
    padding: 12px;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-category-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-category {
    display: block;
    min-width: 0;
    margin: 0;
    color: #6b7280;
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-rating {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    color: #6b7280;
    font-size: .62rem;
    font-weight: 600;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-stars {
    color: #fbbf24;
    font-size: .68rem;
    letter-spacing: .02em;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-title {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 0;
    color: #1f2937;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card:is(.product-card--classic, .product-card--compact, .product-card--outline, .product-card--editorial, .product-card--minimal, .product-card--framed, .product-card--centered, .product-card--horizontal, .product-card--catalog) .product-card-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 6px 0 0;
    color: #6b7280;
    font-size: .72rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Composition variations. */
.product-card--compact .product-card-content { padding: 10px; }
.product-card--compact .product-card-title { margin-top: 5px; font-size: .78rem; }
.product-card--compact .product-card-description { margin-top: 4px; -webkit-line-clamp: 1; }

.product-card--outline { border-width: 2px !important; }
.product-card--outline .product-card-media { margin: 8px 8px 0 !important; border-radius: 6px !important; }
.product-card--outline .product-card-content { padding: 12px 14px 14px !important; }

.product-card--editorial { border-color: transparent !important; border-radius: 0 !important; box-shadow: none !important; }
.product-card--editorial .product-card-media { border-radius: 2px !important; }
.product-card--editorial .product-card-content { padding-right: 0 !important; padding-bottom: 0 !important; padding-left: 0 !important; }

.product-card--minimal { border-color: transparent !important; box-shadow: none !important; }
.product-card--minimal .product-card-content { padding: 10px 0 0 !important; }

.product-card--framed { padding: 8px; }
.product-card--framed .product-card-media { border-radius: 6px !important; background: #f5f5f4 !important; }
.product-card--framed .product-card-media > img { padding: 14px; object-fit: contain; }
.product-card--framed .product-card-content { padding: 12px 4px 4px !important; }

.product-card--centered .product-card-content { text-align: center; }
.product-card--centered .product-card-category-rate { justify-content: center; }
.product-card--centered .product-card-description { margin-right: auto; margin-left: auto; }

.product-card--horizontal { flex-direction: row !important; padding: 0; }
.product-card--horizontal .product-card-media { width: 42% !important; flex: 0 0 42% !important; }
.product-card--horizontal .product-card-content { padding: 12px !important; }

.product-card--catalog { border-radius: 6px !important; }
.product-card--catalog .product-card-media { border-bottom: 1px solid #e5e7eb; }
.product-card--catalog .product-card-content { padding: 14px !important; }

/* Settings previews use the same card classes as the storefront. */
.admin-product-style-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 20px;
}

.admin-product-style-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.admin-product-style-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.admin-product-style-choice {
    display: flex;
    height: 100%;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    padding: 14px;
    background: #fff;
}

.admin-product-style-option:hover .admin-product-style-choice {
    border-color: #a1a1aa;
}

.admin-product-style-option > input:checked + .admin-product-style-choice {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 1px var(--admin-primary);
}

.admin-product-style-option > input:focus-visible + .admin-product-style-choice {
    outline: 2px solid var(--admin-primary);
    outline-offset: 4px;
}

.admin-product-style-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.admin-product-style-check {
    display: flex;
    width: 20px;
    height: 20px;
    border: 1px solid #d4d4d8;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.admin-product-style-check svg {
    width: 12px;
    height: 12px;
    visibility: hidden;
}

.admin-product-style-option > input:checked + .admin-product-style-choice .admin-product-style-check {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #fff;
}

.admin-product-style-option > input:checked + .admin-product-style-choice .admin-product-style-check svg {
    visibility: visible;
}

.admin-product-style-preview {
    display: flex;
    min-height: 320px;
    padding: 18px 10px;
    align-items: center;
    justify-content: center;
    background: #f8f8f7;
    border-radius: 3px;
}

.admin-product-style-preview .product-card {
    width: 180px;
    height: auto;
    pointer-events: none;
}

.admin-product-style-preview .product-card-media {
    background: #eeefed;
}

.admin-product-style-preview .product-card-placeholder {
    position: absolute;
    inset: 0;
    color: #92988f;
}

.admin-product-style-preview .product-card-placeholder svg {
    width: 48px;
    height: 48px;
    stroke-width: 1;
}

.admin-product-style-preview .product-card--horizontal {
    width: 100%;
}

.admin-product-style-choice > small {
    color: #71717a;
    font-size: 11px;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .admin-product-style-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .admin-product-style-options {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }
}
