/* =========================================================
   Vegto · inner pages: shared components
   (page header, breadcrumbs, forms, panels, summaries, notices,
    empty states, accordions, prose, CTA band). Loaded after style.css.
   ========================================================= */

/* ---------- Page header ---------- */
.page-head { background: var(--tint); padding: 26px 0 34px; border-bottom: 1px solid var(--line); }
.page-head-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--green); }
.crumbs svg { width: 14px; height: 14px; opacity: .6; }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 500; }
.page-title { margin-top: 14px; font: 600 38px/1.15 var(--head); letter-spacing: -.015em; }
.page-sub { margin-top: 10px; max-width: 640px; color: var(--ink-2); font-size: 16px; line-height: 1.6; }
.ph-art { width: 360px; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; box-shadow: var(--sh-md); background: var(--green-50); }
.ph-art img { width: 100%; height: 100%; object-fit: cover; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.ph-meta span { display: inline-flex; align-items: center; gap: 8px; }
.ph-meta .ic { color: var(--green); }
/* deep green variant */
.page-head--green { background: linear-gradient(180deg, var(--green-dk), var(--deep-2)); border-bottom: 0; color: #fff; }
.page-head--green .crumbs { color: rgba(255, 255, 255, .7); }
.page-head--green .crumbs a:hover { color: #fff; }
.page-head--green .crumbs [aria-current] { color: #fff; }
.page-head--green .page-title { color: #fff; }
.page-head--green .page-sub, .page-head--green .ph-meta { color: rgba(255, 255, 255, .85); }
.page-head--green .ph-meta .ic { color: var(--leaf-lt); }

/* ---------- Layout helpers ---------- */
.sec-sm { padding: 48px 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.sticky-col { position: sticky; top: 150px; }
.stack > * + * { margin-top: 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- Panels + summaries ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 600 18px var(--head); color: var(--ink); }
.panel-title .ic { width: 20px; height: 20px; color: var(--green); }
.panel-title .step { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; font: 600 14px var(--head); }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 15px; color: var(--ink-2); }
.sum-row b { color: var(--ink); font-weight: 600; }
.sum-row .save { color: var(--green); font-weight: 600; }
.sum-total { margin-top: 8px; padding-top: 14px; border-top: 1px dashed #D5D6C1; font: 600 19px var(--head); color: var(--ink); }
.sum-total b { font-size: 22px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font: 500 14px var(--body); color: var(--ink); }
.label small, .field > label small { font-weight: 400; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--bg); font-size: 15px; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A776D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
.input:hover, .select:hover, .textarea:hover { border-color: #CCD2BC; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-50); }
.input::placeholder, .textarea::placeholder { color: #8B8E80; }
.hint { font-size: 13px; color: var(--muted); }
.field-error { display: none; align-items: center; gap: 6px; font-size: 13px; color: #C62828; }
.field-error .ic { width: 15px; height: 15px; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #E57373; }
.field.has-error .field-error { display: flex; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .ic { position: absolute; left: 14px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.input-wrap > .input { padding-left: 44px; }
.input-wrap > .input-btn { position: absolute; right: 6px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.input-wrap > .input-btn:hover { background: var(--green-50); color: var(--green-dk); }
.input-prefix { display: flex; }
.input-prefix > span { display: grid; place-items: center; padding: 0 14px; border: 1.5px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--tint); font-weight: 500; color: var(--ink-2); }
.input-prefix > .input { border-radius: 0 10px 10px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }

.check, .radio { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.check input, .radio input {
  appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; margin-top: 1px;
  border: 1.5px solid #B4C3B0; background: var(--card); cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s;
}
.check input { border-radius: 6px; }
.radio input { border-radius: 50%; }
.check input:checked { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / 14px; border-color: var(--green); }
.radio input:checked { border-color: var(--green); box-shadow: inset 0 0 0 4.5px var(--bg); background: var(--green); }
.check input:focus-visible, .radio input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* selectable cards (payment, delivery slot, address) */
.choice { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.choice:hover { border-color: #CCD2BC; }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-50); box-shadow: 0 0 0 3px rgba(40, 92, 53, .08); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-dot { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid #B4C3B0; background: var(--card); transition: all .2s; }
.choice:has(input:checked) .choice-dot { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 4.5px var(--bg); }
.choice b { display: block; font: 600 15px var(--head); color: var(--ink); }
.choice small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.choice:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }

/* ---------- Buttons + links ---------- */
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn-ghost { background: transparent; color: var(--green-dk); }
.btn-ghost:hover { background: var(--green-50); }
.btn-soft { background: var(--green-50); color: var(--green-dk); }
.btn-soft:hover { background: var(--green-100); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.link { color: var(--green); font-weight: 600; }
.link:hover { color: var(--green-dk); text-decoration: underline; text-underline-offset: 3px; }
.link-danger { color: #C62828; font-weight: 500; }
.link-danger:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Notices, chips, tags ---------- */
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--green-50); color: var(--green-dk); font-size: 14.5px; line-height: 1.5; }
.notice > .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.notice--warn { background: var(--gold-50); color: var(--gold-ink); }
.notice--error { background: #FDECEA; color: #B3261E; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--green-50); color: var(--green-dk); font: 500 13px var(--body); white-space: nowrap; }
.chip button { display: grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; border-radius: 50%; }
.chip button:hover { background: var(--green-100); }
.chip svg { width: 13px; height: 13px; stroke-width: 2.4; }
.tag-soft { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 600 12px var(--body); background: var(--green-50); color: var(--green-dk); }
.tag-soft--amber { background: var(--gold-50); color: var(--gold-ink); }
.tag-soft--red { background: #FDECEA; color: #B3261E; }
.tag-soft--blue { background: #E8F0FE; color: #1A56B8; }
.tag-soft--grey { background: #EEEBDD; color: var(--ink-2); }

/* ---------- Empty state ---------- */
.empty { padding: 56px 20px; text-align: center; }
.empty-ic { display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 50%; background: var(--green-50); color: var(--green); }
.empty-ic svg { width: 42px; height: 42px; stroke-width: 1.5; }
.empty h2, .empty h3 { font: 600 24px var(--head); }
.empty p { max-width: 440px; margin: 10px auto 24px; color: var(--muted); }
.empty .btn + .btn { margin-left: 10px; }

/* ---------- Long-form text ---------- */
.prose { font-size: 16.5px; line-height: 1.8; color: var(--ink-2); }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 38px; font: 600 26px/1.3 var(--head); color: var(--ink); }
.prose h3 { margin-top: 28px; font: 600 20px/1.35 var(--head); color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--green); }
.prose a { color: var(--green); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote { margin: 28px 0; padding: 18px 22px; border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; background: var(--green-50); font: 500 18px/1.6 var(--head); color: var(--green-dk); }
.prose img, .prose figure img { width: 100%; border-radius: 14px; }
.prose figcaption { margin-top: 8px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---------- Mini trust row ---------- */
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-item { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.trust-item .trust-ic { flex: none; }
.trust-item b { display: block; font: 600 14.5px var(--head); color: var(--ink); }
.trust-item small { font-size: 12.5px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .two-col { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .ph-art { width: 300px; }
}
@media (max-width: 960px) {
  .page-head-in { grid-template-columns: 1fr; gap: 20px; }
  .ph-art { width: 100%; max-width: 560px; aspect-ratio: 21 / 9; }
  .page-title { font-size: 32px; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .sticky-col { position: static; }
  .trust-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .page-head { padding: 18px 0 26px; }
  .page-title { margin-top: 10px; font-size: 27px; }
  .page-sub { font-size: 15px; }
  .ph-art { aspect-ratio: 16 / 9; border-radius: 14px; }
  .sec-sm { padding: 36px 0; }
  .panel { padding: 18px; border-radius: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr; gap: 10px; }
  .empty { padding: 40px 8px; }
  .empty .btn + .btn { margin: 10px 0 0; }
}
