/* ═══════════════════════════════════════════════════════════════════
   A1 Dry Cleaners — Items Step UI  (items-step.css)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Container reset ──────────────────────────────────────────────── */
#itemsContainer.is-active {
  margin: 0 -24px;
  padding: 0;
  overflow: visible;
}

/* Hide legacy summary + continue button when ItemsStep owns the panel */
.step-panel:has(.items-container.is-active) > .order-summary          { display: none !important; }
.step-panel:has(.items-container.is-active) > .step-nav > #toStep3   { display: none !important; }
.step-panel:has(.items-container.is-active) > h3                      { display: none !important; }
.step-panel:has(.items-container.is-active) > p.muted                 { display: none !important; }

/* Extra bottom padding on the items panel so fixed bar doesn't overlap */
@media (max-width: 1099px) {
  .step-panel[data-panel="2"] { padding-bottom: 72px; }
}

/* ── Root ─────────────────────────────────────────────────────────── */
.is-root {
  font-family: 'DM Sans', sans-serif;
  color: #111111;
}

/* ── Quick-add bar ────────────────────────────────────────────────── */
.is-quick-add {
  background: #F8F5F0;
  padding: 14px 20px 12px;
  border-bottom: 1px solid #E0DBD3;
}
.is-qa-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #111111;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.is-qa-bolt { font-size: 13px; }
.is-qa-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 899px) {
  .is-qa-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .is-qa-pills::-webkit-scrollbar { display: none; }
}
.is-qa-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #C4963A;
  color: #111111;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.is-qa-pill:hover  { background: #C4963A; color: #F8F5F0; }
.is-qa-pill.is-flash { background: #C4963A; color: #F8F5F0; transition: none; }
.is-qa-plus { font-size: 15px; font-weight: 300; opacity: 0.7; }
@media (max-width: 899px) {
  .is-qa-pill { font-size: 12px; padding: 7px 11px; }
}

/* ── Body layout ──────────────────────────────────────────────────── */
.is-body {
  display: flex;
  height: 540px;
  border-top: 1px solid #E0DBD3;
}
@media (max-width: 899px) {
  .is-body { height: auto; flex-direction: column; }
}

/* ── Sidebar ──────────────────────────────────────────────────────── */
.is-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid #E0DBD3;
  overflow-y: auto;
  background: #F4F1EC;
}
@media (max-width: 899px) { .is-sidebar { display: none; } }

