:root {
    --marketplace-primary: #0d6efd;
    --marketplace-bg: #f8f9fa;
    --bs-font-sans-serif: 'Google Sans', system-ui, -apple-system, sans-serif;
    --bs-body-font-family: 'Google Sans', system-ui, -apple-system, sans-serif;
}

body {
    font-family: 'Google Sans', system-ui, -apple-system, sans-serif;
    background: var(--marketplace-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.skip-link:focus {
    top: 1rem;
}

.marketplace-header {
    z-index: 1030;
}

.marketplace-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
}

.marketplace-brand-icon {
    display: block;
    flex-shrink: 0;
}

.marketplace-brand i {
    font-size: 1.5rem;
}

.marketplace-search {
    max-width: 520px;
}

.marketplace-header-row {
    width: 100%;
}

.marketplace-header-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-shrink: 0;
}

.marketplace-header-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    white-space: nowrap;
}

.marketplace-header-link:hover {
    color: #212529;
    text-decoration: underline;
}

.marketplace-filters .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
}

.marketplace-filters .form-select.is-active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.marketplace-filters .form-select.is-active:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.35);
}

.marketplace-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.marketplace-card:hover,
.marketplace-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
    outline: none;
}

.marketplace-card:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.35) !important;
}

.marketplace-card-thumb,
.marketplace-card-img-placeholder {
    aspect-ratio: 21 / 9;
    width: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.marketplace-card-img-placeholder {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.marketplace-card-placeholder-icon {
    display: block;
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.9;
}

.marketplace-card-thumb > .marketplace-card-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
}

.marketplace-detail-img-placeholder {
    height: 360px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.marketplace-detail-img-placeholder .marketplace-card-placeholder-icon {
    height: 4.5rem;
    max-width: 50%;
}

/* Detail page — horizontal layout */
.marketplace-detail-header {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
}

.marketplace-detail-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.2;
}

.marketplace-detail-summary {
    font-size: 1rem;
    color: #495057;
    max-width: 48rem;
}

.marketplace-detail-actions {
    align-self: flex-start;
}

.marketplace-detail-cta,
.marketplace-detail-demo {
    white-space: nowrap;
}

.marketplace-gallery-section {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.marketplace-gallery-scroller {
    position: relative;
    max-width: 100%;
}

.marketplace-gallery-scroller:not(.has-overflow) .marketplace-gallery-nav {
    display: none;
}

.marketplace-gallery-track {
    overflow: hidden;
    max-width: 100%;
}

.marketplace-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #212529;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.12);
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.marketplace-gallery-nav:hover:not(:disabled) {
    background: #fff;
}

.marketplace-gallery-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.marketplace-gallery-nav-prev {
    left: 0.5rem;
}

.marketplace-gallery-nav-next {
    right: 0.5rem;
}

.marketplace-gallery {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    padding: 0.25rem 0 0.5rem;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.marketplace-gallery::-webkit-scrollbar {
    display: none;
}

.marketplace-gallery-item {
    flex: 0 0 auto;
    width: min(280px, 70vw);
    aspect-ratio: 1 / 1;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    scroll-snap-align: start;
    display: block;
    position: relative;
    transition: transform 0.15s ease;
}

.marketplace-gallery-item:hover {
    transform: translateY(-2px);
}

.marketplace-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #e9ecef;
}

.marketplace-gallery-video-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
    color: #fff;
}

.marketplace-gallery-video-thumb i {
    font-size: 3rem;
}

.marketplace-gallery-empty {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 280px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #fff;
    border: 1px dashed #dee2e6;
    border-radius: 0.5rem;
    color: #adb5bd;
}

.marketplace-gallery-empty i {
    font-size: 2.5rem;
}

.marketplace-detail-tabs .nav-tabs {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.marketplace-detail-tabs .nav-link {
    font-weight: 500;
    color: #495057;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
}

.marketplace-detail-tabs .nav-link.active {
    color: var(--marketplace-primary);
    border-bottom-color: var(--marketplace-primary);
    background: transparent;
}

.marketplace-tab-content {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 1.5rem;
}

.marketplace-detail-carousel {
    background: #fff;
}

.marketplace-detail-sidebar {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.marketplace-description {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.marketplace-description ul {
    padding-left: 1.25rem;
}

.marketplace-meta-table th {
    width: 40%;
    font-weight: 500;
}

.marketplace-changelog-entry {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.marketplace-changelog-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.marketplace-changelog-entry:first-child {
    padding-top: 0;
}

.marketplace-changelog-notes p {
    margin-bottom: 0.5rem;
}

.marketplace-changelog-notes p:last-child {
    margin-bottom: 0;
}

.marketplace-changelog-notes ul,
.marketplace-changelog-notes ol {
    margin: 0.25rem 0 0.5rem;
    padding-left: 1.25rem;
}

.marketplace-changelog-notes ul:last-child,
.marketplace-changelog-notes ol:last-child {
    margin-bottom: 0;
}

.marketplace-changelog-notes li + li {
    margin-top: 0.2rem;
}

.marketplace-changelog-notes code {
    font-size: 0.875em;
    padding: 0.1em 0.35em;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 0.25rem;
}

.marketplace-status {
    min-height: 1.5rem;
}

.marketplace-footer {
    background: #fff;
}

.marketplace-footer-link {
    color: #6c757d;
    text-decoration: none;
}

.marketplace-footer-link:hover {
    color: #212529;
    text-decoration: underline;
}

.marketplace-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.marketplace-footer-sep {
    color: #adb5bd;
}

.marketplace-cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    padding: 1rem;
    background: rgba(33, 37, 41, 0.96);
    color: #f8f9fa;
    box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.15);
}

.marketplace-cookie-consent[hidden] {
    display: none !important;
}

.marketplace-cookie-consent-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.marketplace-cookie-consent-copy {
    flex: 1 1 16rem;
    max-width: 42rem;
}

.marketplace-cookie-consent-copy a {
    color: #fff;
    text-decoration: underline;
}

.marketplace-cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.marketplace-legal {
    max-width: 42rem;
}

.marketplace-legal h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.marketplace-legal h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.marketplace-legal p,
.marketplace-legal li {
    color: #495057;
    line-height: 1.6;
}

.marketplace-legal ul {
    padding-left: 1.25rem;
}

.marketplace-legal .marketplace-legal-updated {
    color: #6c757d;
    font-size: 0.875rem;
}

.marketplace-faq.marketplace-legal {
    max-width: 48rem;
}

.marketplace-faq .accordion {
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.marketplace-faq .accordion-header {
    margin: 0;
}

.marketplace-faq .accordion-button {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.marketplace-faq .accordion-body {
    color: #495057;
    line-height: 1.6;
}

.marketplace-faq .accordion-body p:last-child {
    margin-bottom: 0;
}

.marketplace-faq-cta-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

#view-detail {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    scroll-margin-top: 6rem;
}

.marketplace-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

.marketplace-detail-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.marketplace-detail-main {
    flex: 1 1 auto;
    min-width: 0;
}

.marketplace-detail-buybox {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    text-align: right;
}

.marketplace-detail-price {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

#view-detail:focus {
    outline: none;
}

@media (max-width: 767.98px) {
    .marketplace-search {
        max-width: 100%;
        order: 3;
        width: 100%;
    }

    .marketplace-header-nav {
        order: 2;
        margin-left: auto;
    }

    .marketplace-detail-header {
        padding: 1rem;
    }

    .marketplace-detail-header-row {
        flex-direction: column;
        gap: 1rem;
    }

    .marketplace-detail-buybox {
        align-items: stretch;
        text-align: left;
        width: 100%;
    }

    .marketplace-detail-price {
        font-size: 1.5rem;
    }

    .marketplace-detail-cta,
    .marketplace-detail-demo {
        width: 100%;
    }

    .marketplace-gallery-item {
        width: min(240px, 75vw);
    }
}

/* GLightbox: hide description bar (raw URLs) under slides */
.glightbox-container .gslide-description {
    display: none !important;
}

.glightbox-container .gslide-media {
    box-shadow: none;
}
