/* ========================================
  比較検討リスト（cmp-）
  - 切り替え：min-width: 900px
  - 構成：ブロックごとに SP → PC の順で記述
======================================== */

/* EC-CUBEのレイアウト枠を、このページだけモックの幅へ合わせる */
.comparison_page .ec-layoutRole__contents {
  max-width: none;
}

.comparison_page .ec-layoutRole__left,
.comparison_page .ec-layoutRole__right {
  display: none;
}

.comparison_page .ec-layoutRole__main,
.comparison_page .ec-layoutRole__mainWithColumn,
.comparison_page .ec-layoutRole__mainBetweenColumn {
  width: 100%;
  max-width: none;
}

/* ----------------------------------------
  比較検討リスト SP
---------------------------------------- */
.cmp {
  margin-top: 24px;
  padding-bottom: 40px;
}

.cmp .mp-title {
  margin-top: 0;
  text-align: left;
}

.cmp__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
  align-items: stretch;
}

.cmp__card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 12px 10px 14px;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
}

.cmp__card:nth-child(even) {
  margin-left: -1px;
}

.cmp__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  cursor: pointer;
  background-color: #cccccc;
  border-radius: 50%;
}

.cmp__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.cmp__media .product-card__img-wrap {
  width: 100%;
  height: 100%;
}

.cmp__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  margin-top: 10px;
}

.cmp__card .product-card__title {
  min-height: 3em;
}

.cmp__card .color-swatches {
  --color-swatch-size: 14px;
  margin-top: 8px;
  min-height: 0;
}

.cmp__card .chips {
  margin-top: 8px;
}

.cmp__ship {
  width: fit-content;
  margin-top: 8px;
}

.cmp__stars {
  margin-top: 8px;
}

.cmp__price {
  margin-top: 8px;
}

.cmp__card .product-card__price-note {
  font-size: 12px;
}

.cmp__card .product-card__price {
  font-size: 20px;
}

.cmp__card .product-card__meta {
  font-size: 11px;
}

.cmp__spec {
  width: 100%;
  max-width: 100%;
  margin-top: 12px;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--color-border);
}

.cmp__spec th,
.cmp__spec td {
  box-sizing: border-box;
  padding: 6px 3px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  vertical-align: middle;
  border: 1px solid var(--color-border);
}

.cmp__spec th {
  width: 42%;
  overflow: hidden;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  background-color: var(--color-bg-gray);
}

.cmp__spec td {
  width: 58%;
  overflow: hidden;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.cmp__spec-row--top th,
.cmp__spec-row--top td {
  vertical-align: top;
}

.cmp__actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.cmp__actions .btn {
  padding: 10px 8px;
  font-size: 12px;
  word-break: auto-phrase;
  text-align: center;
}

.cmp__quote-result {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 10px;
}

.cmp__quote-result-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
}

.cmp__quote-result-price {
  display: grid;
  gap: 0;
  min-width: 0;
  justify-items: end;
  text-align: right;
}

.cmp__quote-result-total {
  margin: 0;
  font-family: var(--font-inter);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary);
}

.cmp__quote-result-unit {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-primary);
}

/* ----------------------------------------
  比較検討リスト PC
---------------------------------------- */
@media (min-width: 900px) {
  .cmp {
    margin-top: 40px;
    padding-bottom: 60px;
  }

  .cmp__title {
    font-size: 30px;
  }

  .cmp__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
  }

  .cmp__card {
    padding: 16px 14px 18px;
    border-radius: 6px;
  }

  .cmp__card:nth-child(even) {
    margin-left: 0;
  }

  .cmp__remove {
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding-bottom: 2px;
    font-size: 18px;
  }

  .cmp__card .product-card__title {
    font-size: 13px;
  }

  .cmp__card .color-swatches {
    --color-swatch-size: 16px;
  }

  .cmp__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
  }

  .cmp__card .product-card__price-note {
    margin-right: 0;
    font-size: 13px;
  }

  .cmp__card .product-card__price {
    margin-top: 0;
    font-size: 24px;
  }

  .cmp__card .product-card__meta {
    flex: 1 0 100%;
    margin-top: 6px;
    font-size: 13px;
  }

  .cmp__spec {
    margin-top: 14px;
  }

  .cmp__spec th,
  .cmp__spec td {
    padding: 5px;
    font-size: 12px;
    line-height: 1.5;
  }

  .cmp__spec th {
    width: 30%;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .cmp__spec td {
    width: 70%;
    word-break: break-word;
  }

  .cmp__actions {
    gap: 10px;
    padding-top: 16px;
  }

  .cmp__actions .btn {
    padding: 12px 10px;
    font-size: 14px;
  }

  .cmp__quote-result {
    display: flex;
    width: 100%;
    gap: 8px;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 8px;
  }

  .cmp__quote-result-label {
    flex-shrink: 0;
    font-size: 13px;
  }

  .cmp__quote-result-price {
    flex-shrink: 0;
    margin-left: auto;
  }

  .cmp__quote-result-total {
    font-size: 20px;
    white-space: nowrap;
  }

  .cmp__quote-result-unit {
    font-size: 11px;
    white-space: nowrap;
  }
}

