/*
Theme Name: SWELL Child
Theme URI: https://shiki-hack.com
Description: SWELL子テーマ（アヘ堂）
Author: tukune1994
Author URI: https://shiki-hack.com
Template: swell
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swell-child
*/

/* ========================================
   トップページ：SWELLレイアウト上書き
   （サイドバーを消して1カラム全幅にする）
======================================== */
/* 重要：SWELLは home 等のクラスを <body> ではなく #body_wrap に付けるため
   セレクタは body.home ではなく .home（#body_wrap.home）で書く */
.home #content.l-content {
  display: block !important;
  max-width: 1140px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
/* サイドバーをID指定で確実に非表示 */
.home #sidebar,
.home .l-sidebar {
  display: none !important;
}
/* 念のため本文ラッパーも全幅化 */
.home #content.l-content .l-mainWrap,
.home #content.l-content .l-main {
  width: 100% !important;
  max-width: 100% !important;
}
/* SWELLのヒーロー（メインビジュアル）と投稿スライダーを非表示（自前ヒーローに置き換え） */
.home #main_visual,
.home #post_slider {
  display: none !important;
}

/* ========================================
   ラッパー（SWELLコンテンツ幅に合わせる）
======================================== */
#ahedo-top {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  box-sizing: border-box;
}

#ahedo-top .ahedo-inner {
  width: 100%;
}

/* ========================================
   ヒーロースライダー
======================================== */
#ahedo-top .ahedo-hero {
  margin: 0 0 36px;
}
#ahedo-top .ahedo-hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}
#ahedo-top .ahedo-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: block;
  color: #fff;
}
#ahedo-top .ahedo-hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}
#ahedo-top .ahedo-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#ahedo-top .ahedo-hero__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 24px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}
#ahedo-top .ahedo-hero__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #e24b4a;
  color: #fff;
  padding: 2px 9px;
  border-radius: 6px;
  margin-bottom: 7px;
}
#ahedo-top .ahedo-hero__title {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#ahedo-top .ahedo-hero__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
#ahedo-top .ahedo-hero__thumb {
  flex: 0 0 auto;
  width: 96px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: none;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s;
}
#ahedo-top .ahedo-hero__thumb.is-active {
  opacity: 1;
  border-color: #e24b4a;
}
#ahedo-top .ahedo-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) {
  #ahedo-top .ahedo-hero__title { font-size: 15px; }
  #ahedo-top .ahedo-hero__caption { padding: 28px 16px 14px; }
  #ahedo-top .ahedo-hero__thumb { width: 72px; }
}

/* ----- SWELL継承スタイルのリセット（スコープ内のみ） ----- */
#ahedo-top a {
  text-decoration: none !important;
  color: inherit;
  box-shadow: none !important;
  background-image: none !important;
}
#ahedo-top a::before,
#ahedo-top a::after {
  content: none !important;
}
#ahedo-top ul,
#ahedo-top ol,
#ahedo-top li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}
#ahedo-top img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}
#ahedo-top p {
  margin: 0;
  line-height: 1.4;
}

/* ========================================
   セクション
======================================== */
#ahedo-top .ahedo-section {
  margin: 0 0 40px;
  padding: 0;
}

#ahedo-top .ahedo-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

#ahedo-top .ahedo-section-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  padding: 0;
  border: none;
  line-height: 1.3;
}

#ahedo-top .ahedo-section-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #fde8e8;
  color: #c0392b;
  font-weight: 600;
}

#ahedo-top .ahedo-section-more {
  margin-left: auto;
  font-size: 13px;
  color: #888 !important;
}

#ahedo-top .ahedo-section-more:hover {
  color: #333 !important;
}

/* ========================================
   グリッド
======================================== */
#ahedo-top .ahedo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

/* ========================================
   カード
======================================== */
#ahedo-top .ahedo-card {
  position: relative;
  display: block;
  color: inherit;
}

#ahedo-top .ahedo-card:hover .ahedo-card__thumb img {
  transform: scale(1.04);
}

#ahedo-top .ahedo-card__thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

#ahedo-top .ahedo-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
  display: block;
}

#ahedo-top .ahedo-card__badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  line-height: 1.4;
  color: #fff;
  z-index: 2;
}

#ahedo-top .ahedo-card__badge--new  { background: #1d9e75; }
#ahedo-top .ahedo-card__badge--sale { background: #e24b4a; }

#ahedo-top .ahedo-card__badge--rank {
  background: #f0a500;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
}

#ahedo-top .ahedo-card__title {
  margin: 8px 0 2px !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--swl-clr-text, #333);
}

#ahedo-top .ahedo-card__meta {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ahedo-top .ahedo-card__price-original {
  text-decoration: line-through;
  color: #aaa;
  margin-right: 4px;
}

#ahedo-top .ahedo-card__price-sale {
  color: #c0392b;
  font-weight: 700;
}

/* ========================================
   タグピル
======================================== */
#ahedo-top .ahedo-tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
  padding: 0;
}

#ahedo-top .ahedo-tag-pill {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 14px;
  background: #f0eefe;
  color: #4a3db0 !important;
  transition: background 0.15s;
}

#ahedo-top .ahedo-tag-pill:hover {
  background: #ddd9fc;
  color: #2e247e !important;
}

/* ========================================
   年齢確認ゲート
======================================== */
#ahedo-age-gate {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ahedo-age-gate .ahedo-age-gate__box {
  background: #fff;
  border-radius: 12px;
  padding: 40px 36px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-sizing: border-box;
}

#ahedo-age-gate .ahedo-age-gate__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #222;
}

#ahedo-age-gate .ahedo-age-gate__text {
  font-size: 14px;
  color: #555;
  margin: 0 0 24px;
  line-height: 1.7;
}

#ahedo-age-gate .ahedo-age-gate__btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
}

#ahedo-age-gate .ahedo-age-gate__btn--yes {
  background: #e24b4a;
  color: #fff !important;
  margin-right: 10px;
}

#ahedo-age-gate .ahedo-age-gate__btn--no {
  background: #eee;
  color: #555 !important;
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 600px) {
  #ahedo-top {
    padding: 16px 12px 32px;
  }
  #ahedo-top .ahedo-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
  }
  #ahedo-top .ahedo-section-title {
    font-size: 17px;
  }
}
