/* ════════════════════════════════════════════
   LULU — E-commerce shop
════════════════════════════════════════════ */
#biz.lulu-biz--shop {
  --lish-green: #1e4a3d;
  --lish-green-hover: #16352b;
  --lish-gold: #c9a36a;
  --lish-ink: #1a1a1a;
  --lish-muted: #6b7280;
  --lish-line: #e5e7eb;
  --lish-bg: #f3f4f6;
  --lish-card: #ffffff;
  --lish-sale: #dc2626;

  background: var(--lish-bg);
  color: var(--lish-ink);
  font-family: 'Mulish', 'Inter', system-ui, sans-serif;
  overflow: hidden;
  padding-top: 0;
  display: flex;
  flex-direction: column;
}

#biz.lulu-biz--shop .lish-store {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--lish-bg);
}

/* Top bar */
#biz.lulu-biz--shop .lish-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top, 10px)) 16px 10px;
  background: var(--lish-card);
  border-bottom: 1px solid var(--lish-line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  z-index: 10;
}

#biz.lulu-biz--shop .lish-topbar-back {
  width: 40px;
  height: 40px;
  border: 1px solid var(--lish-line);
  border-radius: 10px;
  background: #fff;
  color: var(--lish-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

#biz.lulu-biz--shop .lish-topbar-back svg { width: 20px; height: 20px; }

#biz.lulu-biz--shop .lish-topbar-spacer {
  width: 40px;
  flex-shrink: 0;
}

#biz.lulu-biz--shop .lish-topbar-brand {
  flex: 1;
  min-width: 0;
}

#biz.lulu-biz--shop .lish-topbar-logo {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--lish-green);
  line-height: 1.1;
}

#biz.lulu-biz--shop .lish-topbar-sub {
  display: block;
  font-size: 11px;
  color: var(--lish-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#biz.lulu-biz--shop .lish-topbar-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--lish-line);
  border-radius: 10px;
  background: #fff;
  color: var(--lish-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

#biz.lulu-biz--shop .lish-topbar-cart svg { width: 22px; height: 22px; color: var(--lish-green); }

#biz.lulu-biz--shop .lish-cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--lish-sale);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

#biz.lulu-biz--shop .lish-cart-total {
  color: var(--lish-green);
}

@media (max-width: 400px) {
  #biz.lulu-biz--shop .lish-cart-total { display: none; }
}

/* Toolbar */
#biz.lulu-biz--shop .lish-toolbar {
  flex-shrink: 0;
  background: var(--lish-card);
  border-bottom: 1px solid var(--lish-line);
  padding: 12px 16px;
}

#biz.lulu-biz--shop .lish-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 44px;
  border: 1px solid var(--lish-line);
  border-radius: 10px;
  background: var(--lish-bg);
  margin-bottom: 12px;
}

#biz.lulu-biz--shop .lish-search-box svg {
  width: 18px;
  height: 18px;
  color: var(--lish-muted);
  flex-shrink: 0;
}

#biz.lulu-biz--shop .lish-search-inp {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  color: var(--lish-ink);
  outline: none;
}

#biz.lulu-biz--shop .lish-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

#biz.lulu-biz--shop .lish-cats::-webkit-scrollbar { display: none; }

#biz.lulu-biz--shop .lish-cat {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 1px solid var(--lish-line);
  border-radius: 8px;
  background: #fff;
  color: var(--lish-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

#biz.lulu-biz--shop .lish-cat--on {
  background: var(--lish-green);
  border-color: var(--lish-green);
  color: #fff;
}

#biz.lulu-biz--shop .lish-cat:hover:not(.lish-cat--on) {
  border-color: var(--lish-green);
  color: var(--lish-green);
}

/* Catalog */
#biz.lulu-biz--shop .lish-catalog {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

#biz.lulu-biz--shop .lish-catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

#biz.lulu-biz--shop .lish-catalog-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: var(--lish-ink);
}

#biz.lulu-biz--shop .lish-catalog-count {
  font-size: 13px;
  color: var(--lish-muted);
  font-weight: 500;
}

#biz.lulu-biz--shop .lish-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--lish-muted);
  font-size: 14px;
  background: var(--lish-card);
  border-radius: 12px;
  border: 1px dashed var(--lish-line);
}

/* Product grid */
#biz.lulu-biz--shop .lish-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 540px) {
  #biz.lulu-biz--shop .lish-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 900px) {
  #biz.lulu-biz--shop .lish-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

