:root {
  --faq-scroll-offset: 80px;
  --product-anchor-offset: 140px;
}

/* --------------------------------
   Base
--------------------------------- */

body {
  background: #f7fbf8;
}

html {
  scroll-padding-top: var(--faq-scroll-offset);
}

.faq-section {
  scroll-margin-top: var(--faq-scroll-offset);
}

.legacy-product-shell {
  padding: 14px 0 22px;
}

.legacy-frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.legacy-body {
  padding: 18px;
  color: #2c4339;
  line-height: 1.7;
  font-size: 0.95rem;
}

.legacy-body img {
  max-width: 100%;
  height: auto;
}

.legacy-bridge-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #d7e5dc;
  border-radius: 16px;
  background: #fbfdfc;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.7;
}

/* --------------------------------
   Hero
--------------------------------- */

.product-hero-soft {
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcfa 100%);
  border-bottom: 1px solid var(--line);
}

.product-hero-soft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: center;
}

.product-hero-copy .eyebrow {
  margin: 0 0 8px;
}

.product-hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.42rem, 2.5vw, 1.9rem);
  line-height: 1.4;
  color: var(--green-900);
}

.product-subcopy {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.product-subcopy + .product-subcopy {
  margin-top: 6px;
}

.product-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.product-hero-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--green-700);
  border-radius: 12px;
  background: #ffffff;
  color: var(--green-800);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 90, 67, 0.08);
}

.product-hero-links a:hover {
  background: #f4fbf7;
}

.product-hero-visual-soft {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.product-hero-visual-soft.is-single,
.product-hero-visual-soft:has(.visual-item:only-child) {
  grid-template-columns: auto;
  justify-self: center;
  justify-content: center;
  width: fit-content;
  max-width: 180px;
}

.product-hero-visual-soft .visual-item {
  text-align: center;
}

.product-hero-visual-soft img {
  width: 100%;
  max-width: 92px;
  height: auto;
  display: block;
  margin: 0 auto 6px;
  object-fit: contain;
}

.product-hero-visual-soft span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* --------------------------------
   Generic content cards
--------------------------------- */

.legacy-content-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.legacy-content-card + .legacy-content-card {
  margin-top: 18px;
}

.legacy-heading-band {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #d7e5dc;
  border-radius: 16px;
  background: linear-gradient(180deg, #f4fbf7 0%, #eef8f2 100%);
  text-align: center;
}

.legacy-heading-band h2,
.legacy-heading-band h3 {
  margin: 0;
}

.legacy-heading-band h3 {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.6;
  font-weight: 700;
}

.legacy-product-image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 0 0 16px;
  align-items: start;
}

.legacy-product-image-card {
  text-align: center;
}

.legacy-product-image-card img {
  display: block;
  margin: 0 auto 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px;
}

.legacy-product-image-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.legacy-alert {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #f2d3c2;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf7 0%, #fff3ec 100%);
  box-shadow: var(--shadow);
}

/* --------------------------------
   Info table
--------------------------------- */

.legacy-info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
}

.legacy-info-table th,
.legacy-info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.legacy-info-table th {
  width: 98px;
  text-align: left;
  color: var(--green-900);
  font-weight: 800;
  white-space: nowrap;
}

/* --------------------------------
   Order table
--------------------------------- */

.legacy-order-table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 18px;
  border: 1px solid #b9d8c8;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 0 0 1px #b9d8c8;
}

.legacy-order-table th,
.legacy-order-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #dbe9e1;
  border-right: 1px solid #dbe9e1;
  font-size: 0.93rem;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  background: #ffffff;
}

.legacy-order-table th:last-child,
.legacy-order-table td:last-child {
  border-right: 0;
}

.legacy-order-table thead th {
  background: #eef8f2;
  color: var(--green-900);
  font-weight: 800;
}

.legacy-order-table .price {
  white-space: normal;
  font-weight: 800;
  color: var(--green-900);
}

.legacy-order-table th:nth-child(2),
.legacy-order-table td:nth-child(2) {
  width: 96px;
  white-space: nowrap;
}

.legacy-order-table th:last-child {
  width: 138px;
}

.legacy-order-table .order-cell {
  width: 138px;
  min-width: 0;
  text-align: center;
}

.product-order-block {
  margin-top: 18px;
  scroll-margin-top: var(--product-anchor-offset);
}

.legacy-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  min-width: 0;
  padding: 0 clamp(10px, 2vw, 16px);
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(242, 106, 33, 0.24);
}

.legacy-cart-btn img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.legacy-cart-btn:disabled,
.legacy-cart-btn.is-disabled {
  background: #b8c0bc;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.88;
}

.out-of-stock {
  color: #d71920;
  font-weight: 900;
}

.product-inquiry-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 18px;
}

.product-inquiry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--green-700);
  border-radius: 12px;
  background: #f4fbf7;
  color: var(--green-800);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 90, 67, 0.08);
}

