/* =========================================================
   checkout.css
   Dipakai untuk halaman: checkout.html
   ========================================================= */


/* =========================================================
   1) PAGE WRAPPER + TITLE
   ========================================================= */
.checkout-page {
  font-family: "Viga", sans-serif;
  color: #222;
}

.co-title {
  text-align: center;
  font-family: "Calistoga", serif;
  color: var(--primary);
  font-size: 1.50rem;
  letter-spacing: 1px;
  margin: 1.2rem 0 2.2rem;
  text-transform: uppercase;
}


/* =========================================================
   2) MAIN GRID (2 COLUMNS)
   ========================================================= */
.co-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: start;
}


/* =========================================================
   3) SECTION HEADERS
   ========================================================= */
.co-section-head {
  font-family: "Viga", sans-serif;
  color: var(--primary);
  font-weight: 900;
  font-size: 1.15rem;
  margin: 0 0 0.7rem;
}


/* =========================================================
   4) FORM (LABELS + FIELDS)
   ========================================================= */
.co-field {
  margin-bottom: 0.95rem;
}

.co-label {
  display: block;
  color: var(--primary);
  font-weight: 900;
  margin: 0 0 0.35rem;
}

/* ===== Input / Select / Textarea (BASE) ===== */
.co-input,
.co-select,
.co-textarea {
  border: 1.8px solid rgba(139, 30, 30, .45);
  border-radius: 10px;
  padding: .65rem .7rem;
  font-weight: 800;
  color: #222;
  background: #fff;
}

/* Disabled Shadow Bootstrap */
.form-control.co-input,
.form-control.co-textarea,
.form-select.co-select {
  box-shadow: none !important;
}

/* ===== Focus State Function ===== */
.form-control.co-input:focus,
.form-control.co-textarea:focus,
.form-select.co-select:focus {
  border-color: rgba(139, 30, 30, .75);
  box-shadow: 0 0 0 .15rem rgba(139, 30, 30, .12) !important;
}

/* Textarea */
.co-textarea {
  resize: none;
}

/* Select */
.co-select {
  appearance: auto;
  background: #fff;
}

.co-select-small {
  max-width: 320px;
}


/* =========================================================
   5) CHECKBOX LINE (SHIP TO OTHER + TERMS)
   ========================================================= */
/* ===== Checkbox Function ===== */
.co-checkline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--primary);
  margin: 0.15rem 0 1rem;
}

.co-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}


/* =========================================================
   6) SELECT CHEVRON (match profile)
   ========================================================= */
.form-select.co-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238b1e1e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px 18px;
}

.form-select.co-select::-ms-expand {
  display: none;
}


/* =========================================================
   7) RIGHT: PRODUCT LIST
   ========================================================= */
.co-products {
  margin-top: 0.3rem;
}

.co-item {
  display: grid;
  grid-template-columns: 18px 72px 1fr 140px 40px 160px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
}

/* No */
.co-no {
  color: var(--primary);
  font-weight: 900;
}

