/* Cart UI used by every page: the shop pages and the landing-style product page.
   Every class starts with pc- and sets its own font, colours and spacing,
   so it looks the same whatever CSS the page around it has. */
:root {
  --pc-ink: #1A2229;
  --pc-ink-soft: #3F4A52;
  --pc-ink-mute: #7A8088;
  --pc-line: #E2D9CB;
  --pc-cta: #1F4D2B;
  --pc-cta-hover: #296B3A;
  --pc-cta-tint: #F1F7F2;
  --pc-teal: #0F4C5C;
  --pc-teal-50: #E8F0F2;
  --pc-gold: #C8A66B;
  --pc-gold-tint: #FBF5EA;
  --pc-success: #2E7D4F;
}

body.no-scroll { overflow: hidden; }
.pc-count[hidden] { display: none; }
/* The drawer and toast sit outside the page; inside a Shopify theme its heading presets would style their headings.
   revert gives them the browser defaults, and the pc- rules below set the rest. */
:where(.pc-root) :is(h1, h2, h3, h4, h5, h6) { font-family: revert; font-style: revert; font-weight: revert; font-size: revert; line-height: revert; letter-spacing: revert; text-transform: revert; color: revert; }

.pc-test-bar { background: #FFF4E5; color: #9C5C00; font: 700 13px/1.5 'Tajawal', system-ui, sans-serif; text-align: center; padding: 6px 12px; }
/* On landing-style pages the test marker is a thin line, so it does not push the page down. */
.pc-test-line { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: #E8A03C; z-index: 300; pointer-events: none; }

/* cart button + count badge (used in any header) */
.pc-cart-btn {
  position: relative; width: 42px; height: 42px; display: inline-grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--pc-ink); cursor: pointer;
}
.pc-cart-btn:hover { background: var(--pc-teal-50); }
.pc-count {
  position: absolute; top: 2px; left: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--pc-cta); color: #fff; font: 800 11px/19px 'Tajawal', system-ui, sans-serif; text-align: center;
}

/* drawer */
.pc-overlay { position: fixed; inset: 0; z-index: 190; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.pc-overlay.open { opacity: 1; pointer-events: auto; }
.pc-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 200; width: min(430px, 92vw); margin: 0; padding: 0;
  display: flex; flex-direction: column; background: #fff; box-shadow: 8px 0 30px rgba(0, 0, 0, .15);
  transform: translateX(-105%); transition: transform .25s ease;
  font-family: 'Tajawal', system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.6; color: var(--pc-ink); direction: rtl; text-align: right;
}
.pc-drawer.open { transform: none; }
.pc-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--pc-line); font-size: 18px; }
.pc-drawer-body { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.pc-drawer-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--pc-line); background: #fff; }
.pc-empty { text-align: center; padding: 48px 0; color: var(--pc-ink-mute); }
.pc-empty p { margin: 0 0 14px; }
.pc-icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--pc-ink-mute); font-size: 15px; cursor: pointer;
}
.pc-icon-btn:hover { background: var(--pc-teal-50); }

