@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700;800;900&display=swap");

:root {
  --ink: #050505;
  --muted: #5d646f;
  --line: #d9d9d9;
  --chip: #f3f3f3;
  --paper: #ffffff;
  --warm: #d5b086;
  --steel: #455363;
  --brick: #a84635;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Vazirmatn", "Vazir", Tahoma, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.shop-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.98) 0%,
      rgba(255,255,255,0.95) 30%,
      rgba(255,255,255,0.80) 45%,
      rgba(255,255,255,0.00) 65%
    ),
    url("/images/construction-hero.png") center center / cover no-repeat;
}

.brand-mark {
  position: absolute;
  top: 32px;
  left: 76px;
  display: block;
  width: 112px;
  height: 112px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.top-actions {
  position: absolute;
  top: 64px;
  right: 86px;
  display: flex;
  gap: 26px;
}

.icon-action {
  width: 24px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.icon-action::before {
  content: "";
  position: absolute;
  inset: 3px 6px 2px;
  border: 2px solid #000;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.icon-action::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid #000;
  border-radius: 50%;
  top: 1px;
  right: 8px;
}

.icon-action.bag::before {
  inset: 5px 3px 2px;
  border: 2px solid #000;
  border-radius: 4px;
}

.icon-action.bag::after {
  width: 9px;
  height: 5px;
  border: 2px solid #000;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  top: 2px;
  right: 7px;
}

.hero-copy {
  position: absolute;
  left: 76px;
  top: 50%;
  width: min(35vw, 540px);
  max-width: calc(100% - 152px);
  transform: translateY(-50%);
  direction: rtl;
  text-align: right;
}

.hero-copy h1 {
  margin: 0;
  color: #111827;
  font-size: 56px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-copy h1 span {
  color: #D97706;
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 520px;
  color: #4B5563;
  font-size: 18px;
  line-height: 1.9;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 800;
  transition: background-color .18s ease, border-color .18s ease;
}

.hero-button.primary {
  background: #D97706;
  color: #FFFFFF;
}

.hero-button.primary:hover {
  background: #B45309;
}

.hero-button.secondary {
  border: 1px solid #D1D5DB;
  background: transparent;
  color: #111827;
}

.hero-button.secondary:hover {
  border-color: #9CA3AF;
}

.quote-action {
  gap: 10px;
}

.quote-action b {
  color: #b45309;
  font-weight: 900;
}

.quote-mobile {
  display: none;
}

.catalog-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 60px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 30px 74px 80px;
}

.filters-panel {
  position: sticky;
  top: 20px;
  align-self: start;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.filter-lines {
  width: 22px;
  height: 14px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid transparent;
  position: relative;
}

.filter-lines::before,
.filter-lines::after {
  content: "";
  position: absolute;
  right: 0;
  height: 2px;
  background: var(--ink);
}

.filter-lines::before {
  top: 5px;
  width: 17px;
}

.filter-lines::after {
  top: 11px;
  width: 9px;
}

.filter-group {
  margin-bottom: 34px;
}

.filter-group h2 {
  margin: 0 0 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid #6b6b6b;
  font-size: 1.08rem;
  font-weight: 800;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
}

.filter-chip {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--chip);
  font-size: .96rem;
  color: #15314f;
  transition: background-color .18s ease, color .18s ease;
}

.filter-chip.active,
.filter-chip:hover {
  background: #000;
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 28px;
}

.product-card {
  display: block;
  min-width: 0;
}

.product-card:hover .product-art::before {
  transform: translate(-50%, -50%) rotate(-6deg) scale(1.04);
}

.product-art {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: end start;
  overflow: hidden;
  position: relative;
  background: #ece8e1;
  border-radius: 0;
  color: rgba(255, 255, 255, .78);
  isolation: isolate;
}

.product-art::before,
.product-art::after {
  content: "";
  position: absolute;
  z-index: -1;
  transition: transform .2s ease;
}

.product-art::before {
  width: 52%;
  height: 52%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(0, 0, 0, .28);
}

.product-art::after {
  inset: 16%;
  border: 14px solid rgba(255, 255, 255, .52);
}

.product-art span {
  margin: 0 0 22px 24px;
  direction: rtl;
  font-size: 1.3rem;
  font-weight: 900;
}

.product-photo {
  background: #e7e7e7;
}

.product-photo::before,
.product-photo::after {
  display: none;
}

.product-photo img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-photo span {
  max-width: calc(100% - 32px);
  margin: 0 0 18px 18px;
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 1rem;
}

.product-cement,
.product-white-cement,
.product-gypsum,
.product-mortar {
  background: linear-gradient(135deg, #dedbd4, #9f978e);
}

.product-sand,
.product-gravel {
  background: linear-gradient(135deg, #d4b487, #786653);
}

.product-brick,
.product-block {
  background: linear-gradient(135deg, #bd614c, #7f3428);
}

.product-rebar,
.product-rebar-heavy,
.product-spacer {
  background: linear-gradient(135deg, #c9d1d5, #4d5965);
}

.product-tile,
.product-wall-tile {
  background: linear-gradient(135deg, #f2f0ea, #93a7a7);
}

.product-additive,
.product-adhesive,
.product-insulation,
.product-pipe,
.product-foam {
  background: linear-gradient(135deg, #d7e3df, #576d76);
}

.product-cement::before,
.product-white-cement::before,
.product-gypsum::before,
.product-mortar::before {
  width: 42%;
  height: 58%;
  border-radius: 10px 10px 24px 24px;
  background: linear-gradient(90deg, #f6f1e6, #b6aa9c);
}

.product-sand::before,
.product-gravel::before {
  width: 64%;
  height: 34%;
  top: 60%;
  border-radius: 50% 50% 18% 18%;
  background: linear-gradient(180deg, #f1ce94, #a98255);
}

.product-brick::before,
.product-block::before {
  width: 62%;
  height: 38%;
  background:
    linear-gradient(#0000 47%, rgba(255,255,255,.32) 48% 52%, #0000 53%),
    linear-gradient(90deg, #0000 31%, rgba(255,255,255,.28) 32% 35%, #0000 36% 64%, rgba(255,255,255,.28) 65% 68%, #0000 69%),
    #8f372c;
}

.product-rebar::before,
.product-rebar-heavy::before {
  width: 72%;
  height: 18%;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #333d48 0 18px, #798796 18px 24px);
}

.product-tile::before,
.product-wall-tile::before {
  width: 58%;
  height: 58%;
  background:
    linear-gradient(90deg, #0000 48%, rgba(80, 91, 91, .22) 49% 51%, #0000 52%),
    linear-gradient(#0000 48%, rgba(80, 91, 91, .22) 49% 51%, #0000 52%),
    #f6f6f0;
}

.product-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-top: 16px;
}

.product-info h2 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 900;
}

.product-info strong {
  white-space: nowrap;
  color: #15314f;
  font-size: 1rem;
}

.product-id-badge,
.admin-product-id {
  direction: ltr;
  font-weight: 900;
  color: #15314f;
}

.readonly-field {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f6f6f6;
  color: #15314f;
  direction: ltr;
}

.product-id-badge {
  width: fit-content;
  margin: -4px 0 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: .94rem;
}

.product-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: .93rem;
}

.breadcrumb-line {
  max-width: 1260px;
  margin: 38px auto 18px;
  padding: 0 40px;
  display: flex;
  gap: 10px;
  color: var(--muted);
}

.breadcrumb-line a {
  color: var(--ink);
  font-weight: 800;
}

.product-detail {
  max-width: 1260px;
  margin: 0 auto 44px;
  padding: 22px 40px 0;
  display: grid;
  grid-template-columns: minmax(360px, 560px) minmax(0, 1fr);
  gap: 68px;
  align-items: center;
}

.detail-art {
  min-height: 520px;
}

.detail-copy {
  min-width: 0;
}

.product-gallery {
  max-width: 1260px;
  margin: -14px auto 42px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.product-gallery a {
  display: block;
  border: 1px solid var(--line);
  background: #f5f5f5;
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--steel);
  font-weight: 900;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  line-height: 1.16;
  font-weight: 900;
}

.detail-summary {
  margin: 0;
  max-width: none;
  color: #38404a;
  font-size: 1.12rem;
  line-height: 2;
}

.product-description-section {
  max-width: 1260px;
  margin: 0 auto 58px;
  padding: 0 40px 36px;
  border-bottom: 1px solid var(--line);
}

.product-description-section h2 {
  margin: 0 0 18px;
  font-size: 1.5rem;
  font-weight: 900;
}

.detail-price {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.detail-price span {
  font-size: 1.7rem;
  font-weight: 900;
}

.detail-price small {
  color: var(--muted);
}

.spec-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.spec-list span {
  padding: 10px 14px;
  border-radius: 999px;
  background: #f1f1f1;
  color: #1e344b;
  font-weight: 700;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  margin-top: 34px;
}

.variant-picker {
  width: 100%;
  display: grid;
  gap: 10px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
}

.variant-picker legend {
  margin-bottom: 4px;
  font-weight: 900;
}

.variant-picker label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  max-width: 460px;
  padding: 10px 12px;
  border: 1px solid #d9dde2;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.variant-picker input {
  accent-color: #000;
}

.variant-picker strong {
  white-space: nowrap;
}

.detail-actions .secondary-action {
  align-self: flex-start;
  flex: 0 0 auto;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
}

.primary-action {
  background: #000;
  color: #fff;
}

.secondary-action {
  border: 1px solid #000;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 22px 74px;
  color: var(--muted);
}

.admin-shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 42px 40px 80px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
}

.admin-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #b7d8c0;
  border-radius: 4px;
  background: #edf8f0;
  color: #235331;
  font-weight: 800;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.admin-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
}

.admin-table th {
  background: #f6f6f6;
  color: #27313d;
  font-weight: 900;
}

.admin-table td strong,
.admin-table td small {
  display: block;
}

.admin-table td small {
  margin-top: 4px;
  color: var(--muted);
  direction: ltr;
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 900;
}

.status-pill.active {
  background: #edf8f0;
  color: #235331;
}

.status-pill.inactive {
  background: #f1f1f1;
  color: #6a717a;
}

.small {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: .92rem;
}

button.primary-action,
button.secondary-action,
button.danger-action {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.danger-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  background: #9f1d1d;
  color: #fff;
  font-weight: 900;
}

.admin-form {
  display: grid;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: #26313d;
  font-weight: 900;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #bfc5cd;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-form textarea {
  resize: vertical;
  line-height: 1.8;
}

.wide-field {
  display: grid;
}

.variant-options-source {
  display: none;
}

.variant-builder {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.variant-builder-empty {
  display: flex;
}

.variant-builder-empty[hidden],
.variant-builder-panel[hidden] {
  display: none;
}

.variant-builder-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d9dde2;
  border-radius: 6px;
  background: #fff;
}

.variant-builder-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.variant-option-list {
  display: grid;
  gap: 10px;
}

.variant-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, .8fr) 40px;
  gap: 10px;
  align-items: end;
}

.variant-option-row .icon-button {
  align-self: end;
}

.image-manager {
  margin-top: 42px;
}

.image-manager h2 {
  margin: 0 0 18px;
  font-size: 1.4rem;
  font-weight: 900;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.image-grid figure {
  margin: 0;
  display: grid;
  gap: 10px;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
}

@media (max-width: 1400px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .catalog-shell {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .filters-panel {
    position: static;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -8px;
  }
}

@media (max-width: 720px) {
  .shop-hero {
    min-height: 520px;
    background:
      linear-gradient(
        90deg,
        rgba(255,255,255,0.98) 0%,
        rgba(255,255,255,0.95) 42%,
        rgba(255,255,255,0.82) 64%,
        rgba(255,255,255,0.12) 100%
      ),
      url("/images/construction-hero.png") center center / cover no-repeat;
  }

  .brand-mark {
    left: 22px;
    top: 18px;
    width: 82px;
    height: 82px;
  }

  .top-actions {
    right: 22px;
    top: 42px;
  }

  .hero-copy {
    left: 22px;
    top: 52%;
    width: calc(100% - 44px);
    max-width: 360px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-copy p {
    font-size: 15px;
    line-height: 1.8;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .hero-button {
    min-height: 44px;
    padding: 10px 16px;
  }

  .quote-desktop {
    display: none;
  }

  .quote-mobile {
    display: inline-flex;
  }

  .catalog-shell {
    padding: 24px 22px 54px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-detail {
    padding: 8px 22px 0;
    gap: 28px;
  }

  .detail-art {
    min-height: 0;
  }

  .breadcrumb-line {
    padding: 0 22px;
  }

  .product-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 auto 38px;
    padding: 0 22px;
  }

  .product-description-section {
    margin-bottom: 46px;
    padding: 0 22px 30px;
  }

  .site-footer {
    flex-direction: column;
    padding: 22px;
  }

  .admin-shell {
    padding: 28px 22px 56px;
  }

  .admin-header {
    display: grid;
  }

  .form-grid,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .variant-builder-head,
  .variant-option-row {
    grid-template-columns: 1fr;
  }

  .variant-option-row .icon-button {
    justify-self: start;
  }
}

/* Shared commerce shell */
.site-header {
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 34px;
  padding: 10px clamp(22px, 5vw, 74px);
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-brand img {
  width: 92px;
  height: 92px;
  display: block;
  object-fit: contain;
}

.header-brand span {
  display: grid;
  gap: 2px;
}

.header-brand strong {
  font-size: 1.08rem;
  font-weight: 900;
}

.header-brand small {
  color: var(--muted);
  white-space: nowrap;
  font-size: .78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-weight: 800;
}

.main-nav a,
.footer-links a {
  transition: color .18s ease;
}

.main-nav a:hover,
.footer-links a:hover {
  color: #b45309;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header-actions form {
  margin: 0;
}

.header-command {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #cfd3d8;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.header-command.strong {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.header-phone {
  color: #4b5563;
  font-size: .86rem;
}

.header-cart {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid #cfd3d8;
  border-radius: 4px;
}

.header-cart b {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b45309;
  color: #fff;
  font-size: .7rem;
}

.cart-glyph {
  width: 20px;
  height: 16px;
  display: inline-block;
  position: relative;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.cart-glyph::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 6px;
  top: -7px;
  right: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.site-notice {
  position: fixed;
  top: 94px;
  left: 50%;
  z-index: 60;
  transform: translateX(-50%);
  padding: 12px 18px;
  border: 1px solid #9bc7a8;
  border-radius: 4px;
  background: #eaf7ee;
  color: #174b27;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  font-weight: 800;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) 1fr 1fr;
  gap: 48px;
  padding: 46px clamp(22px, 5vw, 74px) 22px;
  border-top: 1px solid #343a40;
  background: #171a1f;
  color: #d9dde3;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.footer-brand img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #fff;
}

.footer-brand strong,
.footer-links strong,
.footer-contact strong {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
}

.footer-brand p {
  max-width: 420px;
  margin: 0;
  color: #aeb4bd;
  line-height: 1.9;
}

.footer-links,
.footer-contact {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-contact span,
.footer-links a {
  color: #aeb4bd;
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid #343a40;
  color: #8f97a3;
  font-size: .85rem;
}

/* Product cart controls */
.product-info {
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
}

.product-info > div {
  min-width: 0;
}

.product-info strong {
  display: block;
  margin-top: 5px;
}

.cart-add-button {
  width: 44px;
  height: 44px;
  display: block;
  position: relative;
  border: 0;
  border-radius: 4px;
  border: 1px solid #d5d9de;
  background: #fff url("/images/add-to-cart.png") center / 30px 30px no-repeat;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.cart-add-button:hover {
  border-color: #f15a24;
  background-color: #fff7ed;
  transform: translateY(-2px);
}

.cart-add-button::before {
  display: none;
}

.cart-add-button::after {
  display: none;
}

.add-cart-command {
  gap: 12px;
}

.add-cart-command img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.detail-actions form {
  width: min(100%, 460px);
  display: grid;
  gap: 10px;
  flex: 0 1 460px;
  margin: 0;
}

.detail-actions .add-cart-command {
  width: 100%;
}

/* Account */
.auth-shell {
  min-height: calc(100vh - 320px);
  display: grid;
  place-items: center;
  padding: 54px 22px 74px;
  background: #f4f5f6;
}

.auth-panel {
  width: min(100%, 480px);
  padding: 34px;
  border: 1px solid #d6d9dd;
  border-radius: 6px;
  background: #fff;
}

.auth-panel h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
}

.auth-panel > p:not(.eyebrow):not(.auth-switch) {
  margin: 12px 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

.auth-form,
.checkout-form {
  display: grid;
  gap: 18px;
}

.auth-form label,
.checkout-form label {
  display: grid;
  gap: 7px;
  color: #28323e;
  font-weight: 800;
}

.auth-form input:not([type="checkbox"]),
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #bfc5cd;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  font: inherit;
}

.check-field {
  grid-template-columns: 20px 1fr;
  align-items: center;
}

.check-field input {
  width: 18px;
  height: 18px;
}

.auth-form label > span:not(:empty),
.validation-summary {
  color: #a31d1d;
  font-size: .85rem;
}

.validation-summary ul {
  margin: 0 0 10px;
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  color: #9a4c05;
  font-weight: 900;
}

/* Cart and checkout */
.cart-shell,
.checkout-shell {
  max-width: 1320px;
  min-height: 62vh;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
}

.cart-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 40px;
  align-items: start;
}

.cart-lines {
  display: grid;
  gap: 14px;
}

.cart-line {
  display: grid;
  grid-template-columns: 116px minmax(180px, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d9dde2;
  border-radius: 6px;
  background: #fff;
}

.cart-thumb {
  width: 116px;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  position: relative;
  background: #d7d9dc;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line-copy h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 900;
}

.cart-line-copy p {
  margin: 6px 0;
  color: var(--muted);
}

.checkout-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .78rem;
}

.quantity-form {
  display: grid;
  grid-template-columns: 58px 40px;
  gap: 6px;
  align-items: center;
}

.quantity-form label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .8rem;
}

.quantity-form input {
  width: 58px;
  height: 40px;
  border: 1px solid #c5cad0;
  border-radius: 4px;
  text-align: center;
}

.icon-button {
  width: 40px;
  height: 40px;
  position: relative;
  border: 1px solid #c5cad0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.refresh-icon::before {
  content: "↻";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #26313d;
  font-size: 1.3rem;
}

.remove-icon::before,
.remove-icon::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 2px;
  top: 18px;
  right: 11px;
  background: #9f1d1d;
  transform: rotate(45deg);
}

.remove-icon::after {
  transform: rotate(-45deg);
}

.cart-line-total {
  min-width: 140px;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.cart-line-total span {
  color: var(--muted);
  font-size: .8rem;
}

.cart-summary {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid #cfd4d9;
  border-radius: 6px;
  background: #f6f7f8;
  position: sticky;
  top: 104px;
}

.cart-summary h2,
.checkout-form h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 900;
}

.cart-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.summary-total {
  padding-top: 16px;
  border-top: 1px solid #cfd4d9;
  font-size: 1.05rem;
}

.cart-summary .primary-action,
.cart-summary .secondary-action {
  width: 100%;
  border-radius: 4px;
}

.checkout-form {
  padding: 26px;
  border: 1px solid #d5d9de;
  border-radius: 6px;
}

.checkout-form textarea {
  resize: vertical;
}

.checkout-form label > span:not(:empty) {
  color: #9f1d1d;
  font-size: .84rem;
}

.checkout-form > .primary-action {
  justify-self: start;
  border: 0;
  border-radius: 4px;
}

.checkout-summary button[disabled] {
  border: 0;
  background: #777f89;
  cursor: not-allowed;
}

.payment-note {
  margin: 0;
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.7;
}

.order-result-shell {
  max-width: 860px;
  min-height: 65vh;
  margin: 0 auto;
  padding: 58px 40px 80px;
  text-align: center;
}

.order-result-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #1f7a3d;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 900;
}

.order-result-shell h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
}

.order-result-shell > p:not(.eyebrow) {
  color: var(--muted);
}

.order-result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0;
  border: 1px solid #d7dbe0;
  background: #d7dbe0;
}

.order-result-summary > div {
  display: grid;
  gap: 5px;
  padding: 18px;
  background: #fff;
}

.order-result-summary span {
  color: var(--muted);
  font-size: .84rem;
}

.payment-placeholder {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid #f0b56e;
  background: #fff8ed;
}

.payment-placeholder p {
  margin: 8px 0 18px;
  color: #6b5a43;
}

.payment-placeholder button[disabled] {
  border: 0;
  background: #777f89;
  cursor: not-allowed;
}

.order-status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 4px;
  background: #fff1dc;
  color: #8a4a06;
  font-size: .82rem;
  font-weight: 900;
}

.admin-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.admin-order-layout > div {
  display: grid;
  gap: 22px;
}

.order-admin-section,
.order-admin-side {
  padding: 22px;
  border: 1px solid #d5d9de;
  border-radius: 6px;
  background: #fff;
}

.order-admin-section h2,
.order-admin-side h2 {
  margin: 0 0 18px;
  font-size: 1.25rem;
  font-weight: 900;
}

.admin-order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #e2e5e8;
}

.admin-order-line div {
  display: grid;
  gap: 4px;
}

.admin-order-line small {
  color: var(--muted);
}

.admin-order-total {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  font-size: 1.1rem;
}

.order-data-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 20px;
  margin: 0;
}

.order-data-list dt {
  color: var(--muted);
}

.order-data-list dd {
  margin: 0;
  line-height: 1.8;
}

.order-admin-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 132px;
}

.order-admin-side form {
  display: grid;
  gap: 10px;
}

.order-admin-side select {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #bcc2c9;
  border-radius: 4px;
  background: #fff;
  font: inherit;
}

.order-admin-side form .primary-action {
  width: 100%;
  border: 0;
  border-radius: 4px;
}

.order-admin-side > div {
  display: grid;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid #e0e3e7;
}

.order-admin-side > div span {
  color: var(--muted);
  font-size: .83rem;
}

.empty-state {
  max-width: 680px;
  margin: 50px auto;
  padding: 46px 24px;
  text-align: center;
}

.empty-state h1,
.empty-state h2 {
  margin: 0 0 12px;
  font-weight: 900;
}

.empty-state p {
  margin-bottom: 24px;
  color: var(--muted);
}

/* Product comments */
.comments-section {
  max-width: 1260px;
  margin: 0 auto 80px;
  padding: 0 40px;
}

.comments-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.comments-heading h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 900;
}

.comments-heading h2 span {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  margin-right: 8px;
  border-radius: 50%;
  background: #eceff2;
  color: #4b5563;
  font-size: .85rem;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid #d4d8dd;
  border-radius: 6px;
  background: #f7f8f9;
}

.comment-form label {
  color: #27313c;
  font-weight: 900;
}

.comment-form textarea {
  width: 100%;
  min-height: 116px;
  padding: 12px 14px;
  border: 1px solid #bfc5cc;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  font: inherit;
  line-height: 1.8;
  resize: vertical;
}

.comment-form > span:not(:empty) {
  color: #9f1d1d;
  font-size: .85rem;
}

.comment-form .primary-action {
  justify-self: start;
  border-radius: 4px;
}

.comment-login-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid #d4d8dd;
  background: #f7f8f9;
}

.comment-login-prompt p {
  margin: 0 auto 0 0;
  color: var(--muted);
}

.comment-login-prompt .primary-action,
.comment-login-prompt .secondary-action {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 4px;
}

.comment-list {
  display: grid;
  gap: 12px;
}

.comment-item {
  padding: 20px;
  border: 1px solid #d9dde2;
  border-radius: 6px;
  background: #fff;
}

.comment-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.comment-item header strong {
  color: #26313d;
  font-weight: 900;
}

.comment-item time {
  color: #77808b;
  font-size: .82rem;
}

.comment-item p {
  margin: 14px 0 0;
  color: #333d48;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-item form {
  margin-top: 14px;
}

.comments-empty {
  margin: 0;
  padding: 26px 20px;
  border: 1px dashed #c8cdd3;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 10px 20px;
  }

  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }

  .cart-line {
    grid-template-columns: 100px minmax(0, 1fr) auto;
  }

  .cart-thumb {
    width: 100px;
  }

  .cart-line-total {
    grid-column: 2 / -1;
    grid-row: 2;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-items: start;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .admin-order-layout {
    grid-template-columns: 1fr;
  }

  .order-admin-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    padding: 10px 16px;
  }

  .header-brand small,
  .header-phone {
    display: none;
  }

  .header-brand img {
    width: 68px;
    height: 68px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-command {
    min-height: 38px;
    padding: 7px 10px;
    font-size: .82rem;
  }

  .site-notice {
    top: 16px;
    width: calc(100% - 32px);
    text-align: center;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    display: grid;
  }

  .cart-shell,
  .checkout-shell {
    padding: 32px 18px 56px;
  }

  .cart-line {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
  }

  .cart-thumb {
    width: 80px;
  }

  .quantity-form {
    grid-column: 1 / 2;
  }

  .cart-line-total {
    grid-column: 2 / 3;
    grid-row: 2;
    min-width: 0;
  }

  .auth-panel,
  .checkout-form {
    padding: 22px;
  }

  .comments-section {
    padding: 0 18px;
  }

  .comment-login-prompt {
    flex-wrap: wrap;
  }

  .comment-login-prompt p {
    flex-basis: 100%;
    margin-bottom: 6px;
  }

  .comment-item header {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .order-result-shell {
    padding: 40px 18px 60px;
  }

  .order-result-summary {
    grid-template-columns: 1fr;
  }

  .admin-order-line {
    grid-template-columns: 1fr 1fr;
  }

  .order-data-list {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .order-data-list dd {
    margin-bottom: 10px;
  }
}
.field-caption {
    display: block;
    color: #26313d;
    font-weight: 900;
}

.bridge-editor-host {
    display: grid;
    gap: 8px;
}

.detail-summary :where(p, ul, ol) {
    margin-bottom: 1rem;
}

.expandable-description {
  position: relative;
}

.description-collapsible {
  position: relative;
}

.expandable-description.is-collapsible:not(.is-expanded) .description-collapsible {
  max-height: 6em;
  overflow: hidden;
}

.expandable-description.is-collapsible:not(.is-expanded) .description-collapsible::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2.4em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 88%);
  pointer-events: none;
}