/* ----------------------------------------
  比較検討：簡単自動見積モーダル SP
---------------------------------------- */
body.is-cmp-modal-open {
  overflow: hidden;
}

.cmp-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 12px;
}

.cmp-modal.is-open {
  display: grid;
}

.cmp-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
}

.cmp-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100% - 24px);
  margin: 0;
  padding: 12px 4px 20px;
  overflow: auto;
  background-color: #ffffff;
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.cmp-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  background-color: #999999;
  border: none;
  border-radius: 50%;
}

.cmp-modal__name {
  margin: 0;
  padding: 4px 40px 12px 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.cmp-modal__body {
  display: grid;
  gap: 0;
  min-width: 0;
}

.cmp-modal .pd__quote {
  width: 100%;
  margin: 0;
  overflow: visible;
  border-top: none;
  border-bottom: none;
}

.cmp-modal .pd__quote-title {
  padding: 6px 12px;
  background-color: #999999;
}

.cmp-modal .pd__quote-body {
  padding: 16px 0 20px;
}

.cmp-modal .pd__quote-stack {
  display: grid;
  gap: 20px;
  padding-right: 12px;
  padding-left: 12px;
}

.cmp-modal .pd__summary-panel {
  width: 100%;
  margin: 0;
  padding: 16px 12px 20px;
  background-color: #fff5f5;
}

.cmp-modal .pd__summary-panel--single {
  display: flex;
  flex-direction: column-reverse;
  gap: 16px;
}

.cmp-modal .pd__summary-breakdown {
  /* padding-bottom: 20px; */
  /* border-bottom: 2px solid var(--color-border); */
}

.cmp-modal .pd__summary-request {
  cursor: pointer;
  gap: 8px;
  font-family: inherit;
  background-color: #ababab;
  color: #ffffff;
  border: 1px solid #ababab;
}

.cmp-modal .pd__ship-card {
  border: none;
}

.cmp-modal .pd__ship-card-form {
  padding: 8px 10px;
  max-width: 230px;
  width: 100%;
}

.cmp-modal .pd__ship-card-form-icon {
  position: relative;
  right: -15px;
  width: 5px;
}

/* ----------------------------------------
  比較検討：簡単自動見積モーダル PC
---------------------------------------- */
@media (min-width: 900px) {
  .cmp-modal {
    display: none;
    place-items: center;
    padding: 32px 24px;
  }

  .cmp-modal.is-open {
    display: grid;
  }

  .cmp-modal__dialog {
    display: flex;
    flex-direction: column;
    width: min(1200px, 100%);
    height: auto;
    max-height: calc(100vh - 64px);
    padding: 24px 28px 28px;
    overflow: hidden;
    border-radius: 8px;
  }

  .cmp-modal__close {
    top: 16px;
    right: 16px;
  }

  .cmp-modal__name {
    flex-shrink: 0;
    padding: 0 48px 16px 0;
    font-size: 18px;
  }

  /* 見出し全幅 → 下に表 / 印刷・日付 / サマリーの3カラム */
  .cmp-modal__body {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 0.9fr);
    gap: 0;
    align-items: start;
    min-height: 0;
    overflow: auto;
    background-color: var(--color-bg-gray);
    border: 1px solid var(--color-border);
    -webkit-overflow-scrolling: touch;
  }

  .cmp-modal__quote,
  .cmp-modal .pd__quote {
    display: contents;
  }

  .cmp-modal .pd__quote-title {
    grid-column: 1 / -1;
    padding: 10px 12px;
    font-size: 16px;
  }

  .cmp-modal .pd__quote-body {
    grid-column: 1 / 3;
    grid-template-columns: minmax(0, 370px) minmax(0, 340px);
    gap: 20px 24px;
    align-items: start;
    padding: 16px 20px 20px;
    background-color: var(--color-bg-gray);
  }

  .cmp-modal .pd__quote-sec:first-child {
    width: 100%;
    max-width: 370px;
  }

  .cmp-modal .pd__quote-stack {
    width: 100%;
    max-width: 340px;
    gap: 16px;
    padding-right: 0;
    padding-left: 0;
  }

  .cmp-modal__summary {
    grid-column: 3;
    min-width: 0;
    padding: 0 16px 20px 0;
  }

  .cmp-modal .pd__summary-panel {
    padding: 0;
    background-color: transparent;
  }

  .cmp-modal .pd__summary-panel--single {
    flex-direction: column;
    gap: 0;
  }

  .cmp-modal .pd__summary {
    padding: 12px;
    background-color: #fff5f5;
    border-radius: 4px;
  }

  .cmp-modal .pd__summary-card {
    background-color: #ffffff;
  }

  .cmp-modal .pd__summary-case {
    display: block;
    border-bottom: 2px solid var(--color-border);
  }

  .cmp-modal .pd__summary-ship-note {
    padding-top: 0;
    border-top: none;
  }

  .cmp-modal .pd__summary-panel {
    gap: 0;
  }

  .cmp-modal .pd__ship-card {
    border: none;
  }

  .cmp-modal .pd__summary-breakdown {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-border);
  }
}

