/* Let's Talk Weddings PH — pages.css: Product page, cart, checkout and order confirmation.
   Load order: base.css, shop.css, pages.css (then admin.css on the admin page). */

/* ---------- Product page ---------- */
.crumbs { padding-top: var(--s-5); font-size: var(--t-xs); color: var(--ink-3); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.crumbs li + li::before { content: '/'; margin-right: var(--s-2); color: #cdbfb8; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--teal-deep); text-decoration: underline; }
.product { display: grid; gap: var(--s-6); padding-block: var(--s-5) var(--s-8); }
@media (min-width: 900px) { .product { grid-template-columns: 1.05fr 1fr; gap: var(--s-8); align-items: start; } }
@media (min-width: 900px) { .product__media { position: sticky; top: 96px; } }
.product__media .visual { aspect-ratio: 1 / 1; border-radius: 999px 999px 20px 20px; }
@media (min-width: 900px) { .product__media .visual { aspect-ratio: 4 / 5; } }
.product__media img.visual { padding: 10% 8% 6%; } /* a little more room under the arch */
.product__zoom { position: relative; display: block; border-radius: 999px 999px 20px 20px; }
.product__zoom:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 4px; }
.product__zoom-hint {
  position: absolute; right: 12px; bottom: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgb(255 255 255 / 0.9); color: var(--ink, #2b2b2b); font-size: var(--t-xs, 0.75rem);
}
.product__thumbs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.product__thumb {
  width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; background: var(--blush); cursor: pointer;
}
.product__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product__thumb[aria-current="true"] { border-color: var(--teal-deep); }
.product__thumb:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
.product h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.625rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 var(--s-4); text-wrap: balance; }
.product__price { display: flex; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-4); }
.product__price .price { font-size: var(--t-lg); }
.product__tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.product__tags .tag { position: static; }
.product__desc { margin: 0 0 var(--s-6); color: var(--ink-2); font-size: var(--t-md); max-width: 46ch; }
.product__desc p { margin: 0 0 var(--s-3); }
.product__desc p:last-child { margin-bottom: 0; }
.product__desc ul { margin: 0 0 var(--s-3); padding-left: 1.2em; columns: 2; column-gap: var(--s-6); font-size: var(--t-sm); }
.product__desc li { break-inside: avoid; margin-bottom: 2px; }
.select {
  width: 100%; max-width: 420px; min-height: 46px; padding: 0 40px 0 14px;
  border: 1px solid #d6ccc7; border-radius: 10px; background: var(--surface);
  font-size: 0.9375rem; color: var(--ink); cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23005e80' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select:hover { border-color: #b9aca5; }
.select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(55, 118, 153, 0.22); }
.product form { display: grid; gap: var(--s-5); border-top: 1px solid var(--line); padding-top: var(--s-5); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: var(--s-3); padding: 0; }
.field-label { margin: 0 0 var(--s-3); font-weight: 600; }
.field-label--block { display: block; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 0.9375rem; color: var(--ink-2); line-height: 1.3;
}
.choice span small { color: var(--teal-deep); font-weight: 600; font-size: var(--t-xs); }
.choice input:hover + span { border-color: #cdbfb8; color: var(--ink); }
.choice input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--teal); }
.choice input:focus-visible + span { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
.choice-note { margin: var(--s-2) 0 0; font-size: var(--t-xs); color: var(--ink-2); }
.choice-note:empty { display: none; }
.qty-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--outline); border-radius: 999px; background: var(--surface); overflow: hidden; }
.qty button { width: 46px; border: 0; background: none; font-size: 1.25rem; cursor: pointer; color: var(--ink-2); }
.qty button:hover { background: var(--blush); color: var(--ink); }
.qty input { width: 76px; min-height: 46px; border: 0; text-align: center; background: none; font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-hint { font-size: var(--t-xs); color: var(--ink-3); }
.summary { display: grid; gap: var(--s-1); padding: var(--s-4) var(--s-5); border-radius: var(--radius); background: var(--blush); }
.summary__row { display: flex; justify-content: space-between; gap: var(--s-4); color: var(--ink-2); font-size: 0.9375rem; }
.summary__row .free { color: var(--teal-deep); font-weight: 600; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); font-weight: 600; margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line); }
.summary__total .price { font-size: var(--t-lg); }
.form-hint { margin: 0; font-size: var(--t-xs); color: var(--ink-3); }
.added:empty { display: none; }
.added { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: var(--radius); background: var(--teal-soft); }
.added__msg { margin: 0; }
.added__msg strong { color: var(--teal-deep); }
.added__msg--error { color: var(--error); }
.added__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.added__actions .btn { min-height: 44px; padding: 0 var(--s-5); font-size: 0.9375rem; }
.related { border-top: 1px solid var(--line); padding-block: var(--s-7) var(--s-8); }
.related h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--t-lg); margin: 0 0 var(--s-5); }
@media (min-width: 1000px) { .related .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* =========================================================
   Step 2 — cart, checkout, confirmation
   ========================================================= */
.page { padding-block: var(--s-6) var(--s-8); min-height: 60vh; }
.page-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); line-height: 1.15; letter-spacing: -0.015em;
  margin: 0 0 var(--s-3);
}
.page-lede { margin: 0 0 var(--s-6); color: var(--ink-2); font-size: var(--t-md); max-width: 52ch; }
.back { margin: 0 0 var(--s-4); }
.link-back { color: var(--teal-deep); font-weight: 500; text-decoration: none; font-size: 0.9375rem; }
.link-back::before { content: '\2190\00a0'; }
.link-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--teal-deep); font-size: 0.9375rem; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }
.btn--block { width: 100%; }
.btn--lg { min-height: 56px; font-size: var(--t-md); }
.notice { margin: 0 0 var(--s-5); padding: var(--s-3) var(--s-4); border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 0.9375rem; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-7); } }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.line {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--s-2) var(--s-4);
  padding: var(--s-5) 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 600px) { .line { grid-template-columns: 112px minmax(0, 1fr) auto; } }
