/* Console & storefront notifications */
:root {
  --notif-panel: #fffdfa;
  --notif-panel-alt: #faf6ef;
  --notif-line: #e5dccd;
  --notif-ink: #17140f;
  --notif-muted: #776e60;
  --notif-gold: #b8873a;
  --notif-gold-soft: #f3e4c8;
  --notif-good: #2f6b4f;
  --notif-warn: #9a6a1d;
  --notif-danger: #9b3a32;
  --notif-shadow: 0 24px 60px -28px rgba(23, 20, 15, .55);
}
html[data-theme="dark"] {
  --notif-panel: #16120e;
  --notif-panel-alt: #1d1812;
  --notif-line: #332a21;
  --notif-ink: #f4ede2;
  --notif-muted: #ada08d;
  --notif-gold: #d4a75a;
  --notif-gold-soft: #2a2116;
  --notif-good: #7fc39b;
  --notif-warn: #e0b36d;
  --notif-danger: #e08c83;
  --notif-shadow: 0 24px 60px -28px rgba(0, 0, 0, .8);
}
.notif-shell { position: relative; }
.notif-bell-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--notif-line); border-radius: 50%; background: var(--notif-panel); color: var(--notif-ink); cursor: pointer; transition: .2s; }
.notif-bell-btn:hover, .notif-bell-btn[aria-expanded="true"] { border-color: var(--notif-gold); color: var(--notif-gold); }
.notif-bell-btn > i { font-size: .86rem; }
.notif-bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 .25rem; border-radius: 999px; background: var(--notif-gold); color: #17140f; display: grid; place-items: center; font-size: .55rem; font-weight: 700; border: 2px solid var(--notif-panel); }
.notif-bell-count[hidden] { display: none; }
.notif-panel { position: absolute; right: 0; top: calc(100% + .65rem); z-index: 145; width: min(390px, calc(100vw - 2rem)); max-height: min(590px, calc(100vh - 110px)); display: flex; flex-direction: column; border: 1px solid var(--notif-line); border-radius: 16px; background: var(--notif-panel); color: var(--notif-ink); box-shadow: var(--notif-shadow); overflow: hidden; animation: notifIn .2s cubic-bezier(.22,1,.36,1); }
.notif-panel[hidden] { display: none !important; }
.notif-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; padding: .85rem .95rem .7rem; background: var(--notif-panel-alt); border-bottom: 1px solid var(--notif-line); }
.notif-panel__kicker { display: inline-flex; align-items: center; gap: .35rem; color: var(--notif-gold); font-size: .5rem; letter-spacing: .17em; text-transform: uppercase; }
.notif-panel__head h3 { margin: .15rem 0 0; font-family: var(--font-display, 'Cormorant Garamond', serif); font-size: 1.55rem; font-weight: 400; line-height: 1; }
.notif-panel__close { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--notif-line); border-radius: 8px; background: var(--notif-panel); color: var(--notif-muted); cursor: pointer; }
.notif-panel__close:hover { color: var(--notif-ink); border-color: var(--notif-gold); }
.notif-panel__toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .8rem; border-bottom: 1px solid var(--notif-line); }
.notif-panel__summary { color: var(--notif-muted); font-size: .62rem; letter-spacing: .02em; }
.notif-text-btn { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: transparent; color: var(--notif-gold); font: inherit; font-size: .62rem; cursor: pointer; padding: .2rem .1rem; }
.notif-text-btn:hover { color: var(--notif-ink); }
.notif-text-btn:disabled { opacity: .4; cursor: default; }
.notif-list { overflow-y: auto; display: grid; }
.notif-item { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .85rem; border-bottom: 1px solid var(--notif-line); position: relative; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.is-unread { background: color-mix(in srgb, var(--notif-gold-soft) 48%, var(--notif-panel)); }
.notif-item__icon { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 9px; background: var(--notif-gold-soft); color: var(--notif-gold); font-size: .7rem; }
.notif-item--success .notif-item__icon { background: color-mix(in srgb, var(--notif-good) 14%, var(--notif-panel)); color: var(--notif-good); }
.notif-item--warning .notif-item__icon { background: color-mix(in srgb, var(--notif-warn) 16%, var(--notif-panel)); color: var(--notif-warn); }
.notif-item--danger .notif-item__icon { background: color-mix(in srgb, var(--notif-danger) 14%, var(--notif-panel)); color: var(--notif-danger); }
.notif-item__body { min-width: 0; flex: 1; }
.notif-item__title { display: flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 600; line-height: 1.35; }
.notif-item__title a { color: var(--notif-ink); text-decoration: none; }
.notif-item__title a:hover { color: var(--notif-gold); }
.notif-item__body p { margin: .18rem 0 .25rem; color: var(--notif-muted); font-size: .65rem; line-height: 1.45; }
.notif-item__body small { display: block; color: var(--notif-muted); font-size: .55rem; }
.notif-level { color: var(--notif-gold); }
.notif-unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--notif-gold); flex: none; }
.notif-item__actions { display: flex; gap: .15rem; opacity: 0; transition: .15s; }
.notif-item:hover .notif-item__actions, .notif-item:focus-within .notif-item__actions { opacity: 1; }
.notif-item__actions button { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--notif-muted); cursor: pointer; font-size: .56rem; }
.notif-item__actions button:hover { border-color: var(--notif-line); color: var(--notif-ink); background: var(--notif-panel); }
.notif-item.is-removing { opacity: 0; transform: translateX(8px); transition: .2s; }
.notif-empty { padding: 2.2rem 1.2rem; text-align: center; color: var(--notif-muted); }
.notif-empty > span { width: 48px; height: 48px; margin: 0 auto .6rem; display: grid; place-items: center; border-radius: 50%; background: var(--notif-gold-soft); color: var(--notif-gold); font-size: 1.15rem; }
.notif-empty h4 { margin: 0 0 .2rem; font-family: var(--font-display, 'Cormorant Garamond', serif); font-size: 1.25rem; font-weight: 400; color: var(--notif-ink); }
.notif-empty p { margin: 0; font-size: .66rem; }
.notif-panel__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .8rem; border-top: 1px solid var(--notif-line); background: var(--notif-panel-alt); color: var(--notif-muted); font-size: .55rem; }
.notif-panel__foot span { display: inline-flex; align-items: center; gap: .3rem; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .notif-panel { position: fixed; right: 1rem; top: 76px; max-height: calc(100vh - 92px); } }

/* RTL: anchor the panel to its inline-start so it grows into the page */
html[dir="rtl"] .notif-panel { right: auto; left: 0; }
html[dir="rtl"] .notif-bell-count { right: auto; left: -4px; }
@media (max-width: 640px) {
  html[dir="rtl"] .notif-panel { position: fixed; right: auto; left: 1rem; }
}