/* Thumbnail */
.co-thumb {
  width: 72px;
  height: 72px;
  border: 2px solid rgba(139, 30, 30, .65);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.co-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Name */
.co-prod-title {
  color: var(--primary);
  font-weight: 900;
  line-height: 1.15;
}

/* Unit/Qty/Total */
.co-unit,
.co-total {
  color: var(--primary);
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.co-qty {
  color: #222;
  font-weight: 900;
  text-align: center;
}

/* Divider */
.co-line {
  border-bottom: 1.6px solid rgba(139, 30, 30, .55);
  margin: 6px 0;
}


/* =========================================================
   8) PAYMENT
   ========================================================= */
.co-paygrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}

.co-subhead {
  color: var(--primary);
  font-weight: 900;
  margin: 0 0 0.5rem;
}

.co-bank {
  color: #666;
  font-weight: 800;
  line-height: 1.5;
  padding-top: 24px;
}


/* =========================================================
   9) SUMMARY (GRAND TOTAL)
   ========================================================= */
.co-summary {
  margin-top: 6px;
}

.co-grand {
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
  font-weight: 900;
}

.co-grand-label,
.co-grand-sep {
  color: #222;
  font-weight: 900;
}

.co-grand-val {
  color: var(--primary);
  font-weight: 900;
}

.co-note {
  margin: 0.7rem 0 0;
  color: #777;
  font-size: 0.78rem;
  line-height: 1.5;
  font-weight: 700;
}


/* =========================================================
   10) UPLOAD PAYMENT EVIDENCE
   ========================================================= */
.co-upload {
  margin-top: 8px;
}

/* ===== Upload Function ===== */
.co-file {
  width: 100%;
  max-width: 360px;
  border: 1.8px solid rgba(139, 30, 30, .45);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
}

.co-file-tag {
  background: #eee;
  padding: 0.45rem 0.7rem;
  font-weight: 900;
  color: #222;
  border-right: 1.8px solid rgba(139, 30, 30, .35);
}

.co-file-name {
  padding: 0.45rem 0.7rem;
  font-weight: 900;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Button Function: Pay Now ===== */
.co-paybtn {
  display: inline-block;
  margin-top: 10px;
  padding: 0.45rem 1.4rem;
  border-radius: 10px;
  font-weight: 900;
}


/* =========================================================
   11) RESPONSIVE
   ========================================================= */

/* ===== Tablet & bawah (<= 991px) ===== */
@media (max-width: 991px) {
  .co-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Product List */
  .co-item {
    grid-template-columns: 18px 72px 1fr;
    grid-template-areas:
      "no thumb name"
      "no thumb meta";
    align-items: start;
  }

  .co-name {
    grid-column: 3;
  }

  .co-unit,
  .co-qty,
  .co-total {
    grid-column: 3;
    margin-top: 6px;
  }

  .co-unit { display: inline-block; margin-right: 14px; }
  .co-qty  { display: inline-block; margin-right: 14px; }
  .co-total{ display: inline-block; }

  /* Payment Grid */
  .co-paygrid {
    grid-template-columns: 1fr;
  }

  .co-bank {
    padding-top: 0;
  }
}

/* ===== Mobile (<= 575px) ===== */
@media (max-width: 575px) {
  .co-title {
    font-size: 1.6rem;
    margin: 1rem 0 1.4rem;
  }

  .co-select-small {
    max-width: 100%;
  }

  .co-file {
    max-width: 100%;
  }

  /* =======================================================
     PRODUCT LIST (MOBILE GRID AREAS)
     ======================================================= */
  .co-item {
    display: grid;
    grid-template-columns: 22px 74px 1fr;
    grid-template-areas:
      "no thumb name"
      "no thumb unit"
      "no thumb qty"
      "no thumb total";
    column-gap: 12px;
    row-gap: 6px;
    padding: 12px 0;
    align-items: start;
  }

  .co-thumb {
    grid-area: thumb;
    width: 74px;
    height: 74px;
    align-self: center;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .co-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .co-no   { grid-area: no; }
  .co-name { grid-area: name; }
  .co-unit { grid-area: unit; }
  .co-qty  { grid-area: qty; }
  .co-total{ grid-area: total; }

  .co-prod-title {
    font-size: 1rem;
    line-height: 1.2;
    margin: 0;
  }

  /* No */
  .co-no {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
  }

  /* Rata Kiri Meta */
  .co-unit,
  .co-qty,
  .co-total {
    justify-self: start;
    text-align: left;
    white-space: nowrap;
    font-size: .95rem;
    font-weight: 900;
    color: var(--primary);
    margin: 0;
  }

  .co-line {
    margin: 6px 0;
  }

  /* Payment */
  .co-paygrid {
    grid-template-columns: 1fr !important;
    gap: 10px;
    align-items: start;
  }

  .co-bank {
    padding-top: 0 !important;
    margin-top: 4px;
    width: 100%;
  }

  /* Upload Spacing */
  .co-upload {
    margin-top: 10px;
    margin-bottom: 10px;
    gap: 10px;
  }

  /* Button Full Lebar */
  .co-paybtn {
    margin: 0 !important;
    margin-top: 6px !important;
    padding: .65rem 1rem;
    width: 100%;
  }

  .co-summary {
    margin-bottom: 8px;
  }

  .checkout-page,
  .checkout-page main,
  .co-grid {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
}