/* ----------------------------------------
  カートページの見積モーダル差分
---------------------------------------- */
.pd__summary-downloads--single {
  grid-template-columns: 1fr;
}

.pd__summary-downloads--single .pd__summary-dl {
  min-height: auto;
}

.pd__summary-downloads--single .pd__summary-dl-text {
  padding: 8px 10px;
}

.cmp-modal__footer--apply {
  display: none;
}

.cmp-modal--cart .cmp-modal__dialog {
  overflow: hidden;
  padding-bottom: 0;
}

.cmp-modal--cart .cmp-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cmp-modal--cart .cmp-modal__footer--apply {
  display: block;
  flex-shrink: 0;
  margin-right: -4px;
  margin-left: -4px;
  padding: 12px 16px 16px;
  background-color: #fff5f5;
  border-radius: 0 0 8px 8px;
}

.cmp-modal--cart .cmp-modal__footer--apply .pd__summary-cart {
  margin-top: 0;
}

.cmp-modal--cart .pd__summary-card > .pd__summary-cart {
  display: none;
}

@media (min-width: 900px) {
  .cmp-modal--cart .pd__summary-case {
    display: block;
  }

  .cmp-modal--cart .cmp-modal__footer--apply {
    display: none;
  }

  .cmp-modal--cart .cmp-modal__dialog {
    overflow: auto;
    padding-bottom: 28px;
  }

  .cmp-modal--cart .cmp-modal__body {
    flex: initial;
    min-height: auto;
    overflow: visible;
  }

  .cmp-modal--cart .pd__summary-card > .pd__summary-cart {
    display: inline-flex;
  }

  .pd__summary-downloads--single .pd__summary-dl-text {
    font-size: 15px;
  }
}

/* ========================================
  カート（cart-）
  - 切り替え：min-width: 900px
======================================== */

/* EC-CUBEのレイアウト枠を、このページだけモックの幅へ合わせる */
.cart_page .ec-layoutRole__contents {
  max-width: none;
}

.cart_page .ec-layoutRole__left,
.cart_page .ec-layoutRole__right {
  display: none;
}

.cart_page .ec-layoutRole__main,
.cart_page .ec-layoutRole__mainWithColumn,
.cart_page .ec-layoutRole__mainBetweenColumn {
  width: 100%;
  max-width: none;
}

/* ----------------------------------------
  カート SP
---------------------------------------- */
.cart {
  margin-top: 24px;
  padding-bottom: 48px;
}

.cart__title {
  margin-top: 0;
}

.cart__steps {
  display: flex;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.cart__step {
  position: relative;
  display: grid;
  flex: 1;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.cart__step:not(:last-child)::after {
  position: absolute;
  top: 19px;
  left: calc(50% + 12px);
  right: calc(-50% + 12px);
  height: 2px;
  content: "";
  background-color: #cccccc;
}

.cart__step-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-inter);
  line-height: 1;
  color: #ffffff;
  background-color: #cccccc;
  border-radius: 50%;
}

.cart__step-label {
  font-size: 13px;
  line-height: 1.3;
  color: #999999;
}

.cart__step.is-current .cart__step-num {
  background-color: var(--color-primary);
}

.cart__step.is-current .cart__step-label {
  font-weight: 700;
  color: var(--color-primary);
}

.cart__lead {
  margin-top: 40px;
  font-size: 15px;
  line-height: 1.4;
}

.cart__note {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-primary);
}

