/*
 * Marketplace /shop/ — SaaS storefront redesign.
 * Loaded only on shop archives. Bump .vN when publishing (CDN caches by path).
 */

/* ─── Page shell ─── */
body.miroseo-ui.woocommerce .mx-main,
body.mx-shop-archive .mx-main {
    background: #f8fafc;
}

/* ─── Hero: one flat dark band, same content width as the grid below ─── */
.mx-woo .mx-shop-hero {
    position: relative;
    overflow: hidden;
    padding: 40px 0 36px;
    text-align: center;
    color: #f8fafc;
    background: linear-gradient(165deg, #020617 0%, #0f172a 55%, #111827 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

/* Kill the nested glow/grid “second frame” look */
.mx-shop-hero-glow,
.mx-shop-hero-grid {
    display: none !important;
}

.mx-woo .mx-shop-hero-inner.mx-container {
    position: relative;
    z-index: 1;
    width: min(var(--mx-max, 1180px), 100%);
    max-width: var(--mx-max, 1180px);
    margin-left: auto;
    margin-right: auto;
}

.mx-woo .mx-shop-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 999px;
}

.mx-woo .mx-shop-hero h1 {
    margin: 0 auto 12px;
    max-width: 22ch;
    font-size: clamp(1.65rem, 3.2vw, 2.25rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #fff;
    text-wrap: balance;
}

.mx-woo .mx-shop-lead {
    margin: 0 auto 18px;
    max-width: 540px;
    font-size: 1rem;
    line-height: 1.55;
    color: #cbd5e1;
}

.mx-shop-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

/* Stats: same dark surface as hero — not a second nested frame */
.mx-shop-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0;
}

.mx-shop-stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 16px 12px 4px;
    background: transparent;
    border-right: 1px solid rgba(148, 163, 184, 0.14);
}

.mx-shop-stats li:last-child {
    border-right: 0;
}

.mx-shop-stats strong {
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.mx-shop-stats span {
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
}

/* ─── Content shell ─── */
.mx-woo .mx-shop-content {
    padding: 36px 24px 96px;
}

/* Keep toolbar + grid on the same track as the hero container */
.mx-woo .mx-shop-toolbar,
.mx-woo ul.products,
.mx-shop-sections {
    max-width: var(--mx-max, 1180px);
}

/* ─── Toolbar ─── */
.mx-woo .mx-shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin: 0 auto 28px;
    padding: 14px 18px;
    max-width: var(--mx-max, 1180px);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(12px);
}

.mx-woo .woocommerce-result-count {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #475569;
}

.mx-woo .woocommerce-ordering {
    margin: 0;
}

.mx-woo .woocommerce-ordering select {
    min-width: 180px;
    padding: 10px 36px 10px 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

/* ─── Product grid ─── */
.mx-woo ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    max-width: var(--mx-max, 1180px);
}

.mx-woo ul.products::before,
.mx-woo ul.products::after {
    display: none !important;
}

.mx-woo ul.products li.product.mx-shop-card {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    list-style: none;
}

/* ─── Cards ─── */
.mx-shop-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.mx-shop-card:hover .mx-shop-card-inner {
    transform: translateY(-6px);
    border-color: #cbd5e1;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 24px 48px rgba(15, 23, 42, 0.14);
}

.mx-shop-card.is-featured .mx-shop-card-inner {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.18),
        0 18px 44px rgba(180, 83, 9, 0.16);
}

.mx-shop-card.is-featured .mx-shop-card-inner::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 3;
    height: 3px;
    background: linear-gradient(90deg, #fde047, #f59e0b 50%, #fb923c);
}

.mx-shop-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
}

.mx-shop-badge--featured {
    color: #78350f;
    background: linear-gradient(135deg, #fde047, #f59e0b);
    box-shadow: 0 8px 20px rgba(180, 83, 9, 0.35);
}

/* Media sits in a dark SaaS frame */
.mx-shop-card-media {
    position: relative;
    display: block;
    flex-shrink: 0;
    margin: 12px 12px 0;
    overflow: hidden;
    text-decoration: none;
    background: #0f172a;
    border-radius: 14px;
}

.mx-shop-card-media-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(245, 158, 11, 0.18), transparent 55%),
        #0f172a;
}

.mx-shop-card-media-frame .mx-shop-card-thumb {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover;
    object-position: center top;
    margin: 0 !important;
    border: 0;
    border-radius: 0;
    transition: transform 0.35s ease;
}

.mx-shop-card:hover .mx-shop-card-thumb {
    transform: scale(1.03);
}

.mx-shop-card--registry .mx-shop-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 160px;
    font-size: 3.25rem;
    color: #f8fafc;
}

/* Body */
.mx-shop-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 18px 20px 0;
}

.mx-shop-card-cat {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 10px;
    padding: 5px 11px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
}

