/* ============================================================
   Store & Cart — joemcclane.com
   A Chi Rho Impact Media Brand
   Extends css/style.css — uses the same palette variables.
   ============================================================ */

/* ---------- Cart button in the header ---------- */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  border: 1px solid rgba(201, 162, 39, .5);
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .38rem .8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.cart-btn:hover { background: rgba(201, 162, 39, .14); border-color: var(--gold); }
.cart-btn .cart-count {
  display: none;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--burgundy);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}
.cart-btn.has-items .cart-count { display: inline-block; }

/* ---------- Slide-out drawer ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 29, 46, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
  z-index: 200;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(410px, 100%);
  height: 100%;
  background: var(--cream);
  box-shadow: -8px 0 32px rgba(18, 29, 46, .3);
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  z-index: 201;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
  background: var(--navy-dark);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}
.cart-head h2 {
  color: #fff;
  font-size: 1.15rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cart-close {
  background: none;
  border: 0;
  color: var(--gold-light);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .2rem;
}
.cart-close:hover { color: #fff; }

.cart-body { flex: 1 1 auto; overflow-y: auto; padding: 1.1rem; }

.cart-empty { text-align: center; color: var(--gray); padding: 2.5rem 1rem; }
.cart-empty .ce-mark { font-size: 2.2rem; color: var(--gold-deep); margin-bottom: .6rem; }
.cart-empty p { margin-bottom: 1.2rem; }

.cart-line {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: .8rem;
  padding: .9rem 0;
  border-bottom: 1px solid #e6dfcd;
  align-items: start;
}
.cart-line:first-child { padding-top: 0; }
.cart-line img {
  width: 54px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(18, 29, 46, .22);
}
.cart-line h4 {
  font-size: .92rem;
  margin: 0 0 .15rem;
  line-height: 1.3;
}
.cart-line .cl-price { font-size: .84rem; color: var(--gray); }
.cart-line .cl-remove {
  background: none;
  border: 0;
  color: var(--gray);
  font-size: .76rem;
  text-decoration: underline;
  cursor: pointer;
  padding: .3rem 0 0;
}
.cart-line .cl-remove:hover { color: var(--burgundy); }
.cart-line .cl-total { font-weight: 700; color: var(--navy); font-size: .95rem; white-space: nowrap; }

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9d0ba;
  border-radius: 4px;
  overflow: hidden;
  margin-top: .35rem;
  background: #fff;
}
.qty button {
  width: 26px;
  height: 26px;
  border: 0;
  background: #f4efe2;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.qty button:hover { background: var(--gold-light); }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty span {
  min-width: 30px;
  text-align: center;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
}

.cart-foot {
  flex: 0 0 auto;
  border-top: 1px solid #e6dfcd;
  background: #f4efe2;
  padding: 1rem 1.1rem 1.2rem;
}
.cart-foot .row {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--gray);
}
.cart-foot .row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  border-top: 1px solid #ddd4bf;
  padding-top: .6rem;
  margin-top: .6rem;
}
.cart-foot .btn { width: 100%; text-align: center; margin-top: .8rem; }
.ship-note { font-size: .78rem; color: var(--gray); margin: .5rem 0 0; line-height: 1.45; }
.ship-progress {
  font-size: .8rem;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: .5rem;
}

/* ---------- Shop grid ---------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.6rem;
  margin-top: 1.5rem;
}
.shop-card {
  background: #fff;
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 3px 16px rgba(18, 29, 46, .1);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.shop-card img {
  max-width: 168px;
  margin: 0 auto 1rem;
  border-radius: 3px;
  box-shadow: 0 6px 20px rgba(18, 29, 46, .28);
}
.shop-card h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.shop-card .sc-blurb { font-size: .89rem; color: var(--gray); margin-bottom: .9rem; }
.shop-card .sc-price {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .2rem;
}
.shop-card .sc-signed {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--navy-dark);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  padding: .26rem .66rem;
  border-radius: 999px;
  margin-bottom: .7rem;
}
.shop-card .btn { margin-top: auto; }
.shop-card .btn.added { background: var(--burgundy); color: #fff; }

/* ---------- Checkout form ---------- */
.checkout-wrap {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2.2rem;
  align-items: start;
}
@media (max-width: 820px) {
  .checkout-wrap { grid-template-columns: 1fr; }
}

.form-card,
.summary-card {
  background: #fff;
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 3px 16px rgba(18, 29, 46, .1);
  padding: 1.6rem;
}
.summary-card { position: sticky; top: 96px; }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: .3rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: .97rem;
  color: var(--ink);
  background: #fdfbf6;
  border: 1px solid #d9d0ba;
  border-radius: 4px;
  padding: .62rem .7rem;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .18);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 74px; }
.field .hint { font-size: .78rem; color: var(--gray); margin: .3rem 0 0; }
.field .counter { float: right; font-size: .74rem; color: var(--gray); font-weight: 400; text-transform: none; letter-spacing: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field-row.thirds { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 520px) {
  .field-row, .field-row.thirds { grid-template-columns: 1fr; }
}

fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
fieldset legend {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .9rem;
  padding: 0;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 700;
  margin-right: .5rem;
}

.summary-card h3 { border-bottom: 1px solid #e6dfcd; padding-bottom: .7rem; margin-bottom: .9rem; }
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9rem;
  padding: .42rem 0;
  color: var(--ink);
}
.summary-line .sl-name { flex: 1; }
.summary-line .sl-amt { font-weight: 600; white-space: nowrap; }
.summary-total {
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--navy);
  margin-top: .7rem;
  padding-top: .7rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}
.tax-note { font-size: .78rem; color: var(--gray); margin-top: .6rem; }

#paypal-buttons { margin-top: 1.2rem; min-height: 52px; }
.pay-gate {
  font-size: .86rem;
  color: var(--gray);
  background: #f4efe2;
  border-left: 3px solid var(--gold);
  padding: .7rem .85rem;
  border-radius: 0 4px 4px 0;
}

.form-error {
  background: #fdf1f2;
  border-left: 3px solid var(--burgundy);
  color: #6e1423;
  font-size: .9rem;
  padding: .75rem .9rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 1rem;
}
.form-error:empty { display: none; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  justify-content: center;
  margin-top: 1.6rem;
  font-size: .82rem;
  color: var(--gray);
}
.trust-row span::before { content: "\2713"; color: var(--gold-deep); font-weight: 700; margin-right: .35rem; }

/* ---------- Confirmation page ---------- */
.receipt {
  background: #fff;
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 3px 16px rgba(18, 29, 46, .1);
  padding: 1.8rem;
  max-width: 640px;
  margin: 0 auto;
}
.receipt .ref {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray);
}
.receipt .ref strong { color: var(--navy); letter-spacing: .04em; }
.receipt address {
  font-style: normal;
  background: #f4efe2;
  border-radius: 4px;
  padding: .85rem 1rem;
  font-size: .92rem;
  line-height: 1.6;
}
.receipt .insc {
  font-family: var(--serif);
  font-style: italic;
  color: var(--navy);
  border-left: 3px solid var(--gold);
  padding-left: .85rem;
}