.cart__clear {
  margin-top: 20px;
  text-align: right;
}

.cart__clear a {
  font-size: 12px;
  color: var(--color-text-light);
  text-decoration: underline;
}

.cart__table {
  margin-top: 10px;
}

.cart__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 72px;
  gap: 8px;
  padding: 20px 10px;
  font-size: 14px;
  font-weight: 700;
  background-color: #eeeeee;
}

.cart__head-qty,
.cart__head-subtotal {
  text-align: center;
}

.cart__head-subtotal {
  text-align: right;
}

.cart__item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 40px 72px;
  grid-template-areas: "thumb info qty sub";
  column-gap: 8px;
  row-gap: 13px;
  align-items: start;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dotted #cccccc;
}

.cart__item--editable {
  grid-template-areas:
    "actions actions actions actions"
    "thumb info qty sub";
}

.cart__item--sub {
  padding-left: 30px;
}

.cart__item-actions {
  display: flex;
  grid-area: actions;
  gap: 8px;
  justify-content: flex-end;
}

.cart__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  border-radius: 3px;
  text-decoration: none;
}

.cart__btn--edit {
  color: #41aade;
  background-color: #f3fcff;
  border: 1px solid #41aade;
}

.cart__btn--remove {
  color: #ffffff;
  background-color: #ababab;
  border: 1px solid #ababab;
}

.cart__thumb {
  grid-area: thumb;
  align-self: center;
  overflow: hidden;
  width: 56px;
  background-color: #f7f7f7;
}

.cart__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.cart__info {
  grid-area: info;
  min-width: 0;
}

.cart__name {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.cart__unit {
  margin-top: 10px;
  font-size: 14px;
}

.cart__qty {
  grid-area: qty;
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.cart__subtotal {
  grid-area: sub;
  margin: 0;
  font-size: 14px;
  text-align: right;
}

.cart__total {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: flex-end;
  margin: 16px 0 0;
}

.cart__total-label {
  font-size: 14px;
  font-weight: 700;
}

.cart__total-value {
  font-family: var(--font-inter);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #ec2042;
}

.cart__total-yen {
  margin-left: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #333333;
}

.cart__cta-note {
  margin-top: 24px;
  font-size: 15px;
  text-align: center;
}

.cart__cta-wrap {
  margin-top: 12px;
}

.cart__cta {
  width: 100%;
  font-size: 18px;
}

/* ----------------------------------------
  カート PC
---------------------------------------- */
@media (min-width: 900px) {
  .cart {
    margin-top: 40px;
    padding-bottom: 60px;
  }

  .cart__title {
    font-size: 30px;
  }

  .cart__steps {
    max-width: 720px;
    margin: 32px auto 0;
  }

  .cart__step-num {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  .cart__step:not(:last-child)::after {
    top: 27px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
  }

  .cart__step-label {
    max-width: none;
    font-size: 13px;
  }

  .cart__step-label br {
    display: none;
  }

  .cart__lead {
    font-size: 15px;
  }

  .cart__note {
    font-size: 15px;
  }

  .cart__clear a {
    font-size: 14px;
  }

  .cart__head {
    grid-template-columns: 80px minmax(0, 1fr) 80px 120px 64px;
    gap: 16px;
    padding: 32px 16px;
    font-size: 18px;
  }

  .cart__head-name {
    grid-column: 1 / 3;
  }

  .cart__head-qty {
    text-align: center;
  }

  .cart__item {
    grid-template-columns: 80px minmax(0, 1fr) 80px 120px 64px;
    grid-template-areas: "thumb info qty sub .";
    column-gap: 16px;
    align-items: center;
    padding: 16px;
  }

  .cart__item--editable {
    grid-template-areas: "thumb info qty sub actions";
  }

  .cart__item--sub {
    padding-left: 100px;
  }

  .cart__item-actions {
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    justify-self: end;
  }

  .cart__thumb {
    width: 80px;
  }

  .cart__name {
    font-size: 15px;
  }

  .cart__unit {
    font-size: 14px;
  }

  .cart__qty,
  .cart__subtotal {
    font-size: 14px;
  }

  .cart__total {
    margin-top: 20px;
  }

  .cart__total-label {
    font-size: 16px;
  }

  .cart__total-value {
    font-size: 34px;
  }

  .cart__total-yen {
    font-size: 16px;
  }

  .cart__cta-note {
    margin-top: 70px;
    font-size: 15px;
  }

  .cart__cta-note br {
    display: none;
  }

  .cart__cta-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
  }

  .cart__cta {
    width: min(360px, 100%);
  }
}
