/* ============================================================
 * Cart + shared form primitives — dva v3
 *
 * Layout namespace:   .crt-*       (cart page + drawer)
 *                     .auth-*      (login/registration — Phase 3)
 *                     .acc-*       (account hub — Phase 3)
 * Shared primitives:  .form-field, .summary-row, .flash-banner,
 *                     .step-indicator
 *
 * Visual vocabulary: matches .pd-* on the product page —
 *   hairline borders, generous whitespace, mono labels for
 *   meta info, tabular numerals for money, accent-on-hover only,
 *   no shadow lift, no card-on-card chrome. Single content well
 *   (xbec__container) frames every layout.
 *
 * Tokens: --hp-* from general.css. Buttons reuse .hp-btn{-primary|-secondary|-ghost}.
 * ============================================================ */


/* ── Shared primitives ────────────────────────────────────── */

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-field-label {
  font-family: var(--hp-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hp-fg-faint);
}
/*
 * Help text BELOW an input (block context).
 * Glued tight to the input above (4px) and pulled further away from
 * the next field's label (the .form-field's own margin-bottom
 * handles that). Smaller + lighter than the input text so it reads
 * as a footnote, not a sibling label.
 */
.form-field-help {
  margin: -2px 0 0;
  padding-left: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--hp-fg-muted);
  opacity: 0.85;
}
.form-field-input + .form-field-help,
.form-field-textarea + .form-field-help,
.form-field-select + .form-field-help {
  margin-top: 4px;
}
/* Right-aligned variant — used for inline action links that belong to
   the field above (e.g. "Zaboravljena lozinka?" under the password
   input). */
.form-field-help-right { text-align: right; }
.form-field-help-right .auth-link {
  font-size: inherit;
  font-weight: 500;
  color: var(--hp-fg-muted);
  text-decoration: none;
}
.form-field-help-right .auth-link:hover {
  color: var(--hp-accent);
  text-decoration: underline;
}
/* Help text INSIDE a label, e.g. "Telefon (opciono)" — must match the
   label's mono/uppercase vocabulary or it looks like a font swap. */
.form-field-label .form-field-help {
  font-family: var(--hp-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hp-fg-faint);
  opacity: 0.7;
  margin-left: 4px;
}
.form-field-input,
.form-field-textarea,
.form-field-select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--hp-hairline);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--hp-fg);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.form-field-input:hover,
.form-field-textarea:hover,
.form-field-select:hover {
  border-color: var(--hp-hairline-strong);
}
/*
 * Focus styling. We explicitly re-assert `border: 1px solid` here
 * (not just border-color) because general.css ships a global
 * `input:focus { outline: none; border: none; }` rule that would
 * otherwise strip the border entirely on focus — collapsing the
 * box by 2px and creating visible jitter against the box-shadow
 * halo. The :focus selectors below match the same specificity as
 * the global rule, ensuring the border stays put.
 */
.form-field-input:focus,
.form-field-input:focus-visible,
.form-field-textarea:focus,
.form-field-textarea:focus-visible,
.form-field-select:focus,
.form-field-select:focus-visible {
  outline: none;
  border: 1px solid var(--hp-accent);
  box-shadow: 0 0 0 3px var(--hp-accent-soft);
}

/*
 * Live-validation feedback. typed-inputs.js writes is-valid / is-invalid
 * onto the .form-field wrapper after blur. We tint the input border
 * and add a tiny inline icon at the right edge. The check / cross
 * SVGs sit on top of the input via background-image so no extra
 * markup is needed.
 */
.form-field.is-valid .form-field-input {
  border-color: #1b8f3a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231b8f3a'%3E%3Cpath d='M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zm3.2 5.1L7.5 10.3a.85.85 0 0 1-1.2 0L4.8 8.8a.85.85 0 1 1 1.2-1.2l.9.9 3.1-3.1a.85.85 0 1 1 1.2 1.2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 40px;
}
/* fa-regular fa-circle-exclamation outline, hand-traced. */
.form-field.is-invalid .form-field-input {
  border-color: #d93025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='none' stroke='%23d93025' stroke-width='40' stroke-linecap='round'%3E%3Ccircle cx='256' cy='256' r='216'/%3E%3Cline x1='256' y1='152' x2='256' y2='280'/%3E%3Ccircle cx='256' cy='352' r='14' fill='%23d93025' stroke='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 40px;
}
/* Inside the .ti-phone-wrap the input already has padding-left for
   the flag; preserve it. */
