/* KD Store — preservation-first refinement.
   The original layout, spacing, palette, sizing and content order stay intact. */

:root {
  --refine-focus: rgba(126, 91, 53, .5);
  --refine-border: rgba(126, 98, 67, .14);
  --refine-shadow: 0 12px 30px rgba(65, 45, 23, .06);
  --refine-shadow-hover: 0 16px 34px rgba(65, 45, 23, .09);
}

/* v44 — единая лаконичная система значков нижней навигации */
.bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.bottom-nav .nav-item {
  gap: 2px;
  background: transparent;
  color: #82766a;
  transform: none;
}

.bottom-nav .nav-item.active {
  background: transparent;
  color: #2a2219;
}

.bottom-nav .nav-item.active::after { display: none; }

.nav-icon-shell {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  border-radius: 12px;
  background: transparent;
  transition: background-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.bottom-nav .nav-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav .nav-item.active .nav-icon-shell {
  background: rgba(209, 177, 136, .24);
  box-shadow: inset 0 0 0 1px rgba(154, 119, 78, .08);
}

.bottom-nav .nav-item > span:not(.nav-icon-shell):not(.nav-badge) {
  font-size: 10px;
  line-height: 1.2;
}

.bottom-nav .nav-item:active { transform: none; }
.bottom-nav .nav-item:active .nav-icon-shell { background: rgba(209, 177, 136, .34); }

@media (hover: hover) {
  .bottom-nav .nav-item:hover { background: transparent; }
  .bottom-nav .nav-item:not(.active):hover .nav-icon-shell { background: rgba(255,255,255,.42); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-icon-shell { transition: none; }
}

/* v45 — профиль и программа лояльности KD CLUB */
.profile-page {
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
}

.profile-header { margin-bottom: 16px; }

.loyalty-profile {
  display: grid;
  gap: 14px;
}

.loyalty-card {
  position: relative;
  isolation: isolate;
  min-height: 278px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 246, 228, .15);
  border-radius: 29px;
  background:
    radial-gradient(circle at 89% 14%, rgba(210, 176, 126, .32), transparent 29%),
    linear-gradient(135deg, #1b1815 0%, #33281f 58%, #5a4430 100%);
  box-shadow: 0 22px 46px rgba(49, 34, 20, .2);
  color: #fff9ef;
}

.loyalty-card::before,
.loyalty-card::after {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 246, 228, .09);
  border-radius: 50%;
  content: "";
}

.loyalty-card::before {
  top: -105px;
  right: -62px;
  width: 250px;
  height: 250px;
}

.loyalty-card::after {
  top: -55px;
  right: -12px;
  width: 150px;
  height: 150px;
}

.loyalty-card-topline,
.loyalty-card-main,
.loyalty-progress-copy,
.loyalty-progress-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.loyalty-card-topline {
  color: rgba(255, 249, 239, .68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}

.loyalty-card-main {
  gap: 18px;
  min-height: 118px;
}

.loyalty-card-caption {
  color: rgba(255, 249, 239, .67);
  font-size: 12px;
}

.loyalty-card h2 {
  margin: 5px 0 0;
  color: #fff9ef;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(38px, 8vw, 56px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.035em;
}

.loyalty-discount {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.loyalty-discount strong {
  color: #e6c795;
  font-size: clamp(34px, 7vw, 46px);
  line-height: 1;
  letter-spacing: -.05em;
}

.loyalty-discount span {
  color: rgba(255, 249, 239, .67);
  font-size: 10px;
  line-height: 1.25;
}

.loyalty-progress-block { margin-top: 14px; }

.loyalty-progress-copy {
  gap: 12px;
  margin-bottom: 9px;
  font-size: 12px;
}

.loyalty-progress-copy span { color: rgba(255, 249, 239, .68); }
.loyalty-progress-copy strong { color: #fff9ef; font-size: 12px; }

.loyalty-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 249, 239, .16);
}

.loyalty-progress > span {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c49a60, #efd8ae);
}

.loyalty-progress-values {
  margin-top: 7px;
  color: rgba(255, 249, 239, .54);
  font-size: 10px;
}

.loyalty-account-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(157, 125, 83, .16);
  border-radius: 20px;
  background: rgba(255, 251, 243, .72);
  box-shadow: 0 10px 28px rgba(65, 45, 23, .05);
}

.loyalty-note-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(206, 177, 134, .22);
  color: #745737;
}

.loyalty-note-icon svg,
.loyalty-rules svg,
.loyalty-level-marker svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loyalty-account-note strong {
  display: block;
  margin-top: 1px;
  color: #31271e;
  font-size: 13px;
}

.loyalty-account-note p {
  margin: 4px 0 0;
  color: #806f5f;
  font-size: 11px;
  line-height: 1.45;
}

.loyalty-note-content { min-width: 0; }

.loyalty-note-action {
  min-height: 44px;
  margin-top: 11px;
  padding: 0 15px;
  border: 1px solid #221d18;
  border-radius: 14px;
  background: #221d18;
  color: #fffaf2;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.loyalty-note-action.secondary {
  border-color: rgba(116, 87, 55, .2);
  background: transparent;
  color: #6c5944;
}

.loyalty-note-action:focus-visible {
  outline: 2px solid #6f5335;
  outline-offset: 2px;
}

.loyalty-section,
.loyalty-rules {
  padding: 20px;
  border: 1px solid rgba(157, 125, 83, .14);
  border-radius: 25px;
  background: rgba(255, 251, 244, .78);
  box-shadow: 0 13px 32px rgba(65, 45, 23, .055);
}