.line__media .visual { aspect-ratio: 1; border-radius: 12px; padding: 12%; }
.line__media img.visual { padding: 6%; }
.line__media .specimen__note { display: none; }
.line__media .specimen { padding: 8%; }
.line__media .specimen__title { font-size: 0.75rem; }
.line__media .specimen__variant { font-size: 0.75rem; }
.line__body { display: grid; gap: var(--s-1); align-content: start; min-width: 0; }
.line__name { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: var(--t-sm); line-height: 1.35; }
.line__name a { text-decoration: none; }
.line__name a:hover { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; }
.line__opts, .line__unit { margin: 0; color: var(--ink-2); font-size: 0.875rem; }
.line__fee { margin: 0; color: var(--teal-deep); font-size: 0.875rem; font-weight: 500; }
.line__problem { margin: 0; color: var(--error); font-size: 0.875rem; }
.line__problem a { color: inherit; }
.line__controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.line__total { grid-column: 2; font-weight: 600; color: var(--ink); font-size: var(--t-md); }
@media (min-width: 600px) { .line__total { grid-column: 3; grid-row: 1; text-align: right; } }
.qty--sm button { width: 40px; font-size: 1.125rem; }
.qty--sm input { width: 64px; min-height: 40px; }
.qty button:disabled { color: #c3c9ce; cursor: not-allowed; background: none; }
.cart-summary, .checkout-summary {
  display: grid; gap: var(--s-4); padding: var(--s-5);
  border-radius: var(--radius); background: var(--blush);
}
@media (min-width: 900px) { .cart-summary, .checkout-summary { position: sticky; top: 96px; } }
.cart-summary .summary__total, .checkout-summary .summary__total { margin-top: 0; padding-top: 0; border-top: 0; }
.cart-summary .form-hint, .checkout-summary .form-hint { font-size: 0.875rem; color: var(--ink-2); }
.cart-summary a[aria-disabled='true'] { background: #a9bcc7; border-color: #a9bcc7; pointer-events: none; }

/* ---------- Checkout ---------- */
.checkout-layout { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 960px) { .checkout-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s-7); } }
@media (max-width: 959px) { .checkout-summary { order: -1; } }
.checkout-summary h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.375rem; }
.mini-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.mini-lines li { display: flex; justify-content: space-between; gap: var(--s-4); font-size: 0.9375rem; }
.mini-lines li > span { flex: none; font-weight: 500; }
.mini__name { margin: 0; line-height: 1.35; }
.mini__opts { margin: 2px 0 0; color: var(--ink-3); font-size: 0.8125rem; }
.checkout-summary .summary__total { padding-top: var(--s-3); border-top: 1px solid var(--line); }

.checkout-form { display: grid; gap: var(--s-5); }
.step {
  display: grid; gap: var(--s-4);
  padding: var(--s-5); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
@media (min-width: 600px) { .step { padding: var(--s-6); } }
.step > legend {
  float: left; width: 100%; margin: 0 0 var(--s-2); padding: 0;
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; color: var(--teal-deep);
}
.step__n {
  display: grid; place-items: center; width: 32px; height: 32px; flex: none;
  border: 1px solid var(--outline); border-radius: 50%;
  font-family: var(--font-display); font-size: 0.9375rem; font-weight: 400; color: var(--ink);
}
.row { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .row--2 { grid-template-columns: 1fr 1fr; } .row--3 { grid-template-columns: 1.4fr 1fr 0.8fr; } }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field--narrow { max-width: 320px; }
.field--narrow-md { max-width: 440px; }
.field > label, .field > .label { margin: 0; font-weight: 500; font-size: 0.9375rem; color: var(--ink); }
.optional { color: var(--ink-3); font-weight: 400; }
.field input:not([type='radio']):not([type='checkbox']):not([type='file']), .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid #d6ccc7; border-radius: 10px; background: var(--surface);
  font-size: 1rem; line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; min-height: 72px; }
