/* ========================================
 * EC-CUBE BtoB受注サイト - トップページ
 * ======================================== */

/* ========================================
 * セクション共通
 * ======================================== */
.btob-top-section {
  padding: var(--btob-space-2xl) var(--btob-space-lg);
}

.btob-top-section__title {
  font-size: var(--btob-font-size-xl);
  font-weight: var(--btob-font-weight-bold);
  color: var(--btob-text);
  margin-bottom: var(--btob-space-xl);
  padding-left: var(--btob-space-md);
  border-left: 4px solid;
  border-image: linear-gradient(to bottom, var(--btob-primary), var(--btob-accent)) 1;
}

.btob-top-section__subtitle {
  font-size: var(--btob-font-size-sm);
  color: var(--btob-text-secondary);
  margin-top: calc(-1 * var(--btob-space-md));
  margin-bottom: var(--btob-space-xl);
  padding-left: var(--btob-space-md);
}

.btob-top-section__more {
  display: inline-flex;
  align-items: center;
  gap: var(--btob-space-xs);
  margin-top: var(--btob-space-lg);
  font-size: var(--btob-font-size-sm);
  font-weight: var(--btob-font-weight-medium);
  color: var(--btob-primary);
}

.btob-top-section__more:hover {
  text-decoration: underline;
}

@media (min-width: 992px) {
  .btob-top-section {
    padding: 40px var(--btob-space-2xl);
  }

  .btob-top-section__title {
    font-size: var(--btob-font-size-2xl);
  }
}

/* ========================================
 * ① ヒーローバナー
 * ======================================== */
.btob-top-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 240px;
  padding: var(--btob-space-2xl) var(--btob-space-lg);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(135deg, var(--btob-primary-dark) 0%, var(--btob-primary) 50%, var(--btob-accent) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
  background-size: 20px 20px, 100% 100%, 100% 100%;
  color: var(--btob-bg-white);
  overflow: hidden;
}

.btob-top-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: -200px 200px 0 100px rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.btob-top-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  box-shadow: 150px -100px 0 80px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.btob-top-hero__badge {
  position: relative;
  display: inline-block;
  padding: var(--btob-space-xs) var(--btob-space-lg);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--btob-radius-pill);
  font-size: var(--btob-font-size-xs);
  font-weight: var(--btob-font-weight-bold);
  letter-spacing: 2px;
  margin-bottom: var(--btob-space-lg);
  z-index: 1;
}

.btob-top-hero__title {
  position: relative;
  font-size: var(--btob-font-size-2xl);
  font-weight: var(--btob-font-weight-bold);
  line-height: 1.4;
  letter-spacing: 1px;
  margin-bottom: var(--btob-space-sm);
  z-index: 1;
  margin-top: 0;
}

.btob-top-hero__subtitle {
  position: relative;
  font-size: var(--btob-font-size-sm);
  opacity: 0.85;
  margin-bottom: var(--btob-space-lg);
  z-index: 1;
}

.btob-top-hero__search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 400px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--btob-radius-pill);
  margin-bottom: var(--btob-space-lg);
  z-index: 1;
  backdrop-filter: blur(4px);
}

.btob-top-hero__search-input {
  flex: 1;
  height: 100%;
  padding: 0 var(--btob-space-lg);
  background: transparent;
  border: none;
  color: var(--btob-bg-white);
  font-size: var(--btob-font-size-sm);
  outline: none;
}

.btob-top-hero__search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.btob-top-hero__search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 2px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: var(--btob-bg-white);
  cursor: pointer;
  transition: background var(--btob-transition-fast);
}

.btob-top-hero__search-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.btob-top-hero__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--btob-space-sm);
  height: var(--btob-btn-height);
  padding: 0 var(--btob-space-2xl);
  background: var(--btob-bg-white);
  color: var(--btob-primary-dark);
  border: none;
  border-radius: var(--btob-radius-pill);
  font-size: var(--btob-font-size-md);
  font-weight: var(--btob-font-weight-bold);
  cursor: pointer;
  transition: all var(--btob-transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.btob-top-hero__btn:hover {
  background: var(--btob-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

@media (min-width: 992px) {
  .btob-top-hero {
    min-height: 320px;
    padding: var(--btob-space-2xl) 60px;
  }

  .btob-top-hero__title {
    font-size: 32px;
  }

  .btob-top-hero__subtitle {
    font-size: var(--btob-font-size-lg);
  }
}

/* ========================================
 * ② カテゴリから探す
 * ======================================== */
.btob-top-categories {
  background: var(--btob-bg-white);
}

.btob-top-categories__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--btob-space-lg);
}

.btob-top-categories__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--btob-space-sm);
  padding: var(--btob-space-xl) var(--btob-space-lg);
  background: var(--btob-bg-white);
  border: 1px solid var(--btob-border-light);
  border-radius: var(--btob-radius-md);
  box-shadow: var(--btob-shadow-sm);
  text-align: center;
  transition: all var(--btob-transition-fast);
}