/* buttons inside the cart UI */
.pc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0;
  padding: 13px 18px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; text-decoration: none;
  font: 800 16px/1.3 'Tajawal', system-ui, sans-serif; transition: background .15s;
}
.pc-btn-primary { background: var(--pc-cta); color: #fff; }
.pc-btn-primary:hover { background: var(--pc-cta-hover); }
.pc-btn-outline { background: #fff; color: var(--pc-cta); border-color: var(--pc-cta); }
.pc-btn-outline:hover { background: var(--pc-cta-tint); }
.pc-btn-link { background: none; color: var(--pc-teal); padding: 8px; font-weight: 700; }
.pc-btn-block { width: 100%; }
.pc-btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }

/* bundle chips (product cards + cart lines) */
.pc-chips { display: flex; gap: 8px; }
.pc-chip {
  flex: 1; min-width: 0; display: grid; gap: 1px; margin: 0; padding: 8px 4px; cursor: pointer;
  border: 1.5px solid var(--pc-line); border-radius: 12px; background: #fff; color: var(--pc-ink);
  font: 800 14px/1.4 'Tajawal', system-ui, sans-serif; text-align: center;
}
.pc-chip small { font-size: 12px; font-weight: 600; color: var(--pc-ink-mute); }
.pc-chip.active { border-color: var(--pc-cta); background: var(--pc-cta-tint); color: var(--pc-cta); }
.pc-chip.active small { color: var(--pc-cta); }

/* cart lines (drawer + checkout) */
.pc-line { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--pc-line); }
.pc-line img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; border: 1px solid var(--pc-line); }
.pc-line-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.pc-line-name { text-decoration: none; font-size: 14px; color: var(--pc-ink-soft); }
.pc-line-name strong { color: var(--pc-teal); }
.pc-line .pc-chips { gap: 6px; }
.pc-line .pc-chip { padding: 6px 2px; font-size: 13px; }
.pc-line .pc-chip small { font-size: 11px; }
.pc-line-price { margin-top: 8px; font-weight: 900; font-size: 17px; }
.pc-line-price small { font-weight: 600; font-size: 12px; color: var(--pc-ink-mute); }
.pc-nudge {
  width: 100%; margin: 8px 0 0; padding: 8px 10px; cursor: pointer; text-align: right;
  background: var(--pc-gold-tint); border: 1.5px dashed var(--pc-gold); border-radius: 10px;
  color: #7A5A1E; font: 700 13px/1.5 'Tajawal', system-ui, sans-serif;
}
.pc-cross { margin-top: 16px; background: var(--pc-teal-50); border-radius: 16px; padding: 12px 14px; }
.pc-cross h4 { margin: 0 0 6px; font-size: 15px; color: var(--pc-teal); }
.pc-cross-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; }
.pc-cross-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.pc-cross-item strong { display: block; color: var(--pc-teal); }
.pc-cross-item small { display: block; color: var(--pc-ink-mute); font-size: 12px; line-height: 1.4; }
.pc-cross-item a { color: inherit; text-decoration: none; }
.pc-cross-info { display: block; min-width: 0; }
.pc-cross-name { font-weight: 800; color: var(--pc-teal); letter-spacing: .02em; }
.pc-cross-more { display: inline-block; margin-top: 2px; font: 700 12px/1.4 'Tajawal', system-ui, sans-serif; color: var(--pc-teal); text-decoration: underline; text-underline-offset: 3px; }
/* add-on offer ("order bump"): special price next to the crossed-out normal one */
.pc-line-price s, .pc-cross-item s { font-weight: 600; font-size: 12.5px; color: var(--pc-ink-mute); }
.pc-deal-price { font-size: 14px; font-weight: 900; color: var(--pc-cta); }
.pc-deal {
  display: inline-block; margin-inline-start: 4px; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
  background: var(--pc-gold-tint); color: #7A5A1E; font: 800 11.5px/1.6 'Tajawal', system-ui, sans-serif;
}
.pc-totals { display: grid; gap: 4px; margin-bottom: 12px; font-size: 15px; }
.pc-totals > div { display: flex; justify-content: space-between; }
.pc-free { color: var(--pc-success); font-weight: 800; }
.pc-totals .pc-grand { font-size: 18px; font-weight: 900; border-top: 1px dashed var(--pc-line); padding-top: 8px; margin-top: 4px; }

/* toast */
.pc-toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 220; max-width: 92vw;
  background: var(--pc-ink); color: #fff; padding: 10px 16px; border-radius: 12px; font: 700 14px/1.5 'Tajawal', system-ui, sans-serif;
  opacity: 0; transform: translate(-50%, 16px); transition: opacity .2s, transform .2s; pointer-events: none; direction: rtl;
}
.pc-toast.show { opacity: 1; transform: translate(-50%, 0); }