.loyalty-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.loyalty-section-header h2,
.loyalty-rules h2 {
  margin: 4px 0 0;
  color: #30251c;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(25px, 5vw, 34px);
  font-weight: 500;
  line-height: 1;
}

.loyalty-section-header > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(197, 158, 103, .15);
  color: #80613d;
  font-size: 11px;
  font-weight: 800;
}

.loyalty-level-list { display: grid; gap: 7px; }

.loyalty-level {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 69px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: rgba(241, 233, 220, .46);
}

.loyalty-level.compact { min-height: 58px; }

.loyalty-level.active {
  border-color: rgba(161, 122, 74, .28);
  background: linear-gradient(110deg, rgba(230, 209, 177, .48), rgba(251, 246, 237, .9));
  box-shadow: inset 3px 0 0 #a78354;
}

.loyalty-level-marker {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(137, 110, 79, .17);
  border-radius: 50%;
  color: #8c7d6d;
  font-size: 11px;
  font-weight: 800;
}

.loyalty-level.reached .loyalty-level-marker {
  border-color: #9a7850;
  background: #9a7850;
  color: #fffaf2;
}

.loyalty-level-marker svg { width: 17px; height: 17px; }

.loyalty-level-copy { min-width: 0; }

.loyalty-level-copy > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.loyalty-level-copy strong {
  color: #33281f;
  font-size: 13px;
  letter-spacing: .025em;
}

.loyalty-level-copy span {
  color: #9a8978;
  font-size: 10px;
}

.loyalty-level-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #7f6f60;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loyalty-level-discount {
  color: #453425;
  font-size: 17px;
  letter-spacing: -.03em;
}

/* v51 — премиальный акцент верхнего уровня KD PLATINUM */
.loyalty-level.loyalty-level-black {
  border-color: rgba(113, 94, 73, .24);
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, .92), transparent 36%),
    linear-gradient(115deg, rgba(222, 215, 206, .78), rgba(252, 249, 244, .96) 48%, rgba(211, 202, 190, .7));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 9px 24px rgba(63, 49, 35, .07);
}

.loyalty-level-black .loyalty-level-marker {
  border-color: rgba(101, 84, 66, .34);
  background: linear-gradient(145deg, #fffdfa, #d3c7b8);
  color: #514233;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.loyalty-level-black .loyalty-level-copy strong {
  color: #241e18;
  letter-spacing: .065em;
}

.loyalty-level-black .loyalty-level-discount {
  color: #2b231c;
  font-size: 18px;
  font-weight: 800;
}

.loyalty-level-black.reached .loyalty-level-marker {
  border-color: #55483a;
  background: linear-gradient(145deg, #746454, #30271f);
  color: #fffaf2;
}

.loyalty-level-black.active {
  border-color: rgba(91, 74, 57, .4);
  box-shadow:
    inset 3px 0 0 #6f5a45,
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 10px 26px rgba(63, 49, 35, .1);
}

.loyalty-rules h2 { margin-bottom: 16px; }

.loyalty-rules ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loyalty-rules li {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 0;
  border-top: 1px solid rgba(142, 113, 79, .11);
  color: #5c4b3c;
  font-size: 12px;
  line-height: 1.4;
}

.loyalty-rules li:first-child { border-top: 0; }

.loyalty-rules li svg {
  width: 27px;
  height: 27px;
  padding: 6px;
  border-radius: 50%;
  background: rgba(181, 148, 102, .15);
  color: #7f603d;
}

@media (max-width: 420px) {
  .loyalty-card { min-height: 260px; padding: 20px; border-radius: 25px; }
  .loyalty-card-main { min-height: 108px; }
  .loyalty-section,
  .loyalty-rules { padding: 17px; border-radius: 22px; }
  .loyalty-level { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; padding-inline: 9px; }
  .loyalty-level-marker { width: 30px; height: 30px; }
  .loyalty-level-copy > div { display: grid; gap: 1px; }
  .loyalty-level-copy small { max-width: 185px; }
  .bottom-nav .nav-item > span:not(.nav-icon-shell):not(.nav-badge) { font-size: 9px; }
}

.auth-dialog {
  width: min(calc(100% - 20px), 520px);
  max-height: min(88vh, 760px);
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
}

.auth-step[hidden] { display: none; }

.auth-intro {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  margin: 17px 0 18px;
  padding: 15px;
  border: 1px solid rgba(157, 125, 83, .16);
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(237, 223, 202, .55), rgba(255, 252, 246, .9));
}

.auth-intro-icon,
.auth-call-visual {
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #201c18;
  color: #f8e9d1;
}

.auth-intro-icon {
  width: 44px;
  height: 44px;
}

.auth-intro-icon svg,
.auth-call-visual svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-intro strong {
  display: block;
  color: #30271f;
  font-size: 13px;
}

.auth-intro p {
  margin: 4px 0 0;
  color: #776b60;
  font-size: 11px;
  line-height: 1.48;
}

.auth-form { display: grid; gap: 14px; }

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field > span,
.auth-code-label {
  color: #5b5147;
  font-size: 11px;
  font-weight: 800;
}

.auth-phone-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid rgba(118, 96, 70, .25);
  border-radius: 16px;
  background: #faf6ef;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.auth-phone-control:focus-within {
  border-color: #6f5335;
  background: #fffdf9;
  box-shadow: 0 0 0 3px rgba(111, 83, 53, .12);
}

.auth-phone-control > span {
  display: grid;
  place-items: center;
  min-width: 53px;
  min-height: 36px;
  border-right: 1px solid rgba(118, 96, 70, .14);
  color: #2d251e;
  font-size: 16px;
  font-weight: 800;
}

.auth-phone-control input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #211c17;
  font-size: 16px;
}