.description-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  padding: 8px 18px;
  border: 1px solid #cfd7e2;
  border-radius: 10px;
  background: #f5f8fc;
  color: #2456a6;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.description-toggle[hidden] {
  display: none;
}

.description-toggle:hover {
  border-color: #2864dc;
  background: #edf4ff;
  color: #1d55c1;
}

.description-toggle-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}

.expandable-description.is-expanded .description-toggle-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

/* Product detail sections and comparison */
.field-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.8;
}

.product-detail {
  align-items: start;
}

.detail-copy {
  padding: 28px;
  border: 1px solid #e2e5e9;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(20, 32, 48, .06);
}

.detail-actions .compare-toggle {
  gap: 9px;
  border-color: #cbd2da;
  background: #fff;
  color: #26394e;
  font: inherit;
  cursor: pointer;
}

.compare-icon {
  position: relative;
  width: 22px;
  height: 19px;
  display: inline-block;
  flex: 0 0 22px;
}

.compare-icon::before,
.compare-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  width: 20px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.compare-icon::before {
  top: 0;
}

.compare-icon::after {
  bottom: 0;
}

.product-section-divider {
  width: min(calc(100% - 80px), 1180px);
  height: 1px;
  margin: 6px auto 20px;
  background: linear-gradient(90deg, transparent, #c9d1da 18%, #c9d1da 82%, transparent);
  text-align: center;
}

.product-section-divider span {
  position: relative;
  top: -4px;
  display: inline-block;
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: #d97706;
  box-shadow: 0 0 0 6px #fff;
}

.product-section-nav {
  position: sticky;
  top: 122px;
  z-index: 20;
  width: min(calc(100% - 80px), 1180px);
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 6px;
  margin: 0 auto 24px;
  padding: 9px;
  overflow-x: auto;
  border: 1px solid #e1e5ea;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(24, 39, 75, .08);
  backdrop-filter: blur(12px);
}

.product-section-nav a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: #edf3fb;
  color: #26394e;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.product-section-nav a:hover,
.product-section-nav a.active {
  background: #2864dc;
  color: #fff;
  transform: translateY(-1px);
}

.product-content-stack {
  width: min(calc(100% - 80px), 1180px);
  display: grid;
  gap: 22px;
  margin: 0 auto 80px;
}

.product-content-panel {
  scroll-margin-top: 205px;
  padding: 28px;
  border: 1px solid #e1e5ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(24, 39, 75, .05);
}

.product-content-panel > h2,
.product-content-panel .comments-heading h2 {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 14px;
  color: #17263a;
  font-size: 1.55rem;
  font-weight: 900;
}

.product-content-panel > h2::after,
.product-content-panel .comments-heading h2::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 76px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706, #f4b04d);
}