#biz.lulu-biz--shop .lish-prod {
  background: var(--lish-card);
  border: 1px solid var(--lish-line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

#biz.lulu-biz--shop .lish-prod:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

#biz.lulu-biz--shop .lish-prod-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
}

#biz.lulu-biz--shop .lish-prod-img {
  position: relative;
  aspect-ratio: 1;
  background: var(--tint, #f4f6f5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#biz.lulu-biz--shop .lish-prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#biz.lulu-biz--shop .lish-img-letter {
  font-size: 32px;
  font-weight: 800;
  color: var(--lish-green);
  opacity: 0.25;
}

#biz.lulu-biz--shop .lish-prod-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

#biz.lulu-biz--shop .lish-prod-badge--sale { background: var(--lish-sale); color: #fff; }
#biz.lulu-biz--shop .lish-prod-badge--pop { background: var(--lish-gold); color: #2a2008; }
#biz.lulu-biz--shop .lish-prod-badge--due { background: var(--lish-green); color: #fff; }

#biz.lulu-biz--shop .lish-prod-body {
  padding: 10px 12px 8px;
  flex: 1;
}

#biz.lulu-biz--shop .lish-prod-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 4px;
  color: var(--lish-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

#biz.lulu-biz--shop .lish-prod-aisle {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--lish-muted);
  margin: 0 0 6px;
}

#biz.lulu-biz--shop .lish-prod-aisle svg { width: 12px; height: 12px; flex-shrink: 0; }

#biz.lulu-biz--shop .lish-prod-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

#biz.lulu-biz--shop .lish-prod-was {
  font-size: 12px;
  color: var(--lish-muted);
  text-decoration: line-through;
}

#biz.lulu-biz--shop .lish-prod-now {
  font-size: 15px;
  font-weight: 800;
  color: var(--lish-green);
}

#biz.lulu-biz--shop .lish-prod-add {
  margin: 0 10px 10px;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--lish-green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

#biz.lulu-biz--shop .lish-prod-add:hover { background: var(--lish-green-hover); }
#biz.lulu-biz--shop .lish-prod-add:active { transform: scale(0.98); }

/* Sheets */
#biz.lulu-biz--shop .lish-sheet-backdrop,
#biz.lulu-biz--shop .lish-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
}

#biz.lulu-biz--shop .lish-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  z-index: 310;
  max-height: 90vh;
  background: var(--lish-card);
  border-radius: 16px 16px 0 0;
  color: var(--lish-ink);
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 16px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

#biz.lulu-biz--shop .lish-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--lish-line);
  border-radius: 2px;
  margin: 10px auto 0;
}

#biz.lulu-biz--shop .lish-sheet-body { padding: 16px 20px 24px; }

#biz.lulu-biz--shop .lish-sheet-img {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--tint, #f4f6f5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid var(--lish-line);
}

#biz.lulu-biz--shop .lish-sheet-img img { width: 100%; height: 100%; object-fit: cover; }

#biz.lulu-biz--shop .lish-sheet-img .lish-img-letter {
  font-size: 56px;
  font-weight: 800;
  color: var(--lish-green);
  opacity: 0.2;
}

#biz.lulu-biz--shop .lish-sheet-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lish-muted);
  margin: 0 0 4px;
}

#biz.lulu-biz--shop .lish-sheet-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

#biz.lulu-biz--shop .lish-sheet-price {
  margin-bottom: 8px;
}

#biz.lulu-biz--shop .lish-was {
  font-size: 14px;
  text-decoration: line-through;
  color: var(--lish-muted);
  margin-right: 8px;
}

#biz.lulu-biz--shop .lish-sheet-now {
  font-size: 24px;
  font-weight: 800;
  color: var(--lish-green);
}

#biz.lulu-biz--shop .lish-sheet-aisle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--lish-muted);
  margin-bottom: 12px;
}

#biz.lulu-biz--shop .lish-sheet-aisle svg { width: 14px; height: 14px; }

#biz.lulu-biz--shop .lish-sheet-desc {
  font-size: 13px;
  color: var(--lish-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

#biz.lulu-biz--shop .lish-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
  font-weight: 600;
  font-size: 14px;
}

#biz.lulu-biz--shop .lish-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 14px;
}

#biz.lulu-biz--shop .lish-qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--lish-line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#biz.lulu-biz--shop .lish-qty-btn svg { width: 16px; height: 16px; }

