/* ============================================================================
 * public/css/reco.css — recommendation rails, the "Added to Cart" page and
 * the customer Payments & refunds page. Uses the tokens already defined in
 * app.css (--brand, --line-2, --green, --ink, --muted) so themes stay in sync.
 * ==========================================================================*/

/* ---------------------------------------------------------------- rails */
.rails { padding: 6px 0 30px; }

.rail { margin-top: 26px; }

.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.rail-head h2 {
  font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 0;
}
.rail-sub { color: var(--brand); font-weight: 700; }
.rail-nav { display: flex; gap: 6px; flex: 0 0 auto; }
.rail-btn {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  font-size: 19px; line-height: 1; display: grid; place-items: center;
  transition: background .15s, border-color .15s, transform .1s;
}
.rail-btn:hover { background: #f6f7fb; border-color: var(--brand); color: var(--brand); }
.rail-btn:active { transform: scale(.94); }

.rail-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 2px 2px 12px; scrollbar-width: thin;
}
.rail-track::-webkit-scrollbar { height: 7px; }
.rail-track::-webkit-scrollbar-thumb { background: #d7dae6; border-radius: 99px; }
.rail-track::-webkit-scrollbar-track { background: transparent; }

.rcard {
  flex: 0 0 196px; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.rcard:hover { box-shadow: 0 10px 26px rgba(18, 24, 50, .10); border-color: #cfd4e6; transform: translateY(-2px); }
.rcard-img {
  height: 152px; display: grid; place-items: center; padding: 10px;
  background: #fff; overflow: hidden;
}
.rcard-img img { max-width: 100%; max-height: 132px; object-fit: contain; mix-blend-mode: multiply; }
.rcard-glyph {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-weight: 800; font-size: 30px; color: #fff; border-radius: 10px;
}
.rcard-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rcard-name {
  font-size: 12.8px; line-height: 1.35; color: var(--ink); font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 34px;
}
.rcard-name:hover { color: var(--brand); }
.rcard-rating { display: flex; align-items: center; gap: 5px; font-size: 11.5px; }
.rcard-rating .stars { color: #f5a623; font-size: 12px; }
.rcard-rating .rc { color: var(--muted); }
.rcard-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.rcard-price .now { font-size: 16px; font-weight: 800; }
.rcard-price .cur { font-size: 11px; vertical-align: super; font-weight: 700; }
.rcard-price .was { font-size: 11.5px; color: var(--muted); text-decoration: line-through; }
.rcard-price .off { font-size: 11.5px; color: var(--green); font-weight: 700; }
.rcard-oos { font-size: 11.5px; color: var(--brand); font-weight: 600; padding: 6px 0 2px; }
.rcard .btn { margin-top: 4px; }

/* ------------------------------------------------------- added to cart */
.atc-wrap { padding-top: 18px; }
.atc-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.atc-main { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; }
.atc-ok { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.atc-tick {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  background: rgba(22, 163, 74, .12); color: var(--green);
  display: grid; place-items: center; font-size: 21px; font-weight: 800;
}
.atc-tick svg { width: 22px; height: 22px; }
.atc-ok h1 { margin: 0; font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -.01em; }
.atc-ok p { margin: 2px 0 0; font-size: 12.5px; }

.atc-item { display: flex; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.atc-thumb {
  width: 150px; height: 150px; flex: 0 0 auto; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 12px; padding: 8px; background: #fff;
}
.atc-thumb img { max-width: 100%; max-height: 130px; object-fit: contain; mix-blend-mode: multiply; }
.atc-glyph { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 34px; border-radius: 9px; }
.atc-info { flex: 1; min-width: 0; }
.atc-name { font-size: 15px; font-weight: 600; line-height: 1.4; display: block; margin-bottom: 8px; }
.atc-name:hover { color: var(--brand); }
.atc-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.atc-price .now { font-size: 22px; font-weight: 800; }
.atc-price .was { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.atc-price .off { background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.atc-eta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.atc-eta svg { width: 15px; height: 15px; }

.atc-side { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; position: sticky; top: 88px; }
.atc-sub { margin-bottom: 13px; }
.atc-sub-val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.atc-free { font-size: 12.5px; margin-top: 9px; color: var(--ink); }
.atc-free.ok { color: var(--green); font-weight: 700; }
.atc-bar { height: 6px; border-radius: 99px; background: #eceef6; overflow: hidden; margin-top: 7px; }
.atc-bar span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .4s; }

@media (max-width: 880px) {
  .atc-grid { grid-template-columns: 1fr; }
  .atc-side { position: static; }
  .atc-thumb { width: 108px; height: 108px; }
  .rcard { flex-basis: 158px; }
  .rail-head h2 { font-size: 16.5px; }
}

/* ---------------------------------------------------- payments & refunds */
.pay-page { padding: 16px 0 40px; }
.page-h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 18px; }

.pay-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.pay-kpi {
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px;
  padding: 14px 15px; display: flex; flex-direction: column; gap: 2px;
}
.pay-kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.pay-kpi .v { font-size: 23px; font-weight: 800; letter-spacing: -.02em; }
.pay-kpi .s { font-size: 11.5px; color: var(--muted); }

.pay-alert {
  background: rgba(245, 166, 35, .09); border: 1px solid rgba(245, 166, 35, .35);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 18px;
}
.pay-alert > b { font-size: 13.5px; display: block; margin-bottom: 8px; }
.pay-alert-row {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  font-size: 12.5px; padding: 5px 0; border-top: 1px dashed rgba(0, 0, 0, .08);
}

.pay-seg { margin-bottom: 14px; flex-wrap: wrap; }

.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-row {
  display: flex; align-items: flex-start; gap: 13px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 13px 15px;
}
.pay-row-ico {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.pay-row-ico.in { background: rgba(22, 163, 74, .12); color: var(--green); }
.pay-row-ico.out { background: rgba(91, 75, 245, .10); color: var(--brand); }
.pay-row-main { flex: 1; min-width: 0; }
.pay-row-t { font-size: 13.5px; font-weight: 700; }
.pay-row-s { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pay-row-m {
  display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px;
  font-size: 11.5px; color: var(--muted); align-items: center;
}
.pay-row-m .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.pay-row-amt { font-size: 15.5px; font-weight: 800; white-space: nowrap; }
.pay-row-amt.in { color: var(--green); }

.pill {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  background: #eef0f7; color: #475069; text-transform: uppercase; letter-spacing: .03em;
}
.pill.ok { background: rgba(22, 163, 74, .13); color: var(--green); }
.pill.bad { background: rgba(220, 38, 38, .12); color: #b91c1c; }

@media (max-width: 780px) {
  .pay-kpis { grid-template-columns: repeat(2, 1fr); }
  .pay-row-amt { font-size: 14px; }
}
