/* Koritsuki — developer portfolio layout (derived from prior retail template) */
:root {
  --font: "Barlow", system-ui, -apple-system, sans-serif;
  --color-bg: #ffffff;
  --color-text: #1c1c1c;
  --color-muted: #5c5c5c;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-dark: #0f0f0f;
  --header-h: 72px;
  --product-subnav-h: 3.75rem;
  --container: min(1200px, 100% - 2rem);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.koritsuki-body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10000;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.narrow {
  max-width: 640px;
  margin-inline: auto;
}

.muted {
  color: var(--color-muted);
}

.small {
  font-size: 0.875rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "burger mid actions";
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.5rem 0;
}

.header__mid {
  grid-area: mid;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  min-width: 0;
}

.header__logo img {
  max-height: 40px;
  width: auto;
}

.header__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
}

.header__nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9375rem;
  text-transform: capitalize;
  text-decoration: none;
}

.header__nav a:hover {
  color: var(--color-accent);
}

.header__actions {
  grid-area: actions;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text) !important;
  text-decoration: none !important;
  line-height: 0;
}

.header__cart:hover .header__cart-icon {
  opacity: 0.85;
}

.header__cart-icon-wrap {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.header__cart-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Count sits on top of the icon, red circle (pill if 2+ digits) */
.header__cart-badge {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  transform: translate(42%, -42%);
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  box-sizing: border-box;
  background: #e53935;
  color: #fff !important;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.header__cta {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--color-accent);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none !important;
  border-radius: 2px;
}

.header__cta:hover {
  background: var(--color-accent-hover);
}

/* Mobile nav */
.nav-toggle {
  grid-area: burger;
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-burger {
  display: none;
  grid-area: burger;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 920;
}

.nav-burger span {
  display: block;
  height: 3px;
  width: 22px;
  background: var(--color-text);
  margin-inline: auto;
}

@media (max-width: 991px) {
  .nav-burger {
    display: flex;
  }

  .header__mid {
    justify-content: center;
  }

  .header__nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--header-h) + 32px);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 2rem;
    background: #fff;
    box-shadow: var(--shadow);
    gap: 0;
    z-index: 910;
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow: auto;
  }

  .header__nav a {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
  }

  .nav-toggle:checked ~ .header__mid .header__nav {
    display: flex;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 16rem;
  height: clamp(16rem, 42vw, 28rem);
  max-height: 28rem;
  display: grid;
  align-items: end;
  color: #fff;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.75s ease;
  pointer-events: none;
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__media img,
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__dots {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 1rem;
  pointer-events: none;
}

.hero__dot {
  pointer-events: auto;
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s, transform 0.2s;
}

.hero__dot:hover,
.hero__dot:focus-visible {
  transform: scale(1.15);
  outline: none;
}

.hero__dot:focus-visible {
  box-shadow: 0 0 0 2px var(--color-accent);
}

.hero__dot.is-active {
  background: #fff;
}

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

  .hero__slide:not(.is-active) {
    opacity: 0;
  }

  .hero__dots {
    display: none;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 1.5rem 1rem 2.25rem;
  text-align: center;
}

.hero__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.85);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  max-width: 22ch;
  margin-inline: auto;
  color: var(--color-accent);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
}

.btn--primary {
  background: #fff;
  color: var(--color-dark) !important;
}

.btn--primary:hover {
  background: #f0f0f0;
}

.btn--outline {
  border-color: var(--color-accent);
  color: var(--color-accent) !important;
  background: transparent;
}

.btn--outline:hover {
  background: var(--color-accent);
  color: #fff !important;
}

/* Home: two-column promo row (sign + offer), centered like sketch */
.home-scatter {
  padding: 2.5rem 1rem 3.5rem;
  background: linear-gradient(165deg, #eef2f7 0%, #e2e8f0 42%, #f8fafc 100%);
}

.home-scatter__wrap {
  max-width: min(72rem, 100%);
  margin-inline: auto;
  container-type: inline-size;
  container-name: home-scatter;
}

.home-scatter__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
}

.home-scatter__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(48vh, 28rem);
  padding: 0.75rem;
}

.home-scatter__figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  filter: drop-shadow(0 16px 36px rgba(15, 23, 42, 0.2));
}

.home-scatter__img {
  display: block;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

/* Horizontal banner — centered in left column, as wide as the half allows */
.home-scatter__img--sign {
  width: 100%;
  max-width: min(100%, 40rem);
  height: auto;
}

/* Vertical offer — cap height to match sign (720×400) at half container minus gap */
.home-scatter__img--offer {
  width: auto;
  max-width: min(100%, 24rem);
  max-height: 22rem;
  max-height: calc(
    400 / 720 *
      min(40rem, calc((100cqi - clamp(1.25rem, 4vw, 3rem)) / 2))
  );
  height: auto;
}

@media (max-width: 719px) {
  .home-scatter__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-scatter__cell {
    min-height: auto;
  }

  .home-scatter__img--sign {
    max-width: min(100%, 28rem);
    max-height: none;
  }

  .home-scatter__img--offer {
    max-width: min(88vw, 20rem);
    max-height: calc(400 / 720 * min(28rem, 100cqi - 2rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-scatter__figure {
    filter: drop-shadow(0 8px 20px rgba(15, 23, 42, 0.15));
  }
}

/* Categories */
.section {
  padding: 3.5rem 1rem;
}

.section--muted {
  background: #f6f6f6;
}

.section--about {
  background: #e3f9fc;
}

.koritsuki-body main > #about {
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

.about-post {
  max-width: 42rem;
  margin-inline: auto;
  padding: 1.75rem 1.5rem 2rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
}

.about-post__figure {
  margin: 0 auto 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: auto;
  max-width: 160px;
}

.about-post__img {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #e3f9fc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.about-post__bizcard {
  width: 100%;
  max-width: 7.25rem;
  transform: rotate(-3deg);
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.15));
}

.about-post__bizcard-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .about-post__bizcard {
    transform: none;
  }
}

.about-post__byline {
  margin: 0 0 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8e8e8;
}

.about-post__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: capitalize;
}

