/* ==========================================================================
   GLYRA — Checkout
   Two columns: the form on the left, the order on a tinted panel on the
   right. Only the logo and the bag in the header, so nothing competes with
   finishing the order. Loaded by checkout.html alone.
   ========================================================================== */

.co-body{background:#fff}

/* ---------- header ---------- */
.co-header{border-bottom:1px solid rgba(34,36,31,.1);background:#fff}
.co-header-inner{
  max-width:1120px;margin:0 auto;padding:18px 24px;
  display:flex;align-items:center;justify-content:space-between;
}
.co-logo{display:inline-flex}
.co-logo .logo-img{height:30px;width:auto;object-fit:contain}
.co-bag{
  display:grid;place-items:center;width:40px;height:40px;
  color:var(--g-ink,#22241f);border-radius:50%;
}
.co-bag:hover{background:rgba(34,36,31,.06)}
.co-bag svg{width:24px;height:24px}

.co-center{max-width:560px;margin:64px auto;padding:0 20px;text-align:center}

/* ---------- layout ---------- */
.co-layout{
  display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);
  min-height:calc(100vh - 77px);
}
.co-main{display:flex;justify-content:flex-end;padding:36px 44px 64px}
.co-main-inner{width:100%;max-width:560px}
.co-summary{
  background:var(--g-mist,#f4f2ec);
  border-left:1px solid rgba(34,36,31,.08);
  padding:36px 44px 64px;
}
.co-summary-inner{max-width:440px;position:sticky;top:24px}
.co-summary-toggle{display:none}

/* ---------- sections ---------- */
.co-section{margin-bottom:32px}
.co-section h2{
  font-size:1.25rem;font-weight:600;letter-spacing:0;text-transform:none;
  margin:0 0 14px;color:var(--g-ink,#22241f);
}
.co-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.co-link{font-size:.875rem;color:var(--g-ink,#22241f);text-decoration:underline;text-underline-offset:3px}
.co-signed-in{font-size:.875rem;color:var(--g-muted,#6b6f66);margin:-6px 0 12px}
.co-sub{font-size:.8125rem;color:var(--g-muted,#6b6f66);margin:-8px 0 12px}
.co-note{font-size:.75rem;color:var(--g-muted,#6b6f66);margin:-6px 0 12px}

/* ---------- fields: the label sits inside and lifts once there's a value ---------- */
.co-field{position:relative;margin-bottom:12px}
.co-field input,
.co-field select{
  width:100%;height:52px;padding:20px 14px 6px;
  font:inherit;font-size:.9375rem;color:var(--g-ink,#22241f);
  background:#fff;border:1px solid #d6d3cb;border-radius:6px;
  appearance:none;-webkit-appearance:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.co-field select:disabled{opacity:1;color:var(--g-ink,#22241f);background:#fff}
.co-field input:focus,
.co-field select:focus{
  outline:0;border-color:var(--g-ink,#22241f);
  box-shadow:0 0 0 1px var(--g-ink,#22241f);
}
.co-field label{
  position:absolute;left:15px;top:50%;transform:translateY(-50%);
  font-size:.9375rem;color:#85887f;pointer-events:none;
  transition:top .15s ease, font-size .15s ease, transform .15s ease;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 30px);
}
.co-field input:focus + label,
.co-field input:not(:placeholder-shown) + label,
.co-field select + label{top:8px;transform:none;font-size:.6875rem}
.co-field input:invalid:not(:placeholder-shown):not(:focus){border-color:#c0564a}

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

/* the "?" next to Phone */
.co-field-help input{padding-right:46px}
.co-help{
  position:absolute;right:13px;top:50%;transform:translateY(-50%);
  width:20px;height:20px;border-radius:50%;
  border:1.5px solid #85887f;color:#85887f;
  display:grid;place-items:center;font-size:.6875rem;font-weight:700;cursor:help;
}
.co-tip{
  position:absolute;right:-6px;bottom:calc(100% + 10px);width:240px;
  padding:10px 12px;border-radius:6px;background:var(--g-ink,#22241f);color:#fff;
  font-size:.75rem;font-weight:400;line-height:1.45;text-align:left;
  opacity:0;visibility:hidden;transition:opacity .15s ease;z-index:5;
}
.co-help:hover .co-tip,.co-help:focus .co-tip{opacity:1;visibility:visible}

.co-check{
  display:flex;align-items:center;gap:10px;margin:2px 0 0;
  font-size:.875rem;color:var(--g-ink,#22241f);cursor:pointer;
}
.co-check input{width:18px;height:18px;flex:none;accent-color:var(--g-ink,#22241f)}

.co-notes{margin-top:14px}
.co-notes summary{
  cursor:pointer;font-size:.875rem;color:var(--g-ink,#22241f);
  text-decoration:underline;text-underline-offset:3px;list-style:none;
}
.co-notes summary::-webkit-details-marker{display:none}
.co-notes textarea{
  width:100%;margin-top:10px;padding:12px 14px;font:inherit;font-size:.9375rem;
  border:1px solid #d6d3cb;border-radius:6px;resize:vertical;
}
.co-notes textarea:focus{outline:0;border-color:var(--g-ink,#22241f);box-shadow:0 0 0 1px var(--g-ink,#22241f)}
.co-notes--open{margin-top:18px}
.co-notes--open label{display:block;font-size:.875rem;font-weight:600;color:var(--g-ink,#22241f)}
.co-notes--open label span{font-weight:400;opacity:.6}
.co-notes--open textarea{margin-top:6px}

/* ---------- shipping method ---------- */
.co-ship{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  padding:16px;border-radius:6px;font-size:.9375rem;
  border:1px solid var(--g-sage,#7a8b6f);background:rgba(122,139,111,.08);
}
.co-ship strong{font-weight:600;font-size:.875rem;letter-spacing:.3px}

/* ---------- payment ---------- */
.co-pay{border:1px solid #d6d3cb;border-radius:6px;overflow:hidden;margin:0;padding:0;min-width:0}
.co-pay-option{
  display:flex;align-items:center;gap:12px;padding:16px;cursor:pointer;
  border-top:1px solid #d6d3cb;font-size:.9375rem;
}
.co-pay-option:first-of-type{border-top:0}
.co-pay-option input{width:18px;height:18px;flex:none;margin:0;accent-color:var(--g-ink,#22241f)}
.co-pay-option:has(input:checked){background:rgba(122,139,111,.08);box-shadow:inset 0 0 0 1px var(--g-sage,#7a8b6f)}
.co-pay-title{font-weight:500}
.co-pay-fee{margin-left:auto;font-size:.75rem;color:var(--g-muted,#6b6f66);text-align:right}
.co-pay-perk{
  margin-left:auto;font-size:.6875rem;letter-spacing:.6px;text-transform:uppercase;
  padding:3px 8px;border-radius:999px;background:rgba(122,139,111,.18);color:#4d5c45;
}
.co-pay-panel{
  padding:16px 18px;background:#faf9f6;border-top:1px solid #d6d3cb;
  font-size:.875rem;line-height:1.6;color:var(--g-ink,#22241f);
}
.co-pay-panel ol{margin:0;padding-left:18px}
.co-pay-panel li{margin:4px 0}
.co-pay-lead{font-weight:600;margin:0 0 6px}
.co-pay-panel .otp-box{margin-top:14px}
.co-pay-panel .proof-fields{margin-top:14px}

/* ---------- submit ---------- */
.co-error{margin-top:4px}
.co-submit{
  width:100%;height:56px;margin-top:20px;border:0;border-radius:6px;cursor:pointer;
  background:var(--g-ink,#22241f);color:#fff;font:inherit;font-size:1rem;font-weight:600;
  transition:background .15s ease;
}
.co-submit:hover{background:#000}
.co-submit:disabled{opacity:.6;cursor:default}
.co-submit:focus-visible{outline:2px solid var(--g-sage,#7a8b6f);outline-offset:2px}
.co-pay-note{margin:10px 0 0;font-size:.8125rem;color:var(--g-muted,#6b6f66);text-align:center}

.co-policies{
  display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:40px;padding-top:16px;
  border-top:1px solid rgba(34,36,31,.1);
}
.co-policies a{font-size:.8125rem;color:var(--g-ink,#22241f);text-decoration:underline;text-underline-offset:3px}

/* ---------- summary ---------- */
.co-item{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:14px;align-items:center;margin-bottom:14px}
.co-thumb{
  position:relative;width:64px;height:64px;border-radius:8px;
  border:1px solid rgba(34,36,31,.12);background:#fff;
}
.co-thumb img{width:100%;height:100%;object-fit:contain;padding:4px;border-radius:8px}
.co-qty{
  position:absolute;top:-8px;right:-8px;min-width:22px;height:22px;padding:0 6px;
  border-radius:11px;background:rgba(34,36,31,.82);color:#fff;
  font-size:.75rem;font-weight:600;display:grid;place-items:center;
}
.co-item-name{font-size:.875rem;font-weight:500;line-height:1.35}
.co-item-sub{display:block;font-size:.75rem;color:var(--g-muted,#6b6f66);margin-top:2px}
.co-item-price{font-size:.875rem;white-space:nowrap}

.co-discount{display:flex;gap:10px;margin:22px 0 4px}
.co-discount .co-field{flex:1;margin:0}
.co-apply{
  height:52px;padding:0 20px;border-radius:6px;cursor:pointer;
  border:1px solid #d6d3cb;background:#ecebe6;color:var(--g-ink,#22241f);
  font:inherit;font-size:.875rem;font-weight:600;
}
.co-apply:hover{background:#e2e0d9}
.co-apply:disabled{opacity:.6;cursor:default}
.co-discount-msg{min-height:0;font-size:.8125rem}

.co-offer{
  margin:12px 0 0;padding:10px 12px;border-radius:6px;font-size:.8125rem;line-height:1.45;
  background:rgba(122,139,111,.14);color:#3f4b39;
}
.co-offer a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px}

.co-lines{margin-top:18px}
.co-line{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:.875rem}
.co-line em{font-style:normal;color:var(--g-muted,#6b6f66);font-size:.8125rem;margin-left:4px}
.co-total{margin-top:8px;padding-top:12px;font-size:1.125rem;font-weight:600;align-items:baseline}
.co-total small{font-size:.75rem;font-weight:400;color:var(--g-muted,#6b6f66);margin-right:4px}
.co-total strong{font-size:1.3rem;font-weight:700}
.co-points{margin-top:18px}
.co-points-signin{margin-top:14px;font-size:.8125rem}

/* ---------- phones and small tablets ---------- */
@media (max-width:900px){
  .co-layout{grid-template-columns:1fr;min-height:0}
  .co-summary-toggle{
    order:0;display:flex;align-items:center;justify-content:space-between;gap:12px;
    width:100%;padding:16px 20px;border:0;border-bottom:1px solid rgba(34,36,31,.1);
    background:var(--g-mist,#f4f2ec);font:inherit;color:var(--g-ink,#22241f);cursor:pointer;
  }
  .co-summary-toggle-label{display:flex;align-items:center;gap:8px;font-size:.875rem}
  .co-summary-toggle-label svg{width:20px;height:20px}
  .co-summary-toggle .co-chevron{width:14px;height:14px;transition:transform .2s ease}
  .co-summary-toggle[aria-expanded="true"] .co-chevron{transform:rotate(180deg)}
  .co-summary-toggle strong{font-size:1rem}

  .co-summary{
    order:1;display:none;border-left:0;border-bottom:1px solid rgba(34,36,31,.1);
    padding:20px;
  }
  .co-summary.is-open{display:block}
  .co-summary-inner{max-width:none;position:static}

  .co-main{order:2;padding:24px 20px 48px;justify-content:stretch}
  .co-main-inner{max-width:none}
}

@media (max-width:420px){
  .co-row{grid-template-columns:1fr;gap:0}
  .co-header-inner{padding:14px 16px}
  .co-tip{width:200px}
}

/* An empty error box should take no room between the payment and the button */
.co-error:empty{display:none}
.co-error{margin:16px 0 0}

/* The country box is fixed to Pakistan, but it should still read as a dropdown */
.co-field-select select{
  padding-right:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2385887f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;background-size:16px;
}

/* Why the delivery price changes with the payment option */
.co-ship-name{display:flex;flex-direction:column;gap:2px}
.co-ship-note{font-style:normal;font-size:.75rem;color:var(--g-muted,#6b6f66)}
.co-pay-fee{letter-spacing:0;text-transform:none}