#biz.lulu-biz--shop .lish-btn {
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
}

#biz.lulu-biz--shop .lish-btn--primary {
  background: var(--lish-green);
  color: #fff;
}

#biz.lulu-biz--shop .lish-btn--primary:hover { background: var(--lish-green-hover); }
#biz.lulu-biz--shop .lish-btn--full { width: 100%; }

/* Cart drawer */
#biz.lulu-biz--shop .lish-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100%, 400px);
  z-index: 320;
  transform: translateX(100%);
  transition: transform 0.28s ease;
}

#biz.lulu-biz--shop .lish-drawer:not([hidden]) {
  transform: translateX(0);
  background: var(--lish-card);
  color: var(--lish-ink);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

#biz.lulu-biz--shop .lish-drawer[hidden] { display: none; }

#biz.lulu-biz--shop .lish-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top, 16px)) 16px 12px;
  border-bottom: 1px solid var(--lish-line);
}

#biz.lulu-biz--shop .lish-drawer-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

#biz.lulu-biz--shop .lish-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

#biz.lulu-biz--shop .lish-icon-btn:hover { background: var(--lish-bg); }
#biz.lulu-biz--shop .lish-icon-btn svg { width: 20px; height: 20px; }

#biz.lulu-biz--shop .lish-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

#biz.lulu-biz--shop .lish-cart-empty {
  text-align: center;
  color: var(--lish-muted);
  padding: 48px 16px;
  font-size: 14px;
}

#biz.lulu-biz--shop .lish-cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--lish-line);
}

#biz.lulu-biz--shop .lish-cart-line-name { font-weight: 600; font-size: 14px; }
#biz.lulu-biz--shop .lish-cart-line-meta { font-size: 12px; color: var(--lish-muted); margin-top: 2px; }

#biz.lulu-biz--shop .lish-cart-line-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

#biz.lulu-biz--shop .lish-cart-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.4;
  padding: 4px;
}

#biz.lulu-biz--shop .lish-cart-remove:hover { opacity: 1; }

#biz.lulu-biz--shop .lish-drawer-foot {
  padding: 16px;
  border-top: 1px solid var(--lish-line);
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

#biz.lulu-biz--shop .lish-cart-sub {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 16px;
}

/* Checkout */
#biz.lulu-biz--shop .lish-checkout-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
}

#biz.lulu-biz--shop .lish-checkout-sub {
  color: var(--lish-muted);
  margin: 0 0 20px;
  font-size: 14px;
}

#biz.lulu-biz--shop .lish-checkout-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px;
  margin-bottom: 10px;
  border: 2px solid var(--lish-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
}

#biz.lulu-biz--shop .lish-checkout-opt:hover { border-color: var(--lish-green); }

#biz.lulu-biz--shop .lish-checkout-opt-title {
  display: block;
  font-weight: 700;
  font-size: 15px;
}

#biz.lulu-biz--shop .lish-checkout-opt-sub {
  display: block;
  font-size: 13px;
  color: var(--lish-muted);
  margin-top: 4px;
}

#biz.lulu-biz--shop .lish-pickup-ok {
  text-align: center;
  padding: 20px 0;
}

#biz.lulu-biz--shop .lish-pickup-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lish-green);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

#biz.lulu-biz--shop .lish-pickup-total {
  font-weight: 700;
  margin: 12px 0 20px;
  color: var(--lish-muted);
}

/* Toast */
#biz.lulu-biz--shop .lish-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  transform: translateX(-50%) translateY(60px);
  background: var(--lish-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1);
  pointer-events: none;
  z-index: 400;
  white-space: nowrap;
}

#biz.lulu-biz--shop .lish-toast.lish-show { transform: translateX(-50%) translateY(0); }

/* Scanner FAB — shop grid (class toggled by product-scanner.js) */
#ps-fab.ps-fab--lulu.ps-fab--shop {
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  z-index: 400;
  background: #1e4a3d !important;
  background-image: linear-gradient(145deg, #1e4a3d 0%, #16352b 100%) !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(30, 74, 61, 0.4);
}

#ps-fab.ps-fab--lulu.ps-fab--shop .ps-icon-frame {
  stroke: #fff;
  stroke-width: 2.2;
}

#ps-fab.ps-fab--lulu.ps-fab--shop .ps-icon-fill {
  fill: #fff;
}