.about-post__role {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 600;
}

.about-post__body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
}

.about-post__body p {
  margin: 0 0 1rem;
}

.about-post__body p:last-child {
  margin-bottom: 0;
}

@media (min-width: 720px) {
  .about-post {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0 2rem;
    align-items: start;
    padding: 2rem 2.25rem 2.25rem;
  }

  .about-post__figure {
    margin: 0;
    max-width: 160px;
    align-items: center;
  }

  .about-post__img {
    width: 160px;
    height: 160px;
  }

  .about-post__bizcard {
    max-width: 6.75rem;
  }

  .about-post__main {
    min-width: 0;
  }

  .about-post__byline {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }
}

.section__head {
  margin-bottom: 2rem;
}

.section__head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
}

.section__head--center {
  text-align: center;
}

/* Home — auto-scrolling product strip (duplicate track for seamless loop) */
.our-products {
  container-type: inline-size;
  container-name: our-products;
  width: 100%;
}

.our-products__scroller {
  overflow-x: hidden;
  overflow-y: hidden;
}

.our-products__marquee-inner {
  --our-products-marquee-gap: 0.75rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: var(--our-products-marquee-gap);
  width: max-content;
  animation: our-products-marquee 90s linear infinite;
}

.our-products__scroller:hover .our-products__marquee-inner {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .our-products__marquee-inner {
    animation: none;
  }

  .our-products__track--clone {
    display: none;
  }

  .our-products__scroller {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .our-products__marquee-inner {
    width: auto;
    flex-wrap: nowrap;
  }
}

@keyframes our-products-marquee {
  from {
    transform: translateX(0);
  }

  to {
    /* Two equal tracks + one flex gap: move exactly one track + gap */
    transform: translateX(calc(-50% - var(--our-products-marquee-gap) / 2));
  }
}

.our-products__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.75rem;
  min-height: 0;
  padding-bottom: 0.35rem;
}

.our-products__item {
  flex: 0 0 auto;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

.our-products__item--clone {
  pointer-events: none;
  cursor: default;
  user-select: none;
}

.our-products__item:not(.our-products__item--clone):hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.our-products__item:not(.our-products__item--clone):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.our-products__thumb {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  background: #f0f0f0;
  overflow: hidden;
}

.our-products__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tile width: more tiles per row = smaller strip (was 3 / 5; tighter layout) */
.our-products__item {
  width: calc((100vw - 4rem - 2.25rem) / 4);
}

@media (min-width: 48rem) {
  .our-products__item {
    width: calc((min(1200px, 100vw - 2rem) - 4.5rem) / 7);
  }
}

@container our-products (max-width: 47.999rem) {
  .our-products__item {
    width: calc((100cqw - 2.25rem) / 4);
  }
}

@container our-products (min-width: 48rem) {
  .our-products__item {
    width: calc((100cqw - 4.5rem) / 7);
  }
}

.our-products-lightbox {
  padding: 0;
  border: none;
  max-width: min(96vw, 1100px);
  width: min(96vw, 1100px);
  background: transparent;
}

.our-products-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.our-products-lightbox__inner {
  position: relative;
  padding: 2.5rem 1rem 1rem;
  background: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.our-products-lightbox__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.our-products-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.our-products-lightbox__img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(82vh, 900px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* Reviews */
.section--reviews {
  background: #ffffff;
}

/* Home: alternate section washes below hero */
.koritsuki-body main > section#our-products.section {
  background: #f7f7f7;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.koritsuki-body main > section#our-products.section .section__head {
  margin-bottom: 1rem;
}

.reviews__meta {
  margin: 0;
  font-size: 1rem;
}

.review-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .review-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid #eee;
}

.stars {
  color: #f5a623;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.review-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.review-card__body {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.review-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
}

.review-card__name {
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--color-dark);
  color: #ccc;
  margin-top: 0;
}

.site-footer a {
  color: #e0e0e0;
}

.footer__cta-strip {
  background: var(--color-accent);
  color: #fff;
  padding: 1.5rem 1rem;
}

.footer__cta-strip a {
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none !important;
}

.footer__cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__phones {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer__phones .muted {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

.footer__grid {
  display: grid;
  gap: 2rem;
  padding: 3rem 1rem;
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 1.2fr repeat(3, 1fr);
  }
}

.footer__logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 1rem;
}