.auth-field small {
  color: #877b70;
  font-size: 10px;
  line-height: 1.4;
}

.auth-consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 44px;
  padding: 4px 0;
  color: #74695f;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.45;
}

.auth-consent input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #1d1a17;
}
.auth-consent a { color: #6f5632; text-decoration: underline; text-underline-offset: 2px; }
.auth-consent a:hover { color: #171717; }

.reviews-list-intro { margin: 10px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.reviews-list { display: grid; gap: 10px; margin-bottom: 14px; }
.public-review-card,
.reviews-empty { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,252,245,.72); }
.public-review-head,
.public-review-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.public-review-head strong { min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.public-review-head span,
.public-review-meta,
.public-review-card time { color: var(--muted); font-size: 10px; }
.public-review-meta { justify-content: flex-start; margin-top: 4px; gap: 8px; }
.public-review-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}
.public-review-photos img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(128, 107, 72, .15);
  border-radius: 11px;
  background: #f1e8dc;
  object-fit: cover;
}
.public-review-card p { margin: 10px 0 7px; font-size: 12px; line-height: 1.5; }
.public-review-card time { display: block; }
.reviews-empty { display: grid; gap: 5px; text-align: center; }
.reviews-empty strong { font-size: 13px; }
.reviews-empty span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.reviews-empty.error { border-color: rgba(162,75,47,.32); }

.auth-terms {
  margin: -4px 0 2px;
  border: 1px solid rgba(120, 92, 55, .18);
  border-radius: 13px;
  background: rgba(255, 252, 245, .66);
  color: #6f6253;
  font-size: 11px;
  line-height: 1.45;
}

.auth-terms summary {
  cursor: pointer;
  padding: 9px 11px;
  color: #604d39;
  font-weight: 700;
}

.auth-terms ul {
  margin: -1px 12px 11px 27px;
  padding: 0;
}

.auth-terms li { margin: 4px 0; }

.auth-submit { min-height: 52px; }

.auth-code-step {
  padding-top: 18px;
  text-align: center;
}

.auth-call-visual {
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(47, 34, 22, .14);
}

.auth-call-visual svg { width: 29px; height: 29px; }

.auth-code-step h3 {
  margin: 6px 0 9px;
  color: #2b231c;
  font-family: var(--serif);
  font-size: clamp(27px, 7vw, 34px);
  font-weight: 500;
  line-height: 1.02;
}

.auth-method-help {
  margin: 0 auto;
  max-width: 420px;
  color: #6f6358;
  font-size: 12px;
  line-height: 1.5;
}

.auth-method-help strong { color: #31271f; }

.auth-phone-sent {
  display: inline-flex;
  margin: 11px 0 17px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(205, 179, 141, .18);
  color: #6e583e;
  font-size: 10px;
  font-weight: 800;
}

.auth-code-label { text-align: left; }

.auth-code-input {
  width: 100%;
  min-height: 68px;
  box-sizing: border-box;
  border: 1px solid rgba(118, 96, 70, .27);
  border-radius: 18px;
  outline: 0;
  background:
    linear-gradient(90deg, transparent 24.7%, rgba(130, 108, 83, .13) 25%, transparent 25.3%, transparent 49.7%, rgba(130, 108, 83, .13) 50%, transparent 50.3%, transparent 74.7%, rgba(130, 108, 83, .13) 75%, transparent 75.3%),
    #faf6ef;
  color: #211c17;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .72em;
  line-height: 1;
  padding: 0 0 0 .72em;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.auth-code-input:focus {
  border-color: #6f5335;
  box-shadow: 0 0 0 3px rgba(111, 83, 53, .12);
}

.auth-debug-code {
  margin: -4px 0 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #edf6ee;
  color: #32643c;
  font-size: 10px;
  line-height: 1.4;
}

.auth-fallbacks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 15px;
}

.auth-fallbacks p {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #897c70;
  font-size: 10px;
}

.auth-fallbacks button,
.auth-change-phone {
  min-height: 46px;
  border: 1px solid rgba(111, 91, 68, .22);
  border-radius: 14px;
  background: rgba(255, 252, 247, .78);
  color: #3f342a;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.auth-fallbacks button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.auth-change-phone {
  width: 100%;
  margin-top: 8px;
  border-color: transparent;
  background: transparent;
  color: #776957;
}

.auth-status {
  min-height: 17px;
  margin: 10px 2px 0;
  color: #776b60;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.auth-status.error { color: #a13e2d; }
.auth-status.success { color: #2f7443; }

.auth-form [aria-invalid="true"],
.auth-phone-control:has(input[aria-invalid="true"]) {
  border-color: #b34a36;
  box-shadow: 0 0 0 3px rgba(179, 74, 54, .1);
}

.auth-dialog button:focus-visible,
.auth-dialog input:focus-visible {
  outline: 2px solid #6f5335;
  outline-offset: 2px;
}

@media (hover: hover) {
  .auth-fallbacks button:not(:disabled):hover,
  .auth-change-phone:hover { background: rgba(231, 216, 195, .48); }
}

@media (max-width: 420px) {
  .auth-dialog { width: 100%; padding-inline: 17px; }
  .auth-fallbacks { grid-template-columns: 1fr; }
  .auth-fallbacks p { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-phone-control,
  .auth-code-input,
  .auth-fallbacks button,
  .auth-change-phone { transition: none; }
}

/* v39 — крупнее фото одежды и данные для точного подбора размера */
.product-card[data-product-category="clothes"] .product-image img,
.dialog-gallery[data-product-category="clothes"] .dialog-main-image,
.dialog-gallery[data-product-category="clothes"] .dialog-thumb img {
  transform: scale(var(--product-media-scale, 1));
  transform-origin: center;
}

.support-size-details {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(128, 107, 72, .22);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(251, 247, 237, .98), rgba(239, 232, 218, .76));
}

.support-size-details[hidden] {
  display: none;
}

.support-size-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.support-size-icon {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #171717;
  color: #fff;
  font-size: 17px;
  line-height: 1;
}

.support-size-heading strong {
  display: block;
  color: #2f281f;
  font-size: 12px;
  line-height: 1.35;
}

.support-size-heading p {
  margin: 3px 0 0;
  color: #766b5f;
  font-size: 10px;
  line-height: 1.45;
}

.support-size-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.support-size-fields label[hidden] {
  display: none;
}

.support-size-fields > label:last-child {
  grid-column: 1 / -1;
}

.support-size-fields input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid rgba(128, 107, 72, .22);
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
  color: var(--text);
  font: inherit;
  outline: none;
}

.support-size-fields input:focus {
  border-color: #806b48;
  box-shadow: 0 0 0 3px rgba(128, 107, 72, .10);
}

.support-size-fields input::placeholder {
  color: #a49a8e;
}

@media (max-width: 420px) {
  .support-size-details {
    padding: 12px;
  }

  .support-size-fields {
    grid-template-columns: 1fr;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: max(8px, env(safe-area-inset-top));
  left: 12px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #171411;
  color: #fff;
  font: 700 14px/1.2 var(--font-body, sans-serif);
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid #c8a46a;
  outline-offset: 2px;
}

button,
[role="button"] {
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--refine-focus);
  outline-offset: 3px;
}

/* Preserve the original hero dimensions and placement; refine only its edge. */
.hero-image-banner {
  border: 1px solid rgba(255, 255, 255, .34);
  box-shadow:
    0 18px 46px rgba(48, 33, 17, .13),
    0 1px 0 rgba(255, 255, 255, .28) inset;
}

.hero-banner-link {
  min-height: 44px;
  transition: box-shadow .18s ease;
}

.hero-banner-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .92);
}

.hero-banner-link:active {
  background: transparent;
  box-shadow:
    0 0 12px rgba(255, 255, 255, .34),
    0 0 22px rgba(255, 255, 255, .18);
  transform: none;
}

/* Original category grid and card geometry are intentionally untouched. */
.categories-section .category-card {
  --category-media-size: 100%;
  --category-media-offset-x: 0%;
  --category-media-offset-y: 0%;
  border-color: var(--refine-border);
  outline: 2px solid transparent;
  outline-offset: 0;
  box-shadow: var(--refine-shadow);
  transition: border-color .2s ease, box-shadow .2s ease, outline-color .2s ease, outline-offset .2s ease;
}

.categories-section .category-image {
  position: relative;
  background: linear-gradient(180deg, #f2e0d0 0%, #eedccd 48%, #e8d4c3 100%);
}

.categories-section .category-image::before {
  content: "";
  position: absolute;
  top: 48%;
  left: 50%;
  width: 88%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 250, 244, .96) 0%,
    rgba(255, 247, 238, .72) 38%,
    rgba(255, 243, 231, .32) 60%,
    rgba(255, 243, 231, 0) 80%
  );
  filter: blur(4px);
  transform: translate(-50%, -50%);
}

