/* =========================================
   11. COUPON SECTION
   ========================================= */
.checkout-page .page-hero h1 {
  text-shadow: 0 0 12px rgba(239, 189, 98, .22);
  animation: checkoutTitleGlow 2.8s ease-in-out infinite alternate;
}
.checkout-page .page-hero h1 span {
  text-shadow: 0 0 14px rgba(239, 189, 98, .48), 0 0 32px rgba(217, 156, 46, .2);
}
.checkout-page .page-panel {
  position: relative;
  box-shadow: 0 24px 65px rgba(0, 0, 0, .34), 0 0 22px rgba(217, 156, 46, .07);
  animation: checkoutPanelReveal .75s cubic-bezier(.2, .8, .2, 1) both;
}
.checkout-page .delivery-form,
.checkout-page .checkout-summary-column .info-card {
  animation: checkoutCardGlow 3.2s ease-in-out infinite alternate;
}
.checkout-page .checkout-summary-column .info-card:nth-child(2) { animation-delay: -.8s; }
.checkout-page .checkout-summary-column .info-card:nth-child(3) { animation-delay: -1.6s; }
.checkout-page .checkout-summary-column .info-card:nth-child(4) { animation-delay: -2.4s; }
.checkout-page .checkout-summary-column .info-card:nth-child(5) { animation-delay: -3.2s; }

