/* Artkins Shop Filters — server-rendered sidebar.
   v0.2.0 — dark-mode-aware. The artkins-dark-mode plugin is universally
   active on storefront pages and forces `main label` to light via
   !important. Hardcoding the dark palette here (the plugin never runs
   on a light-theme storefront) keeps the panel legible and on-brand.
*/

.artkins-shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 0 0 1.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 10px;
    background: #1a1a1a !important;
    color: #f0ece6 !important;
}

.artkins-shop-filter-group {
    position: relative;
    flex: 0 0 auto;
    min-width: 180px;
}

.artkins-shop-filter-group > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    background: #242424;
    font-size: 0.9rem;
    font-weight: 500;
    color: #f0ece6 !important;
    user-select: none;
    white-space: nowrap;
}
.artkins-shop-filter-group > summary::-webkit-details-marker { display: none; }
.artkins-shop-filter-group > summary::after {
    content: " ▾";
    font-size: 0.75rem;
    opacity: 0.7;
}
.artkins-shop-filter-group[open] > summary::after { content: " ▴"; }
.artkins-shop-filter-group[open] > summary {
    background: #c9a87c;
    color: #1a1a1a !important;
    border-color: #c9a87c;
}

.artkins-shop-filter-options {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 20;
    min-width: 260px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: #242424 !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.artkins-shop-filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.35rem;
    font-size: 0.95rem;
    color: #f0ece6 !important;
    cursor: pointer;
    border-radius: 4px;
}
/* Use hover: hover so mobile tap doesn't leave a stuck highlight. */
@media (hover: hover) {
    .artkins-shop-filter-option:hover { background: rgba(255,255,255,0.05); }
}
.artkins-shop-filter-option input[type="checkbox"] {
    flex-shrink: 0;
    accent-color: #c9a87c;
    width: 18px;
    height: 18px;
}
.artkins-shop-filter-option .artkins-filter-name {
    flex: 1;
    color: #f0ece6 !important;
}
.artkins-shop-filter-option .artkins-filter-count {
    font-size: 0.82rem;
    color: #9a9590 !important;
    font-variant-numeric: tabular-nums;
}

.artkins-shop-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}
.artkins-shop-filter-actions .button {
    padding: 0.45rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 999px;
    background: #c9a87c !important;
    color: #1a1a1a !important;
    border: 1px solid #c9a87c !important;
    cursor: pointer;
    font-weight: 600;
}
.artkins-shop-filter-actions .button:hover { filter: brightness(1.06); }
.artkins-shop-filter-clear {
    font-size: 0.85rem;
    color: #9a9590 !important;
    text-decoration: underline;
}
.artkins-shop-filter-clear:hover { color: #f0ece6 !important; }

/* Mobile — stack, widen disclosure panels */
@media (max-width: 781px) {
    .artkins-shop-filters {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    .artkins-shop-filter-group { min-width: 0; width: 100%; }
    .artkins-shop-filter-group > summary {
        width: 100%;
        text-align: left;
        display: block;
        padding: 0.55rem 0.9rem;
    }
    .artkins-shop-filter-options {
        position: static;
        box-shadow: none;
        border: 1px solid rgba(255,255,255,0.08);
        padding: 0.5rem 0.7rem 0.7rem;
        max-height: none;
        margin-top: 0.25rem;
    }
    .artkins-shop-filter-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        margin-top: 0.25rem;
    }
}