.btob-top-categories__card:hover {
  border-color: var(--btob-primary);
  box-shadow: var(--btob-shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.btob-top-categories__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--btob-primary-light);
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.btob-top-categories__name {
  font-size: var(--btob-font-size-sm);
  font-weight: var(--btob-font-weight-bold);
  color: var(--btob-text);
}

.btob-top-categories__count {
  font-size: var(--btob-font-size-xs);
  color: var(--btob-primary);
  font-weight: var(--btob-font-weight-medium);
}

.btob-top-categories__arrow {
  color: var(--btob-text-muted);
  transition: transform var(--btob-transition-fast), color var(--btob-transition-fast);
}

.btob-top-categories__card:hover .btob-top-categories__arrow {
  transform: translateX(4px);
  color: var(--btob-primary);
}

/* モバイル: 横並びレイアウト */
@media (max-width: 991px) {
  .btob-top-categories__grid {
    grid-template-columns: 1fr;
    gap: var(--btob-space-sm);
  }

  .btob-top-categories__card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--btob-space-md);
    padding: var(--btob-space-md) var(--btob-space-lg);
  }

  .btob-top-categories__icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
    flex-shrink: 0;
  }

  .btob-top-categories__arrow {
    margin-left: auto;
  }
}

@media (min-width: 992px) {
  .btob-top-categories__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
 * ③ おすすめ商品
 * ======================================== */
.btob-top-products {
  position: relative;
  background: var(--btob-bg);
}

.btob-top-products__scroll {
  display: flex;
  gap: var(--btob-space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--btob-space-sm);
}

.btob-top-products__scroll::-webkit-scrollbar {
  display: none;
}

/* モバイルのみスクロールヒント */
.btob-top-products__scroll::after {
  content: "";
  position: sticky;
  right: 0;
  flex-shrink: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--btob-bg));
  pointer-events: none;
}

.btob-top-products__card {
  flex-shrink: 0;
  width: 220px;
  background: var(--btob-bg-white);
  border: 1px solid var(--btob-border-light);
  border-radius: var(--btob-radius-md);
  box-shadow: var(--btob-shadow-sm);
  overflow: hidden;
  scroll-snap-align: start;
  transition: all var(--btob-transition-fast);
}

.btob-top-products__card:hover {
  border-color: var(--btob-primary);
  box-shadow: var(--btob-shadow-md);
}

.btob-top-products__img {
  width: 100%;
  height: 160px;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(0, 0, 0, 0.02) 10px,
      rgba(0, 0, 0, 0.02) 20px
    ),
    var(--btob-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--btob-text-muted);
  border-bottom: 1px solid var(--btob-border-light);
}

.btob-top-products__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btob-top-products__info {
  padding: var(--btob-space-md);
}

.btob-top-products__name {
  font-size: var(--btob-font-size-sm);
  font-weight: var(--btob-font-weight-medium);
  color: var(--btob-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--btob-space-sm);
}

.btob-top-products__price {
  font-size: var(--btob-font-size-lg);
  font-weight: var(--btob-font-weight-bold);
  color: var(--btob-primary);
  margin-bottom: var(--btob-space-xs);
}

.btob-top-products__price-tax {
  display: block;
  font-size: var(--btob-font-size-xs);
  font-weight: var(--btob-font-weight-normal);
  color: var(--btob-text-muted);
}

.btob-top-products__unit {
  font-size: var(--btob-font-size-xs);
  color: var(--btob-text-muted);
  margin-bottom: var(--btob-space-sm);
}

.btob-top-products__unit-badge {
  display: inline-block;
  background: var(--btob-primary-light);
  color: var(--btob-primary);
  padding: 1px var(--btob-space-sm);
  border-radius: var(--btob-radius-sm);
  font-size: var(--btob-font-size-xs);
  font-weight: var(--btob-font-weight-medium);
  margin-bottom: var(--btob-space-sm);
}

.btob-top-products__qty {
  display: flex;
  border: 1px solid var(--btob-border);
  border-radius: var(--btob-radius-sm);
  overflow: hidden;
  margin-bottom: var(--btob-space-sm);
}