.categories-section .category-image img {
  position: relative;
  top: var(--category-media-offset-y);
  left: var(--category-media-offset-x);
  z-index: 1;
  width: var(--category-media-size);
  height: auto;
  max-width: none;
  max-height: none;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  transform: none;
  transition: none;
}

.categories-section .category-card[data-home-category="shoes"] { --category-media-size: 99%; --category-media-offset-y: -7%; }
.categories-section .category-card[data-home-category="clothes"] { --category-media-size: 87%; }
.categories-section .category-card[data-home-category="bags"] { --category-media-size: 109%; --category-media-offset-y: -5%; }
.categories-section .category-card[data-home-category="accessories"] { --category-media-size: 100%; --category-media-offset-y: -5%; }
.categories-section .category-card[data-home-category="headwear"] { --category-media-size: 78%; --category-media-offset-x: calc(-7% + 4px); --category-media-offset-y: -2%; }

.categories-section .category-card strong {
  color: #2a2219;
  letter-spacing: -.01em;
}

/* Stock: keep the warm composition, but restore separation between the section,
   cards and product photography. */
.home-page .stock-section {
  border-color: rgba(151, 113, 72, .19);
  background: linear-gradient(145deg, #f3e5d6 0%, #efe0cf 100%);
  box-shadow: 0 14px 34px rgba(68, 50, 29, .055);
}

.home-page .stock-card {
  display: flex;
  flex-direction: column;
  border-color: rgba(126, 96, 62, .18);
  background: linear-gradient(180deg, #fbf2e9 0%, #f7eadc 100%);
  box-shadow: 0 10px 24px rgba(68, 50, 29, .065);
}

.home-page .stock-card h3 {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 3.6em;
  line-height: 1.2;
}

.home-page .stock-count {
  margin: auto auto 2px;
}

.home-page .stock-photo {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8f5f1 0%, #f3ede7 100%);
}

.home-page .stock-photo img {
  position: relative;
  z-index: 1;
  background: #fff;
  mix-blend-mode: normal;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, #000 64%, rgba(0, 0, 0, .92) 76%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 0%, #000 64%, rgba(0, 0, 0, .92) 76%, transparent 100%);
}

.home-page .stock-count.last {
  border: 1px solid rgba(166, 82, 45, .15);
  background: #f5d9c6;
  color: #8e3f24;
  font-weight: 700;
}

.home-page .stock-price {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 8px;
  color: #2a2219;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
}

/* v43 — new arrivals with a crop-safe media stage for every product shape. */
.home-page .new-section {
  padding: 30px 18px 22px;
  border: 1px solid rgba(151, 113, 72, .19);
  border-radius: 32px;
  background: linear-gradient(145deg, #f3e5d6 0%, #efe0cf 100%);
  box-shadow: 0 14px 34px rgba(68, 50, 29, .055);
}

.home-page .new-feature,
.home-page .new-small {
  isolation: isolate;
  border-color: rgba(126, 96, 62, .18);
  background: linear-gradient(180deg, #fbf2e9 0%, #f7eadc 100%);
  box-shadow: 0 10px 24px rgba(68, 50, 29, .065);
}

.home-page .new-feature,
.home-page .new-small {
  --new-feature-media-scale: 1;
}

.home-page .new-feature {
  display: block;
  min-height: 410px;
  padding: 0;
}

.home-page .new-feature-image {
  position: absolute;
  inset: 12px 14px 112px;
  display: block;
  width: calc(100% - 28px);
  height: calc(100% - 124px);
  border-radius: 20px;
  background: #f8f3ed;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: darken;
  transform: scale(var(--new-feature-media-scale));
  transform-origin: center;
}

.home-page .new-feature::after {
  display: none;
}

.home-page .new-feature-copy {
  position: absolute;
  inset: auto 24px 20px;
  padding: 0;
}

.home-page .new-small-media {
  display: grid;
  place-items: center;
  width: calc(100% - 18px);
  margin: 9px 9px 0;
  aspect-ratio: 1.08;
  overflow: hidden;
  border-radius: 18px;
  background: #f8f3ed;
}

.home-page .new-small-media img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: darken;
  transform: scale(var(--new-feature-media-scale));
  transform-origin: center;
}

.home-page .new-small-copy {
  background: transparent;
}

/* The closing reviews/support pair reads as one compact final chapter. */
.home-page .support-section {
  margin-top: 22px;
}

.home-page .reviews-copy p,
.home-page .support-copy p {
  color: #746354;
  font-size: 13px;
  line-height: 1.5;
}

.home-page .support-button {
  border: 1.5px solid rgba(23, 23, 23, .52);
  background: rgba(255, 255, 255, .28);
  color: #241f1a;
}

.home-page .reviews-icon svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: currentColor;
  transform: translateY(-.5px);
}

.home-page .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.home-page [data-product-id][role="button"]:focus-visible {
  outline: 3px solid var(--refine-focus);
  outline-offset: 3px;
}

.home-page .reviews-channel-button:focus-visible,
.home-page .reviews-leave-button:focus-visible,
.home-page .support-button:focus-visible {
  outline: 3px solid rgba(128, 107, 72, .28);
  outline-offset: 3px;
}

@media (max-width: 620px) {
  .home-page .stock-price {
    margin-bottom: 6px;
    font-size: 12px;
  }
}

.stock-card,
.new-feature,
.new-small,
.product-card,
.reviews-card,
.support-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.round-link,
.text-link,
.primary-button,
.card-add,
.reviews-channel-button,
.reviews-leave-button,
.support-button {
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.round-link:active,
.text-link:active,
.primary-button:active,
.card-add:active,
.reviews-channel-button:active,
.reviews-leave-button:active,
.support-button:active {
  transform: scale(.975);
}

/* Keep the warm original navigation, adding only clearer interaction feedback. */
.bottom-nav {
  border-color: rgba(198, 168, 132, .32);
  box-shadow: 0 14px 36px rgba(45, 33, 18, .12);
  -webkit-backdrop-filter: blur(20px) saturate(115%);
  backdrop-filter: blur(20px) saturate(115%);
}

.nav-item {
  transition: color .18s ease, background-color .18s ease, transform .12s ease;
}

.nav-item:active {
  transform: scale(.96);
}

/* Catalog refinement: preserve the grid, improve information priority. */
.catalog-quick-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 9px;
  margin-top: 10px;
}

.catalog-sort-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(126, 98, 67, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .56);
}

.catalog-sort-control > span {
  color: #8b7e70;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.catalog-sort-control select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 28px 0 0;
  border: 0;
  outline: 0;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #6f655a 50%) calc(100% - 8px) 19px / 5px 5px no-repeat,
    linear-gradient(135deg, #6f655a 50%, transparent 50%) calc(100% - 3px) 19px / 5px 5px no-repeat;
  color: #302820;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.catalog-reset-button {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(126, 98, 67, .22);
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  color: #44382d;
  font-size: 11px;
  font-weight: 800;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}

.catalog-reset-button:not(:disabled):active {
  transform: scale(.97);
}

.catalog-reset-button:disabled {
  border-color: rgba(126, 98, 67, .08);
  background: rgba(255, 255, 255, .32);
  color: #aaa095;
  cursor: default;
}

.filters-toggle.has-active:not([aria-expanded="true"]) {
  border-color: rgba(126, 91, 53, .34);
  background: #f6e8d8;
  color: #4b3928;
}

.filters-toggle.has-active:not([aria-expanded="true"]) b {
  background: #9b7752;
  color: #fff;
}

.product-card .product-image {
  width: 84%;
  margin: 18px auto 7px;
}

.product-card .product-info {
  display: flex;
  flex-direction: column;
  padding: 7px 14px 14px;
}

.product-card .product-name {
  min-height: 38px;
  color: #241d17;
  line-height: 1.28;
}

.product-card .product-price {
  display: block;
  margin-top: 8px;
  color: #17130f;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.1;
}

.product-card .product-variants {
  min-height: 42px;
  margin: 10px 0 0;
  color: #62594f;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.product-card .product-variants span {
  margin-bottom: 3px;
  color: #82766a;
  font-size: 9px;
}

.product-card .card-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
}

.product-card .product-sku {
  order: 5;
  overflow: hidden;
  margin: 9px 2px 0;
  color: #93897e;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 430px) {
  .catalog-sort-control {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 6px 10px 4px;
  }

  .catalog-sort-control select {
    height: 30px;
    background-position: calc(100% - 8px) 12px, calc(100% - 3px) 12px;
    font-size: 11px;
  }

  .catalog-reset-button {
    padding: 0 12px;
    font-size: 10px;
  }

  .product-card .product-image {
    width: 82%;
    margin-top: 16px;
  }

  .product-card .product-info {
    padding: 6px 10px 12px;
  }

  .product-card .product-name {
    min-height: 36px;
    font-size: 14px;
  }

  .product-card .product-price {
    font-size: 16px;
  }

  .product-card .product-variants {
    min-height: 40px;
    font-size: 10px;
  }

  .product-card .card-add {
    min-height: 42px;
    font-size: 11px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .hero-banner-link:hover {
    background: transparent;
    box-shadow:
      0 0 12px rgba(255, 255, 255, .30),
      0 0 22px rgba(255, 255, 255, .15);
  }

  .home-page .text-link:hover {
    border-color: rgba(126, 91, 53, .42);
    background: #fffaf4;
    color: #7a5d3d;
    box-shadow: 0 7px 16px rgba(68, 54, 31, .08);
    transform: translateY(-1px);
  }

  .stock-card:hover,
  .new-feature:hover,
  .new-small:hover,
  .product-card:hover {
    border-color: rgba(126, 98, 67, .22);
    box-shadow: var(--refine-shadow-hover);
    transform: translateY(-2px);
  }

  .categories-section .category-card:hover {
    border-color: rgba(126, 98, 67, .24);
    outline-color: rgba(184, 143, 96, .16);
    outline-offset: 2px;
    box-shadow: 0 17px 38px rgba(68, 54, 31, .11), 0 0 0 4px rgba(255, 250, 243, .72);
    transform: none;
  }

  .nav-item:hover {
    background: rgba(255, 255, 255, .22);
  }

  .catalog-reset-button:not(:disabled):hover {
    border-color: rgba(126, 91, 53, .42);
    background: #fffaf4;
  }

  .compact-size-selector:hover,
  .size-help-button:hover {
    border-color: rgba(126, 91, 53, .42);
    transform: translateY(-1px);
  }

  .home-page .support-button:hover {
    border-color: #171717;
    background: #171717;
    color: #fff;
    box-shadow: 0 8px 18px rgba(31, 24, 16, .14);
    transform: translateY(-1px);
  }

  .home-page .reviews-channel-button:hover {
    background: #2b2824;
    box-shadow: 0 8px 18px rgba(31, 24, 16, .18);
    transform: translateY(-1px);
  }

  .home-page .reviews-leave-button:hover {
    border-color: rgba(23, 23, 23, .42);
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 7px 16px rgba(68, 54, 31, .08);
    transform: translateY(-1px);
  }
}

/* Product decision flow: size, confidence and secondary information. */
.product-selection-panel {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 14px;
  border: 1px solid rgba(128, 107, 72, .18);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 250, 244, .98), rgba(246, 238, 226, .94));
  box-shadow: 0 12px 30px rgba(68, 54, 31, .055);
}

