/* Peacock Brand — friendly cart shop UI */
:root {
  --pc-ink: #14222a;
  --pc-muted: #5c6b73;
  --pc-bg: #f3f6f7;
  --pc-card: #ffffff;
  --pc-line: #d9e2e6;
  --pc-teal: #0c6b6e;
  --pc-teal-dark: #085255;
  --pc-coral: #ef5a28;
  --pc-coral-dark: #d44818;
  --pc-mint: #e8f6f5;
  --pc-warn: #fff4e8;
  --pc-ok: #12805c;
  --pc-shadow: 0 10px 30px rgba(20, 34, 42, 0.08);
  --pc-radius: 16px;
  --pc-sticky-h: 72px;
  --pc-font: "Segoe UI", "Trebuchet MS", "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.shop-body {
  margin: 0;
  font-family: var(--pc-font);
  color: var(--pc-ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(12, 107, 110, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(239, 90, 40, 0.10), transparent 55%),
    var(--pc-bg);
  padding-bottom: calc(var(--pc-sticky-h) + 28px);
}

img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
a { color: var(--pc-teal); text-decoration: none; }

.shop-shell { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

.shop-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(243, 246, 247, 0.92);
  border-bottom: 1px solid var(--pc-line);
}
.shop-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.shop-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.shop-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.shop-brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.shop-brand span {
  display: block;
  font-size: 0.78rem;
  color: var(--pc-muted);
}
.shop-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  border: 1px solid var(--pc-line);
  background: #fff;
  border-radius: 999px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--pc-ink);
  box-shadow: var(--pc-shadow);
}
.icon-btn:hover { border-color: var(--pc-teal); color: var(--pc-teal); }
.cart-badge {
  background: var(--pc-coral);
  color: #fff;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.notice-bar {
  background: linear-gradient(90deg, var(--pc-teal), #14919b);
  color: #fff;
  text-align: center;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
}

.welcome {
  text-align: center;
  padding: 22px 8px 8px;
}
.welcome h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 800;
}
.welcome p {
  margin: 0 auto;
  max-width: 720px;
  color: var(--pc-muted);
  line-height: 1.5;
}

.stepper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 16px;
}
.step-tab {
  border: 0;
  border-radius: 14px;
  padding: 14px 12px;
  font-weight: 700;
  background: #e7ecee;
  color: #66757c;
  cursor: pointer;
  transition: 0.2s ease;
}
.step-tab.is-active {
  background: var(--pc-coral);
  color: #fff;
  box-shadow: 0 8px 18px rgba(239, 90, 40, 0.28);
}
.step-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.panel { display: none; animation: fadeUp 0.28s ease; }
.panel.is-active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.search-wrap {
  position: relative;
  margin-bottom: 12px;
}
.search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pc-muted);
}
.search-wrap input {
  width: 100%;
  border: 1px solid var(--pc-line);
  border-radius: 14px;
  background: #fff;
  padding: 14px 14px 14px 42px;
  outline: none;
  box-shadow: var(--pc-shadow);
}
.search-wrap input:focus { border-color: var(--pc-teal); }

