/* =========================
   Leah & Friends Vinyl Shop
   style.css
========================= */

/* Reset */
html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: #fff6fa;
  color: #333;
  text-align: center;
}

/* Links */
a { color: inherit; }

/* =========================
   Header + Logo (SMALL)
========================= */

.header {
  background: linear-gradient(135deg, #ffc2d1, #cdb4db);
  padding: 20px 20px 90px;   /* space for logo to hang into white */
  position: relative;
  text-align: center;
}

/* Logo wrapper positioned at bottom edge */
.logo-wrap {
  position: absolute;
  left: 50%;           /* how far into white it drops */
  transform: translateX(-50%);
  z-index: 100;
}

/* Logo size */
.logo {
  width: 170px;             /* adjust if needed */
  max-width: 65vw;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
}

/* Back pill (optional on inner pages) */
.back-pill{
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(190, 34, 34, 0.18);
  color: #050505;
  text-decoration: none;
  font-weight: 700;
  z-index: 60;
}

/* =========================
   Hero section (white)
========================= */

.hero {
  background: #fff;
  padding: 100px 20px 50px;  /* must be bigger than overlap */
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
}

.hero h2 {
  font-size: 1.6rem;
  margin: 0 0 10px 0;
}

.price {
  font-size: 1.05rem;
  color: #777;
  margin: 0 0 18px 0;
}

/* Product preview */
.product-preview {
  width: 90%;
  max-width: 340px;
  display: block;
  margin: 18px auto 8px;
  border-radius: 22px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* =========================
   Buttons
========================= */
.btn {
  display: inline-block;
  margin: 10px 8px;
  padding: 14px 22px;
  background: #cdb4db;
  color: white;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn:hover { transform: scale(1.03); }

.btn.secondary { background: #90dbf4; }

.btn.btn--full {
    border-radius: 18px;
  padding: 16px 18px;
  margin: 10px 0 0;
}

/* =========================
   Card + Form styling
========================= */
.card {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
  overflow: hidden;
}

.form {
  padding: 18px;
  text-align: left;
}

.field { margin-bottom: 14px; }

label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
  color: #333;
}

input, select, textarea {
  width: 100%;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid #e6e6e6;
  background: #fff;
  font-size: 16px;
  box-sizing: border-box;
}

textarea { resize: vertical; min-height: 90px; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #cdb4db;
  box-shadow: 0 0 0 4px rgba(205, 180, 219, 0.25);
}

.hint {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #666;
}

.grid { display: grid; gap: 12px; }
.grid--2 { grid-template-columns: 1fr; }

@media (min-width: 640px){
  .form { padding: 22px; }
  .grid--2 { grid-template-columns: 1fr 1fr; }
}

/* =========================
   Result / messages
========================= */
.notice {
  margin-top: 14px;
  padding: 14px 14px;
  border-radius: 16px;
  font-weight: 700;
  text-align: center;
}

.notice--ok { background: #c9f7d8; color: #006b3c; }
.notice--bad { background: #ffe6e6; color: #a40000; }

/* =========================
   Track Order UI
========================= */
.track-result {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  text-align: left;
}

.status-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* Status Colours */
.status-Pending { background: #ffe8a3; color: #7a5c00; }
.status-Received { background: #cde7ff; color: #004a8f; }
.status-Completed { background: #c9f7d8; color: #006b3c; }
.status-Delivered { background: #e4d7ff; color: #4a2c9b; }

/* Progress */
.progress-wrapper {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  position: relative;
}

.progress-wrapper::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 4px;
  background: #eee;
  z-index: 0;
}

.progress-step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}

.progress-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ddd;
  margin: 0 auto 6px;
}

.progress-label {
  font-size: 0.75rem;
  color: #777;
}

.progress-active .progress-dot { background: #cdb4db; }
.progress-active .progress-label { font-weight: 800; color: #333; }

/* Footer */
footer {
  padding: 26px 16px 34px;
  font-size: 0.9rem;
  color: #777;
}
/* Admin: stop cards/forms overflowing on mobile */
#ordersList, #ordersList * {
  box-sizing: border-box;
}

#ordersList .card {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

#ordersList input,
#ordersList select,
#ordersList textarea,
#ordersList button {
  width: 100%;
  max-width: 100%;
}
/* =========================
   Admin cards – stop clipping + better layout
========================= */

#ordersList{
  text-align: left;              /* admin cards should not inherit centered body text */
}

/* Give card content breathing room */
#ordersList .card{
  padding: 14px;
}

/* Force long stuff (emails/order ids/product names) to wrap */
#ordersList .card,
#ordersList .card *{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* IMPORTANT: your admin.js uses inline flex on the FIRST div inside the card.
   Override it so it doesn't create that big empty chopped area on smaller widths. */
#ordersList .card > div:first-child{
  display: block !important;     /* beats inline display:flex */
}

/* Make the "right side" bits (price/qty) behave nicely */
#ordersList .card > div:first-child > div{
  width: 100%;
}

#ordersList .card > div:first-child > div:last-child{
  text-align: left !important;   /* beats inline text-align:right */
  margin-top: 6px;
}
/* Compact progress (kept inside the card width) */
.wizard-mini{
  max-width: 760px;
  margin: 14px auto 16px;
  text-align: left;
}

.wizard-mini-top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wizard-pill{
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(205, 180, 219, 0.18);
  border: 1px solid rgba(205, 180, 219, 0.30);
}

.wizard-pill-sub{
  color: #555;
  font-weight: 800;
}

.wizard-bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
  margin-top: 10px;
}

