/* =============================
   Marumi Dress - メインスタイル
   ============================= */

:root {
  --pink:         #9B3A5A;
  --pink-hover:   #7D2E47;
  --accent:       #a25661;
  --accent-hover: #8A4952;
  --cream:        #FAF6F2;
  --border:       #E8DDD8;
  --text:         #2C2C2C;
  --muted:        #999;
  --brand-dark:   #1a1a1a;
  --brand-black:  #0F1213;
}

* { box-sizing: border-box; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background-color: #fff;
}

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

/* ===== ヘッダー ===== */
.site-header {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .header-inner { padding: 12px 40px; }
}

/* 左側グループ（SNS + ハンバーガー） */
.header-left {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.header-sns {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 4px;
}

.sns-icon {
  color: #555;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 1.05rem;
  line-height: 1;
  transition: color 0.15s;
}

.sns-icon:hover { color: var(--pink); }
.sns-icon img { display: block; }

/* ロゴ内レイアウト */
.logo-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logo-emblem-img {
  flex-shrink: 0;
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin-bottom: 18px;
}

.logo-text {
  text-align: left;
}

/* ハンバーガーボタン */
.header-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #333;
  border-radius: 2px;
}

/* ロゴ */
.header-logo {
  flex: 1;
  text-align: center;
  padding: 0 8px;
}

.logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}

.logo-title {
  font-family: 'Libre Baskerville', 'Baskerville', serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--brand-black);
  letter-spacing: 0.08em;
  line-height: 1.1;
  display: block;
  white-space: nowrap;
}

.logo-link:hover .logo-title { color: var(--pink); }

.logo-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: #888;
  margin-top: 2px;
  display: block;
}

/* カテゴリ名 */
.category-name {
  font-family: 'Tenor Sans', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #1a1a1a;
  display: inline-block;
}

/* 認証コントロール */
.header-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

@media (min-width: 768px) {
  .auth-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
}

