/* Tool showcase gallery â€?/qr/styles (standalone, no Vite build required) */

.tool-showcase-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tool-showcase-filter {
    border-radius: 9999px;
    border: 1px solid rgba(20, 18, 16, 0.1);
    background: #faf8f5;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b6560;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    cursor: pointer;
}

.tool-showcase-filter:hover {
    border-color: rgba(196, 92, 38, 0.25);
    color: #c45c26;
}

.tool-showcase-filter.is-active {
    border-color: rgba(196, 92, 38, 0.4);
    background: #f5ebe3;
    color: #c45c26;
}

.tool-showcase-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tool-showcase-section {
    border-radius: 1.5rem;
    border: 1px solid rgba(20, 18, 16, 0.08);
    background: #faf8f5;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(20, 18, 16, 0.04);
}

.tool-showcase-section--featured {
    border-color: rgba(196, 92, 38, 0.2);
    background: linear-gradient(135deg, rgba(196, 92, 38, 0.08) 0%, #faf8f5 45%, #faf8f5 100%);
    box-shadow: 0 0 0 1px rgba(196, 92, 38, 0.06), 0 8px 24px rgba(196, 92, 38, 0.08);
}

.tool-showcase-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-showcase-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #141210;
    line-height: 1.3;
}

.tool-showcase-desc {
    margin-top: 0.5rem;
    max-width: 42rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #6b6560;
}

.tool-showcase-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tool-showcase-scroll::-webkit-scrollbar {
    display: none;
}

.tool-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.tool-showcase-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgba(20, 18, 16, 0.1);
    background: #f0ece6;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    scroll-snap-align: start;
    display: block;
    text-decoration: none;
}

.tool-showcase-item:hover {
    transform: translateY(-2px);
    border-color: rgba(196, 92, 38, 0.25);
    box-shadow: 0 8px 20px rgba(20, 18, 16, 0.08);
}

.tool-showcase-item--scroll {
    min-width: 9.5rem;
    max-width: 11rem;
    flex-shrink: 0;
}

.tool-showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.tool-showcase-badge {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    z-index: 1;
    border-radius: 9999px;
    background: rgba(20, 18, 16, 0.7);
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #faf8f5;
    backdrop-filter: blur(4px);
}

.tool-showcase-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 18, 16, 0.8);
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.tool-showcase-lightbox[hidden] {
    display: none !important;
}

.tool-showcase-lightbox-dialog {
    position: relative;
    max-height: 90vh;
    max-width: 64rem;
}

.tool-showcase-lightbox-dialog img {
    max-height: 90vh;
    max-width: 100%;
    border-radius: 1rem;
    object-fit: contain;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.tool-showcase-lightbox-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 1;
    display: flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: none;
    background: rgba(250, 248, 245, 0.15);
    color: #faf8f5;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.tool-showcase-lightbox-close:hover {
    background: rgba(250, 248, 245, 0.25);
}

body.tool-showcase-lightbox-open {
    overflow: hidden;
}

.tool-showcase-empty {
    margin-top: 1rem;
}

.tool-showcase-nav-wrap[hidden] {
    display: none !important;
}

.tool-showcase-nav-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.tool-showcase-nav-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-radius: 1rem;
    border: 1px solid rgba(20, 18, 16, 0.08);
    background: #faf8f5;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tool-showcase-nav-card:hover {
    border-color: rgba(196, 92, 38, 0.25);
    box-shadow: 0 6px 16px rgba(20, 18, 16, 0.06);
    transform: translateY(-1px);
}

.tool-showcase-nav-card[hidden] {
    display: none !important;
}

.tool-showcase-nav-thumb {
    position: relative;
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid rgba(20, 18, 16, 0.08);
    background: #f0ece6;
}

.tool-showcase-nav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-showcase-nav-badge {
    position: absolute;
    left: 0.25rem;
    top: 0.25rem;
    z-index: 1;
    border-radius: 9999px;
    background: rgba(20, 18, 16, 0.72);
    padding: 0.0625rem 0.375rem;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #faf8f5;
}

.tool-showcase-nav-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.125rem;
}

.tool-showcase-nav-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: #141210;
}

.tool-showcase-nav-desc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #6b6560;
}

.tool-showcase-nav-arrow {
    flex-shrink: 0;
    font-size: 1rem;
    color: #9c9690;
    transition: color 0.2s, transform 0.2s;
}

.tool-showcase-nav-card:hover .tool-showcase-nav-arrow {
    color: #c45c26;
    transform: translateX(2px);
}

@media (min-width: 640px) {
    .tool-showcase-section {
        padding: 2rem;
    }

    .tool-showcase-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .tool-showcase-title {
        font-size: 1.5rem;
    }

    .tool-showcase-desc {
        font-size: 1rem;
    }

    .tool-showcase-item--scroll {
        min-width: 10.5rem;
    }
}

@media (min-width: 768px) {
    .tool-showcase-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tool-showcase-nav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .tool-showcase-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tool-showcase-nav-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .tool-showcase-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .tool-showcase-nav-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Compact QR preset gallery â€?/qr/styles */
.qr-preset-gallery-wrap--compact {
    margin-top: 0;
}

.qr-preset-gallery--compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
}

.qr-preset-gallery--compact .qr-preset-card {
    display: flex;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
    border-radius: 0.875rem;
    border: 1px solid rgba(20, 18, 16, 0.08);
    background: #faf8f5;
    padding: 0.5rem 0.75rem;
    text-align: left;
    text-decoration: none;
    color: inherit;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.qr-preset-gallery--compact .qr-preset-card::before {
    display: none;
}

.qr-preset-gallery--compact .qr-preset-card:hover {
    transform: translateY(-1px);
    border-color: rgba(196, 92, 38, 0.22);
    box-shadow: 0 4px 12px rgba(196, 92, 38, 0.1);
}

.qr-preset-gallery--compact .qr-preset-preview {
    display: flex;
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    background: rgba(237, 233, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(196, 92, 38, 0.1);
}

.qr-preset-gallery--compact .qr-preset-preview canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 2.75rem;
    max-height: 2.75rem;
}

.qr-preset-gallery--compact .qr-preset-name {
    margin-top: 0;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #141210;
}

@media (min-width: 640px) {
    .qr-preset-gallery--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .qr-preset-gallery--compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .qr-preset-gallery--compact {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