.footer__heading {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links li {
  margin-bottom: 0.4rem;
}

.footer__links a {
  text-decoration: none;
  font-size: 0.9375rem;
}

.footer__links a:hover {
  text-decoration: underline;
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid #2a2a2a;
}

.footer__legal {
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #888;
}

.footer__legal p {
  margin: 0;
}

/* ----- Product page (reference layout: Shopify product template) ----- */
.product-page {
  padding: 1rem 0 4rem;
}

.product-page__inner {
  width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.breadcrumb__sep {
  margin: 0 0.35rem;
  color: #aaa;
}

.breadcrumb__current {
  color: var(--color-text);
}

/* Wraps masthead + section bands so sticky subnav shares one tall parent.
 * Do NOT use width:100vw on children here — it forces this grid to min-width 100vw and
 * kills centering (content sticks to the viewport edges). */
.product-sticky-scope {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1.5rem;
  width: var(--container);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding-inline: 1rem;
  box-sizing: border-box;
}

.product-sticky-scope .breadcrumb {
  margin-bottom: 0;
}

.product-page__bc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.product-page__add-product {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #fff !important;
  text-decoration: none !important;
  background: var(--color-accent);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, transform 0.12s ease;
}

.product-page__add-product:hover {
  background: var(--color-accent-hover);
  transform: scale(1.04);
}

/* Bands span the content column; bleed only across sticky-scope padding (not 100vw). */
.product-sticky-scope > .product-section-band {
  grid-column: 1 / -1;
  width: calc(100% + 2 * 1rem);
  max-width: none;
  margin-left: -1rem;
  margin-right: -1rem;
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .product-sticky-scope {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
    column-gap: 2.5rem;
    row-gap: 1.25rem;
    align-items: start;
  }

  .product-sticky-scope__bc {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .product-sticky-scope__gallery {
    grid-column: 1;
    grid-row: 2;
  }

  .product-sticky-scope__buy {
    grid-column: 2;
    grid-row: 2;
  }

  .product-subnav {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}

/* Sticky jump bar — stays under site header while scrolling the whole product page */
.product-subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 850;
  margin: 0;
  padding: 0.5rem 0.65rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.product-subnav__track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
}

.product-subnav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none !important;
  text-align: center;
  color: var(--color-text);
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
  border: 1px solid #c8c8c8;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 1px 2px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.product-subnav__btn:hover {
  background: linear-gradient(180deg, #fff 0%, #f4f4f4 100%);
  border-color: #b0b0b0;
  color: var(--color-accent);
}

.product-subnav__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.product-subnav__btn:active {
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08) inset;
}

/* Mobile / narrow: one compact row; break out of .product-sticky-scope width + padding (full viewport bar) */
@media (max-width: 991.98px) {
  :root {
    --product-subnav-h: 2.6rem;
  }

  .product-subnav {
    /* Do not use transform here — it breaks position:sticky. Margins + 100vw align bar to screen edges. */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0.28rem 0.35rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-sizing: border-box;
  }

  .product-subnav__track {
    flex-wrap: nowrap;
    justify-content: stretch;
    gap: 0.22rem;
    max-width: 100%;
    min-width: 0;
  }

  .product-subnav__btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.3rem 0.2rem;
    min-height: 2.2rem;
    font-size: clamp(0.5625rem, 2.65vw, 0.6875rem);
    letter-spacing: 0.02em;
    line-height: 1.12;
    border-radius: 4px;
  }
}

/* Anchor targets clear sticky header + subnav */
.product-page #description,
.product-page #specifications,
.product-page #documentation,
.product-page #product-reviews {
  scroll-margin-top: calc(var(--header-h) + var(--product-subnav-h) + 0.5rem);
}

.product-documentation__intro {
  margin: 0 0 1rem;
  max-width: 52rem;
}

.product-documentation__subhead {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.product-documentation__list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.product-documentation__list li {
  margin-bottom: 0.35rem;
}

.product-documentation__pdf {
  font-weight: 600;
  margin-right: 0.35rem;
}

.product-documentation__image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem 1.25rem;
  margin-top: 0.5rem;
}

.product-documentation__figure {
  margin: 0;
}

.product-documentation__image-link {
  display: block;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
}

.product-documentation__image-link img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.product-documentation__figure figcaption {
  margin-top: 0.35rem;
}

.product-gallery {
  min-width: 0;
}

.product-gallery__main {
  margin-bottom: 0.75rem;
  width: 100%;
  min-width: 0;
}

/* Fixed viewport for main image — no layout jump when swapping assets */
.product-gallery__frame {
  width: 100%;
  height: min(68vh, 640px);
  min-height: 260px;
  border: 2px solid #8a8a8a;
  border-radius: 8px;
  background: #e8e8e8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 16px);
  box-sizing: border-box;
}

.product-gallery__frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/*
 * Thumbnails: always small fixed px (never % of row — that blew up when the flex row
 * sized to image intrinsics). Main image stays large above; strip scrolls horizontally.
 */
.product-gallery__thumbs {
  --thumb-size: 56px;
  --thumb-gap: 0.45rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--thumb-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 2px 0 8px;
  box-sizing: border-box;
}

.product-gallery__thumbs::-webkit-scrollbar {
  height: 6px;
}

.product-gallery__thumbs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.product-gallery__thumb {
  padding: 0;
  border: 2px solid #e5e5e5;
  border-radius: 4px;
  background: #e8e8e8;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 var(--thumb-size);
  width: var(--thumb-size);
  height: var(--thumb-size);
  min-width: var(--thumb-size);
  min-height: var(--thumb-size);
  max-width: var(--thumb-size);
  max-height: var(--thumb-size);
  box-sizing: border-box;
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

@media (min-width: 768px) {
  .product-gallery__thumbs {
    --thumb-size: 64px;
    --thumb-gap: 0.5rem;
  }
}

.product-gallery__thumb:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.product-gallery__thumb:focus:not(:focus-visible) {
  outline: none;
}

.product-gallery__thumb.is-active,
.product-gallery__thumb:hover {
  border-color: var(--color-accent);
}

.product-buybox__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  text-transform: capitalize;
}

.product-buybox__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.product-buybox__stars {
  color: #f5a623;
  letter-spacing: 0.05em;
}

.product-buybox__reviews-link {
  font-size: 0.9375rem;
  font-weight: 600;
}

.product-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.product-price-row__compare {
  font-size: 1.1rem;
  color: #9a9a9a;
}

.product-price-row__sale {
  font-size: 1.75rem;
  font-weight: 800;
  color: #db0000;
}

.product-price-row__badge {
  background: #db0000;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.product-buybox__lead {
  margin: 0 0 0.5rem;
  line-height: 1.55;
}

.product-form-row {
  margin: 1.25rem 0 0.5rem;
}