.btn-login {
  color: var(--brand-black);
  border: 1px solid var(--brand-black);
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  padding: 4px 8px;
  border-radius: 2px;
  text-decoration: none;
  line-height: 1.5;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.btn-login:hover {
  background: var(--brand-black);
  color: #fff;
  border-color: var(--brand-black);
}

.btn-register {
  color: #fff;
  background: var(--brand-black);
  border: 1px solid var(--brand-black);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  padding: 4px 8px;
  border-radius: 2px;
  text-decoration: none;
  line-height: 1.5;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.btn-register:hover {
  background: #2a2d2e;
  border-color: #2a2d2e;
  color: #fff;
}

@media (min-width: 768px) {
  .btn-login, .btn-register {
    font-size: 0.72rem;
    padding: 5px 12px;
  }
}

.cart-icon-link {
  color: #444;
  text-decoration: none;
  position: relative;
  display: inline-block;
}

.cart-icon-link:hover { color: var(--pink); }

.user-icon-link {
  color: #444;
  text-decoration: none;
}

.user-icon-link:hover { color: var(--pink); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.6rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ===== サブナビゲーション ===== */
.sub-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.sub-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sub-nav-inner::-webkit-scrollbar { display: none; }

.sub-nav-list {
  display: flex;
  justify-content: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .sub-nav-list {
    justify-content: center;
  }
}

.sub-nav-list li a {
  display: block;
  flex: 0 0 auto;
  padding: 10px 24px;
  color: #222;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: 0.06em;
  transition: background 0.15s, color 0.15s;
}

.sub-nav-list li a:hover {
  background: var(--cream);
  color: var(--pink);
}

@media (min-width: 768px) {
  .sub-nav-list li a {
    font-size: 0.82rem;
    padding: 12px 36px;
  }
}

/* ===== ヒーローカルーセル（Splide） ===== */
.hero-splide-wrapper {
  margin: 20px 0;
  overflow: hidden;
}

.hero-splide-wrapper picture {
  display: block;
  width: 100%;
  overflow: hidden;
}

.hero-slide-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

@media (max-width: 767px) {
  .hero-splide-wrapper .splide__track {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .hero-splide-wrapper .splide__list {
    gap: 0 !important;
  }

  .hero-splide-wrapper .splide__slide {
    opacity: 1 !important;
    width: 100% !important;
  }

  .hero-slide-img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center top;
    background: #faf5f3;
  }
}


.splide__slide {
  opacity: 0.55;
  transition: opacity 0.4s;
}

.splide__slide.is-active {
  opacity: 1;
}

.splide__arrow {
  background: rgba(255, 255, 255, 0.88);
  opacity: 1;
  width: 2.4em;
  height: 2.4em;
}

.splide__arrow:hover { background: #fff; }
.splide__arrow svg { fill: #333; width: 0.9em; height: 0.9em; }

/* ===== クイックリンクグリッド ===== */
.quick-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.quick-links-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  font-size: 0.82rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.quick-links-grid a:hover {
  background: var(--cream);
  color: var(--text);
}

/* ===== セクションタイトル ===== */
.section-title {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}

/* セクション見出し */
.section-banner {
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 0;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

/* ===== ドレスカード ===== */
.ratio-3x4 {
  --bs-aspect-ratio: 133.33%;
}

.dress-card {
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dress-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

@media (max-width: 768px) {
  .dress-card:hover { transform: none; }
}

/* ===== サムネイル ===== */
.thumbnail-img {
  width: 70px;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s, border-color 0.15s;
}

.thumbnail-img:hover { opacity: 1; }

/* ===== メッセージアラート ===== */
.alert-error {
  --bs-alert-color: #842029;
  --bs-alert-bg: #f8d7da;
  --bs-alert-border-color: #f5c2c7;
}

/* ===== フォーム ===== */
.form-control:focus,
.form-select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 0.2rem rgba(155, 58, 90, 0.2);
}

/* ===== Bootstrap 上書き ===== */
.btn-dark {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  letter-spacing: 0.05em;
}

.btn-dark:hover {
  background-color: #333;
  border-color: #333;
}

.btn-primary { background: var(--pink); border-color: var(--pink); }
.btn-primary:hover, .btn-primary:focus {
  background: var(--pink-hover);
  border-color: var(--pink-hover);
}

.btn-outline-primary { color: var(--pink); border-color: var(--pink); }
.btn-outline-primary:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}

.btn-outline-dark { border-color: var(--text); color: var(--text); }
.btn-outline-dark:hover { background: var(--text); color: #fff; border-color: var(--text); }

.pagination .page-link { color: var(--pink); }
.pagination .page-item.active .page-link {
  background: var(--pink);
  border-color: var(--pink);
}

.card { border-radius: 8px; }

/* ===== フッター ===== */
.site-footer {
  background: var(--brand-black);
  color: #999;
  margin-top: auto;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.footer-brand {
  flex: 0 0 auto;
  min-width: 160px;
}

.footer-logo-text {
  font-family: 'Libre Baskerville', 'Baskerville', serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 0.72rem;
  color: #666;
  margin-bottom: 14px;
}

.footer-sns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #777;
  text-decoration: none;
  font-size: 0.78rem;
  transition: color 0.15s;
}

.footer-social img,
.footer-social .bi {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.footer-social:hover { color: #bbb; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  flex: 1;
  justify-content: flex-end;
}

.footer-col-title {
  color: #ddd;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #777;
  text-decoration: none;
  font-size: 0.76rem;
  transition: color 0.15s;
}

.footer-col ul li a:hover { color: #ccc; }

.footer-bottom {
  border-top: 1px solid #2e2e2e;
  padding: 14px 24px;
  text-align: center;
  font-size: 0.7rem;
  color: #555;
}

@media (max-width: 767px) {
  .footer-top { padding: 32px 20px 24px; }
  .footer-links { justify-content: flex-start; }
}

/* ===== ドレスカードオーバーレイ ===== */
.dress-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 7px;
  text-align: center;
  transition: background 0.2s;
}

.dress-card:hover .dress-card-overlay {
  background: rgba(0, 0, 0, 0.55);
}

/* ===== モバイル調整 ===== */
@media (max-width: 767px) {
  /* モバイルではSNSアイコンを非表示（ハンバーガーメニュー内に移動） */
  .header-sns { display: none; }
  .logo-emblem-img {
    width: 36px;
    height: 36px;
    margin-bottom: 7px;
  }
  .logo-title { font-size: 1.1rem; letter-spacing: 0.08em; }
  .logo-subtitle { font-size: 0.58rem; letter-spacing: 0.04em; }
  .footer-logo-text { font-size: 1.1rem; }
  .logo-inner { gap: 7px; }
  .header-hamburger { width: 38px; height: 38px; }
  .btn-login, .btn-register { font-size: 0.58rem; padding: 3px 6px; }
  .category-name { font-size: 0.88rem; letter-spacing: 0.18em; }
}

@media (max-width: 480px) {
  .logo-emblem-img { width: 30px; height: 30px; margin-bottom: 5px; }
  .logo-title { font-size: 0.95rem; letter-spacing: 0.06em; }
  .logo-subtitle { display: none; }
  .footer-logo-text { font-size: 0.95rem; }
  .header-inner { padding: 6px 10px; }
  .category-name { font-size: 0.82rem; letter-spacing: 0.12em; }
}
