/* ── Header icon links (chat / mail / notif / cart) — clean, gray, elegant ─ */
.ogm-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.ogm-icon-link:hover,
.ogm-icon-link:focus-visible {
    background: rgba(0,0,0,.06);
    color: #1f2937;
    outline: none;
}
[data-theme="dark"] .ogm-icon-link { color: #b4b9c2; }
[data-theme="dark"] .ogm-icon-link:hover { background: rgba(255,255,255,.08); color: #fff; }

.ogm-icon-link__svg {
    width: 20px; height: 20px;
    fill: currentColor;
    pointer-events: none;
    display: block;
}
.ogm-icon-link__badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    background: #e0242b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border-radius: 999px;
    box-shadow: 0 0 0 2px var(--ogm-bg-elev);
}

/* Hide the default <summary> marker on dropdowns built around .ogm-icon-link */
.ogm-header__notif > summary::-webkit-details-marker { display: none; }
.ogm-header__notif > summary { list-style: none; }
.ogm-header__notif > summary::marker { content: ''; }

/* ── Notifications dropdown popup ─────────────────────────────────────── */
.ogm-notif-pop {
    width: min(360px, 90vw);
    padding: 0;
    max-height: 70vh;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.ogm-notif-pop__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ogm-border);
}
.ogm-notif-pop__head strong { font-size: .95rem; }
.ogm-notif-pop__mark-all {
    background: transparent; border: 0; cursor: pointer;
    color: var(--ogm-accent); font-size: .82rem; font-weight: 600;
    padding: 4px 8px; border-radius: 6px;
}
.ogm-notif-pop__mark-all:hover { background: rgba(var(--ogm-accent-rgb),.08); }
.ogm-notif-pop__empty {
    padding: 24px; text-align: center; color: var(--ogm-text-muted);
    font-size: .9rem;
}
.ogm-notif-pop__list {
    list-style: none; padding: 0; margin: 0;
    overflow-y: auto; flex: 1;
}
.ogm-notif-pop__item { border-bottom: 1px solid var(--ogm-border); }
.ogm-notif-pop__item:last-child { border-bottom: 0; }
.ogm-notif-pop__item-link {
    display: flex; gap: 10px;
    padding: 10px 14px;
    text-decoration: none; color: var(--ogm-text);
    transition: background .12s ease;
}
.ogm-notif-pop__item-link:hover { background: var(--ogm-bg-soft); }
.ogm-notif-pop__item.is-unread .ogm-notif-pop__item-link { background: rgba(var(--ogm-accent-rgb),.05); }
.ogm-notif-pop__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ogm-accent);
    flex: none; margin-top: 6px;
}
.ogm-notif-pop__item-body { flex: 1; min-width: 0; }
.ogm-notif-pop__item-subj { font-weight: 600; font-size: .88rem; margin-bottom: 2px; }
.ogm-notif-pop__item-msg  { font-size: .8rem; color: var(--ogm-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ogm-notif-pop__item-when { font-size: .72rem; color: var(--ogm-text-muted); margin-top: 4px; }
.ogm-notif-pop__foot {
    padding: 10px 14px;
    border-top: 1px solid var(--ogm-border);
    text-align: center;
}
.ogm-notif-pop__foot a {
    color: var(--ogm-accent); text-decoration: none; font-weight: 600; font-size: .85rem;
}

/* ── Notifications full page ─────────────────────────────────────────── */
.ogm-notif-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ogm-notif-list__item {
    display: flex; gap: 12px;
    background: var(--ogm-bg-elev);
    border: 1px solid var(--ogm-border);
    border-radius: var(--ogm-radius);
    padding: 12px 14px;
    transition: border-color .15s ease;
}
.ogm-notif-list__item:hover { border-color: var(--ogm-border-strong); }
.ogm-notif-list__item.is-unread { border-left: 3px solid var(--ogm-accent); }
.ogm-notif-list__main { flex: 1; min-width: 0; color: var(--ogm-text); text-decoration: none; }
.ogm-notif-list__subj { font-weight: 700; font-size: 1rem; }
.ogm-notif-list__msg  { font-size: .9rem; color: var(--ogm-text-muted); margin-top: 4px; }
.ogm-notif-list__when { font-size: .8rem; color: var(--ogm-text-muted); margin-top: 6px; }
.ogm-notif-list__actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; font-size: .85rem; }

/* ── Sidebar filter panel (marketplace / future sections) ─────────────── */
.ogm-sidebar-filters {
    display: flex; flex-direction: column; gap: 14px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--ogm-border);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.ogm-sidebar-filters *, .ogm-sidebar-filters *::before, .ogm-sidebar-filters *::after { box-sizing: border-box; }
.ogm-sidebar-filters__head { display: flex; justify-content: space-between; align-items: baseline; }
.ogm-sidebar-filters__head h3 { margin: 0; font-size: .95rem; }
.ogm-sidebar-filters__reset { font-size: .78rem; color: var(--ogm-text-muted); text-decoration: none; }
.ogm-sidebar-filters__reset:hover { color: var(--ogm-accent); }

.ogm-sidebar-filters__group {
    border: 0; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 6px;
    min-width: 0; max-width: 100%;
}
.ogm-sidebar-filters__group legend {
    font-weight: 700; font-size: .85rem;
    margin: 0 0 6px; padding: 0;
    color: var(--ogm-text);
}

.ogm-sidebar-filters__pricerow {
    display: flex; align-items: center; gap: 4px;
    font-size: .85rem; color: var(--ogm-text-muted);
    min-width: 0; max-width: 100%;
    flex-wrap: nowrap;
}
.ogm-sidebar-filters__pricerow input[type="number"] {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--ogm-border);
    border-radius: var(--ogm-radius);
    font-size: .85rem;
    background: var(--ogm-bg-elev);
    color: var(--ogm-text);
    /* Strip the native number-input spinner so the field can shrink to 0 width */
    -moz-appearance: textfield;
    appearance: textfield;
}
.ogm-sidebar-filters__pricerow input[type="number"]::-webkit-outer-spin-button,
.ogm-sidebar-filters__pricerow input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.ogm-sidebar-filters__quick {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 6px;
    min-width: 0; max-width: 100%;
}
.ogm-sidebar-filters__quick a {
    font-size: .78rem; padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--ogm-border);
    background: var(--ogm-bg-elev);
    color: var(--ogm-text-muted);
    text-decoration: none;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
}
.ogm-sidebar-filters__quick a:hover { border-color: var(--ogm-accent); color: var(--ogm-accent); }

