/* MiniHobby Browse by Category v1.0.0 */
.mhbc-section {
    --mhbc-bg: var(--sw-color-background, var(--wp--preset--color--background, #08070d));
    --mhbc-surface: var(--sw-color-surface, var(--wp--preset--color--surface, #111019));
    --mhbc-fg: var(--sw-color-foreground, var(--wp--preset--color--foreground, #f5f7fa));
    --mhbc-muted: var(--sw-color-muted, var(--wp--preset--color--muted, #9297aa));
    --mhbc-teal: var(--sw-color-teal, var(--wp--preset--color--brand-teal, #00c8ed));
    --mhbc-border: var(--sw-color-border, var(--wp--preset--color--border, #282634));
    width: 100%;
    box-sizing: border-box;
    background: var(--mhbc-bg);
    color: var(--mhbc-fg);
    padding: clamp(42px, 5vw, 72px) clamp(18px, 3vw, 42px);
    font-family: inherit;
}

.mhbc-section *,
.mhbc-section *::before,
.mhbc-section *::after { box-sizing: border-box; }

.mhbc-inner {
    width: min(100%, 1500px);
    margin-inline: auto;
}

.mhbc-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(26px, 3vw, 38px);
}

.mhbc-heading-group { min-width: 0; }

.mhbc-eyebrow {
    margin: 0 0 9px;
    color: var(--mhbc-teal);
    font-size: clamp(11px, .8vw, 14px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.mhbc-title {
    margin: 0;
    color: var(--mhbc-fg);
    font-size: clamp(30px, 2.6vw, 46px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.025em;
}

.mhbc-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    flex: 0 0 auto;
    border: 1px solid var(--mhbc-teal);
    border-radius: 8px;
    color: var(--mhbc-teal) !important;
    background: transparent;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .035em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.mhbc-view-all:hover,
.mhbc-view-all:focus-visible {
    background: var(--mhbc-teal);
    color: #061017 !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(0, 200, 237, .16);
}

.mhbc-grid {
    display: grid;
    grid-template-columns: repeat(var(--mhbc-columns, 6), minmax(0, 1fr));
    gap: clamp(13px, 1.2vw, 20px);
}

.mhbc-card {
    position: relative;
    display: block;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--mhbc-border);
    border-radius: 11px;
    background: var(--mhbc-surface);
    color: #fff !important;
    text-decoration: none !important;
    isolation: isolate;
    transform: translateZ(0);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.mhbc-media,
.mhbc-image,
.mhbc-shade {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.mhbc-image {
    object-fit: cover;
    object-position: center;
    transform: scale(1.001);
    transition: transform .38s cubic-bezier(.2,.7,.2,1), filter .3s ease;
}

.mhbc-placeholder {
    background:
        radial-gradient(circle at 70% 25%, rgba(0, 200, 237, .18), transparent 27%),
        linear-gradient(145deg, #171621, #08070d 72%);
}

.mhbc-shade {
    z-index: 1;
    background:
        linear-gradient(to top, rgba(4, 4, 10, .92) 0%, rgba(4, 4, 10, .48) 34%, rgba(4, 4, 10, .08) 68%, rgba(4,4,10,.03) 100%),
        linear-gradient(to right, rgba(4,4,10,.12), rgba(4,4,10,.04));
    transition: background-color .22s ease;
}

.mhbc-label {
    position: absolute;
    z-index: 2;
    left: 10px;
    right: 10px;
    bottom: clamp(11px, 1vw, 16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,.85);
    pointer-events: none;
}

.mhbc-name {
    color: #fff;
    font-size: clamp(10px, .78vw, 14px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.mhbc-count {
    margin-top: 4px;
    color: rgba(255,255,255,.62);
    font-size: clamp(9px, .64vw, 12px);
    font-weight: 500;
    line-height: 1.1;
}

.mhbc-card:hover,
.mhbc-card:focus-visible {
    border-color: color-mix(in srgb, var(--mhbc-teal) 80%, white 8%);
    transform: translateY(-3px);
    box-shadow: 0 15px 38px rgba(0,0,0,.28), 0 0 0 1px rgba(0,200,237,.08);
    outline: none;
}

.mhbc-card:hover .mhbc-image,
.mhbc-card:focus-visible .mhbc-image {
    transform: scale(1.055);
    filter: saturate(1.05) brightness(1.04);
}

.mhbc-card:focus-visible,
.mhbc-view-all:focus-visible {
    outline: 2px solid var(--mhbc-teal);
    outline-offset: 3px;
}

.mhbc-editor-message {
    padding: 18px 20px;
    border: 1px dashed #7b8493;
    background: #f7f8fa;
    color: #1e1e1e;
}

.editor-styles-wrapper .mhbc-section { margin-block: 0; }
.editor-styles-wrapper .mhbc-inner { max-width: 1500px; }

@media (max-width: 1180px) {
    .mhbc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .mhbc-section { padding-inline: 18px; }
    .mhbc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .mhbc-header { align-items: center; }
}

@media (max-width: 620px) {
    .mhbc-header { align-items: flex-start; }
    .mhbc-view-all { min-height: 40px; padding-inline: 14px; font-size: 11px; }
    .mhbc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .mhbc-card { border-radius: 9px; }
}

@media (max-width: 380px) {
    .mhbc-header { flex-direction: column; }
    .mhbc-view-all { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .mhbc-card,
    .mhbc-image,
    .mhbc-view-all { transition: none !important; }
}