.form-field.is-valid .ti-phone-input,
.form-field.is-invalid .ti-phone-input { padding-left: 38px !important; }
/* Focus halo should always win over the validation tint. */
.form-field.is-valid .form-field-input:focus,
.form-field.is-invalid .form-field-input:focus { border-color: var(--hp-accent); }
.form-field-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}
.form-field-error {
  font-size: 13px;
  color: #b3261e;
  font-weight: 500;
}
.form-field-row {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
  .form-field-row { grid-template-columns: 1fr; }
}

.flash-banner-stack { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; }
/*
 * Flash banners: hairline + 3px left accent stripe + leading
 * FontAwesome icon. Matches the site's hairline/mono vocabulary
 * rather than a bootstrap red wash. JS auto-injects the icon when
 * the markup doesn't already carry one (older templates).
 */
.flash-banner {
  margin: 0;
  padding: 12px 16px 12px 18px;
  background: #fff;
  border: 1px solid var(--hp-hairline);
  border-left-width: 3px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hp-fg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.flash-banner > .fa-regular,
.flash-banner > .fa-solid {
  font-size: 16px;
  line-height: 1.45;
  flex-shrink: 0;
  margin-top: 1px;
}
.flash-banner-error { border-left-color: #d93025; background: #fffafa; }
.flash-banner-error > i { color: #d93025; }
.flash-banner-success { border-left-color: #1b8f3a; background: #fbfdfb; }
.flash-banner-success > i { color: #1b8f3a; }
.flash-banner-info { border-left-color: var(--hp-accent); background: #fbfdff; }
.flash-banner-info > i { color: var(--hp-accent); }

.summary-rows { display: flex; flex-direction: column; gap: 10px; }
.summary-rows-compact { gap: 6px; }
.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 14.5px;
}
.summary-row-label { color: var(--hp-fg-muted); }
.summary-row-value {
  color: var(--hp-fg);
  font-family: var(--hp-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.summary-row-total {
  padding-top: 10px;
  border-top: 1px solid var(--hp-hairline);
  font-weight: 700;
}
.summary-row-total .summary-row-label,
.summary-row-total .summary-row-value { color: var(--hp-fg); font-size: 16px; }

.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 36px;
  font-family: var(--hp-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hp-fg-faint);
  list-style: none;
  padding: 0;
}
.step-indicator-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.step-indicator-num {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hp-hairline-strong);
  color: var(--hp-fg-muted);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
}
.step-indicator-item.is-active .step-indicator-num {
  background: var(--hp-accent);
  border-color: var(--hp-accent);
  color: #fff;
}
.step-indicator-item.is-done .step-indicator-num {
  background: var(--hp-fg);
  border-color: var(--hp-fg);
  color: #fff;
}
.step-indicator-item.is-active .step-indicator-label,
.step-indicator-item.is-done .step-indicator-label {
  color: var(--hp-fg);
}
.step-indicator-sep {
  width: 48px;
  height: 1px;
  background: var(--hp-hairline-strong);
  margin: 0 12px;
}


/* ── Cart page (/korpa) ───────────────────────────────────── */
/*
 * Layout philosophy: matches the product page (pd-*) — flat,
 * hairline-only borders, mono accents on labels, tabular nums on
 * money, no card-on-card lift. Two-column grid: lines on the left,
 * sticky summary on the right.
 */

.crt {
  padding: 0 0 80px;
  background: #fff;
}

/* Match .pd-breadcrumb on the product page for visual + spatial parity. */
.crt-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 56px 0 48px;
  font-size: 13px;
  color: var(--hp-fg-muted);
  overflow-wrap: anywhere;
}
.crt-breadcrumb a { color: var(--hp-fg-muted); text-decoration: none; transition: color 160ms ease; }
.crt-breadcrumb a:hover { color: var(--hp-accent); }
.crt-breadcrumb i { font-size: 9px; color: var(--hp-fg-faint); }
.crt-breadcrumb-current { color: var(--hp-fg); font-weight: 500; }

.crt-header {
  margin: 0 0 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hp-hairline);
}
.crt-eyebrow {
  margin: 0 0 6px;
  font-family: var(--hp-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hp-fg-faint);
}
.crt-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--hp-fg);
}
.crt-lede {
  margin: 0;
  color: var(--hp-fg-muted);
  font-size: 15.5px;
  max-width: 60ch;
}
.crt-lede-count {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--hp-accent-soft);
  color: var(--hp-accent);
  font-family: var(--hp-mono);
  font-size: 12px;
  font-weight: 600;
}

