.page-marketplace .marketplace-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.marketplace-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.25rem;
}

.marketplace-module-card {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 1rem;
    background: var(--surface-color, #fff);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.marketplace-module-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.marketplace-module-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 0.75rem;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--accent-color), transparent 92%) 0%,
        color-mix(in srgb, var(--accent-color), transparent 97%) 100%
    );
}

.marketplace-module-card__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--accent-color), transparent 84%);
    color: var(--accent-color);
}

.marketplace-module-card__actions-top {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.marketplace-module-card__body {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.marketplace-module-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.marketplace-module-card__category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-color, #6c757d);
    margin-bottom: 0.75rem;
}

.marketplace-module-card__description {
    color: var(--muted-color, #6c757d);
    font-size: 0.875rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1 1 auto;
}

.marketplace-module-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color, #dee2e6);
    margin-bottom: 1rem;
}

.marketplace-module-card__price {
    font-weight: 700;
    color: var(--heading-color, #012970);
}

.marketplace-module-card__footer .btn {
    min-height: 2.5rem;
}

.marketplace-specs-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.module-specs-content {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--default-color, #444);
    word-wrap: break-word;
}

.module-specs-content h1,
.module-specs-content h2,
.module-specs-content h3,
.module-specs-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.module-specs-content h1:first-child,
.module-specs-content h2:first-child,
.module-specs-content h3:first-child,
.module-specs-content h4:first-child,
.module-specs-content p:first-child {
    margin-top: 0;
}

.module-specs-content ul,
.module-specs-content ol {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.module-specs-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.module-specs-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.module-specs-modal .modal-body {
    max-height: min(70vh, 640px);
    overflow-y: auto;
}

@media (max-width: 575.98px) {
    .marketplace-module-grid {
        grid-template-columns: 1fr;
    }

    .marketplace-module-card__header,
    .marketplace-module-card__body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .module-specs-modal .modal-dialog {
        margin: 0.75rem;
    }
}
