/* ==========================================================================
   Cookify — Checkout page
   Ported 1:1 from the Shopify theme's quick-checkout-page.liquid inline
   <style>, with --color-foreground/--color-background mapped to our own
   ivory/ink tokens, and the single-product row made repeatable for a
   multi-item cart.
   ========================================================================== */

.qcp {
  --color-foreground: #17140F;
  --color-foreground-rgb: 23, 20, 15;
  --color-background: #ffffff;
  --color-success: #0a7d2c;
  --color-error: #c0392b;
  font-family: 'Noto Serif Bengali', serif;
  font-size: 15px;
  color: var(--color-foreground);
  background: rgba(23, 20, 15, 0.025);
  /* Fill at least the full viewport height (minus the header) so this
     section's slightly-tinted background always reaches the bottom of
     the screen — otherwise, once the order form is hidden after a
     successful order and the page gets short, the plain page background
     shows through below it and reads as a visible seam / two-tone page. */
  min-height: calc(100vh - 88px);
  padding-bottom: 56px;
}
.qcp * { box-sizing: border-box; font-family: inherit; }

.qcp__breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
.qcp__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
}
.qcp__back:hover { opacity: 1; }

.qcp__head {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px 0;
  text-align: center;
}
.qcp__page-title {
  font-weight: 700;
  font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
  margin: 0 0 6px;
}
.qcp__page-subtitle {
  font-size: 14px;
  color: rgba(23, 20, 15, 0.65);
  margin: 0 auto 8px;
  max-width: 560px;
}

.qcp__wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .qcp__wrap { grid-template-columns: 1fr; gap: 20px; padding: 16px 16px 0; }
  .qcp__breadcrumb { padding: 18px 16px 0; }
  .qcp__head { padding: 12px 16px 0; }
}

.qcp-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}
.qcp__side-col { display: flex; flex-direction: column; gap: 20px; }

.qcp-card__section { padding: 24px; }
.qcp-card__section--divided {
  border-top: 1px solid rgba(23, 20, 15, 0.08);
}

.qcp-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 18px;
}
.qcp-card__bar {
  display: inline-block;
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--color-foreground);
}
.qcp-card__optional {
  font-size: 12px;
  font-weight: 500;
  color: rgba(23, 20, 15, 0.55);
}

.qcp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) {
  .qcp-field-row { grid-template-columns: 1fr; }
}

.qcp-field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.qcp-card__section .qcp-field:last-child { margin-bottom: 0; }
.qcp-field label {
  font-size: 13px;
  font-weight: 600;
}
.qcp-field input,
.qcp-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem;
  border: 1px solid rgba(23, 20, 15, 0.16);
  border-radius: 6px;
  font-size: 14.5px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
}
.qcp-field input:focus,
.qcp-field textarea:focus {
  outline: none;
  border-color: var(--color-foreground);
  background: rgba(255, 255, 255, 0.75);
}
.qcp-field textarea { min-height: 68px; resize: vertical; }
.qcp-hint { color: rgba(23, 20, 15, 0.55); font-size: 12px; line-height: 1.4; }

.qcp-product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(23, 20, 15, 0.08);
}
.qcp-product-row:last-of-type { margin-bottom: 0; }
.qcp-product-row__thumb {
  width: 56px;
  height: 56px;
  max-width: 56px;
  flex: 0 0 56px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(23, 20, 15, 0.04);
}
.qcp-product-row__info { flex: 1 1 auto; min-width: 0; }
.qcp-product-row__name {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.qcp-product-row__qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(23, 20, 15, 0.15);
  border-radius: 7px;
  overflow: hidden;
}
.qcp__qty-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  color: inherit;
}
.qcp__qty-btn:hover { background: rgba(23, 20, 15, 0.05); }
.qcp-product-row__qty-stepper span {
  display: inline-block;
  width: 34px;
  text-align: center;
  border-left: 1px solid rgba(23, 20, 15, 0.12);
  border-right: 1px solid rgba(23, 20, 15, 0.12);
  height: 28px;
  line-height: 28px;
  font-size: 13px;
}
.qcp-product-row__price { font-size: 14px; font-weight: 700; white-space: nowrap; }

.qcp-empty-cart {
  text-align: center;
  padding: 30px 10px;
  color: rgba(23, 20, 15, 0.6);
  font-size: 14px;
}

.qcp-delivery { margin-bottom: 16px; margin-top: 16px; }
.qcp-delivery__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.qcp-delivery__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qcp-delivery__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 20, 15, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
}
.qcp-delivery__option:hover { border-color: rgba(23, 20, 15, 0.4); background: rgba(255, 255, 255, 0.7); }
.qcp-delivery__option.is-selected {
  border-color: var(--color-foreground);
  border-width: 2px;
  background: rgba(255, 255, 255, 0.8);
}
.qcp-delivery__option-name { font-size: 13px; font-weight: 600; }
.qcp-delivery__option-fee { font-size: 12.5px; color: rgba(23, 20, 15, 0.6); }
@media (max-width: 380px) {
  .qcp-delivery__options { grid-template-columns: 1fr; }
}

.qcp-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13.5px;
  color: rgba(23, 20, 15, 0.7);
}
.qcp-totals__row--total {
  color: var(--color-foreground);
  font-size: 16px;
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(23, 20, 15, 0.08);
}

.qcp-payment-method {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  background: rgba(23, 20, 15, 0.05);
  border: 1px solid rgba(23, 20, 15, 0.12);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.qcp-submit-btn {
  width: 100%;
  box-sizing: border-box;
  display: block;
  padding: 16px 24px;
  background: var(--color-foreground);
  color: var(--color-background);
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.qcp-submit-btn:hover { opacity: 0.88; }
.qcp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.qcp-continue-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.qcp-form-message { margin-top: 12px; font-size: 13.5px; text-align: center; min-height: 1em; }
.qcp-form-message.success { color: var(--color-success); font-weight: 600; }
.qcp-form-message.error { color: var(--color-error); font-weight: 600; }

.qcp-form__lock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 11.5px;
  color: rgba(23, 20, 15, 0.5);
}

/* Once the order is confirmed, the form-oriented "চেকআউট / নিচের
   তথ্যগুলো পূরণ করে..." headline no longer makes sense — the success
   card below already has its own "অর্ডার সফল হয়েছে!" title, so hide the
   old headline instead of showing both at once. */
.qcp.is-success .qcp__head { display: none; }
.qcp.is-success .qcp__wrap { display: none; }
.qcp-success-panel {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 0 24px;
  text-align: center;
}
.qcp-success-panel__card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 40px 28px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}
.qcp-success-panel__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(10, 125, 44, 0.12);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  color: var(--color-success);
}
.qcp-success-panel__title {
  font-size: 20px; font-weight: 700; margin: 0 0 8px;
}
.qcp-success-panel__text { font-size: 14.5px; color: rgba(23, 20, 15, 0.7); margin: 0 0 22px; line-height: 1.6; }
.qcp-success-panel__link {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(23, 20, 15, 0.2);
  color: var(--color-foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
