/* miho 商品展示站 - 自定义样式 (紫色主题 #9F449B，呼应原 Bootstrap 模板) */
:root {
  --brand: #9F449B;
  --brand-dark: #7A3178;
  --brand-light: #C579C2;
  --text-dark: #1e293b;
  --text-muted: #64748b;
}

* { box-sizing: border-box; }
body {
  font-family: 'Open Sans', 'Lato', 'Microsoft YaHei', sans-serif;
  color: var(--text-dark);
  background: #f8fafc;
}
a { color: var(--brand); transition: all .3s; }
a:hover { color: var(--brand-dark); text-decoration: none; }
.container { width: 92%; max-width: 1200px; margin: 0 auto; padding: 0; }
.container-wide { width: 94%; max-width: 1500px; }

/* ============ 顶部导航（紫色模板 header-nav / top-nav 风格） ============ */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.site-header .top-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.site-logo img { height: 46px; max-width: 220px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  display: block;
  padding: 10px 18px;
  color: #333;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .5px;
  border-radius: 4px;
  text-transform: uppercase;
  transition: color .25s ease, background .25s ease;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--brand);
  background: rgba(159,68,155,.08);
}
/* 中和旧模板 .fixed 类对 nav 的影响：header 已用 sticky 定位，无需 fixed */
nav.fixed, .site-nav.fixed, .top-nav.fixed {
  position: static !important;
  top: auto !important;
  width: auto !important;
  margin: 0 !important;
  z-index: auto !important;
}