.mx-shop-card-cat[data-cat='seo'] { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.mx-shop-card-cat[data-cat='woocommerce'] { color: #6d28d9; background: #f5f3ff; border-color: #ddd6fe; }
.mx-shop-card-cat[data-cat='local-seo'] { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; }
.mx-shop-card-cat[data-cat='digital-commerce'] { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.mx-shop-card-cat[data-cat='booking'] { color: #be123c; background: #fff1f2; border-color: #fecdd3; }

.mx-shop-card-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.mx-shop-card-title a {
    color: #0f172a;
    text-decoration: none;
}

.mx-shop-card-title a:hover {
    color: #b45309;
}

.mx-shop-card-tagline {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.5 * 0.9375rem);
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    color: #475569;
}

.mx-shop-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.mx-shop-chip {
    padding: 5px 10px;
    font-size: 0.78125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.mx-shop-chip--free {
    color: #15803d;
    background: #f0fdf4;
    border-color: #86efac;
}

/* Footer */
.mx-shop-card-foot {
    margin-top: auto;
    padding: 18px 20px 20px;
    border-top: 1px solid #f1f5f9;
    background: linear-gradient(180deg, transparent, #f8fafc 40%);
}

.mx-shop-card-price {
    margin-bottom: 14px;
}

.mx-shop-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 10px;
}

.mx-shop-price-main {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.mx-shop-price-term {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #92400e;
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
}

.mx-shop-card-cta {
    gap: 8px;
    padding: 12px 18px !important;
    font-size: 0.9375rem !important;
    font-weight: 700;
    border-radius: 12px;
    color: #111827 !important;
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35);
}

.mx-shop-card-cta:hover {
    background: linear-gradient(135deg, #fef08a 0%, #fbbf24 100%) !important;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.45);
}

.mx-shop-card-cta.mx-btn-gold {
    color: #111827 !important;
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.38);
}

.mx-shop-card-cta.mx-btn-gold:hover {
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.48);
}

.mx-shop-card-cta-arrow {
    transition: transform 0.2s ease;
}

.mx-shop-card:hover .mx-shop-card-cta-arrow {
    transform: translateX(3px);
}

/* Help / free-edition closing tile */
.mx-shop-card--help .mx-shop-card-inner {
    justify-content: center;
    min-height: 100%;
    padding: 32px 26px;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(245, 158, 11, 0.12), transparent 55%),
        linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.28);
}

.mx-shop-card--help:hover .mx-shop-card-inner {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 22px 48px rgba(2, 6, 23, 0.35);
}

.mx-shop-help-kicker {
    margin: 0 0 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fbbf24;
}

.mx-shop-help-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #fff;
}

.mx-shop-help-text {
    margin: 0 0 18px;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #94a3b8;
}

.mx-shop-help-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mx-shop-help-links a {
    display: inline-flex;
    padding: 8px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    background: #fde68a;
    border: 1px solid #fbbf24;
    border-radius: 999px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.mx-shop-help-links a:hover {
    background: #fef3c7;
    transform: translateY(-1px);
}

/* ─── Below-grid sections ─── */
.mx-shop-sections {
    max-width: var(--mx-max, 1180px);
    margin: 64px auto 0;
}

.mx-shop-section-head {
    max-width: 620px;
    margin: 0 auto 36px;
    text-align: center;
}

.mx-shop-section-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
}

.mx-shop-section-head h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.mx-shop-section-lead {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #475569;
}

/* Buying guide */
.mx-shop-guide {
    margin-bottom: 72px;
}

.mx-shop-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.mx-shop-guide-card {
    padding: 28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mx-shop-guide-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.mx-shop-guide-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    font-size: 1.4rem;
    background: linear-gradient(165deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: 14px;
}

.mx-shop-guide-card h3 {
    margin: 0 0 10px;
    font-size: 1.1875rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.mx-shop-guide-card p {
    margin: 0 0 16px;
    font-size: 0.975rem;
    line-height: 1.6;
    color: #475569;
}

.mx-shop-guide-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mx-shop-guide-links a {
    display: inline-flex;
    padding: 7px 13px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.mx-shop-guide-links a:hover {
    background: #fffbeb;
    border-color: #fbbf24;
}

/* FAQ */
.mx-shop-faq {
    margin-bottom: 72px;
}

.mx-shop-faq-list {
    max-width: 820px;
    margin: 0 auto;
    padding: 8px 28px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.mx-shop-faq-item {
    border-bottom: 1px solid #f1f5f9;
}

.mx-shop-faq-item:last-child {
    border-bottom: 0;
}

.mx-shop-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    cursor: pointer;
    list-style: none;
}

.mx-shop-faq-item summary::-webkit-details-marker {
    display: none;
}

.mx-shop-faq-q {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
}

.mx-shop-faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 600;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
}

.mx-shop-faq-item[open] summary::after {
    content: '–';
}

.mx-shop-faq-a {
    padding: 0 0 20px;
}

.mx-shop-faq-a p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: #475569;
}

/* Final CTA */
.mx-shop-final-cta {
    position: relative;
    overflow: hidden;
    padding: 56px 32px;
    text-align: center;
    color: #f8fafc;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    box-shadow: 0 24px 56px rgba(2, 6, 23, 0.28);
}

.mx-shop-final-cta::before {
    content: '';
    position: absolute;
    inset: -30% 15% auto;
    height: 80%;
    background:
        radial-gradient(ellipse at 40% 40%, rgba(245, 158, 11, 0.28), transparent 55%),
        radial-gradient(ellipse at 70% 20%, rgba(56, 189, 248, 0.12), transparent 50%);
    pointer-events: none;
}

.mx-shop-final-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
}

.mx-shop-final-kicker {
    display: inline-flex;
    margin: 0 0 14px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 999px;
}

.mx-shop-final-cta h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
}

.mx-shop-final-cta p {
    margin: 0 0 26px;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.mx-shop-final-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
    .mx-woo ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mx-shop-guide-grid {
        grid-template-columns: 1fr;
    }

    .mx-shop-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .mx-woo .mx-shop-hero {
        padding: 36px 0 32px;
    }

    .mx-woo .mx-shop-hero h1 {
        max-width: none;
    }

    .mx-woo ul.products {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mx-shop-card-media {
        margin: 10px 10px 0;
    }

    .mx-shop-card-body,
    .mx-shop-card-foot {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mx-shop-faq-list {
        padding: 4px 18px;
    }

    .mx-shop-final-cta {
        padding: 44px 22px;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .mx-shop-stats {
        grid-template-columns: 1fr 1fr;
    }

    .mx-shop-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mx-shop-hero-actions .mx-btn {
        width: 100%;
    }
}