.product-spec-grid {
  display: grid;
  grid-template-columns: minmax(150px, .38fr) minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.product-spec-grid dt,
.product-spec-grid dd {
  min-width: 0;
  margin: 0;
  padding: 13px 16px;
  border-radius: 10px;
  line-height: 1.8;
}

.product-spec-grid dt {
  background: #e9edf2;
  color: #27384c;
  font-weight: 800;
}

.product-spec-grid dd {
  background: #f6f8fa;
  color: #3f4c5c;
}

.product-review-text,
.product-content-empty {
  margin: 0;
  color: #3d4a59;
  font-size: 1.05rem;
  line-height: 2.15;
}

.product-review-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.product-content-stack .comments-section {
  max-width: none;
  margin: 0;
  padding: 28px;
}

.product-content-stack .comments-heading {
  margin-bottom: 22px;
}

.product-compare-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid #d5dae0;
  border-radius: 8px;
  background: #fff;
  color: #30445b;
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.product-card-commands {
  width: 95px;
  min-width: 95px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-info {
  grid-template-columns: minmax(0, 1fr) 95px;
}

.product-card-commands form {
  margin: 0;
}

.product-compare-icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  padding: 0;
  border: 1px solid #d5d9de;
  border-radius: 4px;
  background: #fff;
  color: #2864dc;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.product-compare-icon-button .compare-icon {
  width: 20px;
  height: 18px;
  flex-basis: 20px;
}

.product-compare-icon-button .compare-icon::before,
.product-compare-icon-button .compare-icon::after {
  width: 18px;
  height: 6px;
}

.product-compare-icon-button:hover,
.product-compare-icon-button.is-selected {
  border-color: #2864dc;
  background: #edf4ff;
  color: #1d55c1;
}

.product-compare-icon-button:hover {
  transform: translateY(-2px);
}

.product-compare-icon-button.is-selected:not(:hover) {
  transform: none;
}

.detail-copy .detail-product-name {
  margin: 0 0 10px;
  color: #27394d;
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 900;
}

.detail-copy .product-id-badge {
  margin: 0 0 14px;
}

.detail-short-summary {
  margin: 0;
  color: #4d5968;
  font-size: 1rem;
  line-height: 2;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.detail-short-summary + .detail-price {
  margin-top: 18px;
}

.compare-toggle.is-selected,
.product-compare-button:hover {
  border-color: #2864dc;
  background: #edf4ff;
  color: #1d55c1;
}

.header-compare {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid #cfd3d8;
  border-radius: 4px;
  color: #26394e;
  font-size: .88rem;
  font-weight: 800;
}

.header-compare .compare-icon {
  width: 19px;
  height: 17px;
  flex-basis: 19px;
}

.header-compare .compare-icon::before,
.header-compare .compare-icon::after {
  width: 17px;
  height: 6px;
}

.header-compare b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #2864dc;
  color: #fff;
  font-size: .72rem;
}

.compare-dock {
  position: fixed;
  right: 50%;
  bottom: 22px;
  z-index: 80;
  width: min(calc(100% - 32px), 540px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d8dee6;
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 16px 50px rgba(13, 30, 53, .2);
  transform: translateX(50%);
  backdrop-filter: blur(12px);
}

.compare-dock[hidden] {
  display: none;
}

.compare-dock > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2864dc;
}

.compare-dock p,
.compare-dock strong,
.compare-dock small {
  display: block;
  margin: 0;
}

.compare-dock p {
  min-width: 0;
}

.compare-dock strong {
  color: #17263a;
  font-size: .9rem;
}

.compare-dock small {
  color: var(--muted);
  font-size: .72rem;
}

.compare-dock .primary-action {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 10px;
  background: #2864dc;
  font-size: .85rem;
}

.compare-dock > button {
  border: 0;
  background: transparent;
  color: #788391;
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}

.compare-page {
  width: min(calc(100% - 80px), 1260px);
  min-height: 60vh;
  margin: 0 auto;
  padding: 48px 0 86px;
}

.compare-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.compare-page-heading h1 {
  margin: 0;
  color: #17263a;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 900;
}

.compare-page-heading > div > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

.compare-picker-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid #dde2e8;
  border-radius: 18px;
  background: #f7f9fb;
}