.product-qty {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.product-qty__input {
  max-width: 5rem;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.btn--cart {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  background: #2d2d2d;
  color: #fff !important;
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer !important;
}

.btn--cart:hover,
.btn--cart:focus-visible,
.btn--cart:active {
  background: #1a1a1a;
  cursor: pointer !important;
}

.product-add-form__hint {
  margin: 0.5rem 0 0;
}

.product-notice {
  margin: 1.5rem 0;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 0;
  background: #fafafa;
}

.product-notice summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.0625rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 1rem 1.25rem;
  min-height: 3rem;
  line-height: 1.25;
  list-style: none;
}

/* Collapse hint: ▲ when closed (north), ▼ when open */
.product-notice summary::after {
  content: "";
  flex-shrink: 0;
  width: 0;
  height: 0;
  border-left: 0.35em solid transparent;
  border-right: 0.35em solid transparent;
  border-bottom: 0.5em solid var(--color-text);
  transition: transform 0.2s ease;
}

.product-notice[open] summary::after {
  transform: rotate(180deg);
}

.product-notice summary::-webkit-details-marker {
  display: none;
}

.product-notice__body {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  border-top: 1px solid #e0e0e0;
}

.product-notice__subhead {
  margin: 1rem 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.product-notice__subhead:first-child {
  margin-top: 0;
}

.product-notice__list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.product-notice__list li {
  margin-bottom: 0.35rem;
}

.product-notice__returns {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Full-width stripes: subtle off-white vs white while scrolling */
.product-section-band {
  width: 100%;
  padding: 2.5rem 0;
}

.product-section-band:first-of-type {
  margin-top: 1.5rem;
}

.product-section-band--tone-a {
  background: #f7f7f7;
}

.product-section-band--tone-b {
  background: #ffffff;
}

.product-main-sections {
  max-width: 900px;
}

.product-section {
  padding: 0;
  margin: 0;
  border-top: none;
}

.product-section__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-detail-body__h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.product-detail-body__features {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.product-detail-body__features li {
  margin-bottom: 0.35rem;
}

.product-diagram {
  margin: 1rem 0;
  background: #f8f8f8;
  border-radius: 4px;
  padding: 0.5rem;
}

.product-diagram img {
  width: 100%;
  height: auto;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 2rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.spec-table th,
.spec-table td {
  border: 1px solid #e0e0e0;
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.spec-table th {
  background: #f5f5f5;
  font-weight: 700;
  width: 38%;
}

.product-reviews-block .product-section__title {
  margin-bottom: 0.35rem;
}

.product-reviews-block__summary {
  margin: 0 0 1.25rem;
  color: var(--color-muted);
}

.product-review-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-review-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
}

.product-review-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-review-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.25rem;
}

.product-review-card__head .stars {
  color: #f5a623;
  font-size: 0.9rem;
}

.product-review-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.product-review-card__foot {
  margin-top: 0.5rem;
}

.product-buybox__stars .stars__dim {
  color: #ddd;
}

.product-review-card .stars__dim {
  color: #e8e8e8;
}

.product-review-form-wrap {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8e8e8;
  max-width: 36rem;
}

.product-review-form__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.product-review-form__hint {
  margin: 0 0 1rem;
}

.product-review-form__fieldset {
  border: none;
  margin: 0 0 1rem;
  padding: 0;
}

.product-review-form__fieldset > legend {
  margin-bottom: 0;
}

/* Accessible star rating (radios + labels; see GrahamTheDev / star-rating pattern) */
.product-review-form__rating {
  margin: 0.35rem 0 0;
}

.star-rating__row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.12rem;
}

.star-rating__pair {
  position: relative;
  display: block;
}

/* Visually hidden: still in accessibility tree (do not use display:none on inputs) */
.star-rating__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.star-rating__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
}

.star-rating__label {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
  border-radius: 4px;
  transition: background 0.12s ease;
}

.star-rating__icon {
  font-size: 2rem;
  line-height: 1;
  color: #e4e4e4;
  text-shadow:
    0 0 0 1.5px #3a3a3a,
    0 1px 0 rgba(0, 0, 0, 0.06);
  transition: color 0.12s ease, transform 0.12s ease;
}

/* Selected: fill stars 1..n (non-colour cue: filled shape + accent) */
.star-rating:has(.star-rating__input[value="1"]:checked) .star-rating__pair:nth-child(1) .star-rating__icon,
.star-rating:has(.star-rating__input[value="2"]:checked) .star-rating__pair:nth-child(-n + 2) .star-rating__icon,
.star-rating:has(.star-rating__input[value="3"]:checked) .star-rating__pair:nth-child(-n + 3) .star-rating__icon,
.star-rating:has(.star-rating__input[value="4"]:checked) .star-rating__pair:nth-child(-n + 4) .star-rating__icon,
.star-rating:has(.star-rating__input[value="5"]:checked) .star-rating__pair:nth-child(-n + 5) .star-rating__icon {
  color: var(--color-accent);
  text-shadow:
    0 0 0 1.5px #5a0a0a,
    0 1px 0 rgba(0, 0, 0, 0.12);
}

/* Hover preview: highlight up to hovered star */
.star-rating__row:has(.star-rating__pair:nth-child(1):hover) .star-rating__pair:nth-child(1) .star-rating__icon,
.star-rating__row:has(.star-rating__pair:nth-child(2):hover) .star-rating__pair:nth-child(-n + 2) .star-rating__icon,
.star-rating__row:has(.star-rating__pair:nth-child(3):hover) .star-rating__pair:nth-child(-n + 3) .star-rating__icon,
.star-rating__row:has(.star-rating__pair:nth-child(4):hover) .star-rating__pair:nth-child(-n + 4) .star-rating__icon,
.star-rating__row:has(.star-rating__pair:nth-child(5):hover) .star-rating__pair:nth-child(-n + 5) .star-rating__icon {
  color: #c41a1a;
  text-shadow:
    0 0 0 1.5px #3a3a3a,
    0 1px 0 rgba(0, 0, 0, 0.08);
}

.star-rating__input:focus-visible + .star-rating__label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.star-rating__input:focus-visible + .star-rating__label .star-rating__icon {
  color: #c41a1a;
}

.product-review-form__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.product-review-form__textarea {
  min-height: 7rem;
  resize: vertical;
}

.product-review-form__submit {
  margin-top: 0.35rem;
}

.product-review-form__done,
.product-review-form__login-prompt {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e8;
}

.related-products {
  margin: 0;
  padding: 0;
  max-width: 900px;
}

.related-products__title {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.related-products__sub {
  margin: 0 0 1.25rem;
}

.related-products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.related-card {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}

.related-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.related-card__img {
  aspect-ratio: 1;
  background: #f5f5f5;
}

.related-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__title {
  margin: 0;
  padding: 0.75rem 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
}

.related-card__prices {
  padding: 0.35rem 0.75rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.related-card__sale {
  font-weight: 800;
  color: #db0000;
  font-size: 0.9375rem;
}

.related-card__compare {
  font-size: 0.8125rem;
  color: #9a9a9a;
}

@media (max-width: 767.98px) {
  .related-products__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.65rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    padding: 0 1rem 0.35rem;
    margin-inline: -1rem;
    width: calc(100% + 2rem);
  }

  .related-card {
    flex: 0 0 auto;
    width: 108px;
    scroll-snap-align: start;
    border-radius: 5px;
  }

  .related-card__title {
    font-size: 0.6875rem;
    padding: 0.35rem 0.4rem 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .related-card__prices {
    padding: 0.15rem 0.4rem 0.4rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .related-card__sale {
    font-size: 0.75rem;
  }

  .related-card__compare {
    font-size: 0.625rem;
  }
}

/* Flash messages */
.site-messages {
  padding: 0.75rem 1rem 0;
  max-width: var(--container);
  margin-inline: auto;
}

.site-messages__item {
  margin: 0 0 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-messages__item--success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.site-messages__item--error {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ef9a9a;
}

.site-messages__item--info,
.site-messages__item--debug {
  background: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #90caf9;
}

.site-messages__item--warning {
  background: #fff8e1;
  color: #e65100;
  border: 1px solid #ffcc80;
}

/* Products catalog (/products/) */
.products-page {
  padding: 1.5rem 0 4rem;
}

.products-page__header {
  margin-bottom: 0.25rem;
}

.products-page__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
}

.products-page__intro {
  margin: 0 0 1rem;
}

.products-filter-bar {
  margin: 0 0 2rem;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 0.75rem;
}

.products-filter-bar__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.15rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.products-filter-bar__pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  color: var(--color-text) !important;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fafafa;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.products-filter-bar__pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent) !important;
}

.products-filter-bar__pill.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff !important;
}

.products-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.products-grid__cell {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: inherit !important;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.product-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.product-card__media {
  display: block;
  aspect-ratio: 1;
  background: #f5f5f5;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
}

.product-card__category {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.65rem;
}

.product-card__name {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
}

.product-card__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.product-card__price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-accent);
}

.product-card__compare {
  font-size: 0.875rem;
}

.product-card__badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: #ffebee;
  color: var(--color-accent);
}

