/* ============================================================
   IXPLEAS たばこ通販 - モダンスタイル
   深いコーヒーブラウン + ゴールド アクセント
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: "メイリオ", "Meiryo", "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: #3a2f28;
  background: #f5efe6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #8b5a2b;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: #c9a96e; text-decoration: underline; }

img { max-width: 100%; height: auto; border: none; }

/* ===== Layout ===== */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 30px rgba(0,0,0,0.1);
  min-height: 100vh;
}

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

/* ===== Header ===== */
.site-header {
  background: linear-gradient(135deg, #3d2b1f 0%, #5c3d2e 100%);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 30px;
}

.site-logo {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
}
.site-logo a {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-logo .logo-mark {
  color: #d4af37;
  font-size: 28px;
}
.site-logo .logo-text {
  font-size: 14px;
  display: block;
  color: #c9a96e;
  font-weight: normal;
  letter-spacing: 1px;
}

.header-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.header-links a {
  color: #e8dcc8;
}
.header-links a:hover {
  color: #d4af37;
  text-decoration: none;
}

/* ===== Global Navigation ===== */
.main-nav {
  background: #2d1f15;
  border-top: 1px solid #6b4f3d;
  border-bottom: 2px solid #d4af37;
}
.main-nav ul {
  display: flex;
  list-style: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
}
.main-nav li {
  flex: 1;
  text-align: center;
  position: relative;
}
.main-nav li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: #4a3828;
}
.main-nav a {
  display: block;
  padding: 14px 8px;
  color: #f5efe6;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.main-nav a:hover {
  background: #4a3828;
  color: #d4af37;
  text-decoration: none;
}
.main-nav a.active {
  color: #d4af37;
  background: #4a3828;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  background: #f9f5ee;
  padding: 12px 30px;
  font-size: 13px;
  color: #7a6b5d;
  border-bottom: 1px solid #e8dcc8;
}
.breadcrumb a { color: #8b5a2b; }

/* ===== Two Column Layout ===== */
.two-col {
  display: flex;
  gap: 30px;
  padding: 30px;
}

.sidebar {
  width: 200px;
  flex-shrink: 0;
}
.sidebar-menu {
  background: #f9f5ee;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e8dcc8;
}
.sidebar-menu .menu-title {
  background: linear-gradient(135deg, #5c3d2e 0%, #8b5a2b 100%);
  color: #fff;
  padding: 12px 15px;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  letter-spacing: 1px;
}
.sidebar-menu ul { list-style: none; }
.sidebar-menu li {
  border-bottom: 1px solid #e8dcc8;
}
.sidebar-menu li:last-child { border-bottom: none; }
.sidebar-menu a {
  display: block;
  padding: 10px 15px;
  font-size: 13px;
  color: #3a2f28;
  transition: all 0.2s ease;
}
.sidebar-menu a:hover {
  background: #f0e6d6;
  color: #8b5a2b;
  text-decoration: none;
  padding-left: 20px;
}

.main-content {
  flex: 1;
  min-width: 0;
}

/* ===== Single Column ===== */
.single-col {
  padding: 30px;
}

/* ===== Page Title ===== */
.page-title {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #d4af37;
}
.page-title h1 {
  font-size: 26px;
  font-weight: bold;
  color: #3d2b1f;
  letter-spacing: 2px;
}
.page-title .title-sub {
  font-size: 12px;
  color: #a08060;
  margin-top: 5px;
}

/* ===== Hero Section (Index) ===== */
.hero {
  background: linear-gradient(135deg, #f5efe6 0%, #ebe0cc 100%);
  padding: 40px 30px;
  text-align: center;
  border-bottom: 3px solid #d4af37;
}
.hero h2 {
  font-size: 22px;
  color: #3d2b1f;
  margin-bottom: 10px;
  font-weight: bold;
}
.hero p {
  color: #7a6b5d;
  line-height: 1.8;
}
.hero .hero-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 25px;
  flex-wrap: wrap;
}
.hero .feature-item {
  text-align: center;
}
.hero .feature-num {
  font-size: 32px;
  font-weight: bold;
  color: #d4af37;
}
.hero .feature-label {
  font-size: 13px;
  color: #7a6b5d;
}

/* ===== Product Category Cards ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.category-card {
  background: #f9f5ee;
  border: 1px solid #e8dcc8;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: #d4af37;
}
.category-card .cat-header {
  background: linear-gradient(135deg, #8b5a2b 0%, #5c3d2e 100%);
  color: #fff;
  padding: 12px 15px;
  font-weight: bold;
  text-align: center;
}
.category-card .cat-header a {
  color: #fff;
  font-size: 16px;
}
.category-card .cat-header a:hover {
  color: #d4af37;
  text-decoration: none;
}
.category-card .cat-body {
  padding: 15px;
  font-size: 13px;
  color: #5c4a3a;
  line-height: 1.7;
}
.category-card .cat-footer {
  padding: 8px 15px;
  border-top: 1px solid #e8dcc8;
  text-align: right;
  font-size: 12px;
}
.category-card .cat-footer a {
  color: #8b5a2b;
  font-weight: bold;
}

/* ===== Product List (For tabaco_a01 etc) ===== */
.product-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  background: #fff;
}
.product-table th {
  background: linear-gradient(135deg, #5c3d2e 0%, #8b5a2b 100%);
  color: #fff;
  padding: 10px 12px;
  font-weight: bold;
  font-size: 13px;
  text-align: left;
  border: 1px solid #4a3828;
}
.product-table td {
  padding: 10px 12px;
  border: 1px solid #e0d5c3;
  vertical-align: middle;
  font-size: 13px;
}
.product-table tr:nth-child(even) td {
  background: #faf7f2;
}
.product-table tr:hover td {
  background: #f5efe6;
}
.product-table .price {
  color: #b8860b;
  font-weight: bold;
  white-space: nowrap;
}
.product-table .product-img {
  width: 60px;
  text-align: center;
}
.product-table .product-img img {
  max-width: 50px;
  max-height: 70px;
}

/* ===== Ranking ===== */
.rank-list {
  list-style: none;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid #e8dcc8;
  transition: background 0.2s ease;
}
.rank-item:hover {
  background: #faf7f2;
}
.rank-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #b8860b); }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #808080); }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #8b4513); }
.rank-other { background: #8b5a2b; }
.rank-content { flex: 1; }
.rank-name {
  font-weight: bold;
  color: #3d2b1f;
  font-size: 15px;
}
.rank-desc {
  font-size: 12px;
  color: #7a6b5d;
  margin-top: 3px;
}
.rank-price {
  font-size: 16px;
  font-weight: bold;
  color: #b8860b;
  flex-shrink: 0;
}

/* ===== Info Box ===== */
.info-box {
  background: #faf7f2;
  border-left: 4px solid #d4af37;
  padding: 18px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}
.info-box h3 {
  font-size: 16px;
  font-weight: bold;
  color: #5c3d2e;
  margin-bottom: 10px;
}
.info-box p {
  font-size: 14px;
  line-height: 1.8;
  color: #5c4a3a;
}

/* ===== Notice Box (Blue/Warning) ===== */
.notice-box {
  background: #fff8f0;
  border: 1px solid #e8c87a;
  border-radius: 6px;
  padding: 15px 20px;
  margin: 15px 0;
}
.notice-box strong {
  color: #b8860b;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 20px;
  font-weight: bold;
  color: #3d2b1f;
  padding: 10px 0 10px 15px;
  border-left: 4px solid #d4af37;
  margin: 25px 0 15px;
  letter-spacing: 1px;
}
.section-subtitle {
  font-size: 16px;
  font-weight: bold;
  color: #5c3d2e;
  margin: 20px 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px dashed #c9a96e;
}

/* ===== Footer ===== */
.site-footer {
  background: #2d1f15;
  color: #c4b59d;
  padding: 40px 30px 20px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-info {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #4a3828;
  margin-bottom: 20px;
}
.footer-logo {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.footer-logo .gold { color: #d4af37; }
.footer-desc {
  font-size: 13px;
  line-height: 1.8;
  color: #a08870;
}
.footer-nav h4 {
  color: #d4af37;
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: bold;
}
.footer-nav ul { list-style: none; }
.footer-nav li {
  margin-bottom: 6px;
  font-size: 13px;
}
.footer-nav a {
  color: #c4b59d;
}
.footer-nav a:hover {
  color: #d4af37;
}

/* ===== Age Warning ===== */
.age-warning {
  background: #1a3a6b;
  border-radius: 8px;
  padding: 15px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}
.age-warning .age-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  color: #1a3a6b;
  flex-shrink: 0;
}
.age-warning .age-text {
  color: #fff;
  font-size: 13px;
  line-height: 1.7;
}

/* ===== Copyright ===== */
.copyright {
  text-align: center;
  font-size: 12px;
  color: #7a6850;
  padding-top: 15px;
  border-top: 1px solid #3d2b1f;
}

/* ===== Modal (Age Confirmation) ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 35px 40px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-content h3 {
  font-size: 20px;
  color: #3d2b1f;
  margin-bottom: 15px;
  font-weight: bold;
}
.modal-content p {
  font-size: 14px;
  color: #5c4a3a;
  line-height: 1.8;
  margin-bottom: 20px;
}
.modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}
.modal-btn {
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.modal-btn.enter {
  background: linear-gradient(135deg, #8b5a2b, #5c3d2e);
  color: #fff;
}
.modal-btn.enter:hover {
  background: linear-gradient(135deg, #a06830, #6b4a35);
  transform: translateY(-1px);
}
.modal-btn.leave {
  background: #e8e8e8;
  color: #666;
}
.modal-btn.leave:hover {
  background: #d0d0d0;
}

/* ===== Diary / Blog ===== */
.diary-entry {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8dcc8;
}
.diary-date {
  font-size: 13px;
  color: #a08060;
  margin-bottom: 5px;
}
.diary-title {
  font-size: 16px;
  font-weight: bold;
  color: #5c3d2e;
  margin-bottom: 8px;
}
.diary-body {
  font-size: 14px;
  line-height: 1.8;
  color: #3a2f28;
}

/* ===== Form ===== */
.contact-form {
  background: #faf7f2;
  border-radius: 8px;
  padding: 25px;
  margin: 20px 0;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  color: #5c3d2e;
  margin-bottom: 5px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4c4a8;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 3px rgba(212,175,55,0.3);
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .wrapper { box-shadow: none; }

  .header-top {
    flex-direction: column;
    gap: 10px;
    padding: 12px 15px;
  }
  .site-logo { font-size: 20px; }
  .header-links { gap: 15px; font-size: 12px; }

  .main-nav ul {
    flex-wrap: wrap;
    padding: 0;
  }
  .main-nav li {
    flex: 0 0 50%;
    border-bottom: 1px solid #4a3828;
  }
  .main-nav li::before { display: none; }
  .main-nav a { padding: 12px 6px; font-size: 13px; }

  .two-col {
    flex-direction: column;
    padding: 15px;
    gap: 20px;
  }
  .sidebar { width: 100%; }
  .single-col { padding: 15px; }

  .page-title h1 { font-size: 20px; }
  .section-title { font-size: 17px; }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .footer-info {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .hero { padding: 25px 15px; }
  .hero h2 { font-size: 18px; }
  .hero .hero-features { gap: 20px; }
  .hero .feature-num { font-size: 26px; }

  .product-table {
    font-size: 12px;
  }
  .product-table th,
  .product-table td {
    padding: 6px 8px;
  }

  .rank-item {
    flex-wrap: wrap;
    gap: 10px;
  }
  .rank-badge { width: 32px; height: 32px; font-size: 13px; }
  .rank-name { font-size: 14px; }
  .rank-price { font-size: 14px; }

  .age-warning {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .main-nav li { flex: 0 0 100%; }
  .hero .hero-features { gap: 15px; }
}


/* ===== 商品カードグリッド ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.product-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.product-img-wrap {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  padding: 10px;
  box-sizing: border-box;
}

.product-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.4;
  min-height: 2.8em;
}

.product-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 10px;
  flex: 1;
}

.product-price {
  font-size: 16px;
  font-weight: bold;
  color: #c0392b;
  margin-bottom: 10px;
}

.product-price .tax {
  font-size: 11px;
  color: #999;
  font-weight: normal;
  margin-left: 4px;
}

.btn-detail {
  display: block;
  text-align: center;
  background: #2c3e50;
  color: #fff !important;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-detail:hover {
  background: #34495e;
}

/* ランキングバッジ */
.rank-badge {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.rank-badge.rank-1 { background: #f1c40f; color: #fff; }
.rank-badge.rank-2 { background: #bdc3c7; color: #fff; }
.rank-badge.rank-3 { background: #d35400; color: #fff; }

.product-card {
  position: relative;
}

/* カテゴリガイドセクション */
.guide-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
}

.guide-section h3 {
  font-size: 16px;
  margin: 0 0 10px 0;
  color: #2c3e50;
}

/* 通販案内 */
.tuuhan-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 14px;
  color: #444;
}

.tuuhan-content h2 {
  font-size: 20px;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
  margin: 30px 0 15px 0;
}

.tuuhan-content h3 {
  font-size: 16px;
  color: #2c3e50;
  margin: 20px 0 10px 0;
  padding-left: 10px;
  border-left: 4px solid #3498db;
}

.tuuhan-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.tuuhan-content table th,
.tuuhan-content table td {
  border: 1px solid #ddd;
  padding: 10px 15px;
  text-align: left;
}

.tuuhan-content table th {
  background: #f5f7fa;
  font-weight: bold;
  width: 30%;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }
  .product-img-wrap { height: 140px; }
  .product-title { font-size: 13px; }
  .product-price { font-size: 14px; }
  .btn-detail { font-size: 12px; padding: 6px 10px; }
}
