/* ==========================================================
   Storefront (/storefront): kartu item + switch "Dijual di event"
   ========================================================== */

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--store-card-min), 1fr));
    gap: var(--card-gap);
}

.store-card {
    display: flex;
    flex-direction: column;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
    transition: border-color var(--transition-fast);
}

.store-card:not(.is-off) {
    border-color: var(--color-primary-border);
}

.store-card.is-off .store-image,
.store-card.is-off .store-body {
    opacity: var(--opacity-disabled);
}

.store-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: var(--color-surface-alt);
}

.store-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-noimage {
    width: var(--store-icon-size);
    height: var(--store-icon-size);
    fill: none;
    stroke: var(--color-text-muted);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.store-type {
    position: absolute;
    top: var(--space-8);
    left: var(--space-8);
}

.store-body {
    flex: 1;
    padding: var(--space-12);
}

.store-name {
    font-weight: var(--font-bold);
}

.store-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-8);
    margin-top: var(--space-8);
    font-variant-numeric: tabular-nums;
}

.store-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    padding: var(--space-10) var(--space-12);
    border-top: var(--border-width) solid var(--color-border);
}

/* ---- switch ---- */

.switch {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
}

.switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-track {
    position: relative;
    flex-shrink: 0;
    width: var(--switch-width);
    height: var(--switch-height);
    border-radius: var(--radius-pill);
    background: var(--color-border-strong);
    transition: background var(--transition-fast);
}

.switch-track::after {
    content: "";
    position: absolute;
    top: var(--switch-gap);
    left: var(--switch-gap);
    width: calc(var(--switch-height) - 2 * var(--switch-gap));
    height: calc(var(--switch-height) - 2 * var(--switch-gap));
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.switch input:checked + .switch-track {
    background: var(--color-primary);
}

.switch input:checked + .switch-track::after {
    transform: translateX(calc(var(--switch-width) - var(--switch-height)));
}

.switch input:focus-visible + .switch-track {
    box-shadow: var(--shadow-focus);
}

.switch.is-locked {
    cursor: not-allowed;
    opacity: var(--opacity-disabled);
}