.products-empty {
  margin: 2rem 0 0.5rem;
}

/* Cart page */
.cart-page {
  padding: 1.5rem 0 4rem;
}

.cart-page__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
}

.cart-empty {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

.cart-empty__cta {
  display: inline-block;
  margin: 0.5rem 0.75rem 0.5rem 0;
}

.cart-table-wrap {
  overflow-x: auto;
  margin-bottom: 2rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.cart-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.cart-table__th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: #f5f5f5;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.cart-table__th--img {
  width: 100px;
}

.cart-table__th--action {
  width: 90px;
}

.cart-table td {
  padding: 1rem;
  vertical-align: middle;
  border-top: 1px solid #eee;
}

.cart-table__img-cell img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.cart-table__title {
  font-weight: 600;
  max-width: 280px;
}

.cart-table__line-total {
  font-weight: 800;
}

.cart-update-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cart-qty-input {
  width: 3.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--color-accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: 0.875rem;
}

.cart-remove:hover {
  color: var(--color-accent-hover);
}

.btn--small {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #eee;
  color: #222 !important;
  border: 1px solid #ccc;
  border-radius: 2px;
  cursor: pointer;
}

.btn--small:hover {
  background: #e0e0e0;
}

.cart-summary {
  max-width: 360px;
  margin-left: auto;
  padding: 1.25rem;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.cart-summary__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.btn--checkout {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--color-accent);
  color: #fff !important;
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 2px;
  cursor: not-allowed;
  opacity: 0.65;
}

.cart-summary__note {
  margin: 0.5rem 0 0;
}

.cart-summary__continue {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
}

.cart-submit-form {
  margin-top: 0.75rem;
}

.cart-special-label {
  display: block;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.cart-special-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 5rem;
}

.cart-summary__ship-note {
  margin: 0.75rem 0 0.5rem;
}

.cart-summary__submit {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  text-align: center;
  text-decoration: none !important;
  box-sizing: border-box;
}

/* Header account */
.header__account,
.header__login {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text) !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.header__account:hover,
.header__login:hover {
  color: var(--color-accent) !important;
}

/* Global header — signed-in account dropdown */
.header-account-menu {
  position: relative;
  z-index: 940;
}

.header-account-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
  padding: 0.25rem 0;
  user-select: none;
}

.header-account-menu__trigger::-webkit-details-marker {
  display: none;
}

.header-account-menu__trigger::marker {
  content: "";
  display: none;
}

.header-account-menu__name {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .header-account-menu__name {
    max-width: 6.5rem;
  }
}

.header-account-menu__caret {
  font-size: 0.65em;
  opacity: 0.85;
  line-height: 1;
  transition: transform 0.15s ease;
}

.header-account-menu[open] .header-account-menu__caret {
  transform: rotate(-180deg);
}

.header-account-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 15rem;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
}

.header-account-menu__menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-account-menu__rule {
  margin: 0.35rem 0;
  border: 0;
  border-top: 1px solid #e8e8e8;
}

.header-account-menu__item {
  display: block;
  padding: 0.6rem 0.85rem;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--color-text) !important;
  text-decoration: none !important;
  text-transform: none;
  letter-spacing: normal;
  border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
}

