/* ============================================================
   ハラタイル レザーワークス — カスタムCSS for BASE
   コンセプト：職人的ミニマリズム / Artisan Minimalism
   ============================================================ */

/* ---------- Google Fonts Import ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Noto+Sans+JP:wght@300;400;500&family=IM+Fell+English:ital@0;1&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --color-bg:        #F7F4EF;       /* 温かみのあるオフホワイト */
  --color-paper:     #EDEAE3;       /* ペーパーベージュ */
  --color-leather:   #5C3D2E;       /* ダークレザーブラウン */
  --color-tan:       #A07850;       /* タンレザー */
  --color-tan-light: #C9A87C;       /* ライトタン */
  --color-ink:       #2A1F1A;       /* インクブラック */
  --color-muted:     #8C7B6E;       /* ミュートブラウン */
  --color-border:    #D4C9BB;       /* ソフトボーダー */
  --color-accent:    #8B4513;       /* アクセント：サドルブラウン */

  --font-display:    'Cormorant Garamond', 'IM Fell English', Georgia, serif;
  --font-body:       'Noto Sans JP', sans-serif;
  --font-en:         'Cormorant Garamond', Georgia, serif;

  --spacing-section: 80px;
  --radius-sm:       3px;
  --radius-md:       6px;
  --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Texture Overlay (革の質感) ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ---------- Links ---------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--color-tan);
}

/* ============================================================
   HEADER
   ============================================================ */
#mainHeader {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 40px;
}

#shopHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 70px;
}

/* Logo */
#logo {
  display: flex;
  align-items: center;
}

#logo img {
  max-height: 45px;
  width: auto;
}

/* ロゴがテキストの場合 */
#shopHeader h1 a {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--color-leather);
}

/* Nav */
#shopHeader nav {
  display: flex;
  align-items: center;
}

#shopHeader nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

#shopHeader nav ul li a,
.mainHeaderNavColor {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-leather) !important;
  position: relative;
  padding-bottom: 2px;
}

#shopHeader nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-tan);
  transition: width var(--transition);
}

#shopHeader nav ul li a:hover::after {
  width: 100%;
}

/* Category dropdown */
#category-menu {
  position: relative;
  cursor: pointer;
}

#category-menu span {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-leather);
}

.category-list {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  min-width: 180px;
  padding: 8px 0;
  box-shadow: 0 8px 24px rgba(44, 31, 26, 0.1);
}

#category-menu:hover .category-list {
  display: block;
  animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Search */
.itemSearch__form {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border) !important;
  background: transparent;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.itemSearch__field {
  border: none;
  background: transparent;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--color-ink);
  outline: none;
  width: 120px;
}

.itemSearch__field::placeholder {
  color: var(--color-muted);
  letter-spacing: 0.2em;
  font-size: 11px;
}

.itemSearch__btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--color-leather);
}

/* ============================================================
   HERO / TOP AREA (IndexPage)
   ============================================================ */
/* キャテゴリタイトル */
.categoryTitle01 {
  text-align: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--color-leather) !important;
  padding: 40px 20px 24px;
  text-transform: uppercase;
}

/* 子カテゴリ */
.childCategoryList01 {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0 20px 32px;
}

.childCategoryList01_link {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted) !important;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: all var(--transition);
}

.childCategoryList01_link:hover {
  color: var(--color-tan) !important;
  border-color: var(--color-tan);
}

/* ============================================================
   ITEM LIST (商品一覧)
   ============================================================ */
#mainContent.itemList {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-section) 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 36px;
}

@media (max-width: 900px) {
  #mainContent.itemList {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 24px;
    padding: 48px 20px;
  }
}

@media (max-width: 580px) {
  #mainContent.itemList {
    grid-template-columns: 1fr;
    padding: 32px 16px;
  }
}

/* Item Card */
.item.part {
  background: transparent;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition);
}

.item.part:hover {
  transform: translateY(-4px);
}

/* Item Image */
.itemImg {
  position: relative;
  overflow: hidden;
  background: var(--color-paper);
  aspect-ratio: 1 / 1;
  margin-bottom: 16px;
}

.itemImg img.image-resize {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  filter: sepia(5%);
}

.item.part:hover .itemImg img.image-resize {
  transform: scale(1.04);
  filter: sepia(0%);
}

/* SOLD OUT Cover */
.soldout_cover {
  position: absolute;
  inset: 0;
  background: rgba(42, 31, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.soldout_cover p {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.35em;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
}

/* Item Info */
.itemTitle h2 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-ink);
  margin-bottom: 6px;
  line-height: 1.5;
  /* 2行でクリップ */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.itemDetail {
  list-style: none;
}

.itemPrice {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-leather);
}

/* 割引価格 */
.discountPrice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
}

.discountPrice__ratio {
  font-size: 12px;
  color: #fff;
  background: var(--color-accent);
  padding: 2px 6px;
  letter-spacing: 0.05em;
}

.discountPrice__calcPrice,
li.discountPrice .discountPrice__calcPrice {
  font-size: 16px;
  color: var(--color-leather);
}

/* Status badges */
.comingSoon, .preOrder, .lottery, .takeout, .community {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  margin-top: 6px;
}

/* ============================================================
   ITEM DETAIL PAGE
   ============================================================ */
#mainContent.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 40px var(--spacing-section);
}

/* Item Title */
.itemTitle {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--color-leather);
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

/* Layout: image + desc */
.item.clearfix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .item.clearfix {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  #mainContent.wrapper {
    padding: 40px 20px 60px;
  }
}

/* Detail Image Slider */
.itemImgSlide {
  position: relative;
}

#slideImg {
  list-style: none;
}