@keyframes checkoutTitleGlow {
  from { filter: brightness(1); }
  to { filter: brightness(1.12); }
}
@keyframes checkoutPanelReveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes checkoutCardGlow {
  from { box-shadow: 0 0 0 rgba(217, 156, 46, 0); }
  to { box-shadow: 0 0 20px rgba(217, 156, 46, .13); }
}
@keyframes deliveryHeadingGlow {
  from { color: #f4eee4; text-shadow: 0 0 8px rgba(239, 189, 98, .16); }
  to { color: #ffd98f; text-shadow: 0 0 14px rgba(239, 189, 98, .55), 0 0 28px rgba(217, 156, 46, .2); }
}

.delivery-form-heading { margin-bottom: 4px; }
.delivery-form-heading p { margin: 0 0 8px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.delivery-form-heading h2 { display: block; width: fit-content; margin: 0 0 7px; color: #f4eee4; text-shadow: 0 0 10px rgba(239, 189, 98, .22); animation: deliveryHeadingGlow 2.4s ease-in-out infinite alternate; }
.delivery-form-heading small { display: block; color: #817a71; }
.delivery-form-heading small b, .delivery-field label b { color: #d9a23e; }
.delivery-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 15px; }
.delivery-field { display: grid; align-content: start; gap: 8px; }
.delivery-field.full { grid-column: 1 / -1; }
.delivery-field label { color: #aaa399; font-size: 12px; }
.delivery-field label small { color: #777168; }
.delivery-form .delivery-field input,
.delivery-form .delivery-field select,
.delivery-form .delivery-field textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: #11100e;
  color: #f5f1ea;
  font: inherit;
  color-scheme: dark;
}
.delivery-form .delivery-field textarea { resize: vertical; line-height: 1.5; }
.delivery-form .delivery-field input:focus,
.delivery-form .delivery-field select:focus,
.delivery-form .delivery-field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 156, 46, .1); }
.delivery-submit { display: flex; justify-content: space-between; width: 100%; margin-top: 5px; }
.checkout-top-progress { display: flex; align-items: center; justify-content: center; gap: 13px; padding-top: 28px; color: #625c54; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.checkout-top-progress i { width: clamp(25px, 6vw, 75px); height: 1px; background: #403727; font-style: normal; }
.checkout-top-progress .done { color: #9d7c43; }
.checkout-top-progress .active { color: #efbd62; }
.checkout-summary-column { display: grid; align-self: start; gap: 14px; }
.checkout-summary-column .info-card { padding: 21px; }
.checkout-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checkout-section-heading p, .checkout-contact p, .checkout-agreement > p, .loyalty-card p, .delivery-preview > p, .checkout-security > p { margin: 0 0 6px; color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: 1.3px; }
.checkout-section-heading h2, .checkout-section-heading h3, .checkout-contact h3, .loyalty-card h2, .delivery-preview h2 { margin: 0; }
.checkout-section-heading h3 { font-size: 16px; }
.checkout-section-heading button, .checkout-section-heading a { padding: 6px 9px; border: 1px solid #514025; border-radius: 6px; background: transparent; color: #d2a24e; text-decoration: none; font-size: 10px; }
.address-book { margin-bottom: 6px; padding: 16px; border: 1px solid #3b3125; border-radius: 10px; background: #100f0c; }
.address-book .checkout-section-heading p { font-size: 11px; }
.address-book .checkout-section-heading h3 { font-size: 20px; }
.address-book .checkout-section-heading button { padding: 8px 12px; border-color: #795725; color: #efbd64; font-size: 12px; font-weight: 700; box-shadow: 0 0 8px rgba(217, 156, 46, .12); animation: addAddressGlow 1.9s ease-in-out infinite alternate; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.address-book .checkout-section-heading button:hover { transform: translateY(-2px); border-color: #d59b3c; box-shadow: 0 6px 16px rgba(0, 0, 0, .28), 0 0 21px rgba(217, 156, 46, .38); }
@keyframes addAddressGlow { from { box-shadow: 0 0 7px rgba(217, 156, 46, .1); } to { box-shadow: 0 0 19px rgba(217, 156, 46, .32); } }
.address-book[hidden] { display: none; }
.saved-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.saved-addresses button { display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; min-height: 76px; padding: 14px; border: 1px solid #413526; border-radius: 8px; background: #15120e; color: #eee; text-align: left; }
.saved-addresses button:hover { border-color: var(--gold); }
.saved-addresses span { grid-row: 1 / 3; font-size: 27px; }
.saved-addresses strong { font-size: 14px; }
.saved-addresses small { overflow: hidden; color: #918a81; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.checkout-contact, .checkout-agreement { margin-top: 6px; padding: 16px; border: 1px solid #3b3125; border-radius: 10px; background: #100f0c; }
.checkout-contact .checkout-section-heading p { font-size: 11px; }
.checkout-contact .checkout-section-heading h3 { font-size: 20px; }
.contact-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; }
.contact-actions a { display: grid; min-height: 42px; padding: 10px 7px; place-items: center; border: 1px solid #4d3b23; border-radius: 6px; color: #dcb361; text-align: center; text-decoration: none; font-size: 12px; font-weight: 700; }
.checkout-agreement { display: grid; gap: 10px; }
.checkout-agreement label { display: flex; align-items: center; gap: 8px; color: #aaa298; font-size: 11px; }
.checkout-agreement input { accent-color: var(--gold); }
.checkout-agreement a { color: #d4a44d; }
.checkout-agreement b { color: #e2a242; }
.checkout-agreement small { color: #706961; font-size: 9px; }
.total-payable { display: flex; align-items: center; justify-content: space-between; padding: 15px; border: 1px solid #594321; border-radius: 9px; background: #1c150b; color: #a49b8f; }
.total-payable strong { color: #efb957; font-size: 24px; }
.secure-order-button { padding: 15px 17px; border: 0; border-radius: 8px; font-weight: 850; }
.secure-order-button:not(:disabled) { animation: secureButtonGlow 1.8s ease-in-out infinite alternate; }
.secure-order-button:disabled { background: #2b2925; color: #777168; box-shadow: none; cursor: not-allowed; opacity: .65; }
.live-order-summary { position: static; }
#checkoutSummaryProducts { display: grid; max-height: 260px; overflow-y: auto; margin-top: 14px; }
.checkout-summary-product { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #30291f; }
.checkout-summary-product img { width: 48px; height: 48px; object-fit: contain; border-radius: 7px; background: #1b1711; }
.checkout-summary-product strong, .checkout-summary-product small { display: block; }
.checkout-summary-product strong { font-size: 11px; }
.checkout-summary-product small { margin-top: 4px; color: #746e66; font-size: 9px; }
.checkout-summary-product > b { color: #dbab55; font-size: 11px; }
.checkout-empty { color: #777168; font-size: 11px; text-align: center; }
.checkout-totals { margin-top: 14px; padding-top: 14px; border-top: 1px solid #382f24; }
.checkout-totals p { display: flex; justify-content: space-between; margin: 0 0 11px; color: #8f887e; font-size: 11px; }
.checkout-totals b { color: #d0c8bd; }
.checkout-totals > div { height: 1px; margin: 14px 0; background: #3b3125; }
.checkout-totals .checkout-grand-total { margin: 0; color: #eee; font-size: 14px; }
.checkout-grand-total strong { color: #efb957; font-size: 20px; }
.loyalty-card { display: grid; gap: 11px; }
.loyalty-card > span { color: #9a9287; font-size: 11px; }
.loyalty-card > span strong { color: #e8b455; font-size: 17px; }
.loyalty-card label { display: flex; gap: 8px; padding: 10px; border: 1px solid #463821; border-radius: 7px; color: #cbbda5; font-size: 11px; }
.loyalty-card input { accent-color: var(--gold); }
.loyalty-card small { margin-left: auto; color: #75c887; }
.delivery-preview { display: grid; gap: 8px; }
.delivery-preview > strong { color: #efb958; font-size: 18px; }
.delivery-preview > span { margin-top: 8px; color: #777168; font-size: 9px; text-transform: uppercase; }
.delivery-preview > b { color: #b8aea0; font-size: 11px; }
.checkout-security { display: flex; flex-wrap: wrap; gap: 9px; }
.checkout-security > p { flex-basis: 100%; }
.checkout-security > span { color: #7ebe8a; font-size: 9px; }

@keyframes secureButtonGlow {
  from { box-shadow: 0 0 10px rgba(239, 181, 68, .2); }
  to { box-shadow: 0 0 25px rgba(239, 181, 68, .5); }
}

@media (prefers-reduced-motion: reduce) {
  .checkout-page .page-hero h1,
  .checkout-page .page-panel,
  .delivery-form-heading h2,
  .address-book .checkout-section-heading button,
  .checkout-page .delivery-form,
  .checkout-page .checkout-summary-column .info-card,
  .secure-order-button:not(:disabled) { animation: none; }
}

.coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  padding: 0;
}
.checkout-page .coupon {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}
.coupon-card { overflow: hidden; }
.coupon-eyebrow { margin: 0 0 7px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.coupon-copy { color: #8e877d; font-size: 12px; }
.coupon-result { min-height: 18px; margin: 13px 0; padding: 10px 11px; border: 1px solid #373027; border-radius: 7px; background: #100f0d; color: #8f887f; font-size: 11px; line-height: 1.45; }
.coupon-result.success { border-color: #315e3c; background: #0f1b12; color: #71cd89; }
.coupon-result.error { border-color: #6b3732; background: #21110f; color: #e9867b; }
.coupon input[aria-invalid="true"] { border-color: #a94e43; }
.coupon-discount { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; padding: 13px; border: 1px solid #4c3a20; border-radius: 8px; background: #1b150c; color: #9c9387; font-size: 12px; }
.coupon-discount strong { color: #edb957; font-size: 17px; }
.coupon-examples { display: grid; gap: 7px; margin-top: 14px; color: #777168; font-size: 10px; }
.coupon-examples b { display: inline-block; min-width: 82px; color: #b8924f; letter-spacing: .5px; }
.coupon-demo-note { margin: 15px 0 0; color: #68635c; font-size: 10px; }
.coupon input {
  flex: 0 1 270px;
  width: 270px;
  min-width: 0;
  border: 1px solid var(--line);
  background: #12110f;
  color: white;
  border-radius: 8px;
  padding: 11px 13px;
}
.checkout-page .coupon input { width: 100%; }
.coupon button {
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  border-radius: 8px;
  padding: 10px 15px;
}

@media (max-width: 560px) {
  .delivery-fields { grid-template-columns: 1fr; }
  .delivery-field.full { grid-column: 1; }
  .contact-actions { grid-template-columns: 1fr 1fr; }
  .saved-addresses { grid-template-columns: 1fr; }
  .checkout-top-progress { gap: 7px; font-size: 8px; }
  .coupon {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px;
  }
  .coupon input {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
  }
  .coupon button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 8px;
    white-space: normal;
  }
  .checkout-page .coupon { grid-template-columns: minmax(0, 1fr) auto; }
  .checkout-page .coupon input { grid-column: auto; }
  .info-card .coupon button:last-child:first-of-type { grid-column: 1 / -1; }
}

@media (max-width: 340px) {
  .coupon { grid-template-columns: 1fr; }
  .coupon input, .coupon button { grid-column: 1; }
}
