/* Sogilex Products (redesign): the Shop page edited in place, panels for an item, a category, the title and the look. */
.shop-app { padding-bottom: 48px; }
#signin { max-width: 520px; margin: 24px auto 0; }

/* The bar: under Build's own header while you scroll */
.shop-bar { position: sticky; top: var(--hdr, 64px); z-index: 6; margin: 14px 0 0; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(26, 15, 34, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.shop-bar-in { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.shop-bar-h { font-family: var(--display); font-weight: 600; font-size: 16px; }
.shop-state { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
.shop-live { font-size: 13px; color: var(--mute); min-width: 0; overflow-wrap: anywhere; }
.shop-live a { color: var(--text); }
.shop-bar-actions { margin-left: auto; display: flex; gap: 8px; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn.danger { color: #FF9C9C; border-color: #6A3340; }
.shop-tip { margin: 12px 0 0; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; background: rgba(255, 154, 77, .1); border: 1px solid rgba(255, 154, 77, .35); }
.shop-tip[hidden] { display: none; }

/* The Shop page, as customers see it (the Worker's /shop page follows the same choices) */
.shop { --ac: #221A26; --on: #FFFFFF; --bg: #FBF8F2; --ink: #221A26; --mu: #5E4D63; --card: #FFFFFF; --sl: #E6DEE8; --ph: #EFE9F1;
  margin: 14px 0 0; border-radius: 16px; background: var(--bg); color: var(--ink); padding: 22px 18px 28px; font-family: var(--body); }
.shop.dark { --bg: #17121B; --ink: #F3EEF5; --mu: #B9ADC0; --card: #221B28; --sl: #3A2F42; --ph: #2C2433; }
.shop .editable { cursor: pointer; border-radius: 8px; outline: 1px dashed transparent; outline-offset: 4px; }
.shop .editable:hover, .shop .editable:focus-visible { outline-color: var(--ac); }
.s-title { margin: 0; font-weight: 700; font-size: clamp(26px, 6vw, 40px); line-height: 1.1; text-wrap: balance; }
.s-intro { margin: 6px 0 0; color: var(--mu); max-width: 40rem; }
.s-intro.s-intro-empty { font-style: italic; opacity: .75; }
.shop .tabs { display: flex; gap: 8px; overflow-x: auto; margin: 18px 0 4px; padding-bottom: 4px; scrollbar-width: none; }
.shop .tab { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--sl); background: var(--card); color: var(--ink); font: 600 14px var(--body); cursor: pointer; }
.shop .tab.add { border-style: dashed; color: var(--mu); background: transparent; }
.shop .cat { margin-top: 22px; scroll-margin-top: calc(var(--hdr, 64px) + 80px); }
.shop .cat-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.shop .cat-h h2 { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); font-family: var(--body); }
.shop .cat-h button { min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--sl); background: transparent; color: var(--mu); font: 12px var(--body); cursor: pointer; }
.shop .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; }
@media (min-width: 700px) { .shop .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; } }
.shop .card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--sl); border-radius: 14px; overflow: hidden;
  text-align: left; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.shop .card:hover, .shop .card:focus-visible { box-shadow: 0 0 0 2px var(--ac); outline: none; }
.shop .edit-chip { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 3px 9px; border-radius: 999px; background: rgba(18, 10, 24, .78); color: #fff; font-size: 12px; font-weight: 600; }
.shop .ph { width: 100%; aspect-ratio: var(--ratio, 1); background: var(--ph); display: grid; place-items: center; color: var(--mu); font-size: 13px; overflow: hidden; }
.shop .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop .card.sold .ph { opacity: .55; }
.shop .bd { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.shop .nm { font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.shop .pr { font-weight: 700; font-variant-numeric: tabular-nums; }
.shop .ds, .shop .op { font-size: 13px; color: var(--mu); overflow-wrap: anywhere; }
.shop .op b { color: var(--ink); font-weight: 600; }
.shop .buy { margin-top: 6px; align-self: flex-start; padding: 7px 16px; border-radius: 999px; background: var(--ac); color: var(--on); font-weight: 700; font-size: 14px; }
.shop .sold-l { margin-top: 6px; font-weight: 700; color: #C23A5C; font-size: 14px; }
.shop.dark .sold-l { color: #FF9CB5; }
.shop .add-card { border: 2px dashed var(--sl); border-radius: 14px; background: transparent; color: var(--mu); min-height: 160px; display: grid; place-items: center; font: 600 15px var(--body); cursor: pointer; }
.shop .add-card:hover:not(:disabled) { border-color: var(--ac); color: var(--ink); }
.shop .add-card:disabled { cursor: default; font-weight: 400; font-size: 13px; }
.shop.list .grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.shop.list .card { flex-direction: row; }
.shop.list .ph { width: 104px; flex: none; aspect-ratio: 1; }
.shop.list .add-card { min-height: 64px; }

/* Panels: from the bottom on phones, from the side on computers */
.sheet { position: fixed; inset: auto 0 0 0; z-index: 40; max-height: 88vh; overflow: auto; background: #1A1022; border-top: 1px solid var(--ctl);
  border-radius: 18px 18px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .5); color: var(--text);
  padding-block: 16px calc(18px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .sheet { inset: 0 0 0 auto; width: 440px; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--ctl); } }
.sheet-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(8, 4, 12, .55); }
.sheet[hidden], .sheet-scrim[hidden], .shop-toast[hidden] { display: none; }
.sheet h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 600; font-size: 20px; }
.sheet .sub { margin: 0 0 14px; color: var(--mute); font-size: 14px; }
.sheet .f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.sheet .f > label, .sheet .f > .lbl { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.sheet .in { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--ctl); background: #120A18; color: var(--text); font: 15px var(--body); }
.sheet textarea.in { min-height: 76px; resize: vertical; }
.sheet .in[aria-invalid="true"] { border-color: #FF9C9C; }
.sheet .hint { margin: 0; font: 13px/1.45 var(--body); letter-spacing: 0; text-transform: none; text-align: left; color: var(--mute); }
.sheet .hint.err { color: #FF9C9C; }
.sheet .row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sheet .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sheet .photos { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet .thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #2C2433; }
.sheet .thumb img { width: 100%; height: 100%; object-fit: cover; }
.sheet .thumb button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .72); color: #fff; cursor: pointer; }
.sheet .add-photo { width: 84px; height: 84px; border-radius: 10px; border: 2px dashed var(--ctl); display: grid; place-items: center; text-align: center; font-size: 13px; color: var(--mute); cursor: pointer; }
.sheet .add-photo:hover { border-color: var(--lime); color: var(--text); }
.sheet .add-photo.busy { cursor: progress; border-style: solid; }
.sheet .pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.sheet .pick-ph { aspect-ratio: 1; padding: 0; border: 1px solid var(--ctl); border-radius: 8px; overflow: hidden; background: #2C2433; cursor: pointer; }
.sheet .pick-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet .opt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 40px; gap: 8px; margin-bottom: 8px; }
.sheet .opt button { border-radius: 10px; border: 1px solid var(--ctl); background: transparent; color: var(--mute); cursor: pointer; }
.sheet .linkish { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--lime); font: 14px var(--body); text-decoration: underline; cursor: pointer; }
.sheet .check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 8px; cursor: pointer; }
.sheet .check input { width: 20px; height: 20px; accent-color: var(--lime); }
.sheet .actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 0 calc(6px + env(safe-area-inset-bottom, 0px)); background: #1A1022; }
.sheet .choices { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet .choice { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--ctl); background: transparent; color: var(--text); font: 14px var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.sheet .choice[aria-pressed="true"] { border-color: var(--lime); box-shadow: 0 0 0 2px rgba(255, 154, 77, .35); }
.sheet .choice.sw { width: 40px; padding: 0; }
.sheet .choice .dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.sheet .choice.any input { width: 24px; height: 24px; border: 0; padding: 0; background: none; cursor: pointer; }
.sheet .confirm { margin-top: 10px; padding: 12px; border-radius: 10px; border: 1px solid #6A3340; background: rgba(255, 143, 143, .08); }
.sheet .confirm p { margin: 0 0 10px; }
.shop-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 50; max-width: min(92vw, 520px);
  padding: 12px 16px; border-radius: 12px; background: #2A1D33; border: 1px solid var(--lime); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: no-preference) { .sheet:not([hidden]) { animation: sheet-in .18s ease-out; } @keyframes sheet-in { from { transform: translateY(12px); opacity: .6; } } }

/* "Shop page" / "On your website" switch, and the website preview */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--mute); font: 600 13px var(--body); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--lime); color: #1A0F22; }
.seg button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.site-view { margin: 14px 0 0; }
.site-view[hidden] { display: none; }
.site-note { margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(18, 10, 24, .6); font-size: 15px; }
.site-note a { color: var(--lime); }
.site-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.site-tools[hidden], .site-tools .seg[hidden] { display: none; }
.site-stage { margin: 10px 0 0; display: flex; justify-content: center; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 10px; }
#site-frame { display: block; width: 100%; height: min(78vh, 760px); border: 0; border-radius: 10px; background: #fff; }
#site-frame[hidden] { display: none; }
@media (max-width: 520px) { .shop-bar .seg { order: 3; width: 100%; } .shop-bar .seg button { flex: 1; } .site-stage { padding: 0; } }

/* Example items */
.shop .ex-chip { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 3px 8px; border-radius: 999px; background: #FF9A4D; color: #1A0F22; font: 700 11px var(--body); letter-spacing: .04em; text-transform: uppercase; }
.shop .ex-note { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--ac); background: color-mix(in srgb, var(--ac) 8%, transparent); }
.shop .ex-note p { margin: 0; flex: 1 1 260px; font-size: 14px; }
.shop .ex-rm { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sl); background: var(--card); color: var(--ink); font: 600 13px var(--body); cursor: pointer; }
.sheet .f[hidden] { display: none; }