#slideImg li .imgBox img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: sepia(5%);
  transition: filter 0.4s;
}

#slideImg li .imgBox img:hover {
  filter: sepia(0%);
}

/* Thumbnail Pager */
#slideImgPager {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

#slideImgPager li {
  list-style: none;
}

#slideImgPager li a .smallImgBox {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

#slideImgPager li a .smallImgBox:hover,
#slideImgPager li a.active .smallImgBox {
  border-color: var(--color-tan);
}

#slideImgPager li a .smallImgBox img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Item Description */
.itemDescription {
  font-size: 14px;
  line-height: 2;
  color: var(--color-ink);
}

.itemDescription p {
  white-space: pre-line;
}

/* Purchase Box */
.purchase {
  border-top: 1px solid var(--color-border);
  padding-top: 40px;
  margin-top: 0;
}

/* Price in detail */
.itemPrice h2,
.purchase .itemPrice h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--color-leather);
  margin-bottom: 24px;
}

.discountPrice__default {
  text-decoration: line-through;
  color: var(--color-muted);
  font-size: 18px;
  margin-right: 8px;
}

/* SOLD OUT (detail) */
.itemPrice_soldout span {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--color-muted);
  text-transform: uppercase;
}

/* Purchase Button — BASEが生成するボタンをカスタム */
.purchase a[class*="btn"],
.purchase button[class*="btn"],
#appsCartButton,
.addToCartButton,
[id*="purchase"],
[class*="purchaseButton"],
[class*="purchase-button"],
[data-js*="purchase"] {
  display: inline-block;
  background: var(--color-leather) !important;
  color: #F7F4EF !important;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 14px 40px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
}

.purchase a[class*="btn"]:hover,
.purchase button[class*="btn"]:hover,
#appsCartButton:hover,
.addToCartButton:hover {
  background: var(--color-accent) !important;
  transform: translateY(-1px);
}

/* Select (バリエーション) */
select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 14px;
  border-radius: 0;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C3D2E' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
  margin-bottom: 16px;
}

select:focus {
  outline: none;
  border-color: var(--color-tan);
}

/* Share Buttons */
.shareButtons {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.main #about {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--spacing-section) 40px;
  text-align: center;
}

.main #about h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-leather);
  margin-bottom: 32px;
}

.main #about p {
  font-size: 14px;
  line-height: 2.2;
  color: var(--color-muted);
}

.social ul {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin-top: 40px;
}

.social ul li img {
  opacity: 0.6;
  transition: opacity var(--transition);
  filter: sepia(60%) saturate(0.5) hue-rotate(15deg);
}

.social ul li img:hover {
  opacity: 1;
}

/* ============================================================
   PINNED BLOG BANNER
   ============================================================ */
.pinnedBlog {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 40px;
}

.pinnedBlog_title {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--color-leather) !important;
  padding: 12px 20px;
  background: var(--color-paper);
  border-left: 3px solid var(--color-tan);
}

.pinnedBlog_title a {
  color: inherit;
}

/* Search Result Title */
.titleForSearchResult {
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.2em;
  color: var(--color-leather) !important;
  padding: 40px 0 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */
#mainFooter {
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-section);
  padding: 40px 40px 60px;
  background: var(--color-paper);
}

.footerMenu ul {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.footerNav {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted) !important;
  transition: color var(--transition);
}

.footerNav:hover {
  color: var(--color-leather) !important;
}

.footerMenu .boxRight {
  margin-left: auto;
}

/* Footer Copyright (BASE が生成する要素) */
#mainFooter + * {
  display: none;
}

/* ============================================================
   CATEGORY / ITEM CATEGORY APP
   ============================================================ */
.appsItemCategoryTag_lowerLink {
  color: var(--color-muted) !important;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  padding: 8px 20px;
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.appsItemCategoryTag_lowerLink:hover {
  color: var(--color-tan) !important;
  border-left-color: var(--color-tan);
  background: rgba(160, 120, 80, 0.05);
}

/* ============================================================
   ITEM LABEL (App)
   ============================================================ */
.appsItemLabel {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

/* ============================================================
   LOADING
   ============================================================ */
#loading {
  text-align: center;
  padding: 40px 0;
}

/* ============================================================
   WRAPPER utility
   ============================================================ */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* ============================================================
   RESPONSIVE — モバイル
   ============================================================ */
@media (max-width: 768px) {
  #mainHeader {
    padding: 0 20px;
  }

  #shopHeader {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
    gap: 12px;
  }

  #shopHeader nav ul {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  #shopHeader nav ul li a,
  .mainHeaderNavColor {
    font-size: 11px;
  }

  .wrapper,
  #mainContent.wrapper {
    padding-left: 20px;
    padding-right: 20px;
  }

  .main #about {
    padding: 48px 20px;
  }

  #mainFooter {
    padding: 32px 20px 48px;
  }

  .footerMenu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footerMenu .boxRight {
    margin-left: 0;
  }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.item.part {
  animation: fadeUp 0.5s ease both;
}

.item.part:nth-child(1) { animation-delay: 0.05s; }
.item.part:nth-child(2) { animation-delay: 0.10s; }
.item.part:nth-child(3) { animation-delay: 0.15s; }
.item.part:nth-child(4) { animation-delay: 0.20s; }
.item.part:nth-child(5) { animation-delay: 0.25s; }
.item.part:nth-child(6) { animation-delay: 0.30s; }

/* ============================================================
   DECORATIVE — 区切り線 (::after pseudo on sections)
   ============================================================ */
#mainContent.itemList::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-tan-light);
  margin: 0 auto 40px;
  grid-column: 1 / -1;
}

/* ============================================================
   CLEARFIX
   ============================================================ */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}
