@charset "UTF-8";
/* ==========================================================
   天下一 最近チェックした商品 / 追従ナビ
   PC: 768px以上 / スマホ: 767px以下（既存 styles.css / styles-smp.css と同じ境界）
   z-index: 追従ナビ 9000（旧 #pagetop と同じ・remodal より下）
            パネル 100010（#menu-sticky 10000・#header 100000 より上）
   ========================================================== */

/* hidden 属性を確実に効かせる（display 指定より優先） */
.tk-float [hidden],
.tk-recent[hidden],
.tk-recent [hidden] {
  display: none !important;
}

/* ---------- 追従ナビ ---------- */
.tk-float {
  position: fixed;
  z-index: 9000;
  display: flex;
  gap: 8px;
}

.tk-float__btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 1px solid #dccc8d;
  border-radius: 8px;
  background: rgba(50, 50, 50, 0.92);
  color: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}
.tk-float__btn:link,
.tk-float__btn:visited {
  color: #fff;
}
.tk-float__btn:hover,
.tk-float__btn:focus-visible {
  background: #1a1a1a;
  color: #fff;
}
.tk-float__btn:focus-visible {
  outline: 2px solid #eda700;
  outline-offset: 2px;
}
.tk-float__btn.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tk-float__icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tk-float__label {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.tk-float__badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #cc0000;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-sizing: border-box;
}

/* ---------- パネル（共通） ---------- */
.tk-recent {
  position: fixed;
  inset: 0;
  z-index: 100010;
}

.tk-recent__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tk-recent__sheet {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #002020;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
}

.tk-recent.is-open .tk-recent__overlay {
  opacity: 1;
}
.tk-recent.is-open .tk-recent__sheet {
  transform: none;
}

.tk-recent__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 0 8px 0 16px;
  border-bottom: 2px solid #dccc8d;
}

.tk-recent__title {
  margin: 0;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.tk-recent__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #333;
  cursor: pointer;
}
.tk-recent__close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.tk-recent__close:focus-visible {
  outline: 2px solid #eda700;
  outline-offset: -2px;
}

/* 一覧（ここだけスクロール） */
.tk-recent__list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.tk-recent__item {
  margin: 0;
  border-bottom: 1px solid #eee;
}

.tk-recent__link,
.tk-recent__link:link,
.tk-recent__link:visited {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  color: #002020;
  text-decoration: none;
}
.tk-recent__link:hover,
.tk-recent__link:focus-visible {
  background: #fafafa;
}
.tk-recent__link:focus-visible {
  outline: 2px solid #eda700;
  outline-offset: -2px;
}

.tk-recent__thumb {
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 6px;
  background: #eee;
}
.tk-recent__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tk-recent__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tk-recent__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
}

.tk-recent__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

/* 一覧カードの .item-icon span に合わせた程度ラベル */
.tk-recent__rank {
  padding: 0 4px;
  border: 1px solid #eda700;
  border-radius: 6px;
  color: #eda700;
  font-size: 12px;
  line-height: 1.5;
}

.tk-recent__price {
  color: #cc0000;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.tk-recent__was {
  margin-right: 6px;
  color: #666;
  font-size: 12px;
  font-weight: 400;
}

.tk-recent__empty {
  padding: 32px 16px;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.tk-recent__foot {
  flex: none;
  padding: 10px 16px;
  border-top: 1px solid #eee;
  text-align: right;
}

.tk-recent__clear {
  margin: 0;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: #666;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.tk-recent__clear:hover {
  color: #002020;
}

/* パネル表示中は背景をスクロールさせない */
html.tk-recent-lock,
html.tk-recent-lock body {
  overflow: hidden;
}

/* ---------- PC（768px以上） ---------- */
@media screen and (min-width: 768px) {
  .tk-float {
    right: 15px;
    bottom: 50px;
    flex-direction: column;
  }
  .tk-float__btn {
    width: 56px;
    height: 56px;
  }

  /* 右からスライド */
  .tk-recent__sheet {
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    max-width: 90vw;
    transform: translateX(100%);
  }
}

/* ---------- スマホ（767px以下） ---------- */
@media screen and (max-width: 767px) {
  .tk-float {
    right: 10px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
  }
  .tk-float__btn {
    width: 44px;
    height: 44px;
  }
  .tk-float__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* 下からシート */
  .tk-recent__sheet {
    right: 0;
    bottom: 0;
    left: 0;
    max-height: 60vh;
    max-height: 60dvh;
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
  }
  .tk-recent__foot {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  .tk-float__btn,
  .tk-recent__overlay,
  .tk-recent__sheet {
    transition: none;
  }
}

/* ---------- 印刷時は非表示 ---------- */
@media print {
  .tk-float,
  .tk-recent {
    display: none !important;
  }
}