/* Empty state */
.crt-empty {
  text-align: center;
  padding: 80px 24px;
  border: 1px dashed var(--hp-hairline-strong);
  border-radius: 16px;
  background: #fafbfd;
}
.crt-empty-icon {
  font-size: 56px;
  color: var(--hp-fg-faint);
  opacity: 0.5;
  margin-bottom: 18px;
}
.crt-empty-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--hp-fg);
}
.crt-empty-lede {
  margin: 0 0 28px;
  color: var(--hp-fg-muted);
  font-size: 15px;
}

/* Two-column layout: lines + summary */
.crt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 980px) {
  .crt-layout { grid-template-columns: 1fr; gap: 32px; }
}

.crt-lines {
  display: flex;
  flex-direction: column;
}

/* Cart line — flat row with hairline separators, image + body + pricing + remove. */
.crt-line {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 240px 32px;
  gap: 28px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--hp-hairline);
  position: relative;
}
.crt-line:first-child { padding-top: 0; }
.crt-line.is-unavailable { opacity: 0.55; }

.crt-line-image {
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--hp-hairline);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 160ms ease;
}
.crt-line-image:hover { border-color: var(--hp-hairline-strong); }
.crt-line-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 12px;
}
.crt-line-image-fallback {
  font-size: 36px;
  color: var(--hp-fg-faint);
  opacity: 0.45;
}

.crt-line-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.crt-line-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hp-fg);
  text-decoration: none;
  letter-spacing: -0.005em;
  transition: color 160ms ease;
}
.crt-line-title:hover { color: var(--hp-accent); }

.crt-line-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.crt-line-attr {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f5f9;
  color: var(--hp-fg-muted);
}
.crt-line-attr-key {
  font-family: var(--hp-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hp-fg-faint);
}
.crt-line-attr-value { font-weight: 600; color: var(--hp-fg); }

.crt-line-sku {
  margin: 0;
  font-family: var(--hp-mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--hp-fg-faint);
}

.crt-line-flags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.crt-line-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  align-self: flex-start;
}
.crt-line-flag-up      { background: #fdecea; color: #8a1f17; }
.crt-line-flag-down    { background: #e9f7ed; color: #1b6b32; }
.crt-line-flag-info    { background: #f3f5f9; color: var(--hp-fg-muted); font-weight: 500; font-style: italic; }
.crt-line-flag-danger  { background: #fdecea; color: #8a1f17; }

/* Pricing column: unit price → qty stepper → line subtotal */
.crt-line-pricing {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}

.crt-line-unit {
  margin: 0;
  font-size: 13.5px;
  color: var(--hp-fg-muted);
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.crt-line-unit-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--hp-fg);
  font-family: var(--hp-mono);
  letter-spacing: 0.01em;
}
.crt-line-unit-currency {
  font-size: 12px;
  font-family: var(--hp-mono);
  color: var(--hp-fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.crt-line-unit-suffix {
  font-size: 12.5px;
  color: var(--hp-fg-faint);
}

/* Qty pill — mirror of .pd-qty on the product page */
.crt-line-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--hp-hairline-strong);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.crt-line-qty-btn {
  width: 38px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--hp-fg-muted);
  font-size: 12px;
  transition: background 160ms ease, color 160ms ease;
}
.crt-line-qty-btn:hover {
  background: var(--hp-accent-soft);
  color: var(--hp-accent);
}
.crt-line-qty-input {
  width: 56px;
  border: none;
  background: transparent;
  text-align: center;
  font-family: var(--hp-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--hp-fg);
  font-variant-numeric: tabular-nums;
  padding: 8px 0;
  -moz-appearance: textfield;
}
.crt-line-qty-input::-webkit-outer-spin-button,
.crt-line-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.crt-line-qty-input:focus { outline: none; }

.crt-line-subtotal {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.crt-line-subtotal-label {
  font-family: var(--hp-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hp-fg-faint);
}
.crt-line-subtotal-value {
  font-size: 19px;
  font-weight: 700;
  color: var(--hp-fg);
  font-family: var(--hp-mono);
  letter-spacing: 0.01em;
}
.crt-line-subtotal-gross {
  font-size: 12px;
  color: var(--hp-fg-faint);
  font-family: var(--hp-mono);
  letter-spacing: 0.01em;
}

/* Remove "x" */
.crt-line-remove { margin: 0; }
.crt-line-remove-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--hp-fg-faint);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.crt-line-remove-btn:hover {
  background: #fdecea;
  color: #b3261e;
  border-color: #f6c2bd;
}

.crt-continue {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--hp-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hp-fg-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 160ms ease;
  align-self: flex-start;
}
.crt-continue:hover { color: var(--hp-accent); }

/* ── Summary panel (sticky) ──────────────────────────────── */

.crt-summary {
  position: sticky;
  top: calc(var(--nav-height-utility, 36px) + var(--nav-height-brand, 72px) + 16px);
  padding: 28px;
  background: #fafbfd;
  border: 1px solid var(--hp-hairline);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.crt-summary-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--hp-fg);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hp-hairline);
}

.crt-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
}
.crt-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  min-width: 0;
}
.crt-summary-key {
  font-family: var(--hp-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hp-fg-muted);
  margin: 0;
  flex-shrink: 0;
}
.crt-summary-val {
  font-family: var(--hp-mono);
  font-size: 14px;
  color: var(--hp-fg);
  margin: 0;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-align: right;
}
.crt-summary-row-total {
  padding-top: 14px;
  border-top: 1px solid var(--hp-hairline);
  align-items: center;
  gap: 8px;
}
.crt-summary-row-total .crt-summary-key {
  color: var(--hp-fg);
  font-weight: 700;
  font-size: 11.5px;
}
.crt-summary-row-total .crt-summary-val {
  font-size: 19px;
  font-weight: 700;
  color: var(--hp-fg);
  letter-spacing: 0.01em;
}