.compare-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.compare-picker-grid label {
  display: grid;
  gap: 7px;
  color: #34465a;
  font-size: .82rem;
  font-weight: 800;
}

.compare-product-picker {
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  background: #fff;
  color: #17263a;
  font: inherit;
}

.compare-apply {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: #2864dc;
  font: inherit;
  cursor: pointer;
}

.compare-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 40px 20px;
  border: 1px dashed #cbd3dd;
  border-radius: 20px;
  background: #fbfcfd;
  text-align: center;
}

.compare-empty-icon {
  width: 70px;
  height: 56px;
  position: relative;
  color: #2864dc;
}

.compare-empty-icon::before,
.compare-empty-icon::after {
  content: "";
  position: absolute;
  right: 5px;
  left: 5px;
  height: 20px;
  border: 4px solid currentColor;
  border-radius: 6px;
}

.compare-empty-icon::before { top: 3px; }
.compare-empty-icon::after { bottom: 3px; }

.compare-empty h2,
.compare-empty p {
  margin: 0;
}

.compare-empty h2 {
  color: #17263a;
  font-size: 1.35rem;
  font-weight: 900;
}

.compare-empty p,
.compare-hint {
  color: var(--muted);
}

.compare-hint {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff7e8;
}

.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid #dde2e8;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(24, 39, 75, .06);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.compare-table th,
.compare-table td {
  padding: 16px;
  border-bottom: 1px solid #e6e9ed;
  border-left: 1px solid #eef0f3;
  color: #3a4858;
  line-height: 1.8;
  text-align: right;
  vertical-align: middle;
}

