/* Rawhool's Toys - catalogue styles */

:root {
  --primary: #8d1150;
  --primary-dark: #6d0d3e;
  --page-bg: #ffa8f0;
  --ink: #1f1f1f;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --card: #ffffff;
  --radius: 6px;
  --hdr-h: 56px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Roboto, "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

body.plain { background: #fff; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- header */

.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--hdr-h);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .10);
}

.hdr .back {
  border: 0;
  background: none;
  color: var(--primary);
  padding: 4px;
  display: flex;
  line-height: 0;
}

.hdr .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hdr .brand img {
  height: 38px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  display: block;
}

/* the logo is a wordmark, so the text label is redundant beside it on desktop */
.hdr .brand span {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .2px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}

.hdr .spacer { flex: 1; }

.hdr .act {
  border: 0;
  background: none;
  color: var(--primary);
  padding: 6px;
  position: relative;
  display: flex;
  line-height: 0;
}

.hdr .act .badge {
  position: absolute;
  top: -1px;
  right: -2px;
  background: #e01b24;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* search drop-down */
.searchbar {
  position: absolute;
  top: var(--hdr-h);
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px 18px;
  display: none;
  box-shadow: var(--shadow);
}
.searchbar.on { display: block; }
.searchbar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}
.searchbar input:focus { border-color: var(--primary); }

/* ------------------------------------------------------------ page frame */

.page {
  max-width: 1720px;
  margin: 0 auto;
  padding: 26px 22px 120px;
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 26px;
  align-items: start;
}

.page.nosidebar { grid-template-columns: 1fr; }

.filter {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .10);
}
.filter h3 { margin: 0 0 14px; font-size: 16px; font-weight: 500; }
.filter .row { display: flex; align-items: flex-end; gap: 8px; }
.filter label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.filter .fld {
  display: flex;
  align-items: center;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}
.filter .fld span { color: var(--muted); font-size: 13px; }
.filter .fld input {
  width: 62px;
  border: 0;
  outline: none;
  padding: 8px 4px;
  font-size: 14px;
  background: none;
}
.filter .dash { padding-bottom: 9px; color: var(--muted); }

