/*
 * Halfpix Unified UI — 2026-09-15
 * Final route-level design layer. Loaded after legacy parity styles and tokens.
 * Design direction: editorial pottery studio + visual discovery + quiet commerce.
 */

:root {
  --ui-canvas: #f6f7f4;
  --ui-canvas-warm: #f7f3ee;
  --ui-surface: #ffffff;
  --ui-surface-soft: #eef4f1;
  --ui-surface-warm: #f7eee8;
  --ui-ink: #1f2d29;
  --ui-ink-soft: #344740;
  --ui-muted: #68766f;
  --ui-faint: #87938e;
  --ui-line: #dce5e1;
  --ui-line-strong: #cbd8d3;
  --ui-primary: #2f6d60;
  --ui-primary-strong: #23564c;
  --ui-primary-soft: #deeee8;
  --ui-clay: #b96847;
  --ui-clay-soft: #f3e5dc;
  --ui-danger: #9a5148;
  --ui-danger-soft: #f7e8e5;
  --ui-success: #47715c;
  --ui-success-soft: #e8f1eb;
  --ui-warning: #8a6b2f;
  --ui-warning-soft: #f5eedc;

  --ui-radius-xs: 8px;
  --ui-radius-sm: 12px;
  --ui-radius-md: 16px;
  --ui-radius-lg: 22px;
  --ui-radius-xl: 30px;
  --ui-radius-pill: 999px;

  --ui-shadow-xs: 0 1px 2px rgb(31 45 41 / .035);
  --ui-shadow-sm: 0 8px 24px rgb(31 45 41 / .055);
  --ui-shadow-md: 0 18px 48px rgb(31 45 41 / .085);
  --ui-shadow-float: 0 24px 60px rgb(31 45 41 / .14);

  --ui-control: 46px;
  --ui-control-lg: 52px;
  --ui-gutter: clamp(18px, 3vw, 42px);
  --ui-section: clamp(28px, 4vw, 56px);
  --ui-content: 1480px;
  --ui-reading: 760px;
  --ui-ease: cubic-bezier(.2,.75,.25,1);

  /* Keep old theme variables synchronized. */
  --cream: var(--ui-canvas);
  --porcelain: var(--ui-surface);
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-line);
  --clay: var(--ui-primary);
  --clay-dark: var(--ui-primary-strong);
  --clay-soft: var(--ui-primary-soft);
  --hp-canvas: var(--ui-canvas);
  --hp-surface: var(--ui-surface);
  --hp-surface-soft: var(--ui-surface-soft);
  --hp-ink: var(--ui-ink);
  --hp-muted: var(--ui-muted);
  --hp-line: var(--ui-line);
  --hp-primary: var(--ui-primary);
  --hp-primary-deep: var(--ui-primary-strong);
  --hp-primary-soft: var(--ui-primary-soft);
  --hp-shadow: var(--ui-shadow-sm);
}

/* ---------- Global foundation ---------- */
html { background: var(--ui-canvas); }
body {
  color: var(--ui-ink);
  background:
    radial-gradient(circle at 100% 0, rgb(47 109 96 / .075), transparent 30rem),
    radial-gradient(circle at 0 100%, rgb(185 104 71 / .045), transparent 34rem),
    var(--ui-canvas);
}
body::selection { background: var(--ui-primary-soft); color: var(--ui-primary-strong); }
img { max-width: 100%; }
button, input, select, textarea { accent-color: var(--ui-primary); }
button, a { -webkit-tap-highlight-color: transparent; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .55; }

.hp-skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-primary-strong);
  color: #fff;
  font-weight: 700;
  transition: transform 160ms ease;
}
.hp-skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid rgb(47 109 96 / .28) !important;
  outline-offset: 3px;
}

