.ft-products {
  display: grid;
  gap: 24px;
  margin: 1.8em 0;
}

/* ========== Card frame ========== */
.ft-product-link-box {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 24px;
  box-sizing: border-box;
}

/* ========== Summary (thumb + info) ========== */
.ft-product-summary {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

.ft-product-thumb-link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  text-decoration: none;
  color: inherit;
}
.ft-product-thumb-link:hover .ft-product-thumb {
  opacity: 0.92;
}

.ft-product-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.25;
  object-fit: contain;
  border-radius: 14px;
  background: #f8fafc;
  transition: opacity 0.18s ease;
}
.ft-product-thumb.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ft-product-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ft-product-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.45;
  color: #0f172a;
  word-break: break-word;
}
.ft-product-title a {
  color: inherit;
  text-decoration: none;
}
.ft-product-title a:hover {
  color: #dc2626;
  text-decoration: underline;
}

.ft-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ft-product-tags span {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
}

.ft-product-msrp {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 14px;
  background: #fff1f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 14px;
  color: #b91c1c;
  font-weight: 600;
}
.ft-product-msrp strong {
  margin: 0 2px;
  font-size: 18px;
  font-weight: 800;
  color: #dc2626;
}

.ft-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: #475569;
}

/* ========== Best summary banner ========== */
.ft-best-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 4px;
  padding: 14px 16px;
  background: #fff1f2;
  border: 1px solid #fca5a5;
  border-radius: 12px;
}
.ft-best-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #dc2626;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.ft-best-shop-name {
  font-weight: 800;
  color: #b91c1c;
  font-size: 15px;
}
.ft-best-total {
  font-weight: 800;
  font-size: 20px;
  color: #dc2626;
  margin-left: auto;
}
.ft-best-saving {
  width: 100%;
  font-size: 13px;
  color: #b91c1c;
  font-weight: 700;
}

/* ========== Shop sort toolbar ========== */
.ft-shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 8px;
}
.ft-shop-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ft-shop-toolbar__label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-right: 4px;
}
.ft-shop-sort,
.ft-shop-cols {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ft-shop-sort:hover,
.ft-shop-cols:hover {
  background: #f1f5f9;
}
.ft-shop-sort.is-active,
.ft-shop-cols.is-active {
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

/* ========== Shop status note ========== */
.ft-shop-status-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 14px;
  padding: 12px 15px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.6;
  box-sizing: border-box;
}
.ft-shop-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fb923c;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}
.ft-shop-status-text strong {
  color: #ea580c;
  font-weight: 900;
}

/* ========== Shop comparison grid ========== */
.ft-shop-list {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}
.ft-shop-list.is-cols-1 {
  grid-template-columns: 1fr;
}
.ft-shop-list.is-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ft-shop-list.is-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ========== Shop card ========== */
.ft-product-link-box .ft-shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 170px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.045);
  box-sizing: border-box;
  overflow: hidden;
}
.ft-product-link-box .ft-shop-card.is-best {
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 70%);
  border-color: #fca5a5;
}
.ft-shop-card.is-hidden {
  display: none;
}

.ft-shop-card-header {
  margin-bottom: 7px;
  min-width: 0;
}
.ft-shop-name-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}
.ft-product-link-box .ft-shop-card .ft-shop-name {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.22;
  word-break: keep-all;
  overflow-wrap: anywhere;
  min-width: 0;
}

.ft-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.ft-badge-best {
  background: #dc2626;
  color: #ffffff;
}
.ft-badge-discount {
  background: #fee2e2;
  color: #dc2626;
}