/* ============ 轮播 Banner ============ */
.banner-carousel { position: relative; overflow: hidden; }
.banner-slide {
  position: relative;
  height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.banner-slide::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 100%);
}
.banner-content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 560px;
  padding: 0 5%;
}
.banner-content h2 { font-size: 40px; font-weight: 700; margin-bottom: 12px; }
.banner-content p { font-size: 18px; opacity: .92; margin-bottom: 22px; }
.banner-btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--brand);
  color: #fff !important;
  border-radius: 30px;
  font-weight: 600;
}
.banner-btn:hover { background: var(--brand-dark); }
.banner-dots {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center; z-index: 3;
}
.banner-dots span {
  display: inline-block;
  width: 10px; height: 10px; margin: 0 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
}
.banner-dots span.active { background: #fff; }

/* ============ 通用区段 ============ */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 {
  font-size: 32px; font-weight: 700; color: var(--text-dark);
  display: inline-block; position: relative; padding-bottom: 14px;
}
.section-title h2 small { color: var(--brand); font-weight: 400; }
.section-title h2::after {
  content: ''; position: absolute; left: 50%; bottom: 0;
  width: 50px; height: 3px; background: var(--brand);
  transform: translateX(-50%);
}
.section-title p { color: var(--text-muted); margin-top: 10px; }

/* ============ 商品卡片 ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: all .3s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(159,68,155,.18);
}
.product-card .product-img {
  position: relative;
  width: 100%;
  padding-top: 75%;
  background: #f3f3f3;
  overflow: hidden;
}
.product-card .product-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.product-card:hover .product-img img { transform: scale(1.06); }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px;
  font-size: 12px; color: #fff; border-radius: 3px;
  background: var(--brand);
}
.product-badge.new { background: #28a745; }
.product-badge.bestseller { background: #ff6b35; }
.product-info { padding: 16px; }
.product-info h3 {
  font-size: 16px; font-weight: 600; margin: 0 0 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-info .subtitle {
  font-size: 13px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 10px;
}
/* Hide product prices on frontend catalog mode — hide-price guard */
.product-price,
.product-meta .price-box,
.price-box,
.product-price .price,
.product-price .original { display: none !important; visibility: hidden; }

/* ============ 分类区块 ============ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.category-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  padding-top: 70%;
  background: #eee;
}
.category-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.category-card:hover img { transform: scale(1.06); }
.category-card .overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 60%);
  color: #fff;
}
.category-card .overlay h3 { font-size: 20px; margin: 0 0 4px; }
.category-card .overlay p { font-size: 13px; opacity: .85; margin: 0; }

/* ============ 商品详情 ============ */
.product-detail { padding: 40px 0; }
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.product-gallery img {
  width: 100%; border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.product-meta h1 { font-size: 28px; margin-bottom: 8px; }
.product-meta .subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 20px; }
/* price-box hidden intentionally (catalog-only site, no pricing shown) */
.product-meta .info-line { margin: 8px 0; font-size: 14px; }
.product-meta .info-line label { color: var(--text-muted); width: 80px; display: inline-block; }
.btn-buy {
  display: inline-block; padding: 12px 36px;
  background: var(--brand); color: #fff !important;
  border-radius: 30px; font-weight: 600; border: none; cursor: pointer;
}
.btn-buy:hover { background: var(--brand-dark); }
.product-content { margin-top: 40px; padding: 30px; background: #fff; border-radius: 8px; }
.product-content h3 { margin-top: 20px; }

/* ============ 侧边栏 ============ */
.with-sidebar { display: grid; grid-template-columns: 240px 1fr; gap: 30px; }
.sidebar { background: #fff; border-radius: 8px; padding: 20px; height: fit-content; }
.sidebar h3 { font-size: 18px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--brand); }
.sidebar a { display: block; padding: 8px 12px; border-radius: 4px; color: var(--text-dark); }
.sidebar a:hover, .sidebar a.active { background: rgba(159,68,155,.1); color: var(--brand); }

/* ============ 分页 ============ */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination a, .pagination span {
  display: inline-block; min-width: 36px; height: 36px;
  line-height: 36px; padding: 0 10px; text-align: center;
  border-radius: 4px; background: #fff; color: var(--text-dark);
}
.pagination a:hover, .pagination .active { background: var(--brand); color: #fff; }
.pagination .disabled { color: var(--text-muted); background: #f3f3f3; }

/* ============ 新闻卡片 ============ */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.news-card img { width: 100%; height: 180px; object-fit: cover; }
.news-card .news-info { padding: 18px; }
.news-card h3 { font-size: 17px; margin-bottom: 8px; line-height: 1.4; }
.news-card p { font-size: 13px; color: var(--text-muted); }
.news-card .date { font-size: 12px; color: var(--brand); margin-top: 10px; }

/* ============ 关于/联系 ============ */
.page-hero {
  background: url(../images/bg.jpg) center/cover no-repeat;
  color: #fff; text-align: center; padding: 80px 0;
  position: relative;
}
.page-hero::before { content:''; position:absolute; inset:0; background:rgba(0,0,0,.45); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: 40px; margin-bottom: 10px; }
.page-hero p { font-size: 16px; opacity: .9; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { font-size: 22px; margin-bottom: 16px; color: var(--brand); }
.contact-info p { margin: 12px 0; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px; margin-bottom: 14px;
  border: 1px solid #e0e0e0; border-radius: 4px; font-size: 14px;
}
.contact-form button {
  padding: 12px 30px; background: var(--brand); color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font-size: 15px;
}

/* ============ 页脚 ============ */
.site-footer {
  background: #1e293b; color: #cbd5e1;
  padding: 50px 0 20px;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-grid p, .footer-grid a { color: #cbd5e1; font-size: 14px; line-height: 2; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #334155; font-size: 13px; color: #94a3b8; }

/* ============ 响应式 ============ */
@media (max-width: 992px) {
  .product-grid, .category-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .with-sidebar { grid-template-columns: 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .product-grid, .category-grid, .news-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .banner-content h2 { font-size: 26px; }
  .section-title h2 { font-size: 24px; }
}

/* ============ Hero Banner Slider ============ */
.hero-slider {
  position: relative;
  height: 66vh;
  min-height: 400px;
  width: 100%;
  overflow: hidden;
  background: #1e293b;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(30,41,59,0.55) 0%, rgba(30,41,59,0.35) 50%, rgba(30,41,59,0.65) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-family: 'Arial Black', 'Helvetica', sans-serif;
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(18px, 2.5vw, 32px);
  font-weight: 500;
  margin-bottom: 0;
  color: #f1f5f9;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.hero-dots {
  position: absolute;
  bottom: 20px; left: 0; right: 0;
  text-align: center;
  z-index: 3;
}

.hero-dots span {
  display: inline-block;
  width: 10px; height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: background .3s;
}

.hero-dots span.active {
  background: #fff;
}

/* ============ Category Pills ============ */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.category-pill {
  display: inline-block;
  padding: 8px 22px;
  border: 1.5px solid var(--brand);
  border-radius: 30px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .25s ease;
}

.category-pill:hover {
  background: var(--brand);
  color: #fff;
}

/* ============ Product Grid 3-column ============ */
.product-grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-grid-3 .product-img {
  padding-top: 100%;
}

/* ============ Blog Marquee ============ */
.blog-section {
  background: #fff;
}

.blog-marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.blog-marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: blogScrollLeft 40s linear infinite;
}

.blog-marquee:hover .blog-marquee-track {
  animation-play-state: paused;
}

@keyframes blogScrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.blog-card {
  flex: 0 0 320px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  text-decoration: none;
  color: var(--text-dark);
  transition: all .3s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(159,68,155,.18);
  color: var(--text-dark);
}

.blog-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.06);
}

.blog-card-info {
  padding: 16px;
}

.blog-card-info h3 {
  font-size: 16px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.blog-card-info p {
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-info .date {
  font-size: 12px;
  color: var(--brand);
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .product-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .hero-title {
    font-size: clamp(36px, 8vw, 72px);
  }
  .blog-card {
    flex: 0 0 260px;
  }
}
@media (max-width: 480px) {
  .product-grid-3 {
    grid-template-columns: 1fr;
  }
  .hero-slider {
    height: 50vh;
    min-height: 300px;
  }
  .hero-title {
    font-size: clamp(32px, 7vw, 56px);
  }
}

/* ============ Shop by Category ============ */
.shop-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.shop-category-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  text-decoration: none;
  color: var(--text-dark);
  transition: all .3s;
}
.shop-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(159,68,155,.18);
  color: var(--text-dark);
}
.shop-category-img {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: #f3f3f3;
}
.shop-category-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.shop-category-card:hover .shop-category-img img {
  transform: scale(1.08);
}
.shop-category-info {
  padding: 18px;
  text-align: center;
}
.shop-category-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}
.shop-category-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.shop-category-btn {
  display: inline-block;
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
  transition: transform .25s;
}
.shop-category-card:hover .shop-category-btn {
  transform: translateX(4px);
}

/* ============ Why Choose Us ============ */
.why-choose-section {
  background: #f7f1f8;
  max-width: 1500px;
  width: 94%;
  margin: 0 auto;
  border-radius: 12px;
}
.why-choose-section .container-wide {
  width: 100%;
  max-width: 100%;
}
.why-choose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.why-choose-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  line-height: 1.3;
}
.why-choose-content {
  font-size: 15px;
  line-height: 2;
  color: #555;
}
.why-choose-content p { margin-bottom: 14px; }
.why-choose-content ul { padding-left: 20px; }
.why-choose-content li { margin-bottom: 8px; }
.why-choose-img img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* ============ Blog Detail ============ */
.blog-detail-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}
.blog-detail-main {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.blog-detail-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.4;
}
.blog-detail-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.blog-detail-meta i { margin-right: 4px; }
.blog-detail-cover {
  margin-bottom: 28px;
  border-radius: 8px;
  overflow: hidden;
}
.blog-detail-cover img { width: 100%; }
.blog-detail-summary {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: #f8fafc;
  border-left: 4px solid var(--brand);
  border-radius: 0 6px 6px 0;
}
.blog-detail-content {
  font-size: 15px;
  line-height: 2;
  color: #333;
}
.blog-detail-content p { margin-bottom: 16px; }
.blog-detail-content h2, .blog-detail-content h3 { margin: 28px 0 14px; }
.blog-detail-content img { max-width: 100%; border-radius: 8px; }
.blog-detail-content ul, .blog-detail-content ol { padding-left: 24px; margin-bottom: 16px; }
.blog-detail-content li { margin-bottom: 8px; }
.blog-detail-content blockquote {
  border-left: 4px solid var(--brand);
  padding: 12px 20px;
  margin: 20px 0;
  background: #f8fafc;
  color: #555;
}

.blog-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}
.blog-detail-nav a {
  display: block;
  max-width: 48%;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all .25s;
}
.blog-detail-nav a:hover {
  background: rgba(159,68,155,.08);
}
.blog-detail-nav span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.blog-detail-nav strong {
  font-size: 14px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-nav-prev { text-align: left; }
.blog-nav-next { text-align: right; }

.blog-detail-sidebar h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--brand);
}
.blog-related-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
  transition: all .25s;
}
.blog-related-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(159,68,155,.12);
  color: var(--text-dark);
}
.blog-related-img {
  flex: 0 0 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
}
.blog-related-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-related-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-related-info .date {
  font-size: 12px;
  color: var(--brand);
}

/* ============ Responsive for new sections ============ */
@media (max-width: 992px) {
  .shop-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-choose-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .blog-detail-wrap {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .shop-category-grid {
    grid-template-columns: 1fr;
  }
  .blog-detail-main {
    padding: 24px;
  }
  .blog-detail-title {
    font-size: 24px;
  }
  .blog-detail-nav {
    flex-direction: column;
  }
  .blog-detail-nav a { max-width: 100%; }
}