.field input:hover, .field textarea:hover { border-color: #b9aca5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(55, 118, 153, 0.22); }
.field input::placeholder, .field textarea::placeholder { color: #9aa1a8; }
.hint { margin: 0; color: var(--ink-3); font-size: 0.8125rem; line-height: 1.45; }
.error, .warning { margin: 0; font-size: 0.875rem; line-height: 1.4; display: flex; gap: 6px; }
.error { color: var(--error); font-weight: 500; }
.error::before { content: '!'; flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--error); color: #fff; font-size: 0.75rem; font-weight: 700; }
.warning { color: var(--warn); padding: var(--s-2) var(--s-3); border-radius: 8px; background: var(--warn-soft); }
.field--error input:not([type='radio']):not([type='checkbox']):not([type='file']), .field--error textarea { border-color: var(--error); background: var(--error-soft); }
.field--error .choice span, .field--error .upload__drop { border-color: var(--error); }
.error-summary {
  padding: var(--s-4) var(--s-5); border-radius: var(--radius);
  border: 2px solid var(--error); background: var(--error-soft);
}
.error-summary:focus { outline: none; box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.25); }
.error-summary h2 { margin: 0 0 var(--s-2); font-size: 1rem; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.error-summary a { color: var(--error); }

.pay-box { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: 12px; background: var(--blush); }
.pay-box__amount { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); font-weight: 500; }
.pay-box__amount .price { font-size: var(--t-lg); }
.pay-breakdown { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s-4); font-size: 0.9375rem; color: var(--ink-2); }
.pay-breakdown dt, .pay-breakdown dd { margin: 0; }
.pay-breakdown dd { text-align: right; }
.summary__row--strong { color: var(--teal-deep); font-weight: 600; font-size: 1rem; }
.pay-methods { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.pay-methods li { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); border-radius: 10px; background: var(--surface); }
.pay-methods strong { color: var(--teal-deep); font-weight: 600; }
.pay-methods span { color: var(--ink-2); font-size: 0.9375rem; }
.pay-methods li.has-qr { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.pay-method__text { display: grid; gap: 2px; min-width: 0; }
.pay-qr-open { margin-top: 4px; color: var(--teal-deep); font-size: 0.875rem; font-weight: 500; }
.pay-qr-tip { color: var(--ink-3); font-size: 0.75rem; line-height: 1.4; }
.pay-qr-link { display: block; justify-self: end; }
.pay-qr { width: 148px; height: 148px; object-fit: contain; border-radius: 8px; background: #fff; padding: 6px; border: 1px solid var(--line); image-rendering: auto; }
@media (max-width: 420px) {
  .pay-methods li.has-qr { grid-template-columns: 1fr; }
  .pay-qr-link { justify-self: center; }
  .pay-qr { width: 200px; height: 200px; }
}

.upload { position: relative; }
.upload input[type='file'] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload__drop {
  display: grid; justify-items: center; gap: 4px; text-align: center;
  padding: var(--s-6) var(--s-4); border: 1.5px dashed #c9bbb4; border-radius: var(--radius);
  background: var(--paper); cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.upload__drop:hover { border-color: var(--teal); background: var(--teal-soft); }
.upload input:focus-visible + .upload__drop { outline: 2px solid var(--teal-deep); outline-offset: 3px; }
.upload__title { font-weight: 600; color: var(--teal-deep); }
.upload__title::before { content: '\2191\00a0'; }
.upload__sub { font-size: 0.8125rem; color: var(--ink-3); }
.upload--busy .upload__title::after { content: ' \2014 preparing image\2026'; font-weight: 400; color: var(--ink-3); }
.upload--done .upload__drop { display: none; }
.upload__preview { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3); border-radius: var(--radius); background: var(--teal-soft); }
.upload__preview img { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--surface); }
.upload__name { margin: 0 0 4px; font-size: 0.9375rem; word-break: break-word; }

.terms { border: 1px solid var(--line); border-radius: 12px; padding: var(--s-3) var(--s-4); background: var(--paper); }
.terms summary { cursor: pointer; color: var(--teal-deep); font-weight: 500; }
.terms ul { margin: var(--s-3) 0 0; padding-left: 1.1em; display: grid; gap: 4px; color: var(--ink-2); font-size: 0.9375rem; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: 0.9375rem; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--teal); flex: none; }

/* ---------- Confirmation ---------- */
.confirm { max-width: 640px; margin: 0 auto; padding-block: var(--s-6); text-align: center; display: grid; gap: var(--s-4); justify-items: center; }
.confirm .script { font-size: 2.5rem; margin: 0; }
.confirm .page-title:focus { outline: none; }
.confirm__no { margin: 0; font-size: var(--t-md); }
.confirm__no strong { color: var(--teal-deep); letter-spacing: 0.02em; }
.confirm .notice { margin: 0; }
.confirm__next {
  margin: 0; padding: var(--s-5) var(--s-5) var(--s-5) 2.6em; text-align: left;
  border-radius: var(--radius); background: var(--blush); display: grid; gap: var(--s-3); width: 100%;
}
.confirm__next strong { color: var(--teal-deep); }