.cat-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}
.cat-chip {
  flex: 0 0 auto;
  border: 1px solid var(--pc-line);
  background: #fff;
  color: var(--pc-ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.cat-chip.is-active {
  background: var(--pc-teal);
  border-color: var(--pc-teal);
  color: #fff;
}

.cat-block { margin: 8px 0 14px; scroll-margin-top: 140px; }
.cat-title {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--pc-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--pc-shadow);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pc-teal-dark);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.cat-title:hover {
  border-color: #b9d0d2;
  background: #f7fbfb;
}
.cat-title:focus-visible {
  outline: 2px solid rgba(12, 107, 110, 0.35);
  outline-offset: 2px;
}
.cat-title-text {
  flex: 0 1 auto;
  min-width: 0;
}
.cat-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--pc-line), transparent);
}
.cat-chevron {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--pc-mint);
  color: var(--pc-teal-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.18s ease;
}
.cat-chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.cat-block.is-open .cat-title {
  border-color: #9ec4c6;
  background: linear-gradient(180deg, #ffffff, #f3fafa);
  margin-bottom: 12px;
}
.cat-block.is-open .cat-chevron {
  background: var(--pc-teal);
  color: #fff;
  transform: rotate(180deg);
}
.cat-block:not(.is-open) .product-grid {
  display: none;
}
.cat-block.is-search-hit:not(.is-open) .product-grid {
  display: grid;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 700px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.product-card {
  background: var(--pc-card);
  border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius);
  overflow: hidden;
  box-shadow: var(--pc-shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: auto;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(20, 34, 42, 0.12);
}
.product-card.is-oos { opacity: 0.62; }
.product-media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbfb, #eef4f5);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
}
.product-media:focus-visible {
  outline: 2px solid rgba(12, 107, 110, 0.4);
  outline-offset: -2px;
}
.product-media.is-logo-fallback {
  cursor: default;
  background: #fff;
}
.product-media.is-logo-fallback img {
  padding: 28px;
  opacity: 0.95;
}
.product-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 12px;
}
.badge-oos {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: #3a4650;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.badge-off {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: var(--pc-coral);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.product-body {
  position: relative;
  z-index: 1;
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--pc-card);
  overflow: visible;
}
.product-name {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--pc-ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.35em * 2);
  word-break: break-word;
}
.product-meta {
  margin: 0;
  color: var(--pc-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 1.4em;
}
.price-now {
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--pc-teal-dark);
}
.price-was {
  color: #9aa7ad;
  text-decoration: line-through;
  font-size: 0.9rem;
  line-height: 1.2;
}
.qty-row {
  margin-top: auto;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}
@media (min-width: 700px) {
  .product-media { height: 168px; }
}
.qty-row button {
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--pc-mint);
  color: var(--pc-teal-dark);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
.qty-row button:hover { background: #d7efed; }
.qty-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.qty-row input {
  height: 42px;
  border: 1px solid var(--pc-line);
  border-radius: 12px;
  text-align: center;
  font-weight: 700;
  width: 100%;
  -moz-appearance: textfield;
}
.qty-row input::-webkit-outer-spin-button,
.qty-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.empty-search {
  text-align: center;
  padding: 40px 16px;
  color: var(--pc-muted);
  background: #fff;
  border: 1px dashed var(--pc-line);
  border-radius: var(--pc-radius);
}

.sticky-cart {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--pc-line);
  box-shadow: 0 -8px 24px rgba(20, 34, 42, 0.08);
  backdrop-filter: blur(10px);
}
.sticky-cart-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 10px;
  align-items: center;
}
.sticky-meta {
  min-width: 0;
}
.sticky-meta strong {
  display: block;
  font-size: 1.05rem;
}
.sticky-meta span {
  color: var(--pc-muted);
  font-size: 0.85rem;
}
.sticky-meta .ok { color: var(--pc-ok); font-weight: 700; }
.sticky-meta .need { color: var(--pc-coral); font-weight: 700; }
.sticky-actions {
  display: flex;
  gap: 8px;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-ghost {
  background: #eef2f4;
  color: var(--pc-ink);
}
.btn-primary {
  background: var(--pc-coral);
  color: #fff;
}
.btn-primary:hover { background: var(--pc-coral-dark); }
.btn-teal {
  background: var(--pc-teal);
  color: #fff;
}
.btn-teal:hover { background: var(--pc-teal-dark); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 24, 0.45);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cart-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  max-height: min(78vh, 720px);
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(110%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.is-open { transform: translateY(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--pc-line);
}
.drawer-head h3 { margin: 0; }
.drawer-body {
  overflow: auto;
  padding: 12px 16px 20px;
}
.cart-empty {
  text-align: center;
  color: var(--pc-muted);
  padding: 36px 10px;
}
.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f4;
}
.cart-line img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  background: #f4f7f8;
}
.cart-line h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.cart-line p {
  margin: 0;
  color: var(--pc-muted);
  font-size: 0.82rem;
}
.cart-line-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.mini-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pc-mint);
  border-radius: 10px;
  padding: 4px;
}
.mini-qty button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}
.cart-remove {
  border: 0;
  background: transparent;
  color: #b42318;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}
.drawer-foot {
  border-top: 1px solid var(--pc-line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
}
.totals-box {
  background: var(--pc-mint);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
}
.totals-box .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.totals-box .payable {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pc-teal-dark);
}

.checkout-layout {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: start;
  }
}
.card {
  background: #fff;
  border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
  padding: 16px;
}
.card h2, .card h3 {
  margin: 0 0 12px;
}
.form-grid {
  display: grid;
  gap: 12px;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 750;
  margin-bottom: 6px;
  color: #102028;
}
.form-group input,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--pc-line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  color: var(--pc-ink);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #809099;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid rgba(12, 107, 110, 0.2);
  border-color: var(--pc-teal);
}
.form-group .error {
  color: #b42318;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}
.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #b42318;
}
.form-group.has-error .error { display: block; }