.page-title {
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 4px;
  color: #2a2a2a;
  line-height: 1.2;
}
.page-count { color: #4a4a4a; font-size: 15px; margin: 0 0 20px; }

/* --------------------------------------------------------- product grid */

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.pcard {
  background: var(--card);
  border: 1px solid #ececec;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pcard .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pcard .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pcard .thumb .pills {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  gap: 6px;
}
.pill {
  background: rgba(255, 255, 255, .94);
  border-radius: 12px;
  font-size: 11px;
  padding: 3px 9px;
  color: #444;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.pill.oos { background: #444; color: #fff; }

.pcard .meta { padding: 10px 12px 12px; flex: 1; }
.pcard .nm {
  font-size: 13px;
  line-height: 1.35;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.pcard .pr { font-size: 15px; font-weight: 700; margin-top: 8px; color: #1a1a1a; }
.pcard .moq { font-size: 11px; color: var(--muted); margin-top: 3px; }

.btn-add {
  border: 0;
  background: var(--primary);
  color: #fff;
  width: 100%;
  padding: 13px 10px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .4px;
  transition: background .15s;
}
.btn-add:hover { background: var(--primary-dark); }
.btn-add:disabled { background: #b9b9b9; cursor: not-allowed; }

/* quantity stepper (replaces the button once the item is in the cart) */
.stepper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid #ececec;
  animation: stepIn .18s ease-out;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.stepper button {
  border: 0;
  background: #ededed;
  color: #333;
  font-size: 20px;
  line-height: 1;
  padding: 12px 0;
}
.stepper button:hover { background: #e0e0e0; }
.stepper input {
  border: 0;
  border-left: 1px solid #e2e2e2;
  border-right: 1px solid #e2e2e2;
  text-align: center;
  font-size: 15px;
  width: 100%;
  outline: none;
  background: #fff;
}

/* ------------------------------------------------------------ identify gate */

.gate-back {
  position: fixed;
  inset: 0;
  background: rgba(28, 6, 20, .86);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.gate {
  width: min(490px, 92vw);
  max-height: min(78vh, 640px);
  background: #fff;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}

.gate .log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bub {
  max-width: 82%;
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.45;
  border-radius: 3px;
  animation: bubIn .25s ease-out;
}
@keyframes bubIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.bub.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e3e3e3;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.bub.bot b {
  display: block;
  font-size: 12.5px;
  letter-spacing: .3px;
  margin-bottom: 3px;
  color: #111;
}
.bub.me {
  align-self: flex-end;
  background: #f2f2f2;
  border: 1px solid #ececec;
  color: #222;
}

.gate .inrow {
  display: flex;
  align-items: stretch;
  margin: 12px 20px 18px;
  border: 2px solid var(--primary);
  border-radius: 3px;
  overflow: hidden;
}
.gate .cc {
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.gate .inrow input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 13px 14px;
  font-size: 16px;
  border-bottom: 1.5px solid var(--primary);
  margin: 0 10px;
}
.gate .inrow input::placeholder { color: #b98aa6; }
.gate .send {
  border: 0;
  background: var(--primary);
  color: #fff;
  width: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate .send:hover { background: var(--primary-dark); }
.gate .err { color: #d32f2f; font-size: 13px; padding: 0 20px 12px; margin-top: -8px; }

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  top: 74px;
  right: 26px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #222;
  animation: toastIn .25s ease-out;
}
.toast.out { animation: toastOut .25s ease-in forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(24px); }
}
.toast .tick {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop .3s ease-out;
}
@keyframes pop {
  0% { transform: scale(.4); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------- sticky cart bar */

.cartbar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 150;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 22px;
  min-width: 520px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
  animation: barIn .28s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes barIn {
  from { opacity: 0; transform: translate(-50%, 26px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.cartbar .n { font-size: 14px; line-height: 1.35; }
.cartbar .n b { display: block; font-size: 16px; font-weight: 700; }
.cartbar .spacer { flex: 1; }
.cartbar .go {
  border: 0;
  background: none;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --------------------------------------------------------- whatsapp float */

.chatbtn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 140;
  background: #fff;
  border: 0;
  border-radius: 30px;
  padding: 11px 20px 11px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .25);
}

/* ------------------------------------------------------------ product page */

.prod {
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px 70px 90px;
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}

.gallery { position: relative; }
.gallery .main {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.gallery .nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #333;
  padding: 10px;
  line-height: 0;
}
.gallery .nav.prev { left: 18px; }
.gallery .nav.next { right: 18px; }
.gallery .dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.gallery .dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d0d0d0; display: block;
}
.gallery .dots i.on { background: var(--primary); }

.pinfo .price-lbl { font-size: 16px; color: #333; margin: 0 0 14px; }
.pinfo .price-lbl b { color: var(--primary); font-size: 19px; }
.pinfo h1 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 26px;
  line-height: 1.4;
  color: #1a1a1a;
}

.tiers {
  display: flex;
  border-bottom: 1px solid var(--primary);
  margin-bottom: 26px;
}
.tier {
  flex: 1;
  text-align: center;
  padding: 0 10px 12px;
  position: relative;
}
.tier + .tier { border-left: 1px solid #e0e0e0; }
.tier .off {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 11px;
  padding: 3px 12px;
  margin-bottom: 8px;
}
.tier .rng { font-size: 15px; color: #333; margin-bottom: 14px; }
.tier .amt { font-size: 17px; font-weight: 500; color: #222; padding-top: 12px; border-top: 1px solid var(--primary); }
.tier .per { font-size: 12px; color: var(--muted); }
.tiers.single .tier + .tier { display: none; }

.pinfo .btn-add { max-width: 420px; padding: 15px; font-size: 15px; border-radius: 2px; }
.pinfo .stepper { max-width: 420px; border: 1px solid #ddd; border-radius: 2px; }
.pinfo .desc { margin-top: 26px; font-size: 14px; line-height: 1.7; color: #444; white-space: pre-wrap; max-width: 560px; }
.pinfo .facts { margin-top: 20px; font-size: 13px; color: var(--muted); line-height: 1.9; }

/* --------------------------------------------------------------- home grid */

.home {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 22px 90px;
}
.home h2 { font-size: 26px; font-weight: 400; margin: 0 0 20px; }
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
}
.ccard {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #ececec;
}
.ccard .thumb {
  aspect-ratio: 1 / 1;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ccard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ccard .meta { padding: 12px 14px 15px; }
.ccard .nm { font-size: 14px; font-weight: 500; line-height: 1.35; color: #222; }
.ccard .ct { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------- phone gate */

.centre {
  min-height: calc(100vh - var(--hdr-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px 80px;
}
.panel {
  background: #f5f5f5;
  border-radius: 6px;
  width: min(392px, 94vw);
  padding: 62px 32px 34px;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .12);
}
.panel .avatar {
  width: 176px;
  height: auto;
  background: #fff;
  object-fit: contain;
  padding: 8px 12px;
  border-radius: 6px;
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.panel h2 { font-size: 23px; font-weight: 700; margin: 0 0 14px; }
.panel p { font-size: 15px; color: #444; margin: 0 0 22px; line-height: 1.45; }
.phonefld {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 12px;
  margin-bottom: 20px;
}
.phonefld .cc { font-size: 15px; color: #333; white-space: nowrap; }
.phonefld input {
  flex: 1; min-width: 0;
  border: 0; outline: none;
  padding: 14px 10px;
  font-size: 15px;
  background: none;
}
.btn-primary {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 13px 26px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #bbb; }

/* ------------------------------------------------------------------- cart */

.sheet {
  max-width: 940px;
  margin: 0 auto;
  padding: 26px 20px 90px;
}
.box {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .1);
}
.box h3 { margin: 0 0 16px; font-size: 17px; font-weight: 600; }

.line {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f0f0f0;
}
.line:last-child { border-bottom: 0; }
.line .th {
  width: 66px; height: 66px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
}
.line .nm { font-size: 14px; line-height: 1.4; }
.line .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.line .amt { font-weight: 700; font-size: 15px; text-align: right; white-space: nowrap; }
.line .mini {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.line .mini button { border: 0; background: #f0f0f0; width: 28px; height: 26px; font-size: 15px; line-height: 1; }
.line .mini input { width: 42px; border: 0; border-left: 1px solid #eee; border-right: 1px solid #eee; text-align: center; height: 26px; outline: none; }
.line .rm { border: 0; background: none; color: #b0002a; font-size: 12px; margin-top: 6px; padding: 0; }

.tot { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.tot.big { font-size: 18px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  padding: 11px 12px;
  font-size: 14.5px;
  outline: none;
  font-family: inherit;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.alert {
  background: #fff3f3;
  border: 1px solid #f3c2c2;
  color: #a01d1d;
  padding: 11px 14px;
  border-radius: 4px;
  font-size: 13.5px;
  margin-bottom: 14px;
}
.note-warn {
  background: #fff8e1;
  border: 1px solid #f0dca0;
  color: #7a5b00;
  padding: 11px 14px;
  border-radius: 4px;
  font-size: 13.5px;
  margin-bottom: 14px;
}

.empty { text-align: center; padding: 70px 20px; color: #555; }
.empty h3 { font-size: 20px; font-weight: 500; margin: 0 0 8px; }

.ordercard { background: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 1px 5px rgba(0,0,0,.1); }
.ordercard .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.ordercard .no { font-weight: 700; font-size: 15px; }
.ordercard .dt { font-size: 12px; color: var(--muted); }
.chip {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 11px;
  border-radius: 11px;
  background: #eee;
  color: #444;
}
.chip.PENDING { background: #fff3d6; color: #8a5b00; }
.chip.CONFIRMED { background: #e2f0ff; color: #16548f; }
.chip.PACKED { background: #ece2ff; color: #4b2a8f; }
.chip.SHIPPED { background: #dff5e6; color: #1c6b38; }
.chip.DELIVERED { background: #d6f5dc; color: #14602c; }
.chip.CANCELLED { background: #ffe0e0; color: #9c1b1b; }

.spin { text-align: center; padding: 70px; color: #444; font-size: 15px; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1500px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1150px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prod { grid-template-columns: 1fr; gap: 30px; padding: 26px 22px 80px; }
  .gallery .nav { position: absolute; }
}
@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; padding: 18px 14px 130px; }
  .filter { order: 2; }
  .page-title { font-size: 23px; }
}
@media (max-width: 680px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .hdr .brand img { height: 30px; max-width: 132px; }
  .cartbar { min-width: 0; left: 12px; right: 12px; transform: none; padding: 11px 16px; gap: 12px; }
  @keyframes barIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
  .two { grid-template-columns: 1fr; }
  .toast { right: 12px; top: 66px; font-size: 13.5px; }
  .chatbtn { bottom: 90px; right: 14px; }
}

/* ----------------------------------------------------------------- footer */

.site-foot {
  max-width: 1720px;
  margin: 30px auto 0;
  padding: 0 22px 40px;
}

.site-foot .rule {
  border-top: 1px solid rgba(0, 0, 0, .13);
  margin-bottom: 26px;
}

.site-foot h4 {
  color: var(--primary);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .6px;
  margin: 0 0 18px;
}

.site-foot .blk { margin-bottom: 17px; }
.site-foot .blk b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 4px;
}
.site-foot .blk p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #333;
  white-space: pre-line;
}
.site-foot .blk a {
  font-size: 13.5px;
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-foot .blk a:hover { color: var(--primary); }

.site-foot .brandline {
  text-align: center;
  margin-top: 34px;
  font-size: 12.5px;
  color: #5b5b5b;
}
.site-foot .brandline img {
  height: 30px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  border-radius: 3px;
}

/* the store name gets a catalogue count under it on the home page */
.hdr .brand .sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 1px;
}

@media (max-width: 680px) {
  .site-foot { padding: 0 16px 34px; }
}