.crt-summary-note {
  margin: 0;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(14, 165, 233, 0.06);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--hp-fg-muted);
}
.crt-summary-note i {
  color: var(--hp-accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.crt-summary-cta {
  width: 100%;
  justify-content: center;
  padding: 16px 24px;
  font-size: 15px;
  border-radius: 8px;
}


/* Mobile reflow for the cart line */
@media (max-width: 760px) {
  .crt-line {
    grid-template-columns: 90px minmax(0, 1fr) 32px;
    grid-template-areas:
      "img body remove"
      "img pricing pricing";
    column-gap: 16px;
    row-gap: 18px;
  }
  .crt-line-image { width: 90px; height: 90px; grid-area: img; }
  .crt-line-body { grid-area: body; }
  /* flex-end alignment keeps unit + subtotal right-aligned and the
     qty pill at its natural width instead of stretching across the row. */
  .crt-line-pricing {
    grid-area: pricing;
    align-items: flex-end;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
  }
  .crt-line-qty { align-self: flex-end; }
  .crt-line-remove { grid-area: remove; }
  .crt-line-unit, .crt-line-subtotal { align-items: flex-end; }
}


/* ── Cart drawer ──────────────────────────────────────────── */

.crt-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
.crt-drawer[data-open="true"] { pointer-events: auto; }

.crt-drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 19, 32, 0.4);
  opacity: 0;
  transition: opacity 240ms ease;
}
.crt-drawer[data-open="true"] .crt-drawer-scrim { opacity: 1; }

.crt-drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #fff;
  box-shadow: -8px 0 32px rgba(11, 19, 32, 0.12);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.crt-drawer[data-open="true"] .crt-drawer-panel { transform: translateX(0); }

.crt-drawer-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--hp-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crt-drawer-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.crt-drawer-close {
  background: transparent;
  border: 1px solid transparent;
  width: 44px; height: 44px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--hp-fg-muted);
  transition: background 160ms ease, color 160ms ease;
}
.crt-drawer-close:hover { background: #f3f5f9; color: var(--hp-fg); }

.crt-drawer-body { flex: 1; overflow-y: auto; padding: 16px 28px; }

.crt-drawer-empty { text-align: center; padding: 56px 12px; }
.crt-drawer-empty-icon { font-size: 36px; color: var(--hp-fg-faint); opacity: 0.5; margin-bottom: 14px; }
.crt-drawer-empty-title { margin: 0 0 18px; color: var(--hp-fg-muted); font-size: 14.5px; }

.crt-drawer-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.crt-drawer-line {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--hp-hairline);
}
.crt-drawer-line:last-child { border-bottom: none; }
.crt-drawer-line-image {
  width: 60px; height: 60px;
  object-fit: contain;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--hp-hairline);
  border-radius: 8px;
}
.crt-drawer-line-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.crt-drawer-line-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hp-fg);
  text-decoration: none;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.crt-drawer-line-title:hover { color: var(--hp-accent); }
