/* DataCaliper Marketplace – main page (marketplace/index.html). Loaded after style.css. */

.mp-home {
    --mpx-green: #4f6b2a;
    --mpx-green-dark: #3a4f1c;
    --mpx-lime: #a8d26b;
    --mpx-ink: #142033;
    --mpx-muted: #4a5568;
    --mpx-line: #e4e9f0;
    --mpx-bg: #f6f8f4;
    font-family: 'Cabin', sans-serif;
    background: #fff;
}
.mp-home h1, .mp-home h2, .mp-home h3 { font-family: 'Cabin', sans-serif; }

/* ---------- Section heads ---------- */
.mpx-kicker {
    display: inline-block; margin-bottom: .6rem;
    color: var(--mpx-green); font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase;
}
.mpx-h2 { color: var(--mpx-ink); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.2; margin-bottom: .75rem; }
.mpx-lead { color: var(--mpx-muted); font-size: 1.08rem; line-height: 1.65; max-width: 40rem; margin: 0; }

/* ---------- Products ---------- */
.mpx-products { padding: 5rem 0 4.5rem; background: var(--mpx-bg); }
.mpx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.25rem; }

.mpx-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
/*
 * style.css has site-wide button rules that break these chips:
 *   button:hover { opacity: .9; background: unset !important }  -> removed the chip background on hover
 *   button:focus { opacity: .8 }                                  -> clicked chip looked faded
 *   button { outline: none !important }                          -> hid the keyboard focus ring
 * The !important values below are only there to win over those rules.
 */
.mpx-chip {
    border: 1.5px solid #cfd8c4; background: #fff !important; color: var(--mpx-ink);
    padding: .45rem 1rem; border-radius: 999px; font-weight: 600; font-size: .92rem; cursor: pointer;
    opacity: 1 !important;
    transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.mpx-chip:hover {
    background: #eef5e4 !important; border-color: var(--mpx-green); color: var(--mpx-green-dark);
    box-shadow: 0 6px 14px -8px rgba(79, 107, 42, .55);
    transform: translateY(-1px);
}
.mpx-chip[aria-pressed="true"] {
    background: var(--mpx-green) !important; border-color: var(--mpx-green); color: #fff;
    animation: mpx-chip-pop .3s ease;
}
.mpx-chip[aria-pressed="true"]:hover {
    background: var(--mpx-green-dark) !important; border-color: var(--mpx-green-dark); color: #fff;
}
.mpx-chip:active { transform: scale(.95); box-shadow: none; }
@keyframes mpx-chip-pop {
    0%   { transform: scale(.92); }
    60%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}
.mpx-chip:focus { opacity: 1 !important; }
.mpx-chip:focus-visible { outline: 3px solid #1a73e8 !important; outline-offset: 2px; }

.mpx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
@media (max-width: 991px) { .mpx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .mpx-grid { grid-template-columns: 1fr; } }
.mpx-grid > li[hidden] { display: none; }

/* Filter animation (driven by assets/js/marketplace.js) */
.mpx-grid > li { transition: opacity .2s ease, transform .2s ease; }
.mpx-grid > li.mpx-anim-out { opacity: 0; transform: scale(.94); pointer-events: none; }
.mpx-grid > li.mpx-anim-in { animation: mpx-card-in .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes mpx-card-in {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

.mpx-card {
    --accent: var(--mpx-green);
    --tint: #eef5e4;
    border: 1px solid var(--mpx-line);
    border-radius: 22px;
    box-shadow: 0 1px 2px rgba(20, 32, 51, .04), 0 12px 32px -18px rgba(20, 32, 51, .25);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.mpx-card:hover, .mpx-card:focus-within {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 40%, #fff);
    box-shadow: 0 2px 4px rgba(20, 32, 51, .05), 0 24px 48px -22px rgba(20, 32, 51, .35);
}
.mpx-c-green { --accent: #4f6b2a; --tint: #eef5e4; }
.mpx-c-teal  { --accent: #1f5f5b; --tint: #e5f2f1; }
.mpx-c-blue  { --accent: #24508f; --tint: #e7eef9; }
.mpx-c-amber { --accent: #9e4f12; --tint: #fbefe4; }

.mpx-card .mp-card-logo {
    position: relative;
    height: 170px;
    border-bottom: 0;
    background:
        radial-gradient(14rem 8rem at 85% 0%, rgba(255, 255, 255, .9), transparent 70%),
        var(--tint);
}
.mpx-card .mp-card-logo::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 35%, #fff));
}
.mpx-card .mp-card-logo img {
    max-height: 110px; max-width: 75%;
    border-radius: 14px;
    filter: drop-shadow(0 10px 18px rgba(20, 32, 51, .15));
    transition: transform .3s ease;
}
.mpx-card:hover .mp-card-logo img { transform: scale(1.04); }

.mpx-card .mp-card-body { padding: 1.5rem 1.6rem 1.6rem; }
.mpx-card h3 { font-size: 1.45rem; color: var(--mpx-ink); }
.mpx-card h3 a { color: inherit; }
.mpx-card h3 a:hover, .mpx-card h3 a:focus { color: var(--accent); }
.mpx-card .mp-tag { background: var(--tint); color: var(--accent); }
.mpx-card .mp-badge { background: linear-gradient(90deg, #4f6b2a, #6f9a3b); }
.mpx-card .mp-tagline { color: var(--mpx-ink); }

/* View details + Request a quote always on one line */
.mp-card-actions { flex-wrap: nowrap; gap: .6rem; }
.mp-card-actions .mp-btn { flex: 1 1 0; min-width: 0; white-space: nowrap; font-size: .95rem; padding: .55rem .9rem; }
.mpx-card .mp-btn-outline { border-color: var(--accent); color: var(--accent); }
.mpx-card .mp-btn-outline:hover, .mpx-card .mp-btn-outline:focus { background: var(--accent); color: #fff; }
.mpx-card .mp-btn-primary { background: var(--accent); border-color: var(--accent); }
.mpx-card .mp-btn-primary:hover, .mpx-card .mp-btn-primary:focus { background: color-mix(in srgb, var(--accent) 80%, #000); border-color: color-mix(in srgb, var(--accent) 80%, #000); }
@media (max-width: 400px) {
    .mp-card-actions .mp-btn { font-size: .85rem; padding: .5rem .6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .mpx-card, .mpx-card:hover, .mpx-card .mp-card-logo img, .mpx-card:hover .mp-card-logo img { transition: none; transform: none; }
    .mpx-grid > li, .mpx-grid > li.mpx-anim-in, .mpx-grid > li.mpx-anim-out,
    .mpx-chip, .mpx-chip:hover, .mpx-chip:active, .mpx-chip[aria-pressed="true"] { transition: none; animation: none; transform: none; opacity: 1; }
}

/* Keep both card buttons on one line in the narrower 3-column layout */
@media (min-width: 992px) and (max-width: 1199px) {
    .mp-card-actions .mp-btn { font-size: .85rem; padding: .5rem .6rem; }
}