.product-inquiry-btn img {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

.product-inquiry-btn:hover {
  background: #eef8f2;
}

/* --------------------------------
   Review
--------------------------------- */

.legacy-review-box h2 {
  margin-bottom: 10px;
}

.legacy-inline-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* --------------------------------
   Stacked multi-product template
--------------------------------- */

.page-breadcrumb {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.page-breadcrumb a {
  color: var(--green-800);
  text-decoration: none;
}

.product-section-stack {
  display: grid;
  gap: 22px;
}

.product-detail-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
  box-shadow: var(--shadow);
  scroll-margin-top: var(--product-anchor-offset);
}

.legacy-anchor-alias {
  display: block;
  position: relative;
  top: calc(-1 * var(--product-anchor-offset));
  visibility: hidden;
  height: 0;
  pointer-events: none;
}

.product-detail-image,
.product-detail-image-pair {
  text-align: center;
  margin-bottom: 14px;
}

.product-detail-image img,
.product-detail-image-pair img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 220px;
  width: 100%;
  height: auto;
}

.product-detail-image p,
.product-detail-image-pair p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: center;
}

.product-detail-image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.product-detail-image-pair .pair-item {
  text-align: center;
}

.product-detail-lead {
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.product-detail-note {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #f2d3c2;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf7 0%, #fff3ec 100%);
  color: var(--muted);
  line-height: 1.75;
}

.product-detail-note strong {
  color: #a04a1c;
}

.page-disclaimer {
  padding: 14px;
  border: 1px solid #e6d8c7;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8, #fff8f0);
  color: var(--muted);
  line-height: 1.8;
}

.page-disclaimer h2 {
  margin-top: 0;
}

.page-faq-grid {
  display: grid;
  gap: 10px;
}

.page-faq-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.page-faq-item h3 {
  margin: 0 0 8px;
  color: var(--green-900);
  font-size: 1rem;
  line-height: 1.5;
}

.page-faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

/* --------------------------------
   Responsive
--------------------------------- */

@media (max-width: 900px) {
  .product-hero-soft-grid {
    grid-template-columns: 1fr;
  }

  .product-hero-visual-soft {
    display: none;
  }
}

@media (max-width: 760px) {
  .legacy-frame,
  .legacy-content-card,
  .product-detail-section {
    border-radius: 18px;
  }

  .product-hero-soft,
  .legacy-body,
  .product-detail-section {
    padding: 14px;
  }

  .product-hero-links {
    flex-direction: column;
    gap: 8px;
  }

  .product-hero-links a {
    width: 100%;
  }

  .product-inquiry-actions {
    justify-content: stretch;
  }

  .product-inquiry-btn {
    width: 100%;
  }

  .legacy-product-image-row,
  .product-detail-image-pair {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .legacy-info-table,
  .legacy-info-table tbody,
  .legacy-info-table tr,
  .legacy-info-table th,
  .legacy-info-table td {
    display: block;
    width: 100%;
  }

  .legacy-info-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .legacy-order-table {
    table-layout: auto;
  }

  .legacy-order-table th,
  .legacy-order-table td {
    padding: 9px 8px;
    font-size: 0.86rem;
  }

  .legacy-order-table th:last-child,
  .legacy-order-table .order-cell {
    width: 112px;
  }

  .legacy-cart-btn {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.78rem;
  }

  .legacy-cart-btn img {
    display: none;
  }
}

.legacy-info-table th,
.legacy-info-table td {
  padding: 6px 10px;
  line-height: 1.45;
}

.legacy-info-table {
  margin: 6px 0 12px;
}

.bundle-offer-block {
  margin: 22px 0;
}

.bundle-offer-notes {
  margin: 0;
  padding-left: 1.2em;
}

.bundle-offer-notes li + li {
  margin-top: 6px;
}

.bundle-order-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bundle-order-product img {
  display: block;
  width: 56px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  box-shadow: var(--shadow);
}

.bundle-order-product strong {
  color: var(--green-900);
}

.bundle-order-product span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.bundle-order-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bundle-order-form select {
  min-width: 64px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #bfd7ca;
  border-radius: 10px;
  background: #fff;
  color: var(--green-900);
  font-size: 0.95rem;
}

.bundle-stock-out {
  color: #c44d1a;
  font-weight: 700;
}

@media (max-width: 760px) {
  .bundle-order-product {
    align-items: flex-start;
  }

  .bundle-order-product img {
    width: 48px;
  }

  .bundle-order-form {
    flex-direction: column;
  }

  .bundle-order-form select,
  .bundle-order-form .legacy-cart-btn {
    width: 100%;
  }
}

/* --------------------------------
   Stock notice card
--------------------------------- */

.stock-notice-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #f2d3c2;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffaf7 0%, #fff3ec 100%);
  box-shadow: var(--shadow);
}

.stock-notice-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.stock-notice-icon img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
}

.stock-notice-body {
  min-width: 0;
}

.stock-notice-title {
  margin: 0 0 4px;
  color: var(--green-900);
  font-weight: 800;
  line-height: 1.45;
}

.stock-notice-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.stock-notice-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(242, 106, 33, 0.22);
}

.stock-notice-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(242, 106, 33, 0.26);
}

@media (max-width: 760px) {
  .stock-notice-card {
    grid-template-columns: auto 1fr;
  }

  .stock-notice-link {
    grid-column: 1 / -1;
    width: 100%;
  }
}