.is-cat-list  { padding: 6px 0; }
.is-cat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px 11px 10px;
  cursor: pointer;
  color: #111111;
  border-left: 4px solid transparent;
  transition: background 0.1s;
  outline: none;
}
.is-cat-item:hover:not(.is-cat-active) { background: #F8F5F0; }
.is-cat-item.is-cat-active {
  background: #111111;
  color: #F8F5F0;
  border-left-color: #C4963A;
}
.is-cat-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #C4963A;
}
.is-cat-item.is-cat-active .is-cat-icon { color: #F8F5F0; }
.is-cat-name { flex: 1; font-size: 13px; font-weight: 500; }
.is-cat-count {
  font-size: 11px;
  color: #999;
  background: #EDE9E2;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 20px;
  text-align: center;
}
.is-cat-item.is-cat-active .is-cat-count { background: rgba(255,255,255,.15); color: rgba(255,255,255,.7); }

/* ── Centre pane ──────────────────────────────────────────────────── */
.is-centre {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
@media (max-width: 899px) {
  .is-centre { overflow: visible; }
}

/* ── Search bar (desktop only) ────────────────────────────────────── */
.is-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid #E0DBD3;
  background: #fff;
  flex-shrink: 0;
}
@media (max-width: 899px) { .is-search-bar { display: none; } }
.is-search-icon  { color: #aaa; flex-shrink: 0; }
.is-search-input {
  flex: 1;
  border: none; outline: none;
  font-size: 14px; color: #111111;
  font-family: inherit; background: transparent;
}
.is-search-input::placeholder { color: #bbb; }
.is-search-clear {
  background: none; border: none; color: #bbb;
  cursor: pointer; font-size: 18px; padding: 0 2px; line-height: 1;
}

/* ── Catalogue scroll area ────────────────────────────────────────── */
.is-catalogue {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 899px) {
  .is-catalogue { overflow: visible; }
}

/* ── Category section header ──────────────────────────────────────── */
.is-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px 10px;
  background: #F4F1EC;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #111111;
  border-bottom: 1px solid #E0DBD3;
  position: sticky;
  top: 0; z-index: 10;
}
@media (max-width: 899px) {
  .is-section-head {
    position: sticky;
    top: 0;
    font-size: 12px;
    padding: 10px 16px 8px;
  }
}
.is-section-icon { color: #C4963A; display: flex; align-items: center; }

/* ── Item row ─────────────────────────────────────────────────────── */
.is-item-row {
  display: flex;
  align-items: center;
  padding: 15px 22px;
  border-bottom: 1px solid #E0DBD3;
  border-left: 3px solid transparent;
  gap: 12px;
  transition: border-left-color 0.15s, background 0.1s;
}
.is-item-row.is-in-basket {
  border-left-color: #C4963A;
  background: #FDFAF6;
}
@media (max-width: 899px) { .is-item-row { padding: 12px 14px; } }

.is-item-info { flex: 1; min-width: 0; }
.is-item-name { font-size: 14px; font-weight: 500; color: #111111; line-height: 1.3; }
.is-item-desc { font-size: 12px; color: #6B6B6B; margin-top: 2px; line-height: 1.4; }

.is-item-right {
  display: flex; align-items: center;
  gap: 12px; flex-shrink: 0;
}
.is-item-price { font-size: 14px; font-weight: 600; color: #C4963A; white-space: nowrap; }
.is-unit        { font-size: 11px; font-weight: 400; color: #aaa; }

/* ── Qty controls ─────────────────────────────────────────────────── */
.is-qty-ctrl {
  display: flex; align-items: center;
  gap: 5px; min-width: 94px; justify-content: flex-end;
}
.is-add-btn {
  padding: 0 13px; height: 34px;
  border: 1px solid #C4963A; background: transparent;
  color: #C4963A; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.is-add-btn:hover { background: #C4963A; color: #F8F5F0; }
.is-qty-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid #E0DBD3; background: #fff;
  color: #111111; font-size: 18px; font-weight: 300;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1; transition: background 0.1s; flex-shrink: 0;
}
.is-qty-btn:hover { background: #EDE9E2; }
.is-qty-num { font-size: 15px; font-weight: 600; color: #111111; min-width: 18px; text-align: center; }

.is-no-results {
  padding: 40px 22px; text-align: center;
  color: #aaa; font-size: 14px; font-style: italic;
}

/* ── Basket pane (desktop ≥1100px) ───────────────────────────────── */
.is-basket-pane {
  width: 280px; flex-shrink: 0;
  border-left: 1px solid #E0DBD3;
  display: flex; flex-direction: column;
  background: #F4F1EC;
}
@media (max-width: 1099px) { .is-basket-pane { display: none; } }

.is-basket-head {
  padding: 16px 18px 12px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px; font-weight: 700; color: #111111;
  border-bottom: 1px solid #E0DBD3; flex-shrink: 0;
}
.is-basket-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.is-basket-empty {
  padding: 24px 18px; color: #aaa;
  font-size: 13px; font-style: italic; text-align: center;
}
.is-basket-row {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  padding: 9px 14px; border-bottom: 1px solid #EDE9E2; gap: 8px;
}
.is-basket-item-info { flex: 1; min-width: 0; }
.is-basket-item-name { font-size: 12px; font-weight: 500; color: #111111; line-height: 1.3; }
.is-basket-item-sub  { font-size: 11px; color: #aaa; margin-top: 2px; }
.is-basket-item-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 4px; flex-shrink: 0;
}
.is-basket-item-total { font-size: 12.5px; font-weight: 600; color: #111111; }
.is-basket-remove {
  background: none; border: none; color: #ccc;
  cursor: pointer; font-size: 15px; padding: 0; line-height: 1;
  transition: color 0.1s;
}
.is-basket-remove:hover { color: #E53935; }

.is-basket-foot {
  padding: 14px 16px;
  border-top: 1px solid #E0DBD3; flex-shrink: 0;
}
.is-bsub-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.is-bsub-row > span:first-child { font-size: 13px; color: #666; }
.is-bsub-val {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px; font-weight: 700; color: #111111;
}
.is-zone-note { font-size: 11px; color: #aaa; margin-bottom: 6px; }
.is-basket-min { font-size: 12px; margin-bottom: 10px; min-height: 16px; }
.is-min-ok   { color: #2E7D32; }
.is-min-warn { color: #E65100; }
.is-basket-continue {
  width: 100%; height: 46px;
  background: #111111; color: #F8F5F0;
  border: none; border-radius: 6px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: opacity 0.15s, background 0.15s;
}
.is-basket-continue:hover:not(:disabled) { background: #1C1C1C; }
.is-basket-continue:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── Mobile pill strip ────────────────────────────────────────────── */
.is-pill-strip { display: none; }
@media (max-width: 899px) {
  .is-pill-strip {
    display: flex;
    flex-direction: column;
    background: #F8F5F0;
    border-bottom: 1px solid #E0DBD3;
    padding: 10px 12px;
    gap: 8px;
  }
}

/* Desktop: horizontal scroll row (hidden on mobile) */
.is-pill-scroll {
  display: flex; gap: 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; flex: 1; padding-right: 4px;
}
.is-pill-scroll::-webkit-scrollbar { display: none; }

/* Mobile: 2-column grid — all categories visible at once */
@media (max-width: 899px) {
  .is-pill-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    overflow: visible;
    scroll-snap-type: none;
    flex: unset;
    padding-right: 0;
  }
}

.is-pill-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 20px;
  border: 1px solid #C4963A; background: #F8F5F0;
  color: #111111; font-size: 12px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  white-space: nowrap; scroll-snap-align: start; flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
}
.is-pill-item svg { flex-shrink: 0; }
.is-pill-item.is-pill-active { background: #111111; color: #F8F5F0; border-color: #111111; }
.is-pill-item.is-pill-active svg { color: #F8F5F0; }

/* Mobile pill: full-width within grid cell, left-aligned, pill shape */
@media (max-width: 899px) {
  .is-pill-item {
    width: 100%;
    border-radius: 8px;
    padding: 10px 12px;
    justify-content: flex-start;
    white-space: normal;
    flex-shrink: unset;
    scroll-snap-align: none;
    font-size: 13px;
  }
}

/* Search button — icon only on desktop, full-width labelled on mobile */
.is-pill-search-btn {
  flex-shrink: 0; width: 42px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #F8F5F0; border: none;
  border-left: 1px solid #E0DBD3; color: #111111; cursor: pointer;
}
.is-pill-search-label { display: none; }

@media (max-width: 899px) {
  .is-pill-search-btn {
    width: 100%; height: 40px;
    border-left: none;
    border: 1px solid #E0DBD3;
    border-radius: 8px;
    background: #fff;
    gap: 8px;
    font-size: 13px; font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: #666;
  }
  .is-pill-search-label { display: inline; }
}

/* ── Sticky bottom bar (tablet + mobile) ─────────────────────────── */
.is-bottom-bar { display: none; }
@media (max-width: 1099px) {
  .is-bottom-bar {
    display: flex; align-items: center; justify-content: center;
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 100; height: 60px;
    font-size: 14px; font-weight: 500; font-family: 'DM Sans', sans-serif;
    transition: background 0.2s, transform 0.15s;
    transform-origin: bottom center;
  }
}
.is-bar-empty {
  background: #F8F5F0; color: #aaa; border-top: 1px solid #E0DBD3;
}
.is-bar-warn {
  background: #FFF3E0; color: #E65100; border-top: 1px solid #FFCC80;
}
.is-bar-ready {
  background: #111111; color: #F8F5F0; cursor: pointer;
}

/* ── Bar content layout ───────────────────────────────────────────── */
.is-bar-text {
  display: flex; align-items: center; gap: 12px;
}
.is-bar-count {
  font-size: 14px; font-weight: 500;
  display: inline-block;
  animation: is-count-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.is-bar-cta {
  background: #C4963A;
  color: #111111;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1;
}

/* ── Fly-to-bar particle ──────────────────────────────────────────── */
.is-fly-particle {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #C4963A;
  pointer-events: none;
  z-index: 9999;
  will-change: transform, opacity;
  animation: is-fly 0.54s cubic-bezier(0.4, 0, 0.55, 1) forwards;
}

@keyframes is-fly {
  0%   { transform: translate(0, 0) scale(1);                                                         opacity: 1;   }
  28%  { transform: translate(calc(var(--tx) * 0.08), -68px) scale(1.5);                              opacity: 1;   }
  72%  { transform: translate(calc(var(--tx) * 0.72), calc(var(--ty) * 0.65)) scale(0.65);            opacity: 0.9; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.12);                                      opacity: 0;   }
}

/* ── Bar bump on particle arrival ────────────────────────────────── */
@keyframes is-bump {
  0%   { transform: scaleY(1);    }
  22%  { transform: scaleY(1.07); }
  55%  { transform: scaleY(0.96); }
  80%  { transform: scaleY(1.02); }
  100% { transform: scaleY(1);    }
}
.is-bar-bump {
  animation: is-bump 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}

/* ── Count text pop ───────────────────────────────────────────────── */
@keyframes is-count-pop {
  0%   { transform: scale(1);    }
  45%  { transform: scale(1.25); }
  100% { transform: scale(1);    }
}

/* ── Basket drawer overlay ────────────────────────────────────────── */
.is-drawer-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.is-drawer-overlay.is-open { opacity: 1; pointer-events: all; }

.is-drawer {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #fff; border-radius: 16px 16px 0 0;
  max-height: 82vh;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0, 0.15, 1);
}
.is-drawer-overlay.is-open .is-drawer { transform: translateY(0); }

.is-drawer-pull {
  width: 36px; height: 4px; border-radius: 2px;
  background: #E0DBD3; margin: 10px auto 0; flex-shrink: 0;
}
.is-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px 12px; border-bottom: 1px solid #E0DBD3; flex-shrink: 0;
}
.is-drawer-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px; font-weight: 700; color: #111111;
}
.is-drawer-close {
  background: none; border: none; font-size: 22px;
  color: #aaa; cursor: pointer; padding: 0; line-height: 1;
}
.is-drawer-list {
  flex: 1; overflow-y: auto; padding: 6px 0;
  -webkit-overflow-scrolling: touch;
}
.is-drawer-foot {
  padding: 14px 20px; border-top: 1px solid #E0DBD3; flex-shrink: 0;
}
.is-drawer-subtotal {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px; font-weight: 700; color: #111111;
}
.is-drawer-min { font-size: 12px; margin: 7px 0 12px; min-height: 16px; }
.is-drawer-actions {
  display: flex; gap: 10px;
}
.is-drawer-add-more {
  flex: 1; height: 50px;
  background: transparent; color: #111111;
  border: 1.5px solid #111111; border-radius: 8px;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.is-drawer-add-more:hover { background: #111111; color: #F8F5F0; }
.is-drawer-continue {
  flex: 1; height: 50px;
  background: #111111; color: #F8F5F0;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.is-drawer-continue:disabled { opacity: 0.38; cursor: not-allowed; }

/* ── Mobile search overlay ────────────────────────────────────────── */
.is-search-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: #fff;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32, 0, 0.15, 1);
}
.is-search-overlay.is-open { transform: translateY(0); }

.is-so-top {
  display: flex; align-items: center; gap: 12px;
  padding: max(env(safe-area-inset-top, 0px) + 14px, 18px) 16px 14px;
  border-bottom: 1px solid #E0DBD3; flex-shrink: 0;
}
.is-so-close {
  background: none; border: none; font-size: 24px;
  color: #666; cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
}
.is-so-input {
  flex: 1; border: none; outline: none;
  font-size: 16px; color: #111111;
  font-family: inherit; height: 44px;
}
.is-so-input::placeholder { color: #bbb; }

.is-so-results { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.is-so-hint, .is-so-noresults {
  padding: 40px 20px; text-align: center;
  color: #aaa; font-size: 14px;
}
.is-so-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid #E0DBD3; cursor: pointer;
}
.is-so-row:active { background: #F8F5F0; }
.is-so-cat-icon { color: #C4963A; flex-shrink: 0; width: 20px; }
.is-so-item-info { flex: 1; min-width: 0; }
.is-so-item-name { font-size: 14px; font-weight: 500; color: #111111; }
.is-so-item-cat  { font-size: 12px; color: #aaa; margin-top: 2px; }
.is-so-item-right {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 5px; flex-shrink: 0;
}
.is-so-item-price { font-size: 14px; font-weight: 600; color: #C4963A; }
.is-so-add {
  padding: 4px 11px; border-radius: 6px;
  border: 1px solid #C4963A; background: transparent;
  color: #C4963A; font-size: 12px; font-weight: 500;
  font-family: inherit; cursor: pointer;
}
.is-so-add.is-so-added { background: #C4963A; color: #F8F5F0; }
.is-so-add.is-flash     { background: #111111; color: #F8F5F0; transition: none; }

/* ── Admin: featured toggle ───────────────────────────────────────── */
.is-feat-toggle {
  position: relative; display: inline-block;
  width: 36px; height: 20px;
}
.is-feat-toggle input { opacity: 0; width: 0; height: 0; }
.is-feat-slider {
  position: absolute; cursor: pointer;
  inset: 0; background: #ccc;
  border-radius: 20px; transition: background 0.2s;
}
.is-feat-slider:before {
  content: '';
  position: absolute; height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: transform 0.2s;
}
.is-feat-toggle input:checked + .is-feat-slider { background: #C4963A; }
.is-feat-toggle input:checked + .is-feat-slider:before { transform: translateX(16px); }