.wizard-bar-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc2d1, #cdb4db);
  transition: width .18s ease;
}

/* Each step is its own card */
.wizard-card{
  margin: 0 auto 16px;
}

/* Hide non-active steps */
.wizard-step{ display:none; }
.wizard-step.is-active{
  display:block;
  animation: wizardIn .18s ease both;
}

@keyframes wizardIn{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}
/* ===== Choice cards: hide tiny radio + use a proper tick ===== */
.choice-grid{
  display: grid;
  gap: 12px;
}

/* Make the whole option look like a card */
.choice{
  position: relative;
  display: block;
  padding: 14px 14px 14px 46px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.choice:hover{
  transform: translateY(-1px);
  border-color: rgba(205, 180, 219, .75);
  box-shadow: 0 14px 28px rgba(0,0,0,.08);
}

/* Hide the default radio dot */
.choice input[type="radio"]{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Our custom “tick badge” */
.choice::before{
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.25);
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.65);
}

/* When selected, fill badge + show tick */
.choice.choice--selected{
  border-color: rgba(205, 180, 219, 1);
  box-shadow: 0 18px 34px rgba(0,0,0,.10);
  background: rgba(255,255,255,.95);
}

.choice.choice--selected::before{
  border-color: rgba(205, 180, 219, 1);
  background: linear-gradient(135deg, #ffc2d1, #cdb4db);
}

.choice.choice--selected::after{
  content: "✓";
  position: absolute;
  left: 20px;
  top: 13px;
  font-weight: 900;
  font-size: 16px;
  color: #fff;
}

.choice-title{
  display: block;
  font-weight: 900;
  margin-bottom: 4px;
}

.choice-sub{
  display: block;
  color: rgba(0,0,0,.62);
  font-weight: 700;
  line-height: 1.25;
}
/* ===== Review summary tidy ===== */
.review{
  margin-top: 10px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.90);
  border-radius: 16px;
  overflow: hidden;
}

