:root {
  --pf-green: #063f35;
  --pf-green-soft: #edf7f3;
  --pf-orange: #e76632;
  --pf-ink: #17231f;
  --pf-muted: #67716c;
  --pf-line: #d9ddd8;
  --pf-paper: #fffdf8;
  --pf-danger: #9d3e36;
}

.pfwca-page {
  width: min(1180px, calc(100% - 40px));
  margin: 48px auto 80px;
  color: var(--pf-ink);
}

.pfwca-page header { margin-bottom: 32px; }
.pfwca-page h1 { margin: 0 0 12px; color: var(--pf-green); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
.pfwca-page h2 { margin: 0 0 18px; color: var(--pf-green); font-size: 1.35rem; }
.pfwca-page p { color: var(--pf-muted); }
.pfwca-eyebrow { margin: 0 0 8px; color: #ba4d2c !important; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.pfwca-checkout__layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 28px; align-items: start; }
.pfwca-checkout-form,
.pfwca-order-summary,
.pfwca-tracking-card,
.pfwca-account-setup,
.pfwca-cart-items {
  border: 1px solid var(--pf-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(6, 63, 53, .07);
}
.pfwca-checkout-form { padding: clamp(20px, 4vw, 38px); }
.pfwca-checkout-form fieldset { margin: 0 0 34px; padding: 0 0 30px; border: 0; border-bottom: 1px solid var(--pf-line); }
.pfwca-checkout-form legend { margin-bottom: 18px; color: var(--pf-green); font-size: 1.25rem; font-weight: 800; }
.pfwca-fields { display: grid; gap: 16px; }
.pfwca-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pfwca-field-full { grid-column: 1 / -1; }
.pfwca-page label { display: grid; gap: 7px; color: var(--pf-green); font-weight: 750; }
.pfwca-page input,
.pfwca-page select,
.pfwca-page textarea {
  width: 100%; min-height: 54px; box-sizing: border-box; border: 1px solid #c9cfca; border-radius: 13px;
  background: #fff; color: var(--pf-ink); padding: 12px 14px; font: inherit; font-size: 16px;
}
.pfwca-page textarea { resize: vertical; }
.pfwca-page input:focus,
.pfwca-page select:focus,
.pfwca-page textarea:focus { outline: 3px solid rgba(6, 95, 79, .16); border-color: #0b7866; }
.pfwca-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.pfwca-slot-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.pfwca-slot-picker label { display: block; }
.pfwca-slot-picker input { position: absolute; opacity: 0; pointer-events: none; }
.pfwca-slot-picker span { display: grid; gap: 3px; min-height: 72px; place-content: center; border: 1px solid #c9cfca; border-radius: 14px; text-align: center; cursor: pointer; }
.pfwca-slot-picker small { color: var(--pf-muted); font-weight: 500; }
.pfwca-slot-picker input:checked + span { border-color: var(--pf-green); background: var(--pf-green); color: #fff; box-shadow: 0 8px 18px rgba(6, 63, 53, .18); }
.pfwca-slot-picker input:checked + span small { color: #d9eee8; }

.pfwca-primary,
.pfwca-secondary {
  display: inline-flex; min-height: 52px; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 999px;
  padding: 13px 24px; border: 1px solid var(--pf-green); text-decoration: none !important; font-weight: 800; cursor: pointer;
}
.pfwca-primary { background: var(--pf-orange); border-color: var(--pf-orange); color: #fff !important; }
.pfwca-secondary { background: #fff; color: var(--pf-green) !important; }
.pfwca-primary:disabled, .pfwca-secondary:disabled { opacity: .55; cursor: wait; }
.pfwca-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; }

.pfwca-order-summary { position: sticky; top: 24px; padding: 26px; background: var(--pf-paper); }
.pfwca-order-summary > div, .pfwca-tracking-card .total { display: flex; gap: 14px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--pf-line); }
.pfwca-order-summary .total, .pfwca-tracking-card .total { margin-top: 8px; border: 0; color: var(--pf-green); font-size: 1.15rem; }
.pfwca-order-summary small { display: block; margin-top: 16px; color: var(--pf-muted); }
.pfwca-notice { margin: 15px 0; padding: 14px 16px; border-radius: 13px; background: #f3f4f1; color: #46504b; }
.pfwca-notice.is-success { background: var(--pf-green-soft); color: #146653; }
.pfwca-notice.is-error { background: #fff1ee; color: var(--pf-danger); }

.pfwca-cart-items { overflow: hidden; }
.pfwca-cart-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px; border-bottom: 1px solid var(--pf-line); }
.pfwca-cart-item:last-child { border-bottom: 0; }
.pfwca-cart-item img { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; }
.pfwca-cart-item small { display: block; margin-top: 5px; color: var(--pf-muted); }
.pfwca-quantity { display: flex; align-items: center; gap: 12px; }
.pfwca-quantity button { width: 38px; height: 38px; border: 1px solid var(--pf-line); border-radius: 50%; background: #fff; color: var(--pf-green); font-size: 1.25rem; cursor: pointer; }
.pfwca-cart > .pfwca-order-summary { position: static; margin-top: 22px; }
.pfwca-cart-count { display: inline-grid; min-width: 18px; height: 18px; place-items: center; margin-left: 4px; padding: 0 3px; border-radius: 99px; background: var(--pf-orange); color: #fff; font-size: 11px; }

.pfwca-tracking { max-width: 760px; }
.pfwca-tracking-card, .pfwca-account-setup { padding: clamp(22px, 5vw, 38px); margin-bottom: 22px; }
.pfwca-tracking-card > strong { display: block; margin: 6px 0 10px; color: var(--pf-green); font-size: 1.8rem; }
.pfwca-account-setup { display: grid; gap: 14px; }

/* Existing product availability surface: preserve its behavior while making controls touch-friendly. */
.pflp-date-control { position: relative; min-width: 0; }
.pflp-web-availability input[type="date"] {
  display: block; min-height: 60px; appearance: auto; -webkit-appearance: auto;
  color-scheme: light; font-size: 16px; padding-right: 48px;
}
.pflp-web-availability input[type="date"]::-webkit-calendar-picker-indicator { display: block; opacity: 1; width: 28px; height: 28px; cursor: pointer; }
.pflp-date-control__placeholder {
  position: absolute; left: 14px; top: 50%; z-index: 1; transform: translateY(-50%);
  color: #67716c; line-height: 1; pointer-events: none;
}
.pflp-date-control input:valid + .pflp-date-control__placeholder { opacity: 0; }
.pflp-date-control__icon { display: none; }
.pflp-web-availability .pfwca-primary,
.pflp-web-availability .pfwca-secondary { width: 100%; margin-top: 12px; }

@media (max-width: 760px) {
  .pfwca-page { width: calc(100% - 24px); margin: 26px auto 60px; }
  .pfwca-checkout__layout { grid-template-columns: 1fr; }
  .pfwca-order-summary { position: static; order: -1; }
  .pfwca-fields.two { grid-template-columns: 1fr; }
  .pfwca-slot-picker { grid-template-columns: 1fr; }
  .pfwca-slot-picker span { min-height: 58px; grid-template-columns: auto auto; gap: 10px; }
  .pfwca-cart-item { grid-template-columns: 72px minmax(0, 1fr); }
  .pfwca-cart-item img { width: 72px; height: 72px; }
  .pfwca-quantity { grid-column: 2; }
  .pfwca-actions { display: grid; }
  .pfwca-primary, .pfwca-secondary { width: 100%; }
  .pflp-product-page { width: 100% !important; max-width: none !important; }
  .pflp-product-page .pflp-web-availability { margin-left: 0 !important; margin-right: 0 !important; }
}

@media (max-width: 620px) {
  /* One mobile surface instead of three nested cards. This recovers 74px of useful width at 390px. */
  .pflp-product-page .pflp-pdp {
    width: auto;
    margin-inline: 12px;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
  }
  .pflp-product-page .pflp-pdp-breadcrumb {
    margin-bottom: 18px;
    padding: 18px 16px 0;
  }
  .pflp-product-page .pflp-pdp-grid { gap: 18px; }
  .pflp-product-page .pflp-pdp-main-image {
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .pflp-product-page .pflp-pdp-summary {
    padding: 18px 16px 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
  .pflp-product-page .pflp-pdp-summary h1 {
    font-size: clamp(32px, 9.5vw, 38px);
    line-height: 1.04;
  }
  .pflp-product-page .pflp-pdp-intro {
    font-size: 16px;
    line-height: 1.5;
  }
  .pflp-product-page .pflp-pdp-buybox {
    margin-inline: -16px;
    padding: 18px 16px;
    border-width: 1px 0 0;
    border-radius: 0;
  }
  .pflp-product-page .pflp-pdp-variants > div,
  .pflp-time-slots__options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .pflp-product-page .pflp-pdp-variants button {
    min-width: 0;
    min-height: 70px;
    padding: 10px 8px;
    text-align: center;
  }
  .pflp-product-page .pflp-pdp-variants button strong { font-size: 14px; }
  .pflp-product-page .pflp-pdp-variants button small {
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
  }
  .pflp-time-slots__options span {
    min-height: 68px;
    padding: 8px 4px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    text-align: center;
  }
  .pflp-time-slots__options strong {
    font-size: 12px;
    line-height: 1.15;
    white-space: nowrap;
  }
  .pflp-time-slots__options small { font-size: 10px; line-height: 1.15; }
}

@media (max-width: 350px) {
  .pflp-time-slots__options strong { font-size: 11px; }
  .pflp-product-page .pflp-pdp-variants button small { font-size: 10px; }
}