.header-account-menu__item:hover,
.header-account-menu__item:focus-visible {
  outline: none;
  background: #f4f4f4;
  color: var(--color-accent) !important;
}

.header-account-menu__item--logout {
  color: #5c5c5c !important;
  font-weight: 600;
}

.header-account-menu__item--logout:hover,
.header-account-menu__item--logout:focus-visible {
  background: #faf0f0;
  color: #a32020 !important;
}

/* Account area */
.account-page {
  padding: 1.5rem 1rem 4rem;
}

.account-page__layout {
  display: grid;
  gap: 2rem;
  max-width: 1100px;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .account-page__layout {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1rem;
  background: #f8f8f8;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}

.account-nav__home {
  font-weight: 800;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text) !important;
  text-decoration: none !important;
}

.account-nav__home:hover,
.account-nav__link:hover {
  color: var(--color-accent) !important;
}

.account-nav__home.is-active,
.account-nav__link.is-active {
  color: var(--color-accent) !important;
}

.account-nav__group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.account-nav__label {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.15rem;
}

.account-nav__link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text) !important;
  text-decoration: none !important;
  padding: 0.25rem 0;
}

.account-nav__role {
  margin: 0.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}

.account-page__main {
  min-width: 0;
}

.account-page__heading {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  text-transform: uppercase;
}

.account-page__heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1rem;
}

.account-page__heading--with-action {
  margin: 0;
  line-height: 1;
}

/* Box matches one line of the heading (same font-size); full square is clickable. */
.account-page__heading-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1;
  width: 1em;
  height: 1em;
  min-width: 1em;
  min-height: 1em;
  padding: 0;
  color: var(--color-text) !important;
  text-decoration: none !important;
  border: 2px solid var(--color-text);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.account-page__heading-action:hover {
  color: var(--color-accent) !important;
  border-color: var(--color-accent);
  background: #fafafa;
}

.account-page__heading-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--color-accent);
}

.account-products-table-wrap {
  margin-top: 0;
}