.bank-box {
  background: var(--pc-warn);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}
.bank-box h4 { margin: 0 0 8px; }
.bank-box p { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.45; }
.terms {
  margin-top: 12px;
  color: var(--pc-muted);
  font-size: 0.86rem;
}
.terms ul { padding-left: 18px; margin: 8px 0 0; }

.shop-footer {
  margin-top: 28px;
  padding: 24px 0 8px;
  color: var(--pc-muted);
  font-size: 0.88rem;
  text-align: center;
}

.shop-info-panel {
  margin: 28px 0 8px;
}
.shop-info-grid {
  display: grid;
  gap: 14px;
}
@media (min-width: 800px) {
  .shop-info-grid {
    grid-template-columns: 1.2fr 0.9fr;
    align-items: start;
  }
}
.shop-info-card {
  background: #fff;
  border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
  padding: 16px;
}
.shop-info-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--pc-teal-dark);
}
.shop-info-card p {
  margin: 0 0 10px;
  line-height: 1.5;
  color: var(--pc-ink);
  font-size: 0.95rem;
}
.shop-info-card.bank-box {
  background: var(--pc-warn);
  border-color: #f0d9b8;
}
.shop-info-card.terms {
  color: var(--pc-muted);
  font-size: 0.92rem;
}
.shop-info-card.terms ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.shop-info-card.terms li { margin-bottom: 6px; }
.shop-qr {
  display: block;
  max-width: 220px;
  width: 100%;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ecd7b5;
  padding: 6px;
}
.shop-upi-id {
  margin: 8px 0 0 !important;
  font-size: 0.88rem !important;
  color: var(--pc-muted) !important;
  word-break: break-all;
}

.float-wa {
  position: fixed;
  right: 16px;
  bottom: calc(var(--pc-sticky-h) + 18px);
  z-index: 45;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.35);
}

body.on-checkout .sticky-actions #btn-checkout {
  display: none;
}
body.on-checkout .sticky-actions::after {
  content: 'Fill details ↓';
  display: inline-flex;
  align-items: center;
  background: var(--pc-teal);
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
}

/* Product image lightbox */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 16, 20, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.img-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.img-lightbox[hidden] { display: none !important; }
.img-lightbox.is-open[hidden] { display: flex !important; }
.img-lightbox-panel {
  position: relative;
  max-width: min(920px, 100%);
  max-height: min(86vh, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fadeUp 0.22s ease;
}
.img-lightbox-panel img {
  max-width: min(860px, calc(100vw - 72px));
  max-height: min(70vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: #f4f7f8;
}
.img-lightbox-caption {
  margin: 0;
  font-weight: 700;
  color: var(--pc-ink);
  text-align: center;
  font-size: 0.98rem;
}
.img-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--pc-coral);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(239, 90, 40, 0.35);
}
.img-lightbox-close:hover { background: var(--pc-coral-dark); }
body.lightbox-open { overflow: hidden; }