.crt-drawer-line-meta {
  margin: 0;
  font-size: 12px;
  font-family: var(--hp-mono);
  color: var(--hp-fg-faint);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.crt-drawer-line-total {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--hp-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--hp-fg);
}

.crt-drawer-footer {
  padding: 22px 28px 28px;
  border-top: 1px solid var(--hp-hairline);
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.crt-drawer-view { width: 100%; justify-content: center; }
.crt-drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.crt-drawer-actions .hp-btn { width: 100%; justify-content: center; }
.crt-drawer-pay { font-weight: 600; }

/* Persistent cart-hint strip (autohide 5s, dismissible). */
.crt-hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 24px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1a2233;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.crt-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.crt-hint-icon {
  width: 22px; height: 22px;
  background: #14a96f;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.crt-hint-cta {
  background: var(--hp-accent, #ff6a00);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.crt-hint-cta:hover { filter: brightness(1.08); }
.crt-hint-close {
  background: none; border: 0; color: rgba(255,255,255,0.7);
  cursor: pointer; padding: 4px 6px; font-size: 14px;
}
.crt-hint-close:hover { color: #fff; }
@media (max-width: 480px) {
  .crt-hint { left: 12px; right: 12px; transform: translate(0, 24px); border-radius: 14px; }
  .crt-hint.is-visible { transform: translate(0, 0); }
}

.hp-btn-ghost {
  background: transparent;
  color: var(--hp-fg);
  border-color: var(--hp-hairline-strong);
}
.hp-btn-ghost:hover, .hp-btn-ghost:focus-visible {
  background: #f3f5f9;
  outline: none;
}

/* Prefill banner on /kontakt when ?product=<uuid> is set. */
.ct-prefill-banner {
  padding: 14px 18px;
  margin-bottom: 18px;
  background: var(--hp-accent-soft);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--hp-accent);
}


/* ── Checkout wizard pages ────────────────────────────────── */

.crt-wizard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 980px) { .crt-wizard { grid-template-columns: 1fr; gap: 32px; } }

.crt-wizard-form {
  padding: 0;
}
.crt-wizard-summary {
  position: sticky;
  top: calc(var(--nav-height-utility, 36px) + var(--nav-height-brand, 72px) + 16px);
  padding: 28px;
  background: #fafbfd;
  border: 1px solid var(--hp-hairline);
  border-radius: 16px;
  min-width: 0;
}
.crt-wizard-summary .crt-summary-title {
  margin: 0 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hp-hairline);
  font-size: 16px;
  font-weight: 700;
  color: var(--hp-fg);
}
.crt-wizard-summary .summary-row {
  gap: 12px;
  min-width: 0;
}
.crt-wizard-summary .summary-row-label {
  font-family: var(--hp-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hp-fg-muted);
  flex-shrink: 0;
}
.crt-wizard-summary .summary-row-value {
  font-size: 14px;
  white-space: nowrap;
  text-align: right;
}
.crt-wizard-summary .summary-row-total {
  padding-top: 14px;
  border-top: 1px solid var(--hp-hairline);
}
.crt-wizard-summary .summary-row-total .summary-row-label {
  color: var(--hp-fg);
  font-weight: 700;
}
.crt-wizard-summary .summary-row-total .summary-row-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--hp-fg);
  letter-spacing: 0.01em;
}

.crt-wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hp-hairline);
}

.crt-customer-type { margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }

.crt-customer-company, .crt-customer-private { margin-bottom: 12px; }

.crt-saved-addresses { margin-bottom: 28px; }
.crt-saved-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin: 10px 0 8px;
}
.crt-saved-card {
  display: flex;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--hp-hairline);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 160ms ease;
}
.crt-saved-card:hover { border-color: var(--hp-accent); }
.crt-saved-card input { margin-top: 2px; flex-shrink: 0; accent-color: var(--hp-accent); }
.crt-saved-card-body { display: flex; flex-direction: column; gap: 2px; color: var(--hp-fg-muted); }
.crt-saved-card-name { font-weight: 600; color: var(--hp-fg); }
.crt-saved-card-line { font-size: 13px; }