.account-tiles {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 600px) {
  .account-tiles {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

.account-tile {
  display: block;
  padding: 1.25rem 1.35rem;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  text-decoration: none !important;
  color: inherit !important;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.account-tile:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.account-tile__title {
  display: block;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.account-tile__desc {
  display: block;
  line-height: 1.4;
}

.account-placeholder {
  margin-top: 1rem;
  padding: 1.5rem 1.25rem;
  background: #fafafa;
  border: 1px dashed #ccc;
  border-radius: 6px;
}

.account-placeholder--cta p {
  margin: 0 0 0.75rem;
}

.account-placeholder--cta p:last-child {
  margin-bottom: 0;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.account-table th,
.account-table td {
  border: 1px solid #e5e5e5;
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.account-table th {
  background: #f0f0f0;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #e8f4fc;
  color: #1565c0;
}

/* Order workflow (customer + manager order pages) */
.order-workflow {
  list-style: none;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
}

.order-workflow__step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  background: #fafafa;
  color: #777;
  max-width: 100%;
}

.order-workflow__step.is-done {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #1b5e20;
}

.order-workflow__step.is-latest.is-done {
  box-shadow: 0 0 0 2px var(--color-accent);
}

.order-workflow__marker {
  font-weight: 800;
  min-width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.order-workflow__label {
  text-transform: none;
  letter-spacing: 0;
}

.order-detail-block {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
}

.order-detail-block__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 800;
}

.order-detail-block__body {
  margin: 0;
  line-height: 1.55;
}

.order-lines-table {
  margin-top: 0.5rem;
}

.order-detail-total {
  margin: 0.75rem 0 0;
  text-align: right;
  font-size: 1.05rem;
}

.order-confirm-delivery {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}

.order-confirm-delivery__text {
  margin: 0 0 0.75rem;
}

.order-detail-complete {
  margin: 1.25rem 0;
}

.order-detail-back {
  margin-top: 1.5rem;
}

.order-manager-actions {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.order-manager-actions__form .btn {
  margin-top: 0.35rem;
}

.account-dev-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.7;
}

/* Login / register */
.account-auth {
  padding: 2.5rem 1rem 4rem;
  max-width: 420px;
}

.account-auth__title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-auth__errors {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #ffebee;
  color: #b71c1c;
  border-radius: 4px;
  font-size: 0.9375rem;
}

.account-auth__form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-auth__form--tight {
  margin-top: 1rem;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.account-field__label {
  font-size: 0.8125rem;
  font-weight: 700;
}

.account-field__input {
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.account-field__input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.account-field__input:disabled {
  background: #f0f0f0;
  color: #666;
}

select.account-field__select {
  max-width: 100%;
  cursor: pointer;
  background-color: #fff;
}

.account-field__error {
  font-size: 0.8125rem;
  color: var(--color-accent);
  font-weight: 600;
}

.account-auth__submit {
  margin-top: 0.5rem;
  align-self: flex-start;
}

.account-auth__footer {
  margin-top: 1.5rem;
}

/* Unified login / register (email verify flow) */
.unified-auth__intro {
  margin: 0 0 1rem;
  line-height: 1.55;
}

.unified-auth__hint-above-email {
  margin: 0 0 0.75rem;
}

.unified-auth__hint-above-email .unified-auth__hint {
  margin: 0;
}

.unified-auth__email-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.unified-auth__email-input {
  flex: 1;
  min-width: 0;
}

.email-verify-btn {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(160deg, #5b3d7a 0%, #3d2658 100%);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(61, 38, 88, 0.35);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.email-verify-btn:hover:not(:disabled) {
  background: linear-gradient(160deg, #6a488f 0%, #4a2f6a 100%);
  box-shadow: 0 4px 12px rgba(61, 38, 88, 0.45);
}

.email-verify-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.email-verify-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.email-verify-btn__icon {
  width: 1.35rem;
  height: 1.35rem;
}

.unified-auth__verify-error {
  margin: 0.35rem 0 0;
}

.unified-auth__hint {
  font-weight: 700;
  font-size: 1rem;
}

.account-subhead {
  margin: 2rem 0 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.account-field--full {
  grid-column: 1 / -1;
}

/* Account profile — centered stacked form */
.account-profile-detail {
  max-width: 26rem;
  margin: 0 auto;
  padding: 0.5rem 0 2rem;
  text-align: center;
}

.account-profile-detail__header {
  margin-bottom: 2rem;
}

.account-profile-detail__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.account-profile-detail__lead {
  margin: 0 auto;
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.account-profile-detail__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.account-profile-detail__fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  text-align: left;
}

.account-profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.account-profile-field__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #444;
}

.account-profile-field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border: 1px solid #c5c5c5;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-profile-field__input:hover {
  border-color: #999;
}

.account-profile-field__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(214, 16, 16, 0.22);
}

.account-profile-detail__submit {
  min-width: 12rem;
  padding: 0.65rem 1.5rem;
  font-weight: 700;
}

.account-profile-detail__errors {
  width: 100%;
  text-align: left;
  margin-bottom: 1rem;
}

.account-profile-field__help {
  display: block;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.account-profile-detail__subnav {
  margin: 1.25rem 0 0;
}

.account-profile-detail__after-actions {
  margin: 1.5rem 0 0;
}

/* Developer user tools */
.dev-back {
  margin: 0 0 1rem;
}

.dev-back a {
  font-weight: 700;
  text-decoration: none !important;
}

.dev-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.dev-search-form__field {
  flex: 1 1 240px;
  margin: 0;
}

.dev-search-results {
  margin-top: 1rem;
}

.dev-link-action {
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.dev-panel {
  margin-bottom: 2rem;
  padding: 1.25rem 1.35rem;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}

.dev-panel__title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
}

.dev-dl {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 0.35rem 1.25rem;
  margin: 0;
  font-size: 0.9375rem;
}

.dev-dl dt {
  margin: 0;
  font-weight: 700;
  color: var(--color-muted);
}

.dev-dl dd {
  margin: 0;
}

.dev-action-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.6;
}

.dev-action-list li {
  margin-bottom: 1rem;
}

.dev-action-list li:last-child {
  margin-bottom: 0;
}

.dev-promote-form {
  display: inline-block;
  margin-top: 0.5rem;
}

/* Manager — product create: SKU lookup */
.manager-product-sku-search {
  margin: 0 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e8e8e8;
}

.manager-product-sku-search .account-field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.manager-product-sku-search__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.manager-product-sku-search__input {
  min-width: min(100%, 14rem);
  max-width: 20rem;
}

.manager-product-sku-search__result {
  margin: 0.65rem 0 0;
}

.manager-product-create__submit-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1.75rem;
  padding-top: 0.25rem;
}

.manager-product-create__submit {
  background: #0f0f0f !important;
  color: #fff !important;
  border-color: #0f0f0f !important;
}

.manager-product-create__submit:hover {
  background: #2a2a2a !important;
  color: #fff !important;
  border-color: #2a2a2a !important;
}

.manager-product-create__submit:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.manager-product-summary__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.account-table__actions {
  white-space: nowrap;
}

.manager-product-create__save-failed {
  margin-bottom: 1.25rem;
  border-width: 2px;
  border-color: #b42318;
  background: #fef3f2;
}

.manager-product-create__save-failed-title {
  margin: 0 0 0.5rem;
}

.manager-product-create__save-failed-detail {
  margin: 0.35rem 0 0;
}

.manager-product-create__save-failed-hint {
  margin: 0.65rem 0 0;
}

.manager-product-summary__notice {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid #c5c5c5;
  border-radius: 6px;
  background: #f7f7f7;
}

.manager-product-summary__notice-title {
  margin: 0 0 0.35rem;
}

.manager-product-summary__notice .muted {
  margin: 0 0 0.75rem;
}

.manager-product-summary__notice-link {
  margin: 0;
}

.manager-product-form__crumbs {
  margin-bottom: 0.5rem;
}

.manager-product-form__crumb-sep {
  margin: 0 0.35rem;
  color: #888;
}

.manager-product-existing {
  margin: 0 0 0.65rem;
}

.manager-product-existing__gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.manager-product-existing__gallery-item {
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  background: #fafafa;
}

.manager-product-existing__gallery-item img {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.manager-product-existing__manuals {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

/* Manager — selected file previews (client-side validation) */
.manager-file-preview {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
}

.manager-file-preview__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fafafa;
}

.manager-file-preview__item--ok {
  border-color: #c5e0c5;
  background: #f4faf4;
}

.manager-file-preview__item--fail {
  border-color: #e8b4b4;
  background: #fff8f8;
}

.manager-file-preview__media {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
  background: #eee;
}

.manager-file-preview__media--error {
  background: #fde8e8;
  color: #b42318;
}

.manager-file-preview__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.manager-file-preview__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
}

.manager-file-preview__icon--pdf {
  color: #b42318;
}

.manager-file-preview__icon--image {
  color: #5c5c5c;
}

.manager-file-preview__icon--error {
  color: #b42318;
}

.manager-file-preview__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}

.manager-file-preview__name {
  font-size: 0.8125rem;
  font-weight: 600;
  word-break: break-word;
  line-height: 1.25;
}

.manager-file-preview__status {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.manager-file-preview__status--uploaded {
  color: #1a6b1a;
}

.manager-file-preview__status--failed {
  color: #b42318;
}

.manager-file-preview__reason {
  display: block;
  font-size: 0.75rem;
  line-height: 1.3;
}

/* Quill rich text — manager create */
.manager-quill-editor {
  margin-top: 0.35rem;
  background: #fff;
}

.manager-quill-editor .ql-toolbar {
  border: 1px solid #ccc;
  border-radius: 4px 4px 0 0;
  font-family: var(--font);
}

.manager-quill-editor .ql-container {
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  font-family: var(--font);
  font-size: 1rem;
  min-height: 140px;
}

.manager-quill-editor--description .ql-container {
  min-height: 220px;
}

textarea.manager-quill-source--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Storefront — Quill output */
.product-richtext {
  line-height: 1.55;
}

.product-richtext p {
  margin: 0 0 0.65em;
}

.product-richtext p:last-child {
  margin-bottom: 0;
}

.product-richtext ul,
.product-richtext ol {
  margin: 0.5em 0 0.65em 1.25rem;
  padding: 0;
}

.product-richtext .ql-size-small,
.product-richtext span.ql-size-small {
  font-size: 0.875em;
}

.product-richtext .ql-size-large,
.product-richtext span.ql-size-large {
  font-size: 1.125em;
}

.product-richtext .ql-size-huge,
.product-richtext span.ql-size-huge {
  font-size: 1.35em;
}

.product-buybox__lead.product-richtext {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* Manager — create product */
.manager-product-create .manager-product__file-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin: 0.25rem 0 0;
}

.manager-product__file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.manager-product-specs-wrap {
  margin-top: 0.75rem;
}

.manager-product-specs th {
  width: 12rem;
  max-width: 40%;
  vertical-align: top;
  font-weight: 600;
  text-align: left;
}

.manager-product-specs__label {
  font-weight: 600;
  cursor: pointer;
}

.manager-product-specs td .account-field__input {
  width: 100%;
  max-width: 28rem;
}

.product-detail-body__richtext > p:first-child {
  margin-top: 0;
}

/* First-time password (modal-style, full-viewport) */
.first-password-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  background: rgba(15, 15, 15, 0.55);
}

.first-password-dialog {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem 1.35rem 1.25rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.first-password-dialog__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.first-password-dialog__lead {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.first-password-form .account-field {
  margin-bottom: 1rem;
}

.first-password__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.first-password-form__hint {
  margin: -0.25rem 0 1rem;
}

.first-password-form__submit {
  width: 100%;
  margin-top: 0.25rem;
}

.first-password-dialog__footer {
  margin: 1rem 0 0;
  text-align: center;
}

/* ====================================================================
   Edit Mode
   ==================================================================== */

/* Footer edit mode link */
.footer__edit-mode-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.footer__edit-mode-link {
  font: inherit;
  color: #e0e0e0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.footer__edit-mode-link:hover {
  text-decoration: underline;
  color: #fff;
}

/* Editable element indicators (edit mode active) */
.edit-mode [data-ec] {
  outline: 2px dashed rgba(91, 61, 122, 0.35);
  outline-offset: 3px;
  border-radius: 3px;
  cursor: text;
  transition: outline-color 0.15s;
}

.edit-mode [data-ec]:hover {
  outline-color: rgba(91, 61, 122, 0.7);
}

.edit-mode [data-ec-img] {
  outline: 2px dashed rgba(91, 61, 122, 0.35);
  outline-offset: 3px;
  border-radius: 3px;
  cursor: pointer;
  transition: outline-color 0.15s;
}

/* Keep circular avatar filling its figure; height:auto breaks the circle */
.edit-mode .about-post__img[data-ec-img] {
  height: 100% !important;
  border-radius: 50%;
}

/* Hero slideshow: allow proportional scaling when width is adjusted */
.edit-mode .hero__media img[data-ec-img],
.edit-mode .hero__slide img[data-ec-img] {
  height: auto !important;
}

/* Slides are pointer-events:none for the carousel; re-enable in edit mode so images are clickable */
.edit-mode .hero__slide {
  pointer-events: auto !important;
}

.edit-mode [data-ec-img]:hover {
  outline-color: rgba(91, 61, 122, 0.7);
}

.edit-mode [data-ec-img].ec-img-active {
  outline-color: #5b3d7a;
  outline-style: solid;
}

/* Editing state for text */
.ec-editing {
  outline-color: #5b3d7a !important;
  outline-style: solid !important;
}

.ec-quill-wrapper {
  min-width: 200px;
}

.ec-quill-wrapper .ql-toolbar.ql-snow {
  border-radius: 6px 6px 0 0;
  border-color: #d0c8dc;
  background: #f9f7fc;
}

.ec-quill-wrapper .ql-container.ql-snow {
  border-radius: 0 0 6px 6px;
  border-color: #d0c8dc;
  min-height: 2.5em;
  font-family: var(--font);
  font-size: inherit;
}

.ec-quill-wrapper .ql-editor {
  min-height: 2em;
  padding: 0.5rem 0.65rem;
}

/* Image controls overlay */
.ec-img-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  padding: 0.35rem 0.5rem;
  background: #1c1c1c;
  border-radius: 6px;
  width: fit-content;
}

.ec-img-controls__btn {
  padding: 0.25rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1.2;
}


.ec-img-controls__btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ec-img-controls__scale {
  color: #ccc;
  font-size: 0.75rem;
  min-width: 2.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Save toast */
.ec-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10001;
  padding: 0.55rem 1.1rem;
  background: #1c1c1c;
  color: #fff;
  font-size: 0.875rem;
  font-family: var(--font);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.ec-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.ec-toast--error {
  background: #b71c1c;
}

/* Hero slideshow replace button (edit mode only; lives in .hero__content) */
.hero__replace-bar {
  margin: 0 0 1rem;
}

.hero__replace-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font);
  color: #fff;
  background: rgba(28, 28, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s;
}

.hero__replace-btn:hover {
  background: rgba(28, 28, 28, 0.9);
}

/* Our-products per-image replace button (edit mode) */
.our-products__item--editable {
  position: relative;
}

.our-products__replace-wrap {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: auto;
}

.our-products__replace-btn {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font);
  color: #fff;
  background: rgba(28, 28, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s;
  white-space: nowrap;
  line-height: 1.3;
}

.our-products__replace-btn:hover {
  background: rgba(28, 28, 28, 0.92);
}