.btob-top-products__qty-btn {
  width: 28px;
  height: 28px;
  background: var(--btob-bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--btob-font-size-md);
  transition: background var(--btob-transition-fast);
}

.btob-top-products__qty-btn:hover {
  background: var(--btob-border-light);
}

.btob-top-products__qty-input {
  width: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--btob-border);
  border-right: 1px solid var(--btob-border);
  font-size: var(--btob-font-size-sm);
  -moz-appearance: textfield;
}

.btob-top-products__qty-input::-webkit-outer-spin-button,
.btob-top-products__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btob-top-products__cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--btob-space-xs);
  width: 100%;
  height: 36px;
  background: var(--btob-primary);
  color: var(--btob-bg-white);
  border: none;
  border-radius: var(--btob-radius-md);
  font-size: var(--btob-font-size-sm);
  font-weight: var(--btob-font-weight-bold);
  cursor: pointer;
  transition: background var(--btob-transition-fast);
}

.btob-top-products__cart-btn:hover {
  background: var(--btob-primary-hover);
}

.btob-top-products__cart-btn:active {
  background: var(--btob-primary-active);
}

@media (min-width: 992px) {
  .btob-top-products__scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
  }

  .btob-top-products__scroll::after {
    display: none;
  }

  .btob-top-products__card {
    width: auto;
  }
}

/* ========================================
 * ④ キャンペーン・お知らせ
 * ======================================== */
.btob-top-news {
  background: var(--btob-bg-white);
}

.btob-top-news__banner {
  display: block;
  position: relative;
  width: 100%;
  padding: var(--btob-space-xl) var(--btob-space-lg);
  background: linear-gradient(135deg, var(--btob-accent) 0%, #e8a84c 100%);
  border-radius: var(--btob-radius-md);
  color: var(--btob-bg-white);
  text-align: center;
  margin-bottom: var(--btob-space-lg);
  overflow: hidden;
  transition: all var(--btob-transition-fast);
}

.btob-top-news__banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.06) 8px,
    rgba(255, 255, 255, 0.06) 16px
  );
  pointer-events: none;
}

.btob-top-news__banner:hover {
  transform: translateY(-2px);
  box-shadow: var(--btob-shadow-lg);
  text-decoration: none;
}

.btob-top-news__banner-label {
  position: relative;
  display: inline-block;
  padding: 2px var(--btob-space-md);
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--btob-radius-pill);
  font-size: var(--btob-font-size-xs);
  font-weight: var(--btob-font-weight-bold);
  letter-spacing: 2px;
  margin-bottom: var(--btob-space-sm);
}

.btob-top-news__banner-title {
  position: relative;
  font-size: var(--btob-font-size-xl);
  font-weight: var(--btob-font-weight-bold);
  margin-bottom: var(--btob-space-xs);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btob-top-news__banner-desc {
  position: relative;
  font-size: var(--btob-font-size-sm);
  opacity: 0.9;
}

.btob-top-news__banner-deadline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--btob-space-xs);
  padding: var(--btob-space-xs) var(--btob-space-md);
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--btob-radius-pill);
  font-size: var(--btob-font-size-xs);
  margin-top: var(--btob-space-sm);
}

.btob-top-news__banner-cta {
  position: relative;
  display: inline-block;
  margin-top: var(--btob-space-md);
  padding: var(--btob-space-sm) var(--btob-space-xl);
  background: var(--btob-bg-white);
  color: var(--btob-accent);
  border-radius: var(--btob-radius-pill);
  font-weight: var(--btob-font-weight-bold);
  font-size: var(--btob-font-size-sm);
  transition: all var(--btob-transition-fast);
}

.btob-top-news__banner:hover .btob-top-news__banner-cta {
  background: var(--btob-primary-dark);
  color: var(--btob-bg-white);
}

.btob-top-news__list {
  display: flex;
  flex-direction: column;
}

.btob-top-news__item {
  display: flex;
  align-items: baseline;
  gap: var(--btob-space-md);
  padding: var(--btob-space-md) 0;
  border-bottom: 1px solid var(--btob-border-light);
  font-size: var(--btob-font-size-sm);
  color: var(--btob-text);
  transition: color var(--btob-transition-fast);
}

.btob-top-news__item:last-child {
  border-bottom: none;
}

.btob-top-news__item:hover {
  color: var(--btob-primary);
  text-decoration: none;
}