/* each row */
.review .row{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.review .row:first-child{
  border-top: 0;
}

/* label */
.review .k{
  font-weight: 900;
  color: rgba(0,0,0,.68);
  letter-spacing: .1px;
}

/* value */
.review .v{
  font-weight: 800;
  color: rgba(0,0,0,.86);
  word-break: break-word;
}

/* make important lines pop */
.review .row.total .k,
.review .row.total .v{
  font-size: 16px;
}

.review .row.total .v{
  font-weight: 950;
}

/* allow multi-line values (like address/notes) */
.review .v .line{
  display: block;
  margin-top: 2px;
}

/* mobile */
@media (max-width: 520px){
  .review .row{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .review .k{
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
  }
}


/* ===== Postage sub-options ===== */
.choice-wrap{ display:block; }

.postage-box{
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(205,180,219,.55);
  border-radius:16px;
  background: rgba(255,255,255,.78);
}

.postage-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px){
  .postage-grid{ grid-template-columns: 1fr; }
}

/* smaller choice cards for postage */
.choice.choice--mini{
  padding: 12px 12px 12px 42px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.choice.choice--mini::before{
  left: 12px;
  top: 14px;
  width: 20px;
  height: 20px;
}

.choice.choice--mini.choice--selected::after{
  left: 18px;
  top: 11px;
  font-size: 15px;
}
/* =========================
   Global Toast (Centered)
========================= */

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;

  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  padding: 18px 28px;
  border-radius: 18px;
  font-weight: 800;
  font-size: 16px;
  text-align: center;

  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);

  max-width: 90%;
}
  .postcode-map{
    width: 100%;
    height: 260px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(0,0,0,.08);
    margin-top: 10px;
  }
  @media (min-width: 700px){
    .postcode-map{ height: 320px; }
  }


/* =========================
   Home product cards (2 products)
========================= */

.product-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
  padding: 6px 14px 0;
}

.product-card{
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 22px;
  padding: 14px 14px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.product-card-img{
  width: 100%;
  max-width: 360px;
  display: block;
  margin: 10px auto 8px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.product-title{
  margin: 10px 0 4px;
  font-size: 1.05rem;
}

.product-sub{
  margin: 0 0 10px;
  opacity: .8;
  font-size: .95rem;
}

.product-card .btn{
  margin: 10px 0 0;
}

/* =========================
   Multi-address order lines
========================= */

.lines-table-wrap{
  overflow:auto;
  border-radius: 14px;
  border: 2px solid rgba(0,0,0,.06);
  background: #fff;
}

.lines-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.lines-table th, .lines-table td{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  text-align: left;
  font-size: .95rem;
}

.lines-table th{
  background: rgba(255,194,209,.25);
  font-weight: 800;
}

.lines-table input, .lines-table select{
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,.08);
  outline: none;
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}

.line-del-btn{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,.08);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.line-del-btn:disabled{
  opacity: .35;
  cursor: not-allowed;
}

.totals-box{
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
}

.totals-row{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,0,0,.12);
}

.totals-row:last-child{ border-bottom: none; }

.totals-row b{ font-weight: 950; }

/* Processing spinner */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.btn-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.6);
  border-top: 2px solid #fff;
  border-radius: 50%;
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* =========================
   Mobile fix – show Qty without scrolling
========================= */

@media (max-width: 640px){

  .lines-table{
    min-width: 100%;      /* remove forced wide table */
  }

  .lines-table thead{
    display: none;        /* hide header row */
  }

  .lines-table tr{
    display: block;
    padding: 14px;
    margin-bottom: 14px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,.06);
  }

  .lines-table td{
    display: block;
    width: 100%;
    border-bottom: none;
    padding: 6px 0;
  }

  /* Labels above fields */
  .lines-table td:nth-child(1)::before{
    content: "House No";
    display:block;
    font-size: 12px;
    font-weight: 800;
    opacity:.6;
    margin-bottom:4px;
  }

  .lines-table td:nth-child(2)::before{
    content: "Street / Name";
    display:block;
    font-size: 12px;
    font-weight: 800;
    opacity:.6;
    margin-bottom:4px;
  }

  .lines-table td:nth-child(3)::before{
    content: "Quantity";
    display:block;
    font-size: 12px;
    font-weight: 800;
    opacity:.6;
    margin-bottom:4px;
  }

  .lines-table td:nth-child(4){
    text-align:right;
    margin-top:8px;
  }

  .ln-qty{
    width:100%;
  }

  .lines-table-wrap{
    overflow: visible;  /* stop sideways scroll */
  }
}