.selection-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.selection-panel-heading h3 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.selection-kicker {
  color: #8a6842;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
}

.selection-panel-heading > small {
  max-width: 145px;
  color: #81786e;
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.product-selection-panel .compact-size-selector {
  min-height: 70px;
  margin: 0;
  border-color: rgba(44, 36, 28, .26);
  background: rgba(255, 255, 255, .88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .58), 0 7px 18px rgba(68, 54, 31, .06);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.product-selection-panel .compact-size-value strong,
.product-selection-panel .compact-size-price strong {
  font-size: 16px;
}

.compact-size-change {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 6px;
  color: #6f5538;
  text-align: right;
}

.compact-size-change small {
  grid-column: 1;
  margin: 0 !important;
  color: #8e806f !important;
  font-size: 8px !important;
}

.compact-size-change strong {
  grid-column: 1;
  color: #6f5538;
  font-size: 10px !important;
  text-transform: uppercase;
}

.compact-size-change b {
  grid-row: 1 / 3;
  grid-column: 2;
}

.size-help-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid rgba(128, 107, 72, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .52);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.size-help-button.standalone { margin: 0 0 14px; }
.size-help-button svg { width: 24px; height: 24px; fill: none; stroke: #7b5c3d; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.size-help-button span { display: grid; gap: 2px; }
.size-help-button strong { font-size: 12px; }
.size-help-button small { color: var(--muted); font-size: 9px; line-height: 1.3; }
.size-help-button > b { color: #7b5c3d; font-size: 22px; font-weight: 500; }

.purchase-assurance {
  display: grid;
  gap: 13px;
  margin: 0 0 13px;
  padding: 15px;
  border: 1px solid rgba(94, 116, 72, .18);
  border-radius: 21px;
  background: rgba(245, 248, 240, .88);
}

.purchase-assurance-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.purchase-assurance-heading .dialog-status { margin: 1px 0 0; }
.purchase-assurance-heading strong { display: block; font-size: 12px; }
.purchase-assurance-heading p { margin: 3px 0 0; color: #6f7469; font-size: 10px; line-height: 1.45; }

.purchase-guide {
  display: grid;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid rgba(94, 116, 72, .13);
}

.purchase-guide > div {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #444a3e;
  font-size: 11px;
  line-height: 1.35;
}

.purchase-guide svg {
  width: 18px;
  height: 18px;
  padding: 3px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #e6eddd;
  fill: none;
  stroke: #527046;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-details-accordion {
  margin: 0 0 13px;
  border: 1px solid rgba(128, 107, 72, .14);
  border-radius: 18px;
  background: rgba(255, 255, 255, .42);
  overflow: hidden;
}

.product-details-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
}

.product-details-accordion summary::-webkit-details-marker { display: none; }
.product-details-accordion summary:focus-visible { outline: 3px solid var(--refine-focus); outline-offset: -3px; }
.product-details-accordion summary > span { display: grid; gap: 3px; }
.product-details-accordion summary strong { font-size: 12px; }
.product-details-accordion summary small { color: var(--muted); font-size: 9px; }
.product-details-accordion summary > b { color: #806b48; font-size: 22px; font-weight: 400; transition: transform .18s ease; }
.product-details-accordion[open] summary > b { transform: rotate(45deg); }
.product-details-accordion[open] summary { border-bottom: 1px solid rgba(128, 107, 72, .12); }
.product-details-accordion .dialog-meta { margin: 0; padding: 12px 12px 4px; }
.product-details-accordion .brand-article { margin: 2px 14px 14px; }

/* Checkout as a four-step, scannable flow. */
.cart-order-section {
  display: grid;
  gap: 13px;
  margin-top: 4px;
}

.cart-order-section[hidden] { display: none; }

.checkout-flow.cart-summary {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.checkout-flow.cart-summary[hidden] { display: none; }

.checkout-block,
.cart-order-section {
  padding: 16px;
  border: 1px solid rgba(128, 107, 72, .15);
  border-radius: 23px;
  background: rgba(251, 245, 234, .88);
  box-shadow: 0 10px 28px rgba(68, 54, 31, .045);
}

.checkout-block-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.checkout-step-number {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1b1a18;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.checkout-block-heading small {
  display: block;
  margin-bottom: 2px;
  color: #9a744b;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .12em;
}

.checkout-block-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.cart-order-section .cart-list { margin-top: 2px; }

.checkout-flow.checkout-form { margin-bottom: 0; }
.checkout-block { display: grid; gap: 12px; }
.checkout-block-copy { margin: 0 !important; color: #777066 !important; font-size: 11px !important; line-height: 1.45; text-align: left !important; }
.checkout-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.checkout-flow .checkout-block label { gap: 7px; }
.checkout-flow .checkout-block input,
.checkout-flow .checkout-block textarea { background: rgba(255, 255, 255, .9); }
.checkout-flow .checkout-block textarea { min-height: 92px; }

.checkout-confirmation-block .summary-row { padding: 1px 2px; }
.checkout-confirmation-block .summary-row.discount { color: #6f5632; font-weight: 700; }
.checkout-confirmation-block .summary-row.total { margin: 0; padding: 13px 2px 2px; }
.checkout-confirmation-block .summary-row.total > span,
.success-total > span { display: grid; gap: 2px; }
.checkout-confirmation-block .summary-row.total small,
.success-total small { color: #8b8177; font-size: 9px; font-weight: 500; }
.checkout-auth-prompt {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(161, 98, 7, .22);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(255, 250, 240, .98), rgba(245, 234, 215, .8));
}
.checkout-auth-prompt[hidden] { display: none; }
.checkout-auth-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: #1b1a18;
  color: #fff;
}
.checkout-auth-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.checkout-auth-prompt > div { display: grid; gap: 6px; min-width: 0; }
.checkout-auth-prompt strong { font-size: 12px; line-height: 1.3; }
.checkout-auth-prompt p,
.checkout-auth-prompt small { margin: 0 !important; color: #71685e !important; font-size: 9px !important; line-height: 1.45; text-align: left !important; }
.checkout-auth-prompt button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #1b1a18;
  border-radius: 13px;
  background: transparent;
  color: #1b1a18;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  transition: background-color .18s ease, color .18s ease;
}
.checkout-auth-prompt button:hover { background: #1b1a18; color: #fff; }
.checkout-auth-prompt button:focus-visible { outline: 3px solid var(--refine-focus); outline-offset: 2px; }
.checkout-assurance {
  margin: 0 0 2px !important;
  padding: 11px 12px;
  border-radius: 14px;
  background: #eef3e8;
  color: #526048 !important;
  font-size: 10px !important;
  font-weight: 650;
  line-height: 1.45;
  text-align: left !important;
}

.checkout-confirmation-block .checkout-status { margin-top: -2px; }

.compact-size-selector:active,
.size-help-button:active { transform: scale(.985); }

@media (max-width: 520px) {
  .selection-panel-heading { align-items: start; }
  .selection-panel-heading > small { max-width: 115px; }
  .product-selection-panel { padding: 12px; }
  .product-selection-panel .compact-size-selector { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr) auto; gap: 8px; padding: 11px; }
  .product-selection-panel .compact-size-value strong,
  .product-selection-panel .compact-size-price strong { font-size: 14px; }
  .compact-size-change small { display: none; }
  .compact-size-change strong { grid-row: 1 / 3; align-self: center; font-size: 9px !important; }
  .purchase-assurance-heading { grid-template-columns: 1fr; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-block,
  .cart-order-section { padding: 14px; border-radius: 20px; }
  .checkout-auth-prompt { grid-template-columns: 36px minmax(0, 1fr); padding: 11px; }
  .checkout-auth-icon { width: 36px; height: 36px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* v37 — отдельная мобильная подача без изменения компьютерного макета. */
.field-error {
  margin: -1px 2px 0;
  color: #9b452f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

.field-error[hidden] { display: none; }

.checkout-flow .checkout-block input[aria-invalid="true"] {
  border-color: #b85a42;
  box-shadow: 0 0 0 3px rgba(184, 90, 66, .1);
}

@media (max-width: 620px) {
  :root { --nav-height: 74px; }

  .app-shell {
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 38px);
  }

  .page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .content-section { margin-top: 36px; }

  .category-grid,
  .stock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .category-card,
  .category-card:nth-child(4),
  .category-card:nth-child(5) {
    grid-column: auto;
    border-radius: 22px;
  }

  .category-card:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 5px);
    justify-self: center;
  }

  .category-card strong {
    min-height: 52px;
    padding: 7px 8px 13px;
    font-size: 14px;
  }

  .new-small-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .inner-header {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    margin: 4px 0 18px;
  }

  .inner-header h1 { font-size: 34px; }
  .mini-brand { width: 44px; height: 44px; }
  .header-cart { min-height: 44px; }

  .availability-tab {
    min-height: 48px;
    padding: 0 7px;
    font-size: 12px;
  }

  .availability-tab b {
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    font-size: 10px;
  }

  .filter-toolbar .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .filter-chip {
    min-height: 44px;
    padding: 0 15px;
    font-size: 12px;
  }

  .filter-toolbar .filters-toggle {
    min-height: 48px;
    margin-top: 10px;
    font-size: 12px;
  }

  .catalog-sort-control {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    min-height: 48px;
    padding: 0 10px;
  }

  .catalog-sort-control > span { font-size: 10px; }

  .catalog-sort-control select {
    height: 46px;
    background-position: calc(100% - 8px) 19px, calc(100% - 3px) 19px;
    font-size: 12px;
  }

  .catalog-reset-button {
    min-height: 48px;
    padding: 0 12px;
    font-size: 12px;
  }

  .advanced-filters { padding: 11px; }
  .select-filter > span { font-size: 10px; }
  .select-filter select { min-height: 44px; font-size: 12px; }

  .catalog-grid { gap: 10px; }

  .product-card {
    display: flex;
    flex-direction: column;
    border-radius: 21px;
  }

  .product-card .favorite-button {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
  }

  .product-card .status-badge {
    top: 10px;
    left: 8px;
    max-width: calc(100% - 68px);
    min-height: 26px;
    padding: 6px 8px;
    font-size: 11px;
  }

  .product-card .recent-badge {
    top: 42px;
    right: auto;
    left: 8px;
    font-size: 10px;
  }

  .product-card .product-image {
    width: calc(100% - 16px);
    margin: 8px 8px 5px;
  }

  .product-card .product-info {
    flex: 1;
    padding: 7px 10px 11px;
  }

  .product-card .product-brand {
    margin-bottom: 5px;
    font-size: 11px;
  }

  .product-card .product-name {
    display: -webkit-box;
    min-height: 52px;
    max-height: 52px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .product-card .product-price { font-size: 17px; }

  .product-card .product-variants {
    min-height: 42px;
    max-height: 42px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.35;
  }

  .product-card .product-variants span { font-size: 10px; }
  .product-card .product-sku { display: none; }

  .product-card .card-add {
    min-height: 44px;
    margin-top: auto;
    font-size: 12px;
  }

  .bottom-nav {
    width: calc(100% - 16px);
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    margin-bottom: 8px;
    padding: 7px 8px env(safe-area-inset-bottom);
    border-radius: 24px;
  }

  .nav-item {
    min-height: 56px;
    gap: 4px;
    border-radius: 17px;
    font-size: 12px;
  }

  .nav-item.active { background: rgba(255, 255, 255, .44); }
  .nav-item.active::after { display: none; }
  .nav-badge { top: 2px; }

  .product-dialog {
    position: fixed;
    inset: auto 0 0;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - max(12px, env(safe-area-inset-top)));
    margin: 0;
    border-radius: 28px 28px 0 0;
  }

  .dialog-close {
    width: 44px;
    height: 44px;
    margin: 10px 10px -54px 0;
  }

  .share-button,
  .sheet-close { min-height: 44px; }

  .checkout-block-heading small { font-size: 10px; }
  .checkout-block-copy { font-size: 12px !important; }
  .checkout-assurance { font-size: 12px !important; }

  .checkout-flow .checkout-block label > span { font-size: 11px; }

  .checkout-flow .checkout-block input,
  .checkout-flow .checkout-block textarea {
    font-size: 16px;
  }

  .checkout-flow .checkout-block input { min-height: 50px; }
}

/* Readability pass: keep decorative captions compact, but make guidance and actions legible on phones. */
.bottom-nav .nav-item > span:not(.nav-icon-shell):not(.nav-badge) { font-size: 11px; }
.checkout-block-copy,
.checkout-auth-prompt p,
.checkout-auth-prompt small,
.size-help-button small,
.purchase-assurance-heading p,
.product-details-accordion summary small,
.sheet-help,
.review-photo-field small,
.review-consent span,
.review-status,
.support-form label > small,
.support-status,
.profile-empty-hint { font-size: 12px !important; }

.status-badge,
.stock-count,
.new-feature-status,
.size-picker-option span small,
.product-card .recent-badge { font-size: 11px !important; }

.reviews-empty span,
.public-review-text,
.profile-preference-row span,
.info-link-card small,
.faq-item p,
.info-step p,
.info-note p,
.return-card p,
.return-points span { font-size: 12px !important; }
