:root {
  --primary-color: #AC2017;
  --bg-color: #F8F6F3;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: #333333;
  line-height: 1.6;
  padding-top: 56px;
}

.navbar {
  background-color: var(--primary-color) !important;
}

.navbar-brand,
.nav-link {
  color: #fff !important;
  border-radius: 6px;
  transition: all 0.25s ease;
  margin: 0 4px;
}

.nav-link:hover,
.nav-link:focus {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.15);
  outline: none;
}

.nav-link:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.nav-link.active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  font-weight: 600;
}

/* ==================== 统一间距类 ==================== */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }

.p-0 { padding: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }

/* ==================== 边框类 ==================== */
.bd-0 { border: 0 !important; }
.bd-top-0 { border-top: 0 !important; }
.bd-bottom-0 { border-bottom: 0 !important; }

/* ==================== 图片比例类 ==================== */
.img-16-9 {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.img-4-3 {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}

.img-1-1 {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
}

.img-box-1-1 {
  aspect-ratio: 1 / 1;
  width: 100%;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.img-box-1-1 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==================== 固定高度类 ==================== */
.h-120 { height: 120px; }
.h-150 { height: 150px; }
.h-160 { height: 160px; }
.h-180 { height: 180px; }
.h-200 { height: 200px; }
.h-400 { height: 400px; }

/* ==================== 固定高度 + 居中类 ==================== */
.h-100-center {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h-120-center {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h-150-center {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h-160-center {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h-180-center {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h-200-center {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.h-400-center {
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== 固定高度图片类 ==================== */
.h-img-100 {
  height: 100px;
  object-fit: cover;
  width: 100%;
}
.h-img-120 {
  height: 120px;
  object-fit: cover;
  width: 100%;
}
.h-img-150 {
  height: 150px;
  object-fit: cover;
  width: 100%;
}
.h-img-160 {
  height: 160px;
  object-fit: cover;
  width: 100%;
}
.h-img-180 {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ==================== 字体图标尺寸 ==================== */
.fs-icon-sm { font-size: 2rem; }
.fs-icon-md { font-size: 2.5rem; }
.fs-icon-lg { font-size: 3rem; }
.fs-icon-xl { font-size: 6rem; }

/* ==================== 产品卡片背景色 ==================== */
.bg-product-primary {
  background-color: rgba(172, 32, 23, 0.1);
}

/* ==================== 链接样式 ==================== */
.link-unstyled {
  color: inherit;
  text-decoration: none;
}

/* ==================== Logo 图标类 ==================== */
.logo-img-sm {
  height: 32px;
  vertical-align: middle;
  margin-right: 4px;
}
.logo-img-sm-2 {
  height: 32px;
  vertical-align: middle;
}

/* ==================== Card whole-click and hover effect ==================== */
.card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,0.1);
}
.card .stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ==================== Shops Section ==================== */
.shops-section {
  background-color: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: 2rem;
}

.shops-section h2 {
  color: var(--primary-color);
}

.shop-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  min-height: 120px;
}

.shop-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,0.1);
  border-color: var(--primary-color);
}

.shop-logo {
  object-fit: contain;
  max-width: 60px;
  max-height: 60px;
}

.shop-img-wrapper {
  position: relative;
  width: 60px;
  height: 60px;
}

.shop-logo-img,
.shop-qrcode-img {
  position: absolute;
  top: 0;
  start: 0;
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.shop-icon {
  position: absolute;
  top: 0;
  start: 0;
  width: 60px;
  height: 60px;
}

.shop-name {
  text-align: center;
  color: var(--text-dark, #212529);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.shop-item.has-qrcode:hover .shop-logo-img {
  opacity: 0;
}

.shop-item.has-qrcode:hover .shop-qrcode-img {
  opacity: 1 !important;
}

.shop-qrcode-img {
  transition: opacity 0.3s ease;
  opacity: 0;
}

.shop-icon {
  background-color: #f8f9fa;
}

.shop-name {
  color: #333;
  line-height: 1.3;
}

/* 产品页样式 */
.product-header {
  background: var(--bg-color);
  color: #333333;
  padding: 0;
  margin-bottom: 0;
}
.product-header h1 {
  color: #333333;
}

.product-featured {
  width: 100%;
  position: relative;
}
.product-featured-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.product-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.product-featured-image:hover img {
  transform: scale(1.02);
}

.thumbnail-gallery {
  margin-top: 16px;
}
.thumbnail-gallery .d-flex {
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  justify-content: center;
  padding-bottom: 8px;
}
.product-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.product-thumb.active {
  border-color: var(--primary-color);
}
.product-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-content {
  line-height: 1.6;
  font-size: 1rem;
  color: #333333;
  background: #fff;
  padding: 32px;
  height: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  max-width: 480px;
  margin: 0 auto;
}

/* Right column sticky - only for desktop */
@media (min-width: 992px) {
  .product-main-container .col-lg-6:last-child {
    position: sticky;
    top: 80px;
    align-self: flex-start;
  }
  .product-content {
    width: 100%;
    box-sizing: border-box;
  }
}
.product-content h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1a1a1a;
}
.product-content .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 24px;
}

.product-description {
  line-height: 1.8;
  font-size: 1rem;
  color: #333333;
  background: #fff;
  padding: 40px;
  max-width: 924px;
  margin: 30px auto 0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
@media (min-width: 1400px) {
  .product-description { max-width: 924px; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .product-description { max-width: 798px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .product-description { max-width: 672px; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .product-description { max-width: 504px; }
}
@media (max-width: 767px) {
  .product-description { max-width: 378px; }
}

.product-description p {
  margin: 0 0 1em 0;
}

.product-description p img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 16px 0;
}

.product-description p.product-detail-img {
  margin: 0;
}

.product-description p.product-detail-img img {
  margin: 0;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

/* ==================== Image Lightbox ==================== */
.image-lightbox-modal .modal-content {
  background-color: rgba(0, 0, 0, 0.9);
}

.image-lightbox-modal .modal-dialog {
  max-width: 95vw;
}

#lightbox-image {
  max-height: 90vh;
  object-fit: contain;
}

/* ==================== Product Page Enhancements ==================== */
.product-main-container {
  padding-top: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.product-row {
  display: flex;
  flex-wrap: wrap;
}

/* Desktop layout - Left 750px, Right ~half */
@media (min-width: 1100px) {
  .product-main-container {
    max-width: 1320px;
  }
  .product-main-container .product-row .col-lg-6:first-child {
    flex: 0 0 750px;
    max-width: 750px;
  }
  .product-main-container .product-row .col-lg-6:last-child {
    flex: 1;
    max-width: calc(100% - 750px);
  }
}

@media (min-width: 992px) and (max-width: 1099px) {
  .product-main-container {
    max-width: 100%;
  }
  .product-main-container .product-row .col-lg-6:first-child {
    flex: 0 0 65%;
    max-width: 65%;
  }
  .product-main-container .product-row .col-lg-6:last-child {
    flex: 0 0 35%;
    max-width: 35%;
  }
}

/* Image Index Indicator */
.image-index-indicator {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
}

/* Service Promises */
.service-promises {
  padding: 16px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.service-promise-item {
  padding: 8px;
}

.service-promise-item i {
  display: block;
  margin-bottom: 4px;
}

/* Quantity Selector */
.quantity-selector {
  max-width: 200px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-input {
  width: 60px;
  height: 40px;
  margin: 0 8px;
}

/* Product Tabs */
.product-tabs-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.product-tabs-nav {
  border-bottom: 2px solid #f0f0f0;
  padding: 0 20px;
  margin: 0;
}

.product-tabs-nav .nav-link {
  color: #333 !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  padding: 16px 24px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 0;
  background: transparent;
}

.product-tabs-nav .nav-link:hover {
  color: var(--primary-color) !important;
  border-bottom-color: rgba(172, 32, 23, 0.3) !important;
}

.product-tabs-nav .nav-link.active {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color) !important;
  background: transparent !important;
}

.product-tabs-content {
  padding: 30px;
}

/* Product Specs Table */
.product-specs {
  padding: 20px 0;
}

.product-specs table {
  max-width: 600px;
}

.product-specs th {
  font-weight: 500;
  color: #666;
  background: #fafafa;
}

.product-specs td {
  color: #333;
}

/* Product Description in Tabs */
.product-tabs-content .product-description {
  max-width: 100%;
  margin: 0;
  box-shadow: none;
  padding: 20px 0;
}

.product-tabs-content .product-description p img {
  max-width: 100%;
}

@media (max-width: 767px) {
  .product-tabs-nav .nav-link {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .product-tabs-content {
    padding: 20px;
  }

  .quantity-selector {
    max-width: 180px;
  }

  .qty-btn {
    width: 36px;
    height: 36px;
  }

  .qty-input {
    width: 50px;
    height: 36px;
  }
}

/* ==================== Brand List Page ==================== */
.brands-page-container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 30px;
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width 1200px) and (max-width 1399px) {
  .brands-page-container { max-width: 1140px; }
}
@media (min-width 992px) and (max-width 1199px) {
  .brands-page-container { max-width: 960px; }
}
@media (min-width 768px) and (max-width 991px) {
  .brands-page-container { max-width: 720px; }
}

.brand-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.brand-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(172, 32, 23, 0.15);
}

.brand-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 20px;
  background: #f8f9fa;
  display: block;
}

.brand-card-name {
  padding: 12px 10px;
  text-align: center;
  font-weight: 600;
  color: #333;
  background: #fff;
  flex-shrink: 0;
  border-top: 1px solid #f0f0f0;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

/* ==================== Brand Detail Page Layout ==================== */
.brand-page-container {
  padding-top: 30px;
  padding-bottom: 30px;
}

/* Match the article page .row.mb-4.align-items-center width (Bootstrap container) */
.brand-row-summary,
.brand-row-tabs {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width 1200px) and (max-width 1399px) {
  .brand-row-summary,
  .brand-row-tabs { max-width: 1140px; }
}
@media (min-width 992px) and (max-width 1199px) {
  .brand-row-summary,
  .brand-row-tabs { max-width: 960px; }
}

/* Sections inside rows — full width like Bootstrap row behavior */
.brand-summary-section,
.brand-tabs-section {
  max-width: 100%;
  margin-bottom: 24px;
}

/* Row 1: Logo (floating) + Summary (wraps) */
.brand-summary-section {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flow-root;       /* Contain floats without weird side effects */
}

.brand-summary-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  float: left;
  margin: 0 24px 12px 0;
  shape-outside: margin-box;  /* Text hugs the box margin, not the content edge */
}

.brand-summary-logo-placeholder {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 12px;
  color: #adb5bd;
  font-size: 4rem;
  float: left;
  margin: 0 24px 12px 0;
}

.brand-summary-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  margin: 0;
  text-indent: 2em;        /* Chinese-style first-line indent for each paragraph */
}

.brand-summary-text::after {
  content: "";
  display: block;
  clear: both;              /* Clear float at end of last paragraph */
}

@media (max-width: 767px) {
  .brand-summary-section {
    padding: 20px;
  }
  .brand-summary-logo,
  .brand-summary-logo-placeholder {
    float: none;
    display: block;
    margin: 0 auto 16px;
    width: 120px;
    height: 120px;
  }
  .brand-summary-text {
    text-align: center;
    text-indent: 0;
  }
}

/* Row 2: Tabs */
.brand-tabs-section {
  background: #fff;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  clear: left;              /* Ensure no floating effect bleeds into this section */
  /* max-width + centering are inherited from the joint selector above */
}

.brand-tabs-nav {
  border-bottom: 2px solid #f0f0f0;
  padding: 0 20px;
  margin: 0;
}

.brand-tabs-nav .nav-link {
  color: #333 !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  padding: 16px 24px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 0;
  background: transparent;
}

.brand-tabs-nav .nav-link:hover {
  color: var(--primary-color) !important;
  border-bottom-color: rgba(172, 32, 23, 0.3) !important;
}

.brand-tabs-nav .nav-link.active {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color) !important;
  background: transparent !important;
}

.brand-tabs-content {
  padding: 30px;
}

/* ==================== Collection List Page ==================== */
.collections-page-container {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 30px;
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .collections-page-container { max-width: 1140px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .collections-page-container { max-width: 960px; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .collections-page-container { max-width: 720px; }
}

.collection-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.collection-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(172, 32, 23, 0.15);
}
.collection-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f8f9fa;
  display: block;
}
.collection-card-name {
  padding: 12px 10px;
  text-align: center;
  font-weight: 600;
  color: #333;
  background: #fff;
  flex-shrink: 0;
  border-top: 1px solid #f0f0f0;
}
.collection-card-count {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: #868e96;
  margin-top: 2px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

/* ==================== Collection Detail Page Layout ==================== */
/* 与品牌详情页（brand-page-container）保持同一设计语言 */
.collection-page-container {
  padding-top: 30px;
  padding-bottom: 30px;
}

.collection-row-summary,
.collection-row-tabs {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .collection-row-summary,
  .collection-row-tabs { max-width: 1140px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .collection-row-summary,
  .collection-row-tabs { max-width: 960px; }
}

.collection-summary-section,
.collection-tabs-section {
  max-width: 100%;
  margin-bottom: 24px;
}

/* Row 1: 封面（浮动） + 标题/简介（环绕） */
.collection-summary-section {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flow-root;
}

.collection-cover {
  width: 200px;
  height: 200px;
  object-fit: cover;
  background-color: #f8f9fa;
  border-radius: 12px;
  float: left;
  margin: 0 24px 12px 0;
  shape-outside: margin-box;
}

.collection-cover-placeholder {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 12px;
  color: #adb5bd;
  font-size: 4rem;
  float: left;
  margin: 0 24px 12px 0;
}

.collection-summary-body {
  overflow: hidden;
  min-height: 200px;
}

.collection-summary-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 4px;
}

.collection-summary-subtitle {
  color: #868e96;
  font-size: 1rem;
  margin-bottom: 10px;
}

.collection-summary-meta {
  color: #868e96;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.collection-summary-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  margin: 0;
  text-indent: 2em;
}

.collection-summary-text::after {
  content: "";
  display: block;
  clear: both;
}

@media (max-width: 767px) {
  .collection-summary-section {
    padding: 20px;
  }
  .collection-cover,
  .collection-cover-placeholder {
    float: none;
    display: block;
    margin: 0 auto 16px;
    width: 120px;
    height: 120px;
  }
  .collection-summary-body {
    overflow: visible;
    min-height: 0;
    text-align: center;
  }
  .collection-summary-text {
    text-align: center;
    text-indent: 0;
  }
}

/* Row 2: Tabs（目录 / 关于本文集） */
.collection-tabs-section {
  background: #fff;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  clear: left;
}

.collection-tabs-nav {
  border-bottom: 2px solid #f0f0f0;
  padding: 0 20px;
  margin: 0;
}

.collection-tabs-nav .nav-link {
  color: #333 !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  padding: 16px 24px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: 0;
  background: transparent;
}

.collection-tabs-nav .nav-link:hover {
  color: var(--primary-color) !important;
  border-bottom-color: rgba(172, 32, 23, 0.3) !important;
}

.collection-tabs-nav .nav-link.active {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color) !important;
  background: transparent !important;
}

.collection-tabs-content {
  padding: 30px;
}

/* 目录条目：章回体列表 */
.collection-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.collection-toc-entry {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 12px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.collection-toc-entry:last-child { border-bottom: none; }

.collection-toc-entry:hover {
  background-color: #f8f9fa;
  color: inherit;
}

.collection-toc-num {
  min-width: 44px;
  text-align: right;
  font-weight: 700;
  color: var(--primary-color, #AC2017);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.collection-toc-chapter {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--primary-color, #AC2017);
  background: rgba(172, 32, 23, 0.06);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.collection-toc-body { flex: 1 1 auto; min-width: 0; }

.collection-toc-title {
  font-weight: 600;
  color: #333;
}

.collection-toc-note {
  font-size: 0.85rem;
  color: #868e96;
  margin-top: 2px;
}

.collection-toc-entry .bi-chevron-right {
  color: #adb5bd;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.collection-toc-entry:hover .bi-chevron-right {
  color: var(--primary-color, #AC2017);
  transform: translateX(3px);
}

/* ==================== Article / Brand Content ==================== */
/* Shared styles for both .article-content and .brand-description */
/* (originally inline in templates/public/article.html) */
.article-content,
.brand-description {
  line-height: 1.8;
  font-size: 1.1rem;
  color: #333333;
  background: #fff;
  padding: 30px;
  max-width: 924px;
  margin: 0 auto;
}

@media (min-width: 1400px) {
  .article-content,
  .brand-description { max-width: 924px; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .article-content,
  .brand-description { max-width: 798px; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .article-content,
  .brand-description { max-width: 672px; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .article-content,
  .brand-description { max-width: 504px; }
}
@media (max-width: 767px) {
  .article-content,
  .brand-description { max-width: 378px; }
}

.article-content p,
.brand-description p {
  text-indent: 2em;
  margin-bottom: 1em;
}

.article-content p[style*="text-align: center"],
.brand-description p[style*="text-align: center"] {
  text-indent: 0;
}

.article-content p[style*="text-align: right"],
.brand-description p[style*="text-align: right"] {
  text-indent: 0;
}

.article-content img,
.brand-description img,
.brand-description figure img,
.brand-description p img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px auto 10px;
}

.article-content figure,
.brand-description figure,
.brand-description figure.image,
.brand-description figure.align-center,
.brand-description .align-center {
  margin: 20px auto;
  text-align: center;
  max-width: 100%;
  clear: both;
}

.article-content figcaption,
.brand-description figcaption {
  color: #888888;
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 20px;
  font-style: italic;
}