/* OpenSim Marketplace v2 - shop side (product page, side cart, filters, storefront)
   Colours follow Unos Glow on neverworldgrid.com: lavender accent, olive prices. */

:root {
    --osmb-s-ink: #2b2f3a;
    --osmb-s-muted: #6b7280;
    --osmb-s-line: #e4e7ee;
    --osmb-s-soft: #f4f5fd;
    --osmb-s-accent: #9ea9f3;      /* theme buttons */
    --osmb-s-accent-ink: #4b55b8;  /* readable lavender for text */
    --osmb-s-primary: #2f5bb7;     /* v2 primary (dashboard) */
    --osmb-s-primary-dark: #2a3f8f;
    --osmb-s-free: #6d7a12;
    --osmb-s-ok: #1f7a43;
}

/* ---------- Product page: badge + permissions row ---------- */
.osmb-product-badge-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 14px;
}

.osmb-product-badge.virtual-item {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--osmb-s-soft);
    color: var(--osmb-s-accent-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}

ul.osmb-perms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
ul.osmb-perms li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: var(--osmb-s-muted);
}
.osmb-perm__box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 2px solid #c7ccd8;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    color: #fff;
    background: #fff;
}
.osmb-perm.is-on { color: var(--osmb-s-ink); font-weight: 700; }
.osmb-perm.is-on .osmb-perm__box {
    background: var(--osmb-s-primary);
    border-color: var(--osmb-s-primary);
}
.osmb-perms__none { font-style: italic; }

/* Virtual Item Information box */
.osmb-product-meta {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid var(--osmb-s-line);
    border-radius: 10px;
    background: #fff;
}
.osmb-product-meta h4 { margin: 0 0 10px; font-size: 17px; }
.osmb-meta-item { display: flex; gap: 6px; margin: 2px 0; }
.osmb-meta-label { color: var(--osmb-s-muted); }
.osmb-meta-value a { color: var(--osmb-s-accent-ink); font-weight: 700; text-decoration: none; }
.osmb-meta-value a:hover { text-decoration: underline; }
.osmb-delivery-info { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--osmb-s-line); font-size: 14px; }
.osmb-delivery-info p { margin: 0 0 4px; }

.osmb-free-price { color: var(--osmb-s-free); font-weight: 700; }

/* ---------- Side cart ---------- */
/* WooCommerce's "View cart" link after adding: the side cart does that job */
body.osmb-has-sc a.added_to_cart.wc-forward { display: none !important; }
/* Unos Glow fly-cart: keep its icon (it opens ours), never show its panel */
body.osmb-has-sc #fly-cart .flycart-panel { visibility: hidden !important; }

html.osmb-sc-lock { overflow: hidden; }

.osmb-sc[hidden] { display: none !important; }
.osmb-sc {
    position: fixed;
    inset: 0;
    z-index: 100050; /* above the Getting Started panel and the theme header */
    font-family: inherit;
}
.osmb-sc__scrim {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 40, .45);
    opacity: 0;
    transition: opacity .25s;
}
.osmb-sc__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    background: #fff;
    box-shadow: -8px 0 30px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .25s ease;
    outline: none;
}
.osmb-sc.is-open .osmb-sc__scrim { opacity: 1; }
.osmb-sc.is-open .osmb-sc__panel { transform: none; }
body.admin-bar .osmb-sc__panel { top: 32px; }
@media (max-width: 782px) { body.admin-bar .osmb-sc__panel { top: 46px; } }

