/* ========================================
   KARTE Cafe - スタイルシート
   ======================================== */

/* リセット・ベース */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  color: #333;
  background: #FFF8F0;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

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

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #6B4226;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-size: 15px;
  color: #666;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #6B4226;
  font-weight: 600;
}

.cart-icon {
  position: relative;
  font-size: 22px;
  padding: 4px;
}

.cart-icon-symbol {
  display: inline-block;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background: #E53E3E;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ========================================
   ヒーロー
   ======================================== */
.hero {
  background: linear-gradient(135deg, #6B4226, #A0826D, #D4A574);
  color: #fff;
  text-align: center;
  padding: 80px 20px;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 28px;
}

/* ========================================
   ボタン
   ======================================== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #6B4226;
  color: #fff;
}

.btn-primary:hover {
  background: #5A3720;
}

.btn-secondary {
  background: transparent;
  color: #6B4226;
  border: 2px solid #6B4226;
}

.btn-secondary:hover {
  background: #6B4226;
  color: #fff;
}

/* ========================================
   セクション
   ======================================== */
.section-title {
  font-size: 24px;
  color: #333;
  text-align: center;
  margin-bottom: 32px;
  font-weight: 700;
}

.section-cta {
  text-align: center;
  margin-top: 32px;
}

.page-title {
  font-size: 28px;
  color: #333;
  margin-bottom: 28px;
  font-weight: 700;
}

/* 時間帯おすすめセクション */
.time-recommend-section {
  background: #F5EDE3;
  padding: 32px 0;
}

/* ========================================
   商品グリッド
   ======================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image-icon {
  font-size: 48px;
  opacity: 0.6;
}

.product-card-body {
  padding: 16px;
}

.product-category-tag {
  display: inline-block;
  font-size: 11px;
  color: #6B4226;
  background: #F5EDE3;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 6px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #6B4226;
}

/* ========================================
   カテゴリフィルター
   ======================================== */
.filter-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 24px;
  border: 2px solid #D4A574;
  background: transparent;
  color: #6B4226;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background: #6B4226;
  color: #fff;
  border-color: #6B4226;
}

/* ========================================
   商品詳細
   ======================================== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.product-detail-image {
  background: linear-gradient(135deg, #8B6914, #C4A882);
  border-radius: 16px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-icon-large {
  font-size: 80px;
  opacity: 0.5;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-detail-category {
  font-size: 13px;
  color: #6B4226;
  background: #F5EDE3;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.product-detail-name {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

.product-detail-price {
  font-size: 26px;
  font-weight: 700;
  color: #6B4226;
  margin-bottom: 16px;
}

.product-detail-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.8;
  margin-bottom: 28px;
}

.product-detail-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #f5f5f5;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #eee;
}

.qty-input {
  width: 50px;
  height: 40px;
  text-align: center;
  border: none;
  font-size: 16px;
  -moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.add-to-cart-btn {
  flex: 1;
  padding: 12px 24px;
}

/* ========================================
   レビュー
   ======================================== */
.reviews-section {
  border-top: 1px solid #eee;
  padding-top: 36px;
}

.reviews-title {
  font-size: 20px;
  color: #333;
  margin-bottom: 20px;
  font-weight: 700;
}

.review-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.review-stars {
  color: #F5A623;
  font-size: 16px;
}

.review-author {
  font-size: 14px;
  color: #999;
}

.review-text {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

/* ========================================
   カート
   ======================================== */
.cart-empty {
  text-align: center;
  padding: 60px 0;
}

.cart-empty-icon {
  font-size: 64px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.cart-empty-text {
  font-size: 16px;
  color: #999;
  margin-bottom: 24px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.cart-item-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 14px;
  color: #6B4226;
  font-weight: 600;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-qty-btn:hover {
  background: #f5f5f5;
}

.cart-item-qty-value {
  font-size: 15px;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.cart-item-remove:hover {
  color: #E53E3E;
}

/* カート概要 */
.cart-summary {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 80px;
}

.cart-summary-title {
  font-size: 18px;
  margin-bottom: 20px;
  color: #333;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 15px;
  color: #666;
}

.cart-summary-total {
  border-top: 2px solid #eee;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #333;
}

.checkout-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  font-size: 16px;
}

.cart-continue-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #6B4226;
  font-size: 14px;
}

.cart-continue-link:hover {
  text-decoration: underline;
}

/* ========================================
   トースト通知
   ======================================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========================================
   フッター
   ======================================== */
.footer {
  background: #2C1810;
  color: #B8947A;
  text-align: center;
  padding: 24px 20px;
  font-size: 13px;
  margin-top: 48px;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 26px;
  }

  .hero {
    padding: 56px 20px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-detail-image {
    height: 280px;
  }

  .nav {
    gap: 16px;
  }

  .nav-link {
    font-size: 13px;
  }

  .logo {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-actions {
    flex-direction: column;
  }

  .add-to-cart-btn {
    width: 100%;
  }

  .filter-buttons {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 13px;
  }
}