/* ========== Price block ========== */
.ft-shop-price-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 0 8px;
  text-align: center;
  min-width: 0;
}
.ft-sale-price-line,
.ft-total-price-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}
.ft-shop-price-block .ft-price-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0;
}
.ft-sale-price {
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.ft-price-divider {
  width: 100%;
  height: 1px;
  margin: 5px 0;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}
.ft-total-price {
  color: #dc2626;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.ft-shipping-note {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

/* Price unknown */
.ft-shop-price-block.is-unknown {
  min-height: 58px;
  padding: 7px 0;
  justify-content: center;
}
.ft-unknown-price {
  display: block;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}
.ft-unknown-note {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

/* ========== Shop button ========== */
.ft-product-link-box .ft-shop-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 36px;
  margin-top: auto;
  padding: 0 10px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff !important;
  border: 0;
  border-radius: 10px;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 5px 12px rgba(220, 38, 38, 0.14);
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.ft-product-link-box .ft-shop-button:hover {
  color: #ffffff !important;
  opacity: 0.92;
  text-decoration: none !important;
  transform: translateY(-1px);
}
.ft-shop-button-arrow {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
.ft-product-link-box .ft-shop-card.is-search-only {
  min-height: 112px;
}
.ft-product-link-box .ft-shop-card.is-search-only .ft-shop-card-header {
  margin-bottom: 10px;
}
.ft-product-link-box .ft-shop-button.is-disabled {
  background: #e5e7eb;
  color: #9ca3af !important;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

/* ========== Expand button (compact mode) ========== */
.ft-shop-expand {
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  background: #f1f5f9;
  color: #1f2937;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.ft-shop-expand:hover {
  background: #e2e8f0;
}

/* ========== Footer note ========== */
.ft-shop-note {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: #94a3b8;
}

/* ========== Errors ========== */
.ft-error,
.ftl-error {
  margin: 1em 0;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 14px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .ft-shop-list.is-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ft-product-link-box {
    padding: 16px;
    border-radius: 16px;
  }
  .ft-product-summary {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ft-product-thumb-link {
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
  }
  .ft-product-thumb {
    aspect-ratio: 1 / 1.1;
  }
  .ft-product-title {
    font-size: 19px;
  }
  .ft-best-total {
    margin-left: 0;
    font-size: 18px;
  }

  /* Mobile keeps the column toggle visible (1列 / 2列). 3列 falls back to 2 cols → hide its button. */
  .ft-shop-cols.ft-shop-cols--3 {
    display: none;
  }
  .ft-shop-list.is-cols-1 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ft-shop-list.is-cols-2,
  .ft-shop-list.is-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* 1-col cards on mobile: roomy layout */
  .ft-product-link-box .ft-shop-card {
    min-height: auto;
    padding: 10px 11px;
    border-radius: 12px;
  }
  .ft-product-link-box .ft-shop-card .ft-shop-name {
    font-size: 16px;
  }
  .ft-sale-price {
    font-size: 20px;
  }
  .ft-total-price {
    font-size: 22px;
  }
  .ft-product-link-box .ft-shop-button {
    min-height: 36px;
    font-size: 13px;
  }

  /* 2-col cards on mobile: tighter density */
  .ft-shop-list.is-cols-2 .ft-shop-card,
  .ft-shop-list.is-cols-3 .ft-shop-card {
    padding: 9px 10px;
    border-radius: 11px;
  }
  .ft-shop-list.is-cols-2 .ft-shop-card .ft-shop-card-header,
  .ft-shop-list.is-cols-3 .ft-shop-card .ft-shop-card-header {
    margin-bottom: 6px;
  }
  .ft-shop-list.is-cols-2 .ft-shop-card .ft-shop-name,
  .ft-shop-list.is-cols-3 .ft-shop-card .ft-shop-name {
    font-size: 14px;
  }
  .ft-shop-list.is-cols-2 .ft-badge,
  .ft-shop-list.is-cols-3 .ft-badge {
    padding: 2px 7px;
    font-size: 10px;
  }
  .ft-shop-list.is-cols-2 .ft-shop-price-block,
  .ft-shop-list.is-cols-3 .ft-shop-price-block {
    padding: 1px 0 6px;
  }
  .ft-shop-list.is-cols-2 .ft-shop-price-block .ft-price-label,
  .ft-shop-list.is-cols-3 .ft-shop-price-block .ft-price-label {
    font-size: 11px;
  }
  .ft-shop-list.is-cols-2 .ft-sale-price,
  .ft-shop-list.is-cols-3 .ft-sale-price {
    font-size: 17px;
  }
  .ft-shop-list.is-cols-2 .ft-total-price,
  .ft-shop-list.is-cols-3 .ft-total-price {
    font-size: 19px;
  }
  .ft-shop-list.is-cols-2 .ft-price-divider,
  .ft-shop-list.is-cols-3 .ft-price-divider {
    margin: 6px 0;
  }
  .ft-shop-list.is-cols-2 .ft-shipping-note,
  .ft-shop-list.is-cols-3 .ft-shipping-note {
    font-size: 11px;
    margin-top: 2px;
  }
  .ft-shop-list.is-cols-2 .ft-unknown-price,
  .ft-shop-list.is-cols-3 .ft-unknown-price {
    font-size: 15px;
  }
  .ft-shop-list.is-cols-2 .ft-unknown-note,
  .ft-shop-list.is-cols-3 .ft-unknown-note {
    font-size: 11px;
  }
  .ft-shop-list.is-cols-2 .ft-shop-price-block.is-unknown,
  .ft-shop-list.is-cols-3 .ft-shop-price-block.is-unknown {
    min-height: 50px;
    padding: 6px 0;
  }
  .ft-product-link-box .ft-shop-list.is-cols-2 .ft-shop-button,
  .ft-product-link-box .ft-shop-list.is-cols-3 .ft-shop-button {
    min-height: 34px;
    font-size: 12px;
    padding: 0 8px;
    gap: 4px;
    border-radius: 9px;
  }
  .ft-shop-list.is-cols-2 .ft-shop-button-arrow,
  .ft-shop-list.is-cols-3 .ft-shop-button-arrow {
    font-size: 15px;
  }

  .ft-shop-status-note {
    align-items: flex-start;
    padding: 11px 13px;
    font-size: 13px;
  }
}

/* ========== Recommend grid (lightweight multi-product layout) ========== */
.ft-recommend-box {
  margin: 32px 0;
}

.ft-recommend-heading {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.4;
  color: #111827;
}

.ft-recommend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.ft-recommend-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
  overflow: hidden;
}

.ft-recommend-image-link {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.25;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eef2f7;
  text-decoration: none !important;
}

.ft-recommend-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.18s ease;
}
.ft-recommend-image-link:hover .ft-recommend-image {
  opacity: 0.92;
}
.ft-recommend-image.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ft-recommend-body {
  min-width: 0;
}

.ft-recommend-box .ft-recommend-card .ft-recommend-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  font-family: inherit !important;
  color: #111827 !important;
  text-align: left !important;
  letter-spacing: 0 !important;
  border: 0 !important;
  background: transparent !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ft-recommend-box .ft-recommend-card .ft-recommend-title a {
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  text-decoration: none !important;
}
.ft-recommend-box .ft-recommend-card .ft-recommend-title a:hover {
  color: #dc2626 !important;
  text-decoration: underline !important;
}

.ft-recommend-maker {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ft-recommend-price {
  margin-bottom: 12px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}
.ft-recommend-price strong {
  color: #dc2626;
  font-size: 18px;
  font-weight: 900;
  margin: 0 2px;
}

.ft-recommend-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ft-recommend-box .ft-recommend-shop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #475569;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none !important;
  box-sizing: border-box;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: opacity 0.18s ease;
}
.ft-recommend-box .ft-recommend-shop-button:hover {
  opacity: 0.9;
  color: #ffffff !important;
  text-decoration: none !important;
}

.ft-recommend-box .ft-recommend-shop-button.shop-amiami { background: #3f73b8; }
.ft-recommend-box .ft-recommend-shop-button.shop-amiami_yahoo { background: #ff0033; }
.ft-recommend-box .ft-recommend-shop-button.shop-amazon { background: #111827; }
.ft-recommend-box .ft-recommend-shop-button.shop-hobbystock { background: #42b8a6; }
.ft-recommend-box .ft-recommend-shop-button.shop-hobbysearch { background: #2c8b7e; }
.ft-recommend-box .ft-recommend-shop-button.shop-gsc,
.ft-recommend-box .ft-recommend-shop-button.shop-goodsmile,
.ft-recommend-box .ft-recommend-shop-button.shop-goodsmileonlineshop { background: #60a980; }
.ft-recommend-box .ft-recommend-shop-button.shop-animate { background: #7c6ac4; }
.ft-recommend-box .ft-recommend-shop-button.shop-dmm { background: #f0a00e; }
.ft-recommend-box .ft-recommend-shop-button.shop-digitamin { background: #6b7280; }
.ft-recommend-box .ft-recommend-shop-button.shop-yahoo { background: #ff0033; }
.ft-recommend-box .ft-recommend-shop-button.shop-rakuten { background: #bf0000; }

@media (max-width: 767px) {
  .ft-recommend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ft-recommend-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 10px;
    border-radius: 14px;
  }

  .ft-recommend-image-link {
    aspect-ratio: 1 / 1.25;
    border-radius: 10px;
  }

  .ft-recommend-box .ft-recommend-card .ft-recommend-title {
    font-size: 12px !important;
    line-height: 1.4 !important;
    margin: 0 0 4px !important;
    -webkit-line-clamp: 3 !important;
  }

  .ft-recommend-maker {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ft-recommend-price {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 8px;
  }
  .ft-recommend-price strong {
    font-size: 13px;
  }

  .ft-recommend-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .ft-recommend-box .ft-recommend-shop-button {
    min-height: 36px;
    padding: 4px 6px;
    border-radius: 7px;
    font-size: 10.5px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .ft-recommend-heading {
    font-size: 18px;
    margin: 0 0 10px;
  }
}

@media (max-width: 340px) {
  .ft-recommend-grid {
    grid-template-columns: 1fr;
  }
}