/* ---------- Shell / global navigation ---------- */
.hp-app { grid-template-columns: 236px minmax(0, 1fr); }
.hp-rail {
  z-index: 45;
  padding: 24px 18px;
  border-right: 1px solid rgb(220 229 225 / .9);
  background: rgb(255 255 255 / .88);
  box-shadow: 12px 0 40px rgb(31 45 41 / .025);
  backdrop-filter: blur(22px) saturate(135%);
}
.hp-brand { gap: 10px; padding-inline: 8px; color: var(--ui-primary-strong); letter-spacing: -.02em; }
.hp-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--ui-primary), var(--ui-primary-strong));
  box-shadow: 0 8px 18px rgb(47 109 96 / .2);
}
.hp-nav { gap: 6px; margin-top: 30px; }
.hp-nav__item {
  min-height: 46px;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #5f6e68;
  font-size: 14px;
  font-weight: 650;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.hp-nav__item svg { width: 19px; height: 19px; }
.hp-nav__item:hover { transform: translateX(2px); background: #f1f5f3; color: var(--ui-ink); }
.hp-nav__item.is-active {
  border-color: #d3e4de;
  background: var(--ui-primary-soft);
  color: var(--ui-primary-strong);
}
.hp-nav__item.is-create {
  min-height: 48px;
  margin-block: 10px;
  border-color: transparent;
  border-radius: 15px;
  background: var(--ui-primary);
  color: #fff;
  box-shadow: 0 10px 24px rgb(47 109 96 / .18);
}
.hp-nav__item.is-create:hover { transform: translateY(-1px); background: var(--ui-primary-strong); }

.hp-header {
  height: 70px;
  padding: 10px var(--ui-gutter);
  border-bottom: 1px solid rgb(220 229 225 / .82);
  background: rgb(250 252 250 / .84);
  backdrop-filter: blur(22px) saturate(135%);
}
.hp-header > .hp-search {
  width: min(640px, 52vw);
  min-height: 44px;
  border: 1px solid #dbe4e0;
  border-radius: 14px;
  background: rgb(255 255 255 / .92);
  box-shadow: var(--ui-shadow-xs);
}
.hp-header > .hp-search:focus-within {
  border-color: #9bbdb2;
  box-shadow: 0 0 0 4px rgb(47 109 96 / .08);
}
/* One visible surface per control group: the search form owns the outline. */
.hp-header > .hp-search > input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: var(--ui-ink) !important;
  box-shadow: none !important;
}
.hp-header > .hp-search > input:focus { outline: 0 !important; box-shadow: none !important; }
.hp-icon-button[aria-label="Cart"] { position: relative; }
.hp-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--ui-clay);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.hp-icon-button, .hp-language {
  min-width: 42px;
  height: 42px;
  border-color: #dbe4e0;
  background: rgb(255 255 255 / .94);
  color: var(--ui-ink-soft);
  box-shadow: var(--ui-shadow-xs);
}
.hp-icon-button:hover, .hp-language:hover { border-color: #c6d8d1; background: var(--ui-surface-soft); color: var(--ui-primary-strong); }
.hp-account__menu {
  top: 50px;
  width: 230px;
  padding: 8px;
  border-color: var(--ui-line);
  border-radius: 16px;
  box-shadow: var(--ui-shadow-md);
}
.hp-account__menu a { min-height: 42px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.hp-account__menu a:hover { background: var(--ui-surface-soft); color: var(--ui-primary-strong); }

.hp-main {
  width: min(var(--ui-content), calc(100% - (var(--ui-gutter) * 2)));
  padding: clamp(26px, 3.2vw, 46px) 0 88px;
}
.hp-main > :first-child { scroll-margin-top: 88px; }

/* ---------- Unified typography ---------- */
.hp-title, .hp-page-title,
.stream-heading h1, .shop-heading h1, .creation-heading h1,
.astra-cart-header h1, .astra-checkout-header h1,
.create-hub > header h1, .discover-detail__panel > h1,
.product-reference-summary > h1, .post-copy h1,
.hp-public-profile h1 {
  color: var(--ui-ink);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.04em;
}
.hp-title, .hp-page-title, .stream-heading h1, .shop-heading h1,
.creation-heading h1, .create-hub > header h1,
.astra-cart-header h1, .astra-checkout-header h1 {
  font-size: clamp(2.25rem, 4.1vw, 3.65rem);
  line-height: 1.02;
}
.eyebrow, .hp-eyebrow, .hp-kicker, .product-kind {
  color: var(--ui-primary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.hp-subtitle, .stream-heading > p, .shop-heading > p, .creation-heading p,
.create-hub > header p, .product-lead {
  color: var(--ui-muted);
  font-size: clamp(.94rem, 1.15vw, 1.02rem);
  line-height: 1.72;
}
.hp-hero { max-width: 880px; margin: 0 0 clamp(26px, 4vw, 46px); }
.hp-hero .hp-title { margin: 7px 0 8px; }
.hp-hero .hp-subtitle { max-width: 700px; margin: 0; }

/* ---------- Shared surfaces and controls ---------- */
.hp-panel,
.info-card,
.creation-section,
.creation-preview,
.astra-cart-table,
.astra-cart-totals,
.astra-order-table,
.hp-auth-card,
.hp-address,
.hp-following-card {
  border: 1px solid var(--ui-line) !important;
  border-radius: var(--ui-radius-lg) !important;
  background: var(--ui-surface) !important;
  box-shadow: var(--ui-shadow-xs) !important;
}
.hp-panel { padding: clamp(20px, 2.7vw, 30px); }

.hp-button, .app-button,
.astra-place-order, .astra-checkout-button,
.creation-actions button[type="submit"] {
  min-height: var(--ui-control);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-sm) !important;
  background: var(--ui-primary) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgb(47 109 96 / .12);
  transition: transform 160ms var(--ui-ease), box-shadow 160ms ease, background 160ms ease;
}
.hp-button:hover, .app-button:hover,
.astra-place-order:hover, .astra-checkout-button:hover,
.creation-actions button[type="submit"]:hover {
  transform: translateY(-1px);
  background: var(--ui-primary-strong) !important;
  box-shadow: 0 12px 26px rgb(47 109 96 / .16);
}
.hp-button--ghost, .app-button--secondary {
  border-color: var(--ui-line-strong) !important;
  background: var(--ui-surface) !important;
  color: var(--ui-ink) !important;
  box-shadow: none !important;
}
.hp-button--ghost:hover, .app-button--secondary:hover { background: var(--ui-surface-soft) !important; color: var(--ui-primary-strong) !important; }

.hp-chip,
.stream-tabs button,
.discover-tabs button,
.product-option-grid button,
.tag-suggestions button,
.journal-choice span,
.creation-quick-choice label > span {
  min-height: 36px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-pill) !important;
  background: var(--ui-surface);
  color: var(--ui-ink-soft);
  font-size: 13px;
  font-weight: 650;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}
.hp-chip:hover, .stream-tabs button:hover, .discover-tabs button:hover { border-color: #b9cec6; background: var(--ui-surface-soft); color: var(--ui-primary-strong); }
.hp-chip.is-active,
.stream-tabs button[aria-selected="true"],
.discover-tabs button.is-active,
.discover-tabs button[aria-pressed="true"],
.product-option-grid button[aria-pressed="true"] {
  border-color: var(--ui-primary);
  background: var(--ui-primary) !important;
  color: #fff !important;
}

.hp-field,
.creation-section label,
.astra-field-grid label,
.astra-order-note,
.hp-address-form label,
.hp-profile-form label {
  color: var(--ui-ink-soft);
  font-size: 13px;
  font-weight: 650;
}
.hp-field > span,
.creation-section label > span,
.astra-field-grid label > span,
.astra-order-note > span { display: block; margin-bottom: 7px; }

.hp-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.hp-form select, .hp-form textarea,
.creation-section input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.creation-section select, .creation-section textarea,
.astra-field-grid input, .astra-field-grid select,
.astra-order-note textarea,
.discover-filters select {
  border: 1px solid var(--ui-line-strong) !important;
  border-radius: var(--ui-radius-sm) !important;
  background: #fff !important;
  color: var(--ui-ink) !important;
  box-shadow: none !important;
}
.hp-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.hp-form select,
.creation-section input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.creation-section select,
.astra-field-grid input, .astra-field-grid select {
  min-height: var(--ui-control);
  padding: 10px 13px;
}
.hp-form textarea, .creation-section textarea, .astra-order-note textarea { min-height: 120px; padding: 12px 13px; resize: vertical; }
.hp-form :is(input,select,textarea):focus,
.creation-section :is(input,select,textarea):focus,
.astra-field-grid :is(input,select):focus,
.astra-order-note textarea:focus,
.discover-filters select:focus {
  border-color: #8eb5a8 !important;
  outline: 4px solid rgb(47 109 96 / .08) !important;
}

.hp-badge, .content-badge, .discover-chip, .sale-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 5px 9px;
  border: 0;
  border-radius: var(--ui-radius-pill);
  background: var(--ui-primary-soft);
  color: var(--ui-primary-strong);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .015em;
}
.sale-chip, .shop-card__sale { background: var(--ui-clay-soft) !important; color: #82472f !important; }

.hp-toolbar { gap: 10px; }
.hp-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 44px 24px;
  border: 1px dashed var(--ui-line-strong);
  border-radius: var(--ui-radius-lg);
  background: rgb(255 255 255 / .48);
  text-align: center;
}
.hp-empty h2 { margin: 0; font-size: 1.25rem; }
.hp-empty p { max-width: 520px; margin: 0 0 8px; color: var(--ui-muted); }
.hp-alert, .hp-notice {
  border: 1px solid #cce0d8;
  border-radius: var(--ui-radius-md);
  background: var(--ui-primary-soft);
  color: var(--ui-primary-strong);
}
.hp-alert.is-error { border-color: #eccdc8; background: var(--ui-danger-soft); color: #7d4038; }
.hp-loading, .commerce-loading { color: var(--ui-muted); }

/* ---------- Home / visual feed ---------- */
.hp-main[data-view="home"] > .hp-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 860px;
  margin: 0 auto 22px;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.hp-home-feed-tabs { justify-content: flex-start; }
.hp-main[data-view="home"] .feed-masonry,
.hp-main[data-view="discover"] .discover-grid,
.shop-masonry {
  --stream-gap: 18px;
  gap: 0 18px;
}
.feed-card, .discover-card, .shop-card {
  overflow: hidden;
  border: 1px solid #e2e8e5 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgb(31 45 41 / .035) !important;
  transition: transform 180ms var(--ui-ease), box-shadow 180ms ease, border-color 180ms ease;
}
.feed-card:hover, .discover-card:hover, .shop-card:hover {
  transform: translateY(-2px);
  border-color: #d3dfda !important;
  box-shadow: 0 12px 30px rgb(31 45 41 / .07) !important;
}
.feed-card__media, .discover-card__media, .shop-card__media { background: #edf1ef; }
.feed-card__image, .discover-card__media img, .shop-card__media img { transition: transform 260ms var(--ui-ease); }
.feed-card:hover .feed-card__image, .discover-card:hover .discover-card__media img, .shop-card:hover .shop-card__media img { transform: scale(1.025); }
.feed-card__body, .discover-card__body, .shop-card__body { padding: 13px 14px 14px; }
.feed-card__author-row { gap: 8px; margin-bottom: 8px; }
.feed-card__author { min-width: 0; color: var(--ui-muted); font-size: 12px; font-weight: 600; }
.feed-card__author .avatar { width: 24px; height: 24px; }
.feed-card__title, .stream-card__title {
  color: var(--ui-ink) !important;
  font-size: .94rem !important;
  font-weight: 700 !important;
  letter-spacing: -.015em;
  line-height: 1.42 !important;
}
.feed-card__description, .stream-card__summary { margin-top: 7px; color: var(--ui-muted) !important; font-size: 12.5px !important; line-height: 1.55 !important; }
.feed-card__tags, .feed-card__making-tags { gap: 5px; margin-top: 9px; }
.feed-card__tags span, .feed-card__making-tags span { padding: 3px 7px; border-radius: 999px; background: #f3f6f4; color: #66746e; font-size: 10.5px; }
.feed-card__stats { margin-top: 11px; padding-top: 10px; border-top: 1px solid #edf1ef; color: #7a8781; }
.feed-card__stats span { gap: 4px; }
.feed-card__stats svg { width: 14px; height: 14px; }
.feed-card__count, .hp-video-badge { backdrop-filter: blur(8px); }

/* ---------- Discover ---------- */
.discover-page > .commerce-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px 28px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ui-line);
}
.discover-page > .commerce-heading > div:first-child { max-width: 760px; }
.discover-page > .commerce-heading h1 { margin: 5px 0 8px; }
.discover-page > .commerce-heading p { margin: 0; color: var(--ui-muted); }
.discover-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.discover-tabs .hp-chip { padding-inline: 13px; }
.discover-filters {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  gap: 9px;
  flex-wrap: wrap;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.discover-filters > span { align-self: center; display: inline-flex; align-items: center; gap: 7px; margin-right: 4px; color: var(--ui-primary-strong); font-size: 12px; font-weight: 750; }
.discover-filters label { min-width: 138px; }
.discover-filters label > span { display: block; margin: 0 0 4px 2px; color: var(--ui-muted); font-size: 10.5px; font-weight: 700; }
.discover-filters select { min-height: 38px !important; padding: 7px 30px 7px 10px !important; font-size: 12px !important; }
.discover-filters__clear { min-height: 38px; padding: 0 11px; border: 0; background: transparent; color: var(--ui-danger); font-weight: 700; }
.discover-card__facts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.discover-card__facts span { padding: 4px 7px; border-radius: 999px; background: #f1f5f3; color: #5c6d66; font-size: 10.5px; font-weight: 650; }

.discover-detail {
  width: min(1260px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: start;
}
.discover-detail__media { position: sticky; top: 94px; min-width: 0; }
.discover-detail__media .media-gallery { overflow: hidden; border-radius: var(--ui-radius-xl); background: #171a18; box-shadow: var(--ui-shadow-md); }
.discover-detail__panel { min-width: 0; }
.discover-detail__panel > h1 { margin: 12px 0 14px; font-size: clamp(2.1rem, 3.6vw, 3.25rem); line-height: 1.04; }
.discover-detail__panel > p { margin: 0 0 24px; color: var(--ui-muted); font-size: 15px; line-height: 1.78; }
.discover-detail__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 22px 0; border: 1px solid var(--ui-line); border-radius: 16px; background: var(--ui-line); }
.discover-detail__facts > div { padding: 13px 14px; background: #fff; }
.discover-detail__facts dt { color: var(--ui-faint); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.discover-detail__facts dd { margin: 3px 0 0; color: var(--ui-ink); font-size: 13px; font-weight: 700; }
.discover-detail .info-card { margin-top: 14px; padding: 18px 20px; }
.discover-detail .info-card h2, .discover-related h2 { margin: 0 0 7px; font-size: 15px; }
.discover-detail .info-card p { margin: 0; color: var(--ui-muted); }
.discover-related { margin-top: 28px; }
.related-products { display: grid; gap: 8px; }
.related-products > a { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 11px; min-height: 68px; padding: 7px; border: 1px solid var(--ui-line); border-radius: 13px; background: #fff; }
.related-products > a:hover { border-color: #bfd1ca; }
.related-products img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.related-products span { display: grid; gap: 2px; }
.related-products small { color: var(--ui-muted); }
.sticky-commerce-actions { position: sticky; bottom: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; padding: 8px; border: 1px solid var(--ui-line); border-radius: 16px; background: rgb(255 255 255 / .92); box-shadow: var(--ui-shadow-md); backdrop-filter: blur(16px); }
.firing-curve-table { display: grid; gap: 8px; }
.firing-curve-table > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1ef; }
.firing-curve-table > span:last-child { border-bottom: 0; }
.firing-curve-table small { color: var(--ui-muted); }

/* ---------- Shop ---------- */
.shop-page > .shop-heading { max-width: 850px; margin-bottom: 24px; }
.shop-page > .shop-heading h1 { max-width: 760px; margin: 6px 0 10px; }
.shop-page > .shop-heading p { max-width: 660px; margin: 0; }
.shop-category-bar { position: sticky; z-index: 18; top: 82px; margin-bottom: 20px; padding: 6px 0; border: 0; border-radius: 0; background: linear-gradient(to bottom, rgb(246 248 246 / .96), rgb(246 248 246 / .84)); backdrop-filter: blur(12px); }
.shop-categories { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.shop-categories::-webkit-scrollbar { display: none; }
.shop-categories button { flex: 0 0 auto; padding-inline: 14px; }
.shop-categories button small { margin-left: 3px; opacity: .7; }
.shop-card__media { aspect-ratio: 4 / 5; }
.shop-card__media img { width: 100%; height: 100%; object-fit: cover; }
.shop-card__kind { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 7px; color: var(--ui-primary); font-size: 10.5px; font-weight: 750; }
.shop-card__kind svg { width: 13px; height: 13px; }
.shop-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf1ef; }
.shop-card__footer strong { color: var(--ui-ink); font-size: 15px; }
.shop-card__footer span { color: var(--ui-success); font-size: 10.5px; font-weight: 700; }
.shop-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ui-primary-strong);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.1;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}
.shop-card__action svg { width: 15px; height: 15px; }
.shop-card__action:hover:not(:disabled) { border-color: #a9c4ba; background: var(--ui-surface-soft); transform: translateY(-1px); }
.hp-shop-add { border-color: var(--ui-primary); background: var(--ui-primary); color: #fff; }
.hp-shop-add:hover:not(:disabled) { border-color: var(--ui-primary-strong); background: var(--ui-primary-strong); color: #fff; }
.hp-shop-add.is-added { border-color: var(--ui-primary-strong); background: var(--ui-primary-strong); }
.shop-card__action:disabled { border-color: var(--ui-line); background: #f5f6f5; color: var(--ui-faint); cursor: not-allowed; }
.shop-card__message { margin: 6px 0 0; color: var(--ui-muted); font-size: 10.5px; line-height: 1.35; }
.shop-card__message:empty { margin: 0; }
.shop-card__message a { color: var(--ui-primary-strong); font-weight: 750; text-decoration: underline; text-underline-offset: 2px; }
.hp-shop-toast {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 15px;
  border: 1px solid #c9ddd5;
  border-radius: 13px;
  background: #fff;
  color: var(--ui-primary-strong);
  box-shadow: var(--ui-shadow-md);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.hp-shop-toast.is-visible { opacity: 1; transform: translateY(0); }
.hp-shop-toast.is-error { border-color: #e9c7c2; background: #fff9f8; color: var(--ui-danger); }

/* ---------- Product detail ---------- */
.product-detail.product-detail--reference { width: min(1320px, 100%) !important; margin-inline: auto; }
.product-breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 22px; color: var(--ui-muted); font-size: 12px; }
.product-breadcrumb svg { width: 13px; height: 13px; }
.product-breadcrumb a:hover { color: var(--ui-primary); }
.product-breadcrumb strong { min-width: 0; overflow: hidden; color: var(--ui-ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.product-reference-hero { grid-template-columns: minmax(0, 1.06fr) minmax(380px, .94fr) !important; gap: clamp(30px, 5vw, 70px) !important; align-items: start; }
.product-reference-gallery { position: sticky; top: 92px; }
.product-reference-gallery .media-gallery { overflow: hidden; border-radius: var(--ui-radius-xl); background: #f0f2f1; }
.product-reference-gallery .media-gallery__track { border-radius: inherit; }
.product-reference-gallery .media-gallery__open { background: #f0f2f1; }
.product-reference-gallery .media-gallery__open > img { object-fit: contain; background: #f0f2f1; }
.media-gallery__thumbnails { gap: 8px; margin-top: 10px; }
.media-gallery__thumbnails button { overflow: hidden; width: 62px; height: 62px; padding: 0; border: 1px solid var(--ui-line); border-radius: 11px; background: #fff; }
.media-gallery__thumbnails button[aria-pressed="true"] { border-color: var(--ui-primary); box-shadow: 0 0 0 2px var(--ui-primary-soft); }
.product-reference-summary { padding-top: 6px; }
.product-kicker-row { align-items: center; }
.product-reference-summary > h1 { margin: 12px 0 18px; font-size: clamp(2.35rem, 4vw, 3.7rem) !important; line-height: 1.02 !important; }
.product-share { width: 42px; height: 42px; margin-left: auto; border: 1px solid var(--ui-line); border-radius: 50%; background: #fff; color: var(--ui-ink-soft); }
.product-share:hover { background: var(--ui-surface-soft); color: var(--ui-primary-strong); }
.product-price-row { padding-block: 4px 18px; border-bottom: 1px solid var(--ui-line); }
.product-price strong, .hp-current-price { color: var(--ui-ink); font-size: clamp(1.55rem, 2.4vw, 2rem); font-weight: 750; }
.product-price del { color: var(--ui-faint); }
.stock { padding: 6px 9px; border-radius: 999px; background: var(--ui-success-soft); color: var(--ui-success); font-size: 11px; font-weight: 750; }
.stock.out { background: var(--ui-danger-soft); color: var(--ui-danger); }
.product-lead { margin: 18px 0 22px; }
.product-options { margin: 20px 0; padding: 18px; border: 1px solid var(--ui-line); border-radius: 16px; background: #fbfcfb; }
.product-section-heading { margin-bottom: 10px; }
.product-section-heading h2 { font-size: 14px; }
.hp-option-status { color: var(--ui-muted); font-size: 11px; }
.product-option-grid { gap: 7px; }
.product-option-grid button { min-height: 42px; padding: 7px 13px; border-radius: 12px !important; }
.product-purchase-row { grid-template-columns: 130px minmax(0,1fr) !important; gap: 9px; margin-top: 18px; }
.product-quantity-stepper, .quantity-picker { border-color: var(--ui-line-strong) !important; border-radius: 12px !important; background: #fff !important; }
.product-quantity-stepper button, .quantity-picker button { border-radius: 9px; color: var(--ui-ink); }
.product-quantity-stepper button:hover, .quantity-picker button:hover { background: var(--ui-surface-soft); color: var(--ui-primary-strong); }
.product-buy-now { width: 100%; margin-top: 9px; }
.product-secure-line { margin-top: 13px; padding: 12px 13px; border-radius: 13px; background: var(--ui-surface-soft); color: var(--ui-primary-strong); }
.product-secure-line small { color: var(--ui-muted); }
.product-inline-meta { margin-top: 18px; border-top: 1px solid var(--ui-line); }
.product-inline-meta > div { padding: 10px 0; border-bottom: 1px solid #edf1ef; }
.product-inline-meta dt { color: var(--ui-muted); font-size: 11px; }
.product-inline-meta dd { color: var(--ui-ink-soft); font-size: 12px; }
.product-detail-tabs { border-radius: var(--ui-radius-lg) !important; box-shadow: var(--ui-shadow-xs) !important; }
.product-tab-list { background: #fafbf9 !important; }
.product-tab-list button[aria-selected="true"] { color: var(--ui-primary-strong); }
.product-tab-panel { color: var(--ui-ink-soft); }
.product-note { margin-top: 18px; padding: 14px 16px; border-left: 3px solid var(--ui-clay); border-radius: 0 12px 12px 0; background: var(--ui-surface-warm); }
.product-related-section { margin-top: 40px; }
.product-related-section > header { margin-bottom: 14px; }
.product-related-section h2 { margin: 5px 0 0; font-family: var(--font-display); font-size: 2rem; font-weight: 400; }
.product-related-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.product-related-card { overflow: hidden; border: 1px solid var(--ui-line); border-radius: 16px; background: #fff; }
.product-related-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product-related-card > div { display: grid; gap: 3px; padding: 11px 12px 13px; }
.product-related-card h3 { margin: 0; font-size: 13px; }
.product-related-card span { font-weight: 700; }
.product-related-card small { color: var(--ui-success); }

/* ---------- Post detail / overlays / comments ---------- */
.hp-post-overlay {
  width: min(1220px, calc(100vw - 28px));
  max-height: min(92vh, 980px);
  padding: 0;
  border: 0;
  border-radius: var(--ui-radius-xl);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-float);
}
.hp-post-overlay::backdrop { background: rgb(18 26 23 / .62); backdrop-filter: blur(6px); }
.hp-post-close { position: absolute; top: 14px; right: 14px; z-index: 4; width: 42px; height: 42px; border: 1px solid rgb(255 255 255 / .28); border-radius: 50%; background: rgb(24 31 28 / .76); color: #fff; box-shadow: 0 8px 22px rgb(0 0 0 / .14); }
.hp-post-scroll { max-height: min(92vh, 980px); overflow: auto; }
.post-detail { background: #fff; }
.post-layout { gap: 0; }
.post-media, .post-gallery { background: #171a18; }
.post-copy { padding: clamp(22px, 3.2vw, 38px); }
.post-copy h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.08; }
.content-actions { border-top-color: var(--ui-line); border-bottom-color: var(--ui-line); }
.content-actions button { color: var(--ui-muted); }
.content-actions button:hover, .content-actions button.is-active { color: var(--ui-primary); background: var(--ui-surface-soft); }
.post-products > a { border-color: var(--ui-line); border-radius: 13px; }
.hp-comments { border-top-color: var(--ui-line); }
.comment-composer { background: #fbfcfb !important; }
.comment-avatar, .avatar--lg { width: 44px; height: 44px; }
.avatar--sm { width: 24px; height: 24px; }
.comment-item { border-bottom-color: #edf1ef; }
.comment-actions button { color: var(--ui-muted); }

/* ---------- Create hub and creation flows ---------- */
.create-hub { width: min(1120px, 100%); margin-inline: auto; }
.create-hub > header { max-width: 760px; margin-bottom: 30px; }
.create-hub > header h1 { margin: 5px 0 10px; }
.create-hub-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.create-hub-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--ui-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
  transition: transform 180ms var(--ui-ease), box-shadow 180ms ease, border-color 180ms ease;
}
.create-hub-card:hover { transform: translateY(-3px); border-color: #bfd1ca; box-shadow: var(--ui-shadow-sm); }
.create-hub-card > span:first-child { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--ui-primary-soft); color: var(--ui-primary-strong); }
.create-hub-card > span:first-child svg { width: 22px; height: 22px; }
.create-hub-card small { color: var(--ui-faint); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.create-hub-card h2 { margin: 6px 0 7px; font-size: 1.15rem; }
.create-hub-card p { margin: 0; color: var(--ui-muted); font-size: 13px; line-height: 1.58; }
.create-hub-card > svg { position: absolute; right: 20px; top: 20px; color: var(--ui-line-strong); }
.create-hub-card--glaze > span:first-child { background: var(--ui-surface-warm); color: var(--ui-clay); }

.creation-page { width: min(1220px, 100%); margin-inline: auto; }
.creation-heading { display: grid; grid-template-columns: 50px 1fr; gap: 16px; align-items: start; max-width: 840px; margin-bottom: 26px; }
.creation-heading > svg { width: 46px; height: 46px; padding: 11px; border-radius: 15px; background: var(--ui-primary-soft); color: var(--ui-primary-strong); }
.creation-heading h1 { margin: 4px 0 7px; }
.creation-heading p { margin: 0; }
.creation-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px 24px; align-items: start; max-width: none !important; }
.creation-main-column { display: grid; gap: 14px; }
.creation-section, .creation-media-section { padding: 21px 22px; border: 1px solid var(--ui-line); border-radius: 18px; background: #fff; box-shadow: var(--ui-shadow-xs); }
.creation-section__head { margin-bottom: 16px; }
.creation-section__head strong { color: var(--ui-ink); font-size: 15px; }
.creation-section__head small { display: block; margin-top: 3px; color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
.form-stack { gap: 14px; }
.form-grid { gap: 12px; }
.creation-dropzone { min-height: 190px; border: 1.5px dashed #b9cec6 !important; border-radius: 16px !important; background: #f8fbf9 !important; }
.creation-dropzone:hover { border-color: var(--ui-primary) !important; background: var(--ui-surface-soft) !important; }
.creation-dropzone > span { color: var(--ui-muted); }
.creation-dropzone strong { color: var(--ui-ink); }
.creation-preview { position: sticky; top: 92px; padding: 18px !important; }
.creation-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 4px; }
.creation-actions button { min-width: 180px; min-height: var(--ui-control-lg); }
.creation-phone { border-color: #23302c; box-shadow: 0 18px 40px rgb(31 45 41 / .13); }
.creation-phone__screen, .creation-phone__body { background: #fbfcfb; }
.creation-quick-choice > div, .journal-choice-grid { gap: 7px; }
.creation-quick-choice label > span, .journal-choice span { padding: 9px 12px; }
.creation-quick-choice input:checked + span, .journal-choice input:checked + span { border-color: var(--ui-primary); background: var(--ui-primary-soft); color: var(--ui-primary-strong); }
.journal-stepper { border-color: var(--ui-line-strong); border-radius: 12px; }
.tag-editor, .product-tool-picker { padding: 14px; border: 1px solid var(--ui-line); border-radius: 14px; background: #fafbf9; }
.field-hint, .journal-helper, .sharing-hint { color: var(--ui-muted); font-size: 11.5px; }

/* ---------- Journal ---------- */
.hp-main[data-view="journal"] .hp-hero { margin-bottom: 22px; }
.hp-journal-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.hp-journal-stats article { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 17px 18px; border: 1px solid var(--ui-line); border-radius: 16px; background: #fff; box-shadow: var(--ui-shadow-xs); }
.hp-journal-stats strong { font-size: 1.6rem; line-height: 1; }
.hp-journal-stats span { color: var(--ui-muted); font-size: 12px; text-transform: capitalize; }
.hp-journal-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.hp-journal-filters .hp-button:first-of-type { margin-left: auto; }
.hp-journal-grid { columns: 3 270px !important; column-gap: 14px !important; }
.hp-journal-card { margin-bottom: 14px !important; overflow: hidden; border-radius: 18px !important; }
.hp-journal-card .hp-card-media { overflow: hidden; }
.hp-journal-card .hp-card-body { padding: 14px 15px; }
.hp-journal-card .hp-card-title { margin: 8px 0 5px; font-size: .98rem; }
.hp-journal-card .hp-card-copy { margin: 0 0 8px; color: var(--ui-muted); font-size: 12.5px; line-height: 1.55; }
.hp-journal-actions { display: flex; gap: 5px; padding: 9px 10px 11px; border-top: 1px solid #edf1ef; }
.hp-journal-actions .hp-chip { min-height: 32px; padding-inline: 9px; font-size: 11px; }
.hp-journal-delete { margin-left: auto; color: var(--ui-danger) !important; }
.hp-journal-editor { margin-bottom: 16px; }
.hp-journal-editor > .hp-form { max-width: 820px; }

/* ---------- Kiln ---------- */
.hp-main[data-view="kiln-log"] > .hp-toolbar { margin-bottom: 16px; }
.hp-kiln-editor { margin-bottom: 16px; }
.hp-kiln-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.hp-kiln-form > h2, .hp-kiln-form > .kiln-section__head, .hp-kiln-form > .kiln-progress,
.hp-kiln-form > .kiln-setup-grid, .hp-kiln-form > .hp-load-groups,
.hp-kiln-form > .hp-add-group, .hp-kiln-form > .hp-toolbar, .hp-kiln-form > .hp-message { grid-column: 1 / -1; }
.kiln-section__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.kiln-section__head h2 { margin: 3px 0 0; font-size: 1.25rem; }
.kiln-status { padding: 5px 9px; border-radius: 999px; background: var(--ui-warning-soft); color: var(--ui-warning); font-size: 11px; font-weight: 750; }
.kiln-progress { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 0; padding: 12px; border: 1px solid var(--ui-line); border-radius: 15px; background: #fafbf9; }
.kiln-progress > span { position: relative; display: grid; justify-items: center; gap: 4px; color: var(--ui-faint); text-align: center; }
.kiln-progress > span:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 1px; background: var(--ui-line-strong); }
.kiln-progress b { z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--ui-line-strong); border-radius: 50%; background: #fff; font-size: 10px; }
.kiln-progress .is-current, .kiln-progress .is-complete { color: var(--ui-primary-strong); }
.kiln-progress .is-current b, .kiln-progress .is-complete b { border-color: var(--ui-primary); background: var(--ui-primary); color: #fff; }
.kiln-progress small { font-size: 9.5px; }
.kiln-setup-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.hp-load-groups { display: grid; gap: 10px; }
.hp-load-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin: 0; padding: 16px; border: 1px solid var(--ui-line); border-radius: 15px; background: #fafbf9; }
.hp-load-group legend { padding: 0 6px; color: var(--ui-primary-strong); font-size: 11px; font-weight: 800; }
.hp-span-2 { grid-column: 1 / -1; }
.hp-batch-item { width: 100%; min-height: 82px; grid-template-columns: 48px 1fr; text-align: left; border: 1px solid var(--ui-line); border-radius: 15px; background: #fff; }
.hp-batch-item:hover { border-color: #bdd0c8; background: #fbfdfc; }
.hp-kiln-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--ui-surface-warm); color: var(--ui-clay); }

/* ---------- Account / Me / orders / addresses ---------- */
.hp-me-shell { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 22px; align-items: start; }
.hp-me-main { min-width: 0; }
.hp-account-links { position: sticky; top: 92px; display: grid; gap: 4px; padding: 8px !important; }
.hp-account-links > a, .hp-account-links > button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 8px 11px;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--ui-muted) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-align: left;
}
.hp-account-links > a:hover, .hp-account-links > button:hover { background: #f2f6f4 !important; color: var(--ui-ink) !important; }
.hp-account-links > .is-active, .hp-account-links > [aria-current="page"] { background: var(--ui-primary-soft) !important; color: var(--ui-primary-strong) !important; }
.hp-account-links > a:last-child { margin-top: 5px; border-top: 1px solid var(--ui-line) !important; border-radius: 0 0 10px 10px !important; color: var(--ui-danger) !important; }

.hp-profile { padding: clamp(22px, 3vw, 32px) !important; }
.hp-profile-head { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--ui-line); }
.hp-profile-avatar { width: 74px; height: 74px; border: 4px solid #fff; border-radius: 50%; object-fit: cover; background: var(--ui-primary-soft); box-shadow: 0 0 0 1px var(--ui-line); }
.hp-profile-head h2 { margin: 0; font-size: 1.25rem; }
.hp-profile-form { max-width: 680px; }
.hp-profile-results { display: grid; gap: 10px; }
.hp-me-list { display: grid; gap: 10px; }
/* Account content rows: one spacing contract.
   Keep the media block tall enough to match the text stack so the card does not
   look top-heavy or leave a large visual pocket at the bottom. */
.hp-main .hp-me-item {
  display: grid;
  grid-template-columns: 112px minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}
.hp-main .hp-me-item__thumb {
  align-self: center;
  overflow: hidden;
  width: 112px;
  height: 112px;
  min-height: 0;
  border-radius: 12px;
  background: #edf1ef;
}
.hp-main .hp-me-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hp-main .hp-me-item__thumb > span { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ui-faint); }
.hp-main .hp-me-item__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}
.hp-main .hp-me-item__copy > .hp-badge { margin-bottom: 0; }
.hp-main .hp-me-item__copy h3 { margin: 8px 0 4px; font-size: 14px; }
.hp-main .hp-me-item__copy p { max-width: 720px; margin: 0 0 5px; color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
.hp-main .hp-me-item__copy small { display: block; color: var(--ui-faint); line-height: 1.35; }
.hp-main .hp-me-item__actions { display: flex; align-items: center; gap: 6px; padding: 0; }
.hp-following-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px !important; }
.hp-following-card__profile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hp-following-card__profile span { display: grid; }
.hp-following-card__profile small { color: var(--ui-muted); }

.hp-order-row {
  display: grid;
  grid-template-columns: minmax(150px,1.3fr) .8fr .8fr 1fr;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--ui-line);
}
.hp-order-row:first-child { border-top: 1px solid var(--ui-line); }
.hp-order-row:hover { background: #fafcfb; }
.hp-order-row small { color: var(--ui-muted); text-align: right; }

.hp-main[data-view="addresses"] > .hp-new-address { margin: -10px 0 16px; }
.hp-address-editor { margin-bottom: 14px; }
.hp-address-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; max-width: 900px; }
.hp-address-form h2, .hp-address-form .hp-toolbar, .hp-address-form .hp-message { grid-column: 1 / -1; }
.hp-address { position: relative; margin-bottom: 10px; padding: 18px 20px !important; }
.hp-address > strong { font-size: 15px; }
.hp-address > .hp-badge { margin-left: 7px; }
.hp-address > p { max-width: 740px; margin: 8px 0 12px; color: var(--ui-muted); }
.hp-address-delete { color: var(--ui-danger) !important; }

.hp-public-profile { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 18px; margin-bottom: 24px; }
.hp-public-profile h1 { margin: 0 0 6px; font-size: 2.2rem; }
.hp-public-profile p { max-width: 720px; margin: 0; color: var(--ui-muted); }
.hp-user-posts { margin-top: 20px; }


/* ---------- Me / account workspace v1.2 ---------- */
.hp-me-stage { display: grid; gap: 16px; min-width: 0; }
.hp-account-links { gap: 3px; }
.hp-account-links .app-icon { flex: 0 0 auto; width: 17px; height: 17px; }
.hp-account-links > a { gap: 10px; }
.hp-account-group-label {
  display: block;
  padding: 12px 11px 5px;
  color: var(--ui-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hp-account-links > .hp-account-logout {
  margin-top: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--ui-line) !important;
  border-radius: 0 0 10px 10px !important;
  color: var(--ui-danger) !important;
}
.hp-me-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.hp-me-section-head h2 { margin: 3px 0 5px; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.hp-me-section-head p { max-width: 680px; margin: 0; color: var(--ui-muted); line-height: 1.55; }
.hp-me-section-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }

.hp-me-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px !important;
}
.hp-me-summary__identity { display: flex; align-items: center; gap: 17px; min-width: 0; }
.hp-me-summary__identity > div { min-width: 0; }
.hp-me-summary__identity h2 { margin: 3px 0 3px; font-size: clamp(1.35rem, 2.3vw, 1.9rem); }
.hp-me-summary__identity p:not(.hp-meta) { max-width: 620px; margin: 9px 0 0; color: var(--ui-muted); line-height: 1.55; }
.hp-me-summary__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.avatar--xl, .hp-avatar-fallback--xl { width: 88px; height: 88px; }
.hp-avatar-fallback {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ui-primary-soft), var(--ui-surface-warm));
  color: var(--ui-primary-strong);
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px var(--ui-line);
}
.hp-avatar-fallback--lg { width: 48px; height: 48px; font-size: 14px; }
.hp-avatar-fallback--xl { font-size: 22px; }

.hp-me-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.hp-me-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 15px 16px;
  border: 1px solid var(--ui-line);
  border-radius: 16px;
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-xs);
  text-align: left;
  transition: transform .16s var(--ui-ease), border-color .16s var(--ui-ease), box-shadow .16s var(--ui-ease);
}
.hp-me-stat:hover { transform: translateY(-1px); border-color: var(--ui-line-strong); box-shadow: var(--ui-shadow-sm); }
.hp-me-stat > .app-icon { width: 23px; height: 23px; color: var(--ui-primary); }
.hp-me-stat > span { display: grid; gap: 2px; }
.hp-me-stat strong { font-size: 1.35rem; line-height: 1; }
.hp-me-stat small { color: var(--ui-muted); font-size: 11.5px; font-weight: 650; }

.hp-me-quick, .hp-me-recent, .hp-me-collection, .hp-me-security { padding: 22px !important; }
.hp-me-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.hp-me-quick-grid > a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 14px;
  background: #fafcfb;
}
.hp-me-quick-grid > a:hover { border-color: var(--ui-line-strong); background: var(--ui-surface-soft); }
.hp-me-quick-grid .app-icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--ui-primary); }
.hp-me-quick-grid span { display: grid; gap: 3px; min-width: 0; }
.hp-me-quick-grid strong { font-size: 13px; }
.hp-me-quick-grid small { color: var(--ui-muted); font-size: 10.5px; line-height: 1.35; }

.hp-me-order-list { display: grid; border-top: 1px solid var(--ui-line); }
.hp-me-order-list > a {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--ui-line);
}
.hp-me-order-list > a:hover strong { color: var(--ui-primary-strong); }
.hp-me-order-list > a > span:first-child { display: grid; gap: 3px; }
.hp-me-order-list small { color: var(--ui-muted); font-size: 11px; }
.hp-me-order-list b { font-size: 13px; }

.hp-profile-editor { padding: 24px !important; }
.hp-profile-editor .hp-profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  max-width: 880px;
}
.hp-profile-avatar-control {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--ui-line);
  border-radius: 15px;
  background: #fafcfb;
}
.hp-profile-avatar-control > div:last-child { display: grid; gap: 7px; justify-items: start; }
.hp-profile-avatar-control small, .hp-profile-form .hp-field small { color: var(--ui-muted); font-size: 10.5px; line-height: 1.45; }
.hp-avatar-preview { flex: 0 0 auto; }
.hp-avatar-preview img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--ui-line); }
.hp-avatar-picker { cursor: pointer; }
.hp-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hp-bio-count { justify-self: end; }

.hp-me-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ui-line);
}
.hp-me-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px,100%);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 12px;
  background: #fff;
}
.hp-me-search:focus-within { border-color: var(--ui-primary); box-shadow: 0 0 0 3px rgb(47 109 96 / .1); }
.hp-me-search .app-icon { width: 17px; height: 17px; color: var(--ui-muted); }
.hp-me-search input { width: 100%; min-width: 0; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 13px; }
.hp-me-filter { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.hp-me-collection > .hp-me-list:last-child { margin-bottom: 0; }
.hp-danger-action { color: var(--ui-danger) !important; }
.hp-danger-action:hover { background: var(--ui-danger-soft) !important; border-color: rgb(154 81 72 / .22) !important; }

.hp-following-list { display: grid; gap: 9px; }
.hp-following-card {
  border: 1px solid var(--ui-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}
.hp-following-card__profile .avatar { flex: 0 0 auto; width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.hp-following-card__profile strong { font-size: 13.5px; }
.hp-following-card__profile small { margin-top: 3px; font-size: 11px; }

.hp-comment-list { display: grid; gap: 9px; }
.hp-me-comment {
  padding: 16px;
  border: 1px solid var(--ui-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}
.hp-me-comment__meta { display: flex; align-items: flex-start; gap: 10px; color: var(--ui-muted); font-size: 11.5px; }
.hp-me-comment__meta .app-icon { flex: 0 0 auto; width: 18px; height: 18px; color: var(--ui-primary); }
.hp-me-comment__meta span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.hp-me-comment__meta a { color: var(--ui-primary-strong); font-weight: 700; }
.hp-me-comment__meta small { width: 100%; color: var(--ui-faint); }
.hp-me-comment > p { margin: 11px 0 12px; line-height: 1.6; }

.hp-me-post-editor { padding: 24px !important; }
.hp-me-post-editor .hp-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }

.hp-me-security { display: grid; gap: 0; }
.hp-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 16px 0;
  border-top: 1px solid var(--ui-line);
}
.hp-security-row > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hp-security-row .app-icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--ui-primary); }
.hp-security-row span { display: grid; gap: 3px; }
.hp-security-row strong { font-size: 13.5px; }
.hp-security-row small { color: var(--ui-muted); font-size: 11px; line-height: 1.45; }

@media (max-width: 1180px) {
  .hp-me-stat-grid, .hp-me-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .hp-account-group-label { display: none; }
  .hp-account-links { display: flex; align-items: stretch; overflow-x: auto; padding: 6px !important; scrollbar-width: none; }
  .hp-account-links::-webkit-scrollbar { display: none; }
  .hp-account-links > a, .hp-account-links > button { flex: 0 0 auto; width: auto; gap: 7px; white-space: nowrap; }
  .hp-account-links > .hp-account-logout { margin-top: 0; padding-top: 8px; border-top: 0 !important; border-radius: 10px !important; }
  .hp-me-summary { align-items: flex-start; }
}

@media (max-width: 680px) {
  .hp-me-summary { display: grid; padding: 18px !important; }
  .hp-me-summary__identity { align-items: flex-start; }
  .hp-me-summary__actions { justify-content: flex-start; }
  .avatar--xl, .hp-avatar-fallback--xl, .hp-avatar-preview img { width: 72px; height: 72px; }
  .hp-me-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .hp-me-stat { min-height: 72px; padding: 12px; }
  .hp-me-quick, .hp-me-recent, .hp-me-collection, .hp-me-security, .hp-profile-editor, .hp-me-post-editor { padding: 16px !important; }
  .hp-me-quick-grid { grid-template-columns: 1fr; }
  .hp-me-section-head { display: grid; gap: 12px; }
  .hp-me-section-actions { justify-content: flex-start; }
  .hp-profile-editor .hp-profile-form, .hp-me-post-editor .hp-form { grid-template-columns: 1fr; }
  .hp-profile-editor .hp-span-2, .hp-me-post-editor .hp-span-2 { grid-column: 1; }
  .hp-profile-avatar-control { align-items: flex-start; }
  .hp-me-list-toolbar { align-items: stretch; flex-direction: column; }
  .hp-me-search { width: 100%; }
  .hp-me-filter { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .hp-me-order-list > a { grid-template-columns: minmax(0,1fr) auto; }
  .hp-me-order-list > a > b { grid-column: 2; grid-row: 2; }
  .hp-security-row { align-items: flex-start; flex-direction: column; }
  .hp-security-row .hp-button { width: 100%; }
  .hp-following-card { align-items: flex-start; }
}

@media (max-width: 460px) {
  .hp-me-stat-grid { grid-template-columns: 1fr 1fr; }
  .hp-me-stat > .app-icon { width: 20px; height: 20px; }
  .hp-me-stat strong { font-size: 1.15rem; }
  .hp-profile-avatar-control { flex-direction: column; }
  .hp-main .hp-me-item__actions { justify-content: flex-start; }
}


/* ---------- Account orders v1.2 ---------- */
.hp-order-account { display: grid; gap: 14px; }
.hp-orders-workspace { padding: 22px !important; }
.hp-orders-list { display: grid; gap: 8px; }
.hp-order-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}
.hp-order-card:hover { border-color: var(--ui-line-strong); background: #fbfdfc; }
.hp-order-card__main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hp-order-card__main > span:last-child { display: grid; gap: 3px; }
.hp-order-card__main small { color: var(--ui-muted); font-size: 11px; }
.hp-order-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ui-primary-soft); color: var(--ui-primary-strong); }
.hp-order-icon .app-icon { width: 19px; height: 19px; }
.hp-order-card__total { font-size: 13px; }
.hp-order-card > .app-icon { width: 17px; height: 17px; color: var(--ui-faint); }
.hp-order-detail { display: grid; gap: 14px; }
.hp-back-link { display: inline-flex; align-items: center; gap: 5px; width: fit-content; color: var(--ui-muted); font-size: 12px; font-weight: 700; }
.hp-back-link:hover { color: var(--ui-primary-strong); }
.hp-back-link .app-icon { width: 16px; height: 16px; }
.hp-order-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px !important; }
.hp-order-detail__head h2 { margin: 3px 0 5px; font-size: 1.55rem; }
.hp-order-detail__head p { margin: 0; color: var(--ui-muted); }
.hp-order-detail__head > div:last-child { display: grid; justify-items: end; gap: 8px; }
.hp-order-detail__head > div:last-child > strong { font-size: 1.25rem; }
.hp-order-detail__grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(260px,.7fr); gap: 14px; align-items: start; }
.hp-order-products, .hp-order-detail__side > .hp-panel, .hp-order-note { padding: 20px !important; }
.hp-order-products h3, .hp-order-detail__side h3, .hp-order-note h3 { margin: 0 0 14px; font-size: 1rem; }
.hp-order-products__list { display: grid; }
.hp-order-products__list article { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 86px; padding: 11px 0; border-top: 1px solid var(--ui-line); }
.hp-order-products__list article:first-child { border-top: 0; padding-top: 0; }
.hp-order-products__list article:last-child { padding-bottom: 0; }
.hp-order-products__list img, .hp-order-product-placeholder { width: 60px; height: 60px; border-radius: 11px; object-fit: cover; background: var(--ui-surface-soft); }
.hp-order-product-placeholder { display: grid; place-items: center; color: var(--ui-faint); }
.hp-order-product-placeholder .app-icon { width: 22px; height: 22px; }
.hp-order-products__list article > div { display: grid; gap: 3px; }
.hp-order-products__list small { color: var(--ui-muted); font-size: 10.5px; }
.hp-order-products__list b { font-size: 12.5px; }
.hp-order-detail__side { display: grid; gap: 14px; }
.hp-order-totals { display: grid; gap: 9px; margin: 0; }
.hp-order-totals > div { display: flex; justify-content: space-between; gap: 16px; color: var(--ui-muted); font-size: 12px; }
.hp-order-totals dt, .hp-order-totals dd { margin: 0; }
.hp-order-totals .is-total { margin-top: 4px; padding-top: 11px; border-top: 1px solid var(--ui-line); color: var(--ui-ink); font-weight: 800; }
.hp-order-payment { display: flex; justify-content: space-between; gap: 12px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--ui-line); color: var(--ui-muted); font-size: 11px; }
.hp-order-payment strong { color: var(--ui-ink); }
.hp-order-detail__side > .hp-panel > p { margin: 0; color: var(--ui-muted); line-height: 1.55; }
.hp-order-detail__side > .hp-panel > small { display: block; margin-top: 6px; color: var(--ui-faint); }
.hp-order-note p { margin: 0; color: var(--ui-muted); line-height: 1.6; }

@media (max-width: 900px) {
  .hp-order-detail__grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .hp-orders-workspace { padding: 16px !important; }
  .hp-order-card { grid-template-columns: minmax(0,1fr) auto 16px; gap: 9px; }
  .hp-order-card > .hp-badge { grid-column: 2; }
  .hp-order-card__total { grid-column: 2; grid-row: 2; justify-self: end; }
  .hp-order-card > .app-icon { grid-column: 3; grid-row: 1 / span 2; }
  .hp-order-detail__head { align-items: flex-start; padding: 17px !important; }
  .hp-order-products, .hp-order-detail__side > .hp-panel, .hp-order-note { padding: 16px !important; }
  .hp-order-products__list article { grid-template-columns: 52px minmax(0,1fr) auto; }
  .hp-order-products__list img, .hp-order-product-placeholder { width: 52px; height: 52px; }
}


/* ---------- Account addresses v1.2 ---------- */
.hp-address-workspace { display: grid; gap: 14px; }
.hp-address-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}
.hp-address-toolbar h2 { margin: 3px 0 5px; font-size: 1.5rem; }
.hp-address-toolbar p { margin: 0; color: var(--ui-muted); }
.hp-address-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.hp-address-grid > .hp-empty, .hp-address-grid > .hp-alert, .hp-address-grid > .hp-loading { grid-column: 1 / -1; }
.hp-address { display: grid; align-content: start; margin: 0 !important; min-height: 210px; }
.hp-address.is-default { border-color: rgb(47 109 96 / .28); box-shadow: 0 0 0 1px rgb(47 109 96 / .04), var(--ui-shadow-xs); }
.hp-address > header { display: grid; gap: 4px; }
.hp-address > header > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hp-address > header small { color: var(--ui-muted); }
.hp-address-contact { display: grid; gap: 3px; margin: -2px 0 14px; color: var(--ui-muted); font-size: 11px; }
.hp-address > .hp-toolbar { margin-top: auto; padding-top: 8px; }
.hp-address-form { max-width: none; padding: 22px !important; }
.hp-address-form__head { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 2px; }
.hp-address-form__head h2 { margin: 3px 0 0; }

@media (max-width: 900px) {
  .hp-address-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .hp-address-toolbar { align-items: stretch; flex-direction: column; }
  .hp-address-toolbar .hp-button { width: 100%; }
  .hp-address-form { grid-template-columns: 1fr; padding: 16px !important; }
  .hp-address-form .hp-span-2, .hp-address-form__head { grid-column: 1; }
}

/* ---------- Auth ---------- */
.hp-main[data-view="login"], .hp-main[data-view="register"] { width: min(760px, calc(100% - 36px)); }
.hp-main[data-view="login"] .hp-hero, .hp-main[data-view="register"] .hp-hero { margin-inline: auto; text-align: center; }
.hp-auth-card { width: min(480px, 100%); margin-inline: auto; padding: 26px !important; }
.hp-auth-card .hp-form { display: grid; gap: 14px; }
.hp-auth-card .hp-button { width: 100%; min-height: 50px; }
.hp-auth-card > .hp-meta { margin: 16px 0 0; text-align: center; }
.hp-auth-card > .hp-meta a { color: var(--ui-primary); font-weight: 700; }

/* Native wp-login.php parity */
body.login { background: var(--ui-canvas); }
body.login #login { width: min(420px, calc(100% - 32px)); padding-top: 7vh; }
body.login h1 a { width: auto; height: auto; margin-bottom: 22px; background: none !important; color: var(--ui-primary-strong); text-indent: 0; font-family: var(--font-display); font-size: 38px; line-height: 1; }
body.login form { padding: 26px !important; border: 1px solid var(--ui-line) !important; border-radius: 20px !important; box-shadow: var(--ui-shadow-sm) !important; }
body.login form .input { min-height: 46px; border-color: var(--ui-line-strong); border-radius: 11px; box-shadow: none; }
body.login .button-primary { min-height: 42px; border: 0; border-radius: 11px; background: var(--ui-primary); font-weight: 700; }
body.login .button-primary:hover { background: var(--ui-primary-strong); }

/* ---------- Cart ---------- */
.cart-page { width: min(1260px, 100%); margin-inline: auto; }
.astra-cart-header, .astra-checkout-header { margin-bottom: 26px; }
.astra-cart-header h1, .astra-checkout-header h1 { margin: 0; }
.astra-cart-continue, .astra-checkout-header > a { display: inline-flex; align-items: center; gap: 6px; color: var(--ui-muted); font-size: 13px; font-weight: 650; }
.astra-cart-continue:hover, .astra-checkout-header > a:hover { color: var(--ui-primary); }
.astra-cart-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px,.7fr); gap: 22px; align-items: start; }
.astra-cart-table { overflow: hidden; padding: 0 !important; }
.astra-cart-head { min-height: 48px; padding-inline: 16px; background: #fafbf9; color: var(--ui-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.astra-cart-row { min-height: 116px; padding: 14px 16px; border-top-color: var(--ui-line); }
.astra-cart-remove { color: var(--ui-faint); }
.astra-cart-remove:hover { color: var(--ui-danger); }
.astra-cart-product { grid-template-columns: 76px minmax(0,1fr); gap: 12px; }
.astra-cart-image { overflow: hidden; width: 76px; height: 76px; border-radius: 12px; background: #eef2f0; }
.astra-cart-image img { width: 100%; height: 100%; object-fit: cover; }
.astra-cart-product strong { font-size: 13px; }
.astra-cart-product small { color: var(--ui-muted); }
.astra-cart-price, .astra-cart-subtotal { color: var(--ui-ink-soft); font-size: 13px; }
.astra-cart-coupon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 14px 16px 16px; border-top: 1px solid var(--ui-line); background: #fcfdfc; }
.astra-cart-coupon input { min-height: 42px; padding: 9px 11px; border: 1px solid var(--ui-line-strong); border-radius: 11px; }
.astra-cart-coupon button { min-height: 42px; padding: 0 14px; border: 1px solid var(--ui-line-strong); border-radius: 11px; background: #fff; color: var(--ui-ink); font-weight: 700; }
.astra-cart-coupon small { grid-column: 1 / -1; }
.coupon-success { color: var(--ui-success) !important; }
.coupon-error { color: var(--ui-danger) !important; }
.astra-cart-totals { position: sticky; top: 92px; padding: 21px !important; }
.astra-cart-totals h2 { margin: 0 0 16px; font-size: 1.05rem; }
.astra-cart-totals > div { display: grid; grid-template-columns: 95px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid #edf1ef; }
.astra-cart-totals p { margin: 0; color: var(--ui-muted); font-size: 12px; }
.astra-cart-totals p a { display: block; margin-top: 3px; color: var(--ui-primary); font-weight: 700; }
.astra-cart-total strong { font-size: 1.35rem; }
.astra-checkout-button { width: 100%; margin-top: 16px; min-height: 50px; }

/* ---------- Checkout ---------- */
.checkout-page { width: min(1180px, 100%); margin-inline: auto; }
.astra-checkout-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.astra-checkout-header > a { justify-self: start; }
.astra-checkout-header h1 { justify-self: center; }
.astra-checkout-layout { grid-template-columns: minmax(0, 1.18fr) minmax(330px,.82fr); gap: clamp(24px,4vw,46px); align-items: start; }
.astra-customer-column { min-width: 0; }
.astra-customer-column > h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; }
.astra-customer-column > h3, .astra-payment-section > h3 { margin: 24px 0 12px; font-size: 14px; }
.astra-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.astra-field-wide { grid-column: 1 / -1; }
.checkout-reference-fields input, .checkout-reference-fields select { min-height: 48px !important; }
.astra-saved-address { display: block; margin: 14px 0; }
.astra-saved-address > span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.astra-checkout-coupon { margin: 18px 0; padding: 14px; border: 1px solid var(--ui-line); border-radius: 14px; background: #fafbf9; }
.astra-checkout-coupon > label { display: inline-flex; align-items: center; gap: 6px; color: var(--ui-ink-soft); font-size: 12px; font-weight: 700; }
.astra-checkout-coupon > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 8px; }
.astra-checkout-coupon input { min-height: 42px; padding: 9px 11px; border: 1px solid var(--ui-line-strong); border-radius: 11px; }
.astra-checkout-coupon button { min-height: 42px; padding-inline: 14px; border: 1px solid var(--ui-line-strong); border-radius: 11px; background: #fff; font-weight: 700; }
.astra-payment-section { margin-top: 20px; }
.astra-payment-section > div { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #cfe0d9; border-radius: 14px; background: var(--ui-surface-soft); color: var(--ui-primary-strong); }
.astra-payment-section p { display: grid; gap: 2px; margin: 0; }
.astra-payment-section span { color: var(--ui-muted); font-size: 12px; }
.astra-place-order { width: 100%; min-height: 52px; margin-top: 18px; }
.astra-order-column { position: sticky; top: 92px; padding: 22px; border: 1px solid var(--ui-line); border-radius: 20px; background: #fff; box-shadow: var(--ui-shadow-sm); }
.astra-order-column > h2 { margin: 0 0 14px; font-size: 1rem; }
.astra-order-table { overflow: hidden; padding: 0 !important; border-radius: 14px !important; box-shadow: none !important; }
.astra-order-head { padding: 10px 12px; background: #fafbf9; color: var(--ui-muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; }
.astra-order-table article { padding: 11px 12px; border-top-color: var(--ui-line); }
.astra-order-table article > div { grid-template-columns: 48px 1fr; gap: 9px; }
.astra-order-table article img { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; }
.astra-order-table article small { color: var(--ui-muted); }
.astra-order-grand-total { padding: 13px 12px; background: #fbfcfb; }
.astra-order-grand-total strong { font-size: 1.2rem; }

/* ---------- Misc list / cards ---------- */
.hp-list { display: grid; gap: 9px; }
.hp-list-item { display: grid; grid-template-columns: 68px minmax(0,1fr); align-items: center; gap: 12px; min-height: 84px; padding: 8px 10px; border: 1px solid var(--ui-line); border-radius: 15px; background: #fff; box-shadow: var(--ui-shadow-xs); }
.hp-list-item:hover { border-color: #bfd1ca; box-shadow: var(--ui-shadow-sm); }
.hp-list-item > img, .hp-list-item > span:first-child { width: 68px; height: 68px; border-radius: 11px; object-fit: cover; background: #edf1ef; }
.hp-list-item h3 { margin: 5px 0 2px; font-size: 14px; }
.hp-current-price { white-space: nowrap; }
.hp-feed-more, .hp-more { display: block; min-height: 1px; margin: 12px auto 0; border: 0; background: transparent; color: var(--ui-muted); }
.hp-feed-error { color: var(--ui-danger); text-align: center; }

/* ---------- Bottom navigation ---------- */
.hp-bottom-nav { border-color: rgb(216 226 222 / .92); background: rgb(255 255 255 / .94); box-shadow: 0 16px 40px rgb(31 45 41 / .16); }
.hp-bottom-nav a { color: #72807a; }
.hp-bottom-nav a.is-active { color: var(--ui-primary); }
.hp-bottom-nav a.is-create { background: var(--ui-primary); box-shadow: 0 10px 24px rgb(47 109 96 / .24); }


/* Explicit destructive action contract for dynamically rendered screens. */
:where(.hp-delete-batch, .hp-address-delete, .hp-delete-comment, .hp-journal-delete, .hp-remove-favorite, .hp-remove-like, .hp-unfollow) {
  color: var(--ui-danger) !important;
}
:where(.hp-delete-batch, .hp-address-delete, .hp-delete-comment, .hp-journal-delete, .hp-remove-favorite, .hp-remove-like, .hp-unfollow):hover {
  border-color: #e5c5bf !important;
  background: var(--ui-danger-soft) !important;
  color: #7d4038 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .hp-app { grid-template-columns: 210px minmax(0,1fr); }
  .hp-rail { padding-inline: 14px; }
  .hp-main { width: min(var(--ui-content), calc(100% - 36px)); }
  .product-reference-hero { grid-template-columns: minmax(0,1fr) minmax(330px,.9fr) !important; gap: 30px !important; }
  .creation-form { grid-template-columns: minmax(0,1fr) 300px; }
  .hp-me-shell { grid-template-columns: minmax(0,1fr) 230px; }
}

@media (max-width: 900px) {
  .discover-page > .commerce-heading { grid-template-columns: 1fr; align-items: start; }
  .discover-tabs { justify-content: flex-start; }
  .discover-detail { grid-template-columns: 1fr; }
  .discover-detail__media { position: relative; top: auto; }
  .product-reference-hero { grid-template-columns: 1fr !important; }
  .product-reference-gallery { position: relative; top: auto; }
  .creation-form { grid-template-columns: 1fr; }
  .creation-preview { position: relative; top: auto; max-width: 460px; }
  .creation-actions { grid-column: 1; }
  .hp-me-shell { grid-template-columns: 1fr; }
  .hp-account-links { position: relative; top: auto; grid-template-columns: repeat(3,minmax(0,1fr)); order: -1; }
  .hp-account-links > a, .hp-account-links > button { justify-content: center; text-align: center; }
  .hp-account-links > a:last-child { margin-top: 0; border-top: 0 !important; color: var(--ui-danger) !important; }
  .astra-cart-layout, .astra-checkout-layout { grid-template-columns: 1fr; }
  .astra-cart-totals, .astra-order-column { position: relative; top: auto; }
  .product-related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 850px) {
  .hp-app { padding-bottom: 92px; }
  .hp-header { height: 62px; padding: 8px 12px; }
  .hp-header > .hp-search { min-height: 42px; }
  .hp-main { width: min(100% - 24px, 760px); padding-top: 22px; padding-bottom: 86px; }
  .hp-mobile-brand { padding-inline: 0; }
  .hp-title, .hp-page-title, .stream-heading h1, .shop-heading h1, .creation-heading h1,
  .create-hub > header h1, .astra-cart-header h1, .astra-checkout-header h1 { font-size: clamp(2rem, 9vw, 2.65rem) !important; }
  .shop-category-bar { top: 70px; }
  .hp-shop-toast { right: 12px; bottom: 96px; }
  .hp-post-overlay { width: 100vw; max-height: 100dvh; border-radius: 0; }
  .hp-post-scroll { max-height: 100dvh; }
}

@media (max-width: 680px) {
  .hp-main[data-view="home"] > .hp-toolbar { margin-bottom: 14px; }
  .discover-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; }
  .discover-filters > span, .discover-filters__clear { grid-column: 1 / -1; }
  .discover-filters label { min-width: 0; }
  .discover-detail__facts { grid-template-columns: 1fr; }
  .sticky-commerce-actions { grid-template-columns: 1fr; }
  .create-hub-grid { grid-template-columns: 1fr; }
  .create-hub-card { min-height: 164px; }
  .creation-heading { grid-template-columns: 42px 1fr; }
  .creation-heading > svg { width: 40px; height: 40px; padding: 9px; }
  .creation-section, .creation-media-section { padding: 18px; }
  .creation-dropzone { min-height: 150px; }
  .hp-journal-stats { grid-template-columns: 1fr 1fr 1fr; }
  .hp-journal-stats article { display: grid; gap: 3px; padding: 13px; }
  .hp-journal-filters .hp-button:first-of-type { margin-left: 0; }
  .hp-journal-grid { columns: 2 160px !important; }
  .hp-kiln-form, .hp-load-group, .kiln-setup-grid { grid-template-columns: 1fr; }
  .hp-kiln-form > *, .hp-load-group > *, .kiln-setup-grid > * { grid-column: 1 !important; }
  .kiln-progress { overflow-x: auto; grid-template-columns: repeat(6,84px); justify-content: start; }
  .hp-account-links { display: flex; overflow-x: auto; padding: 6px !important; scrollbar-width: none; }
  .hp-account-links::-webkit-scrollbar { display: none; }
  .hp-account-links > a, .hp-account-links > button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .hp-main .hp-me-item { grid-template-columns: 88px minmax(0,1fr); gap: 12px; padding: 12px; }
  .hp-main .hp-me-item__thumb { width: 88px; height: 88px; }
  .hp-main .hp-me-item__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .hp-order-row { grid-template-columns: 1fr auto; }
  .hp-order-row > span:not(.hp-badge), .hp-order-row small { text-align: right; }
  .hp-address-form { grid-template-columns: 1fr; }
  .hp-address-form > * { grid-column: 1 !important; }
  .hp-public-profile { grid-template-columns: auto 1fr; }
  .hp-public-profile .hp-follow { grid-column: 1 / -1; width: 100%; }
  .astra-cart-head { display: none; }
  .astra-cart-row { grid-template-columns: auto 1fr auto; gap: 10px; }
  .astra-cart-product { grid-column: 2 / -1; }
  .astra-cart-price, .astra-cart-quantity, .astra-cart-subtotal { grid-row: auto; }
  .astra-cart-coupon { grid-template-columns: 1fr; }
  .astra-cart-coupon small { grid-column: 1; }
  .astra-checkout-header { grid-template-columns: 1fr auto; gap: 10px; }
  .astra-checkout-header h1 { justify-self: end; font-size: 2rem !important; }
  .astra-field-grid { grid-template-columns: 1fr; }
  .astra-field-wide { grid-column: 1; }
  .product-related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
  .hp-main { width: calc(100% - 20px); }
  .hp-panel { padding: 17px; }
  .hp-header > .hp-search { border-radius: 12px; }
  .hp-title, .hp-page-title, .stream-heading h1, .shop-heading h1, .creation-heading h1,
  .create-hub > header h1, .astra-cart-header h1, .astra-checkout-header h1 { font-size: 2rem !important; }
  .hp-journal-grid { columns: 1 !important; }
  .hp-journal-stats { gap: 6px; }
  .hp-journal-stats article { padding: 11px; }
  .hp-journal-stats strong { font-size: 1.3rem; }
  .discover-filters { grid-template-columns: 1fr; }
  .discover-filters > * { grid-column: 1 !important; }
  .product-reference-summary > h1 { font-size: 2.25rem !important; }
  .product-purchase-row { grid-template-columns: 112px minmax(0,1fr) !important; }
  .product-related-grid { grid-template-columns: 1fr; }
  .hp-bottom-nav { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); height: 68px; border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ========================================================================== 
   v1.2.2 Cart + WooCommerce address system
   ========================================================================== */
.hp-main[data-view="cart"] .hp-cart-page-v2 {
  width: min(1440px, 100%) !important;
  margin-inline: auto;
  padding: 18px 0 80px !important;
}
.hp-main[data-view="cart"] .hp-cart-page-v2 .astra-cart-header {
  align-items: flex-end;
  margin-bottom: 28px;
}
.hp-main[data-view="cart"] .hp-cart-page-v2 .astra-cart-header > div { display: grid; gap: 4px; }
.hp-main[data-view="cart"] .hp-cart-page-v2 .astra-cart-header .eyebrow { margin: 0; }
.hp-cart-layout-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 28px;
  align-items: start;
}
.hp-cart-card-v2,
.hp-cart-summary-v2 {
  min-width: 0;
  border: 1px solid var(--ui-line);
  border-radius: 22px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-xs);
}
.hp-cart-card-v2 { overflow: clip; }
.hp-cart-card-v2__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--ui-line);
  background: #fbfcfb;
}
.hp-cart-card-v2__head > div { display: flex; align-items: baseline; gap: 10px; }
.hp-cart-card-v2__head h2 { margin: 0; font-size: 1.08rem; }
.hp-cart-card-v2__head span { color: var(--ui-muted); font-size: 12px; }
.hp-cart-list-v2 { display: grid; }
.hp-cart-item-v2 {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 20px 22px;
  border-bottom: 1px solid var(--ui-line);
}
.hp-cart-item-v2:last-child { border-bottom: 0; }
.hp-cart-item-v2__image {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 92px;
  height: 92px;
  border-radius: 15px;
  background: #eef3f1;
}
.hp-cart-item-v2__image img { width: 100%; height: 100%; object-fit: cover; }
.hp-cart-item-v2__image > span { color: var(--ui-faint); }
.hp-cart-item-v2__info { min-width: 0; }
.hp-cart-item-v2__info > a { color: inherit; text-decoration: none; }
.hp-cart-item-v2__info h3 {
  margin: 0 0 5px;
  overflow-wrap: anywhere;
  color: var(--ui-primary-deep);
  font-size: 15px;
  line-height: 1.35;
}
.hp-cart-item-v2__info p { margin: 0 0 6px; color: var(--ui-muted); font-size: 12px; }
.hp-cart-item-v2__unit { color: var(--ui-muted); font-size: 12px; }
.hp-cart-item-v2__actions {
  display: grid;
  grid-template-columns: auto minmax(88px, auto);
  grid-template-areas: "qty total" "remove remove";
  gap: 9px 16px;
  align-items: center;
  justify-items: end;
  min-width: 230px;
}
.hp-cart-qty-v2 {
  grid-area: qty;
  display: grid;
  grid-template-columns: 38px 42px 38px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 12px;
  background: #fff;
}
.hp-cart-qty-v2 button {
  width: 38px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-ink);
  font-size: 18px;
  cursor: pointer;
}
.hp-cart-qty-v2 button:hover { background: var(--ui-primary-soft); }
.hp-cart-qty-v2 strong { text-align: center; font-size: 13px; }
.hp-cart-item-v2__total { grid-area: total; white-space: nowrap; font-size: 15px; }
.hp-cart-remove-v2 {
  grid-area: remove;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.hp-cart-remove-v2:hover { color: var(--ui-danger); }
.hp-cart-coupon-v2 {
  padding: 15px 22px 18px;
  border-top: 1px solid var(--ui-line);
  background: #fbfcfb;
}
.hp-cart-coupon-v2__toggle,
.hp-checkout-coupon-v2__toggle,
.hp-address-line2-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.hp-cart-coupon-v2__toggle .app-icon,
.hp-checkout-coupon-v2__toggle .app-icon { width: 16px; height: 16px; }
.hp-cart-coupon-v2__form {
  display: grid;
  grid-template-columns: minmax(0, 280px) auto;
  gap: 8px;
  margin-top: 12px;
}
.hp-cart-coupon-v2__form[hidden],
.hp-checkout-coupon-v2__form[hidden] { display: none !important; }
.hp-cart-coupon-v2__form input,
.hp-checkout-coupon-v2__form input {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ui-ink);
}
.hp-cart-coupon-v2__form button,
.hp-checkout-coupon-v2__form button {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ui-ink);
  font-weight: 700;
}
.hp-cart-coupon-v2__form small { grid-column: 1 / -1; }
.hp-cart-summary-v2 {
  position: sticky;
  top: 92px;
  padding: 24px;
}
.hp-cart-summary-v2 h2 { margin: 4px 0 18px; font-size: 1.35rem; }
.hp-cart-summary-v2 dl { margin: 0; }
.hp-cart-summary-v2 dl > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--ui-line);
}
.hp-cart-summary-v2 dt { color: var(--ui-muted); }
.hp-cart-summary-v2 dd { margin: 0; text-align: right; font-weight: 700; }
.hp-cart-summary-v2 dd span { color: var(--ui-muted); font-size: 12px; font-weight: 500; }
.hp-cart-summary-v2 .is-total { margin-top: 2px; padding-top: 17px; }
.hp-cart-summary-v2 .is-total dt { color: var(--ui-ink); font-weight: 700; }
.hp-cart-summary-v2 .is-total dd { font-size: 1.55rem; }
.hp-cart-summary-v2 .astra-checkout-button { margin: 18px 0 0; }
.hp-cart-summary-v2__note { margin: 11px 0 0; color: var(--ui-muted); font-size: 11px; text-align: center; }

/* Checkout: one address system driven by WooCommerce country/state metadata. */
.hp-main[data-view="checkout"] .hp-checkout-v2 { width: min(1380px, 100%) !important; }
.hp-main[data-view="checkout"] .hp-checkout-v2 .astra-checkout-layout {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: clamp(28px, 4vw, 56px);
}
.hp-checkout-v2 .hp-checkout-section {
  padding: 22px;
  border: 1px solid var(--ui-line);
  border-radius: 20px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-xs);
}
.hp-checkout-section__head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--ui-line); }
.hp-checkout-section__head h2 { margin: 4px 0 5px; font-size: 1.35rem; }
.hp-checkout-section__head p { margin: 0; color: var(--ui-muted); font-size: 12px; }
.hp-checkout-v2 .checkout-reference-fields { gap: 14px; }
.hp-checkout-v2 .checkout-reference-fields .hp-field { display: grid; gap: 6px; }
.hp-checkout-v2 .checkout-reference-fields .hp-field > span:first-child,
.hp-address-form-v2 .hp-field > span:first-child {
  color: var(--ui-ink-soft);
  font-size: 12px;
  font-weight: 700;
}
.hp-checkout-v2 .checkout-reference-fields .hp-field small,
.hp-address-form-v2 .hp-field small { color: var(--ui-faint); font-weight: 500; }
.hp-checkout-v2 .checkout-reference-fields :is(input,select),
.hp-address-form-v2 :is(input,select) {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--ui-line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ui-ink);
  font: inherit;
}
.hp-address-control { display: block; }
.hp-address-line2-wrap { display: grid; gap: 8px; }
.hp-address-line2-toggle { justify-self: start; min-height: 30px; }
.hp-address-line2 { display: grid; gap: 6px; }
.hp-address-line2[hidden] { display: none; }
.hp-saved-address-slot:empty { display: none; }
.hp-saved-address-v2 {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 13px 14px;
  border: 1px solid rgb(47 109 96 / .18);
  border-radius: 14px;
  background: var(--ui-primary-soft);
}
.hp-saved-address-v2 > span { display: inline-flex; align-items: center; gap: 7px; color: var(--ui-primary-deep); font-size: 12px; font-weight: 700; }
.hp-saved-address-v2 .app-icon { width: 16px; height: 16px; }
.hp-saved-address-v2 select { min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--ui-line-strong); border-radius: 11px; background: #fff; }
.hp-checkout-v2 .astra-order-note { margin-top: 18px; padding: 18px 20px; border: 1px solid var(--ui-line); border-radius: 18px; background: var(--ui-surface); }
.hp-checkout-v2 .astra-order-note > span { display: flex; justify-content: space-between; }
.hp-checkout-v2 .astra-order-note small { color: var(--ui-faint); font-weight: 500; }
.hp-checkout-v2 .hp-checkout-coupon-v2 { margin: 14px 0 0; padding: 0; border: 0; background: transparent; }
.hp-checkout-coupon-v2__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; }
.hp-checkout-coupon-v2__form small { grid-column: 1 / -1; }
.hp-checkout-v2 .astra-payment-section { margin-top: 20px; }
.hp-checkout-v2 .astra-place-order { min-height: 52px; }

/* Address book: same fields and country rules as checkout. */
.hp-address-form-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hp-address-form-v2 .hp-address-form__head p { margin: 5px 0 0; color: var(--ui-muted); font-size: 12px; }
.hp-address-form-v2 .hp-field { display: grid; gap: 6px; }
.hp-address-form-v2 label[hidden] { display: none !important; }

@media (max-width: 1120px) {
  .hp-cart-layout-v2,
  .hp-main[data-view="checkout"] .hp-checkout-v2 .astra-checkout-layout { grid-template-columns: 1fr; }
  .hp-cart-summary-v2,
  .hp-checkout-v2 .astra-order-column { position: static; top: auto; }
  .hp-cart-summary-v2 { width: 100%; }
  .hp-checkout-v2 .astra-order-column { grid-row: auto; }
  .hp-checkout-v2 .astra-customer-column { grid-row: auto; }
}
@media (max-width: 720px) {
  .hp-main[data-view="cart"] .hp-cart-page-v2 .astra-cart-header { align-items: flex-start; }
  .hp-cart-item-v2 { grid-template-columns: 76px minmax(0, 1fr); gap: 13px; padding: 16px; }
  .hp-cart-item-v2__image { width: 76px; height: 76px; border-radius: 13px; }
  .hp-cart-item-v2__actions {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "qty . total" "remove . .";
    justify-items: start;
    min-width: 0;
    padding-top: 3px;
  }
  .hp-cart-item-v2__total { justify-self: end; }
  .hp-cart-card-v2__head, .hp-cart-coupon-v2 { padding-inline: 16px; }
  .hp-cart-summary-v2 { padding: 19px; }
  .hp-cart-coupon-v2__form { grid-template-columns: 1fr auto; }
  .hp-saved-address-v2 { grid-template-columns: 1fr; gap: 8px; }
  .hp-address-form-v2 { grid-template-columns: 1fr; }
  .hp-address-form-v2 > * { grid-column: 1 !important; }
}
@media (max-width: 520px) {
  .hp-cart-item-v2__actions { grid-template-columns: auto 1fr; grid-template-areas: "qty total" "remove remove"; }
  .hp-cart-coupon-v2__form,
  .hp-checkout-coupon-v2__form { grid-template-columns: 1fr; }
  .hp-cart-coupon-v2__form small,
  .hp-checkout-coupon-v2__form small { grid-column: 1; }
  .hp-checkout-v2 .hp-checkout-section { padding: 16px; border-radius: 16px; }
}
