/* =========================================================
   商品詳細ページ専用：固定カート数量変更
   現在の tpl_product_info_display.php に対応
========================================================= */

/* 固定バー全体 */
#cart-fixed .cart-fixed-inner {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  width: 100% !important;
}

/* 左側：価格 */
#cart-fixed .cart-price {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* 右側：数量＋カートボタン */
#cart-fixed .cart-controls {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 18px !important;
  width: auto !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* カートに入れる個数：− 1 ＋ */
#cart-fixed .productQty {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 10px !important;
  width: auto !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

#cart-fixed .productQty__label {
  display: inline-block !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  color: #111 !important;
  font-size: 14px !important;
  line-height: 34px !important;
  white-space: nowrap !important;
}

#cart-fixed .productQty__stepper {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  flex-flow: row nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* − ＋ */
#cart-fixed button.productQty__button {
  all: unset !important;
  display: inline-flex !important;
  flex: 0 0 34px !important;
  align-items: center !important;
  justify-content: center !important;

  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;

  box-sizing: border-box !important;
  border-radius: 7px !important;
  background: #4f7653 !important;
  color: #fff !important;

  font-family: Arial, sans-serif !important;
  font-size: 23px !important;
  font-weight: 700 !important;
  line-height: 1 !important;

  cursor: pointer !important;
}

#cart-fixed button.productQty__button::before,
#cart-fixed button.productQty__button::after {
  display: none !important;
  content: none !important;
}

#cart-fixed button.productQty__button:hover {
  opacity: 0.88 !important;
}

/* 数量入力欄 */
#cart-fixed input.productQty__input {
  display: block !important;
  flex: 0 0 52px !important;

  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 34px !important;
  min-height: 34px !important;

  margin: 0 !important;
  padding: 0 6px !important;
  box-sizing: border-box !important;

  border: 1px solid #d8cabb !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #111 !important;

  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 32px !important;
  text-align: center !important;
}

/* カートボタンの外枠 */
#cart-fixed .cart-button {
  display: inline-flex !important;
  flex: 0 0 320px !important;
  align-items: center !important;
  justify-content: center !important;

  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  height: 56px !important;

  margin: 0 !important;
  padding: 0 !important;
}

/* 既存CSSの疑似文字を完全に無効化 */
#cart-fixed .cart-button::before,
#cart-fixed .cart-button::after,
#cart-fixed .cart-button button::before,
#cart-fixed .cart-button button::after,
#cart-fixed #addToCartButton::before,
#cart-fixed #addToCartButton::after {
  display: none !important;
  content: none !important;
}

/* カートに入れる */
#cart-fixed #addToCartButton {
  all: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  height: 56px !important;
  min-height: 56px !important;

  margin: 0 !important;
  padding: 0 28px !important;
  box-sizing: border-box !important;

  border-radius: 8px !important;
  background: #b7472e !important;
  color: #fff !important;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18) !important;

  font-size: 25px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: nowrap !important;

  cursor: pointer !important;
}

#cart-fixed #addToCartButton:hover {
  background: #9f3923 !important;
}


/* =========================================================
   スマホ
========================================================= */

@media screen and (max-width: 767px) {

  #cart-fixed .cart-fixed-inner {
    display: block !important;
    width: 100% !important;
  }

  #cart-fixed .cart-price {
    margin: 0 0 5px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  #cart-fixed #totalPrice {
    font-size: 20px !important;
  }

  #cart-fixed .cart-controls {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: 100% !important;
  }

  #cart-fixed .productQty {
    gap: 4px !important;
  }

  #cart-fixed .productQty__label {
    font-size: 11px !important;
    line-height: 30px !important;
  }

  #cart-fixed .productQty__stepper {
    gap: 3px !important;
  }

  #cart-fixed button.productQty__button {
    flex-basis: 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 19px !important;
  }

  #cart-fixed input.productQty__input {
    flex-basis: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 14px !important;
    line-height: 28px !important;
  }

  #cart-fixed .cart-button {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 126px !important;
    max-width: 190px !important;
    height: 46px !important;
  }

  #cart-fixed #addToCartButton {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 12px !important;
    font-size: 17px !important;
  }
}