/* /korpa/pregled review */
.crt-pregled { display: flex; flex-direction: column; gap: 20px; }
.crt-pregled-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.crt-pregled-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--hp-hairline);
}
.crt-pregled-line:last-child { border-bottom: none; }
.crt-pregled-line-title { font-weight: 600; color: var(--hp-fg); }
.crt-pregled-line-meta { color: var(--hp-fg-faint); font-family: var(--hp-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.crt-pregled-line-total { font-weight: 700; font-variant-numeric: tabular-nums; }

.crt-submit-form { margin-top: 28px; }
.crt-terms-row { margin-bottom: 18px; }

/* /poruci page — calmer headlines, section vocabulary aligned with
   /korpa and account pages. The sidebar reuses the canonical
   .crt-summary block. */
.poruci .crt-title { font-size: 28px; letter-spacing: -0.005em; }
.poruci .crt-lede { font-size: 14.5px; }
.poruci-header { margin: 0 0 28px; padding-bottom: 20px; }

.poruci-form { display: flex; flex-direction: column; gap: 8px; }
.poruci-section-title {
  margin: 24px 0 8px;
  padding: 0;
  font-family: var(--hp-mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--hp-fg-muted);
}
.poruci-section-title:first-child,
.poruci-form > .form-field-row:first-child + .poruci-section-title { margin-top: 4px; }
.poruci-section-title .form-field-help {
  margin-left: 6px;
  font-family: var(--hp-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--hp-fg-faint);
}

.poruci-anon-hint {
  margin: 0 0 20px;
  padding: 12px 14px;
  background: rgba(14, 165, 233, 0.06);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hp-fg-muted);
}
.poruci-anon-hint p { margin: 0; }
.poruci-anon-hint i { color: var(--hp-accent); margin-right: 6px; }

.poruci-company-section { display: contents; }
.poruci-billing-fields { display: flex; flex-direction: column; gap: 0; }
.poruci-save-options { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }

.poruci-submit { width: 100%; justify-content: center; padding: 16px 24px; margin-top: 18px; font-size: 15px; border-radius: 8px; }

.crt-summary-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin: 4px 0 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--hp-fg-muted);
  text-decoration: none;
  transition: color 140ms ease;
}
.crt-summary-edit:hover { color: var(--hp-accent); }
.crt-summary-edit i { font-size: 12px; }


/* ────────────────────────────────────────────────────────────
 * Responsive sweep
 * Tablet ≤ 980px, narrow ≤ 760px, phone ≤ 600px, ultra ≤ 480px.
 * ──────────────────────────────────────────────────────────── */

/* Smaller breadcrumb top margin on phone — 56px wastes vertical
   space above the page title. */
@media (max-width: 640px) {
  .crt-breadcrumb { margin: 28px 0 24px; }
  .crt-header { margin: 0 0 24px; padding-bottom: 18px; }
}

/* Pregled review line: 3-column grid collapses on narrow widths.
   Title goes full-width on row 1; qty/price + total fit on row 2. */
@media (max-width: 560px) {
  .crt-pregled-line {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
  }
  .crt-pregled-line-meta,
  .crt-pregled-line-total {
    font-size: 13px;
  }
  .crt-pregled-line-total { font-weight: 700; align-self: flex-end; }
}

/* Step indicator: hide labels on phone, keep only numbered circles. */
@media (max-width: 520px) {
  .step-indicator-label { display: none; }
  .step-indicator-sep { width: 24px; margin: 0 6px; }
  .step-indicator-item { gap: 0; }
}

/* Cart-line attribute pills tighten up on phones. */
@media (max-width: 480px) {
  .crt-line-attrs { gap: 4px; }
  .crt-line-attr { font-size: 11.5px; padding: 3px 8px; }
  .crt-line-attr-key { font-size: 10.5px; }
}

/* Drawer becomes a bottom sheet on phones. The slide-in-from-right
   feels wrong when the panel is already at width:100% — switch to
   slide-up so it reads as a sheet, not a sidebar that took over. */
@media (max-width: 520px) {
  .crt-drawer-panel {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -8px 32px rgba(11, 19, 32, 0.16);
  }
  .crt-drawer[data-open="true"] .crt-drawer-panel { transform: translateY(0); }
  .crt-drawer-header { padding: 18px 20px; }
  .crt-drawer-body { padding: 12px 20px; }
  .crt-drawer-footer { padding: 18px 20px 22px; }
}

/* Flash banners need a touch more breathing room on the right so the
   exclamation icon doesn't crowd long Serbian error strings. */
@media (max-width: 480px) {
  .flash-banner { padding-right: 18px; }
}

/* Poruci section title letter-spacing eases at narrow widths so
   "Adresa za isporuku" doesn't wrap awkwardly. */
@media (max-width: 480px) {
  .poruci-section-title { letter-spacing: 0.06em; }
}