.osmb-sc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--osmb-s-line);
}
.osmb-sc__head h2 { margin: 0; font-size: 20px; line-height: 1.2; color: var(--osmb-s-ink); }
.osmb-sc-count { color: var(--osmb-s-muted); font-weight: 400; }
.osmb-sc__x {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: var(--osmb-s-soft);
    color: var(--osmb-s-ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.osmb-sc__x:hover { background: #e7e9fb; }

.osmb-sc__added {
    margin: 0;
    padding: 10px 20px;
    background: #eaf6ee;
    color: var(--osmb-s-ok);
    font-weight: 700;
    font-size: 14px;
}
.osmb-sc__added[hidden] { display: none; }

.osmb-sc__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.osmb-sc__items {
    list-style: none;
    margin: 0;
    padding: 8px 20px;
    overflow-y: auto;
    flex: 1;
}
.osmb-sc__item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--osmb-s-line);
    transition: opacity .2s;
}
.osmb-sc__item.is-removing { opacity: .35; }
.osmb-sc__thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.osmb-sc__info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.osmb-sc__name {
    color: var(--osmb-s-ink);
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.osmb-sc__name:hover { color: var(--osmb-s-accent-ink); }
.osmb-sc__store, .osmb-sc__qty { font-size: 13px; color: var(--osmb-s-muted); }
.osmb-sc__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.osmb-sc__price { font-weight: 700; white-space: nowrap; }
.osmb-sc__remove {
    border: 0;
    background: none;
    padding: 0;
    color: var(--osmb-s-muted);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}
.osmb-sc__remove:hover { color: #b4233c; }

.osmb-sc__foot {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--osmb-s-line);
    background: #fafbff;
}
.osmb-sc__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 18px;
}
.osmb-sc__btn {
    display: block;
    text-align: center;
    padding: 13px 18px;
    border-radius: 999px;
    background: var(--osmb-s-primary);
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
    font-size: 16px;
}
.osmb-sc__btn:hover { background: var(--osmb-s-primary-dark); }
.osmb-sc__btn--ghost {
    background: #fff;
    color: var(--osmb-s-primary) !important;
    border: 1px solid var(--osmb-s-primary);
}
.osmb-sc__btn--ghost:hover { background: var(--osmb-s-soft); }
.osmb-sc__note { margin: 8px 0 0; font-size: 13px; color: var(--osmb-s-muted); text-align: center; }
.osmb-sc__link {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--osmb-s-accent-ink);
}
.osmb-sc__avatar { padding: 36px 24px; text-align: center; }
.osmb-sc__avatar-icon {
    width: 64px; height: 64px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--osmb-s-soft); color: var(--osmb-s-primary); font-size: 32px;
}
.osmb-sc__avatar h3 { margin: 0 0 8px; font-size: 20px; color: var(--osmb-s-ink); }
.osmb-sc__avatar p { margin: 0 0 18px; color: var(--osmb-s-muted); }
.osmb-sc__empty { padding: 40px 20px; text-align: center; color: var(--osmb-s-muted); }
.osmb-sc__empty .osmb-sc__btn { display: inline-block; margin-top: 8px; }

/* ---------- Filters widget ---------- */
.osmb-filters__group {
    border: 0;
    margin: 0 0 16px;
    padding: 0;
    min-width: 0;
}
.osmb-filters__group legend,
.osmb-filters__group legend label {
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 6px;
    padding: 0;
    color: var(--osmb-s-ink);
}
.osmb-filters select { width: 100%; }
.osmb-filters__seg {
    display: inline-flex;
    border: 1px solid var(--osmb-s-line);
    border-radius: 999px;
    padding: 3px;
    background: #fff;
}
.osmb-filters__seg label,
.osmb-filters__chip { position: relative; margin: 0; cursor: pointer; }
.osmb-filters__seg input,
.osmb-filters__chip input { position: absolute; opacity: 0; pointer-events: none; }
.osmb-filters__seg span { display: block; padding: 4px 14px; border-radius: 999px; font-size: 14px; }
.osmb-filters__seg input:checked + span { background: var(--osmb-s-accent); color: #fff; font-weight: 700; }
.osmb-filters__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.osmb-filters__chip span {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid var(--osmb-s-line);
    border-radius: 999px;
    font-size: 13px;
    background: #fff;
}
.osmb-filters__chip input:checked + span {
    background: var(--osmb-s-soft);
    border-color: var(--osmb-s-accent);
    color: var(--osmb-s-accent-ink);
    font-weight: 700;
}
.osmb-filters__seg input:focus-visible + span,
.osmb-filters__chip input:focus-visible + span { outline: 2px solid var(--osmb-s-accent-ink); outline-offset: 2px; }
.osmb-filters__actions { display: flex; align-items: center; gap: 12px; }
.osmb-filters__clear { font-size: 14px; }
/* Changes apply instantly when JavaScript runs; the button is the no-JS fallback */
.js-osmb .osmb-filters__actions .button { display: none; }

/* ---------- Storefront toolbar + paging ---------- */
.osmb-store-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 20px;
}
.osmb-store-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.osmb-store-cats a {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--osmb-s-line);
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    color: var(--osmb-s-ink);
    background: #fff;
}
.osmb-store-cats a.is-on,
.osmb-store-cats a:hover { border-color: var(--osmb-s-accent); color: var(--osmb-s-accent-ink); background: var(--osmb-s-soft); }
.osmb-store-sort select { min-width: 180px; }
.osmb-store-paging {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 24px 0;
}
.osmb-store-paging a,
.osmb-store-paging span {
    min-width: 38px;
    padding: 6px 10px;
    border: 1px solid var(--osmb-s-line);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
}
.osmb-store-paging .current { background: var(--osmb-s-accent); border-color: var(--osmb-s-accent); color: #fff; font-weight: 700; }