.btob-top-news__date {
  flex-shrink: 0;
  display: inline-block;
  padding: 2px var(--btob-space-sm);
  background: var(--btob-primary-light);
  border-radius: var(--btob-radius-sm);
  font-size: var(--btob-font-size-xs);
  color: var(--btob-primary);
  font-weight: var(--btob-font-weight-medium);
  white-space: nowrap;
}

.btob-top-news__title {
  flex: 1;
}

/* ========================================
 * ⑤ ご利用ガイド
 * ======================================== */
.btob-top-guide {
  background: var(--btob-bg);
}

.btob-top-guide__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--btob-space-xl);
}

.btob-top-guide__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--btob-space-xl) var(--btob-space-lg);
  background: var(--btob-bg-white);
  border-radius: var(--btob-radius-md);
  border: 1px solid var(--btob-border-light);
  border-top: 3px solid var(--btob-primary);
  transition: all var(--btob-transition-fast);
}

.btob-top-guide__step:nth-child(2) {
  border-top-color: var(--btob-primary-hover);
}

.btob-top-guide__step:nth-child(3) {
  border-top-color: var(--btob-accent);
}

.btob-top-guide__step:nth-child(2) .btob-top-guide__step-num {
  background: var(--btob-primary-hover);
}

.btob-top-guide__step:nth-child(3) .btob-top-guide__step-num {
  background: var(--btob-accent);
}

.btob-top-guide__step:hover {
  transform: translateY(-2px);
  box-shadow: var(--btob-shadow-md);
}

/* モバイル: 下向きライン */
.btob-top-guide__step:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 16px;
  background: var(--btob-primary);
  z-index: 1;
}

.btob-top-guide__step:nth-child(2):not(:last-child)::after {
  background: var(--btob-primary-hover);
}

.btob-top-guide__step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--btob-primary);
  color: var(--btob-bg-white);
  border-radius: 50%;
  font-size: var(--btob-font-size-xl);
  font-weight: var(--btob-font-weight-bold);
  margin-bottom: var(--btob-space-md);
  box-shadow: 0 2px 8px rgba(30, 115, 190, 0.3);
}

.btob-top-guide__step-icon {
  font-size: 36px;
  margin-bottom: var(--btob-space-md);
}

.btob-top-guide__step-title {
  font-size: var(--btob-font-size-md);
  font-weight: var(--btob-font-weight-bold);
  color: var(--btob-text);
  margin-bottom: var(--btob-space-xs);
}

.btob-top-guide__step-desc {
  font-size: var(--btob-font-size-sm);
  color: var(--btob-text-secondary);
}

@media (min-width: 992px) {
  .btob-top-guide__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  /* PC: 右向きライン */
  .btob-top-guide__step:not(:last-child)::after {
    bottom: auto;
    top: 50%;
    left: auto;
    right: -28px;
    transform: translateY(-50%);
    width: 24px;
    height: 2px;
    background: var(--btob-primary);
  }
}

/* ========================================
 * ⑥ フッター情報
 * ======================================== */
.btob-top-footer {
  padding: var(--btob-space-xl) var(--btob-space-lg);
  background: var(--btob-primary-dark);
  color: var(--btob-bg-white);
}

.btob-top-footer__contact {
  text-align: center;
  margin-bottom: var(--btob-space-xl);
  padding-bottom: var(--btob-space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.btob-top-footer__contact-label {
  font-size: var(--btob-font-size-sm);
  opacity: 0.7;
  margin-bottom: var(--btob-space-xs);
}

.btob-top-footer__phone {
  font-size: var(--btob-font-size-2xl);
  font-weight: var(--btob-font-weight-bold);
  letter-spacing: 2px;
  margin-bottom: var(--btob-space-xs);
}

.btob-top-footer__hours {
  font-size: var(--btob-font-size-xs);
  opacity: 0.6;
}

.btob-top-footer__links {
  display: flex;
  justify-content: center;
  gap: var(--btob-space-lg);
  margin-bottom: var(--btob-space-xl);
  flex-wrap: wrap;
}

.btob-top-footer__link {
  font-size: var(--btob-font-size-sm);
  color: var(--btob-bg-white);
  opacity: 0.7;
  transition: opacity var(--btob-transition-fast);
}

.btob-top-footer__link:hover {
  opacity: 1;
  color: var(--btob-bg-white);
}

.btob-top-footer__copy {
  text-align: center;
  font-size: var(--btob-font-size-xs);
  opacity: 0.6;
  padding-top: var(--btob-space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 992px) {
  .btob-top-footer {
    padding: 48px var(--btob-space-2xl);
  }
}