.ogm-sidebar-filters__check {
    display: flex; align-items: center; gap: 8px;
    font-size: .88rem;
    cursor: pointer;
}
.ogm-sidebar-filters__group input[type="text"] {
    padding: 6px 10px;
    border: 1px solid var(--ogm-border);
    border-radius: var(--ogm-radius);
    font-size: .85rem;
    background: var(--ogm-bg-elev);
    color: var(--ogm-text);
    width: 100%;
    min-width: 0;
}

/* Marketplace card cart-add / buy-now mini-forms — inline siblings of seller-strip / contact-bar buttons */
.ogm-listing-card__cart-form,
.ogm-listing-row__cart-form { margin: 0; display: inline-flex; flex: none; }
.ogm-listing-card__cart-form > button,
.ogm-listing-row__cart-form > button { white-space: nowrap; }

/* List-view CTA: large, touch-friendly buy/cart buttons (~2x default) */
.ogm-listing-row__cta-btn {
    padding: 12px 22px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
    border-radius: 999px;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .ogm-listing-row__cta-btn { padding: 10px 16px; font-size: .92rem; }
}

/* Header logo image (replaces text when uploaded in admin Settings) */
.ogm-header__logo { display: block; max-height: 48px; width: auto; }

/* ── Add-to-cart slide-in drawer ──────────────────────────────────────── */
.ogm-cart-drawer__backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    display: none;
    z-index: 9000;
}
.ogm-cart-drawer__backdrop.is-open { display: flex; justify-content: flex-end; }
.ogm-cart-drawer {
    width: min(420px, 92vw);
    height: 100vh;
    background: var(--ogm-bg-elev);
    box-shadow: -8px 0 32px rgba(0, 0, 0, .18);
    display: flex; flex-direction: column;
    animation: ogm-slide-in .2s ease-out;
}
@keyframes ogm-slide-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
.ogm-cart-drawer__head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ogm-border);
}
.ogm-cart-drawer__head h2 { margin: 0; font-size: 1.1rem; }
.ogm-cart-drawer__body {
    flex: 1; overflow-y: auto;
    padding: 12px 18px;
}
.ogm-cart-drawer__items { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ogm-cart-drawer__item {
    display: grid; grid-template-columns: 64px 1fr; gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ogm-border);
}
.ogm-cart-drawer__item:last-child { border-bottom: 0; }
.ogm-cart-drawer__thumb {
    width: 64px; height: 64px; object-fit: cover;
    border-radius: var(--ogm-radius);
    background: var(--ogm-bg-soft);
    display: block;
}
.ogm-cart-drawer__thumb--ph { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.ogm-cart-drawer__item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ogm-cart-drawer__item-title {
    font-weight: 700; color: var(--ogm-text); text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ogm-cart-drawer__item-title:hover { color: var(--ogm-accent); }
.ogm-cart-drawer__item-meta { font-size: .85rem; color: var(--ogm-text-muted); }
.ogm-cart-drawer__item-seller { font-size: .78rem; color: var(--ogm-text-muted); }
.ogm-cart-drawer__item-seller a { color: var(--ogm-text-muted); text-decoration: none; border-bottom: 1px dashed var(--ogm-border-strong); }
.ogm-cart-drawer__item-seller a:hover { color: var(--ogm-accent); border-bottom-color: var(--ogm-accent); }

.ogm-cart-drawer__foot {
    border-top: 1px solid var(--ogm-border);
    padding: 16px 20px;
    background: var(--ogm-bg-soft);
}
.ogm-cart-drawer__totals {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 1.05rem;
    margin-bottom: 12px;
}
.ogm-cart-drawer__totals strong { font-size: 1.3rem; color: var(--ogm-accent); }
.ogm-cart-drawer__actions { display: flex; gap: 8px; }
.ogm-cart-drawer__actions > * { flex: 1; }