.compare-table tr:last-child > * {
  border-bottom: 0;
}

.compare-table tr > *:last-child {
  border-left: 0;
}

.compare-table thead th {
  position: relative;
  padding-top: 22px;
  background: #f7f9fb;
  color: #17263a;
  text-align: center;
}

.compare-table thead th:first-child,
.compare-table tbody th {
  width: 170px;
  background: #f0f3f6;
  color: #26394e;
  font-weight: 900;
}

.compare-table thead a {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.compare-product-image {
  width: min(100%, 190px);
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

.compare-product-image::before,
.compare-product-image::after {
  z-index: 0;
}

.compare-product-image img {
  z-index: 1;
}

.compare-remove {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border: 1px solid #d5dae0;
  border-radius: 50%;
  background: #fff;
  color: #a33b3b;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.compare-price {
  color: #1d55c1 !important;
  font-weight: 900;
  white-space: nowrap;
}

.compare-actions-row .primary-action {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 9px;
  background: #2864dc;
  font-size: .82rem;
}

@media (max-width: 980px) {
  .product-section-nav {
    top: 116px;
  }

  .compare-picker-panel {
    grid-template-columns: 1fr;
  }

  .compare-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-apply {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .detail-copy {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .product-section-divider,
  .product-section-nav,
  .product-content-stack,
  .compare-page {
    width: min(calc(100% - 36px), 1180px);
  }

  .product-section-nav {
    position: static;
    display: flex;
    padding: 7px;
    border-radius: 14px;
  }

  .product-section-nav a {
    min-height: 43px;
    padding: 8px 14px;
    font-size: .86rem;
  }

  .product-content-panel,
  .product-content-stack .comments-section {
    padding: 21px 17px;
    border-radius: 16px;
  }

  .product-content-panel {
    scroll-margin-top: 18px;
  }

  .product-spec-grid {
    grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr);
  }

  .product-spec-grid dt,
  .product-spec-grid dd {
    padding: 11px 10px;
    font-size: .88rem;
  }

  .compare-page {
    padding: 30px 0 70px;
  }

  .compare-page-heading {
    display: grid;
  }

  .compare-picker-grid {
    grid-template-columns: 1fr;
  }

  .compare-dock {
    bottom: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
  }

  .compare-dock > button {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .header-compare > span:not(.compare-icon) {
    display: none;
  }

  .header-compare {
    min-height: 38px;
    padding: 7px 9px;
  }
}
