/* =====================
   Sticky PDP Bar
   ===================== */
.sticky-pdp-bar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 300px;
  z-index: 9999;
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

/* 出現：左からスライドイン */
.sticky-pdp-bar.is-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* 消える：フェードアウトのみ */
.sticky-pdp-bar.is-hiding {
  transform: translateX(0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  pointer-events: auto;
}

.sticky-pdp-bar__inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

/* --- 商品情報 --- */
.sticky-pdp-bar__product {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sticky-pdp-bar__info {
  min-width: 0;
}

.sticky-pdp-bar__img {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
}

.sticky-pdp-bar__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticky-pdp-bar__name {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sticky-pdp-bar__price {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #bf0000;
  line-height: 1.3;
}

/* --- カート --- */
.sticky-pdp-bar__cart form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px !important;
}

.sticky-pdp-bar__quantity {
  flex-shrink: 0;
}

.sticky-pdp-bar__quantity input[type="number"],
.sticky-pdp-bar__quantity select {
  width: 48px;
  height: 34px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
}

.skuquantity {
  width: 48px !important;
  height: 34px !important;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
}

.sticky-pdp-bar__cart .cart-button {
  flex: 1;
}

.sticky-pdp-bar__cart .cart-button input[type="submit"],
.sticky-pdp-bar__cart .cart-button button[type="submit"] {
  width: 100%;
  padding: 8px 0;
  background: #bf0000;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sticky-pdp-bar__cart .cart-button input[type="submit"]:hover,
.sticky-pdp-bar__cart .cart-button button[type="submit"]:hover {
  opacity: 0.8;
}

/* --- SOLDOUT --- */
.sticky-pdp-bar__soldout {
  text-align: center;
}

.sticky-pdp-bar__soldout .itemsoldout {
  color: #c00;
  font-size: 13px;
  font-weight: 700;
}

/* --- お気に入り --- */
.sticky-pdp-bar__favorite {
  display: flex;
  align-items: center;
}

.sticky-pdp-bar__fav-btn {
  width: 100%;
  padding: 8px 0;
  background: #f0f0f0;
  color: #777;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #777;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.sticky-pdp-bar__fav-btn:hover {
  background: #777;
  color: #fff;
}

.sticky-pdp-bar__fav-btn.added {
  background: #fff;
  color: #bf0000;
  border-color: #bf0000;
}

/* --- SP対応 --- */
@media (max-width: 767px) {
  .sticky-pdp-bar {
    left: 10px;
    bottom: 12px;
    width: 260px;
  }

  .sticky-pdp-bar__inner {
    padding: 10px;
    gap: 8px;
  }

  .sticky-pdp-bar__img {
    width: 46px;
    height: 46px;
  }

  .sticky-pdp-bar__name {
    font-size: 11px;
  }
}
