/* ============================================================
   ショップ 一覧 (/shop/) + 商品詳細 (/shop/商品/)   ★2026-07-08 和モダンに刷新
   配色: 深緑 #17603a / 金 #c9a54b / 砂 #efe7d4 でヘッダーと統一
   ============================================================ */

/* ── 一覧ページ全体 ── */
.shop-page { padding: 30px 16px 64px; background: #f4efe4; }
.shop-page__inner { max-width: 1200px; margin: 0 auto; }

/* ── 検索・並び替えツールバー ── */
.shop-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin: 0 0 28px;
}
.shop-toolbar__search { display: flex; flex: 1 1 260px; max-width: 440px; }
.shop-toolbar__search-input {
  flex: 1; padding: 11px 16px; border: 1px solid #d8cba8; border-right: none;
  border-radius: 8px 0 0 8px; font-size: 15px; background: #fff;
}
.shop-toolbar__search-input:focus { outline: none; border-color: #17603a; }
.shop-toolbar__search-btn {
  padding: 0 18px; border: 1px solid #17603a; background: #17603a; color: #fff;
  border-radius: 0 8px 8px 0; cursor: pointer; font-size: 16px;
}
.shop-toolbar__search-btn:hover { background: #1e7947; }
.shop-toolbar__sort { display: flex; align-items: center; gap: 8px; }
.shop-toolbar__sort-label { font-size: 13px; color: #6a7268; font-weight: 700; }
.shop-toolbar__sort-select {
  padding: 10px 14px; border: 1px solid #d8cba8; border-radius: 8px; background: #fff; font-size: 14px; color: #23331f;
}

/* ── 商品グリッド ── */
.shop-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 1000px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ── 商品カード ── */
.shop-card {
  background: #fff; border: 1px solid #e6dcc4; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s, border-color .18s;
}
.shop-card:hover { box-shadow: 0 12px 26px rgba(20,60,40,.13); transform: translateY(-3px); border-color: #c9a54b; }
.shop-card__link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }
.shop-card__image-wrap { position: relative; aspect-ratio: 1 / 1; background: #f1ebde; overflow: hidden; }
.shop-card__image { width: 100%; height: 100%; object-fit: cover; }
.shop-card__image--placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: #b9a878; height: 100%; background: #f1ebde;
}
.shop-card__image--placeholder span { font-size: 12px; color: #a99d78; letter-spacing: .08em; }
.shop-card--soldout .shop-card__image { filter: grayscale(.55) opacity(.7); }
.shop-card__soldout-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(23,50,35,.86); color: #fff;
  font-size: 11.5px; font-weight: 800; padding: 5px 12px; border-radius: 20px; letter-spacing: .08em;
}
.shop-card__body { padding: 14px 15px 6px; flex: 1; }
.shop-card__id-line { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.shop-card__number { font-size: 11px; font-weight: 700; color: #17603a; background: #eaf1ec; padding: 2px 8px; border-radius: 4px; }
.shop-card__genus { font-size: 11.5px; color: #8a8270; }
.shop-card__title {
  font-size: 14.5px; font-weight: 700; color: #23331f; margin: 2px 0 8px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card__price { margin: 4px 0 0; color: #a8551f; display: flex; align-items: baseline; gap: 1px; }
.shop-card__price-value { font-size: 21px; font-weight: 800; letter-spacing: .01em; }
.shop-card__price-unit { font-size: 13px; font-weight: 800; }
.shop-card__price-tax { font-size: 11px; color: #9a917c; margin-left: 4px; font-weight: 400; }
.shop-card__action { padding: 6px 15px 15px; }
.shop-card__cart-btn {
  width: 100%; padding: 11px; font-size: 13.5px; font-weight: 800; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #17603a; color: #fff; border: 1px solid #17603a; cursor: pointer; transition: background .15s;
}
.shop-card__cart-btn:hover { background: #1e7947; }
.shop-card__cart-btn[disabled], .shop-card__cart-btn.btn--secondary {
  background: #f0ece1; color: #a99d84; border-color: #e0d6bf; cursor: default;
}

/* ── ページネーション ── */
.shop-pagination { display: flex; justify-content: center; gap: 7px; margin-top: 36px; flex-wrap: wrap; }
.shop-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
  padding: 0 12px; border: 1px solid #d8cba8; border-radius: 8px; background: #fff; color: #23331f;
  text-decoration: none; font-size: 14px; font-weight: 700;
}
.shop-pagination .page-numbers.current { background: #17603a; color: #fff; border-color: #17603a; }
.shop-pagination .page-numbers:hover:not(.current) { background: #f2ede1; border-color: #c9a54b; }
.shop-empty { text-align: center; color: #6a7268; padding: 70px 0; font-size: 15px; }

/* ============================================================
   商品詳細
   ============================================================ */
.shop-detail { padding: 26px 16px 64px; background: #f4efe4; }
.shop-detail__inner { max-width: 1080px; margin: 0 auto; }
.shop-detail__back {
  display: inline-block; margin-bottom: 18px; color: #17603a; text-decoration: none; font-size: 14px; font-weight: 700;
}
.shop-detail__back:hover { text-decoration: underline; }
.shop-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: #fff; border: 1px solid #e6dcc4; border-radius: 16px; padding: 26px; }
@media (max-width: 860px) { .shop-detail__grid { grid-template-columns: 1fr; gap: 24px; padding: 18px; } }

/* ギャラリー */
.shop-detail__gallery { position: relative; }
.shop-gallery { border-radius: 12px; overflow: hidden; background: #f1ebde; border: 1px solid #e6dcc4; }
.shop-gallery .swiper-slide { aspect-ratio: 1 / 1; }
.shop-gallery .swiper-slide img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.shop-gallery .swiper-button-prev, .shop-gallery .swiper-button-next { color: #17603a; }
.shop-gallery .swiper-pagination { color: #23331f; font-size: 13px; }
.shop-detail__no-image {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  background: #f1ebde; color: #b9a878; border-radius: 12px; border: 1px solid #e6dcc4;
}

/* 情報 */
.shop-detail__meta { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; flex-wrap: wrap; }
.shop-detail__number { font-size: 12px; font-weight: 700; color: #17603a; background: #eaf1ec; padding: 3px 10px; border-radius: 5px; }
.shop-detail__genus { font-size: 13px; color: #8a8270; }
.shop-detail__title { font-size: 25px; font-weight: 800; color: #1a3a24; margin: 0 0 16px; line-height: 1.45; }
.shop-detail__price { margin: 0 0 10px; color: #a8551f; }
.shop-detail__price-value { font-size: 33px; font-weight: 800; }
.shop-detail__price-unit { font-size: 18px; font-weight: 800; }
.shop-detail__price-tax { font-size: 13px; color: #9a917c; margin-left: 5px; }
.shop-detail__stock { margin: 0 0 22px; font-size: 14px; }
.shop-detail__stock--in { color: #17603a; font-weight: 700; }
.shop-detail__stock--low { color: #c9761a; font-weight: 700; }
.shop-detail__stock--out { color: #d63638; font-weight: 700; }

.shop-detail__buy {
  border: 1px solid #e6dcc4; border-radius: 12px; padding: 20px; background: #faf7ef; margin-bottom: 18px;
}
.shop-detail__qty { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.shop-detail__qty label { font-weight: 700; color: #23331f; }
.shop-detail__buttons { display: flex; gap: 12px; }
.shop-detail__buttons .btn { flex: 1; }
@media (max-width: 520px) { .shop-detail__buttons { flex-direction: column; } }
.shop-detail__soldout-note { color: #d63638; font-weight: 700; }
.shop-detail__shipping-note {
  font-size: 13px; color: #5a6b5e; background: #f0ece1; border-radius: 8px; padding: 11px 13px; margin: 0 0 20px;
}

/* 数量ステッパー（詳細・カート共通） */
.shop-qty-stepper { display: inline-flex; align-items: stretch; border: 1px solid #d8cba8; border-radius: 8px; overflow: hidden; }
.shop-qty-stepper__btn {
  width: 40px; border: none; background: #f2ede1; color: #23331f; font-size: 20px; cursor: pointer; line-height: 1;
}
.shop-qty-stepper__btn:hover { background: #e8e0cd; }
.shop-qty-stepper__input {
  width: 56px; text-align: center; border: none; border-left: 1px solid #d8cba8; border-right: 1px solid #d8cba8;
  font-size: 16px; -moz-appearance: textfield;
}
.shop-qty-stepper__input::-webkit-outer-spin-button,
.shop-qty-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 商品説明 */
.shop-detail__section-title { font-size: 16px; font-weight: 800; color: #1a3a24; border-left: 4px solid #c9a54b; padding-left: 11px; margin: 4px 0 12px; }
.shop-detail__body { line-height: 1.95; color: #33422e; font-size: 15px; }
.shop-detail__body img { max-width: 100%; height: auto; border-radius: 8px; }

/* ============================================================
   スマホ用フローティングカートボタン（右下の丸ボタン）
   ============================================================ */
.shop-cart-fab {
  position: fixed; right: 16px; bottom: 20px; z-index: 900; display: none;
  align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
  background: #17603a; color: #fff; box-shadow: 0 6px 18px rgba(20,60,40,.3); text-decoration: none;
}
.shop-cart-fab:hover { background: #1e7947; }
.shop-cart-fab[hidden] { display: none !important; }
.shop-cart-fab__count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: #c9a54b; color: #173404; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.shop-cart-fab__count[hidden] { display: none; }
@media (max-width: 900px) { .shop-cart-fab { display: inline-flex; } }

/* ============================================================
   スマホ向けの細かい調整
   ============================================================ */
@media (max-width: 720px) {
  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .shop-toolbar__search { max-width: none; }
  .shop-toolbar__sort { justify-content: space-between; }
  .shop-toolbar__sort-select { flex: 1; }
}
@media (max-width: 520px) {
  .shop-page { padding: 18px 12px 52px; }
  .shop-card__price-value { font-size: 19px; }
  .shop-detail__title { font-size: 21px; }
  .shop-detail__price-value { font-size: 29px; }
  .shop-detail__buy { padding: 15px; }
  .shop-detail__buttons { margin-bottom: 8px; }
}

/* ── ATELIER: ショップカードをエディトリアルに 2026-07-08 ── */
.shop-card { border-radius: 5px; }
.shop-card__image-wrap::after {
  content:""; position:absolute; left:0; bottom:0; width:100%; height:2px; background:#c9a54b;
  transform:scaleX(0); transform-origin:left; transition:transform .35s cubic-bezier(.2,.7,.2,1); z-index:2;
}
.shop-card:hover .shop-card__image-wrap::after { transform:scaleX(1); }
.shop-card__image { transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.shop-card:hover .shop-card__image { transform: scale(1.06); }
.shop-card__title { font-weight:600; font-size:15px; letter-spacing:.02em; }
.shop-card__genus { letter-spacing:.06em; }
.shop-card__cart-btn { letter-spacing:.08em; border-radius:4px; }

/* 入場アニメ（先頭カードを時差で立ち上げ） */
@keyframes shopUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
.shop-grid .shop-card { opacity:0; animation: shopUp .7s cubic-bezier(.2,.7,.2,1) both; }
.shop-grid .shop-card:nth-child(1){ animation-delay:.02s } .shop-grid .shop-card:nth-child(2){ animation-delay:.07s }
.shop-grid .shop-card:nth-child(3){ animation-delay:.12s } .shop-grid .shop-card:nth-child(4){ animation-delay:.17s }
.shop-grid .shop-card:nth-child(5){ animation-delay:.22s } .shop-grid .shop-card:nth-child(6){ animation-delay:.27s }
.shop-grid .shop-card:nth-child(7){ animation-delay:.32s } .shop-grid .shop-card:nth-child(8){ animation-delay:.37s }

@media (prefers-reduced-motion: reduce) {
  .shop-grid .shop-card { animation:none; opacity:1; }
}
