/* =========================================================
   百花园·实体花店连锁 —— 公共样式与配色方案
   所有模板（index.html / list.html ...）共用，请勿在页面内重复定义主题色
   ========================================================= */

:root {
  /* 主色板（tailwind.config.js 中的 flower 配色直接引用这些变量） */
  --flower-main: #f09898;
  --flower-main-dark: #e07f7f;
  --flower-light: #ffe8e6;
  --flower-pale: #fff8f5;
  --flower-green: #96b894;
  --flower-text: #664e4b;
  --flower-muted: #9c8a86;
  --flower-border: #f3e2de;

  /* 尺寸与阴影 */
  --page-max: 1200px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --shadow-sm: 0 2px 10px rgba(102, 78, 75, 0.05);
  --shadow-md: 0 8px 24px rgba(102, 78, 75, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--flower-pale);
  color: var(--flower-text);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ============ 顶部 header（两页共用结构） ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 14px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--flower-main);
  color: #fff;
  font-size: 20px;
}

/* 品牌图标（assets/logo.svg）：随圆形底色调为白色，避免与主色底融在一起 */
.brand-logo-img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-name {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--flower-main);
}

.brand-slogan {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--flower-muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--flower-light);
  color: var(--flower-main-dark);
}

.nav-link.is-active {
  background: var(--flower-main);
  color: #fff;
}

.site-hotline {
  font-size: 13px;
  color: var(--flower-muted);
  white-space: nowrap;
}

/* 窄屏下的导航开关按钮（右上角） */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--flower-light);
  border-radius: 10px;
  background: #fff;
  color: var(--flower-main-dark);
  font-size: 16px;
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--flower-light);
}

/* ============ 底部 footer ============ */
.site-footer {
  margin-top: 40px;
  padding: 24px 16px;
  border-top: 1px solid var(--flower-border);
  background: #fff;
  text-align: center;
  font-size: 13px;
  color: var(--flower-muted);
}

/* 锚点跳转避开吸顶导航 */
section[id] {
  scroll-margin-top: 96px;
}

/* ============ 面包屑导航 ============ */
.breadcrumb-bar {
  max-width: var(--page-max);
  margin: 0 auto -20px;
  padding: 16px 20px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--flower-muted);
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: var(--flower-main-dark);
}

.breadcrumb-sep {
  font-size: 12px;
  color: #cdb9b5;
}

/* .breadcrumb-current {
  font-weight: 600;
  color: var(--flower-main-dark);
} */

/* ============ 通用卡片 ============ */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-title {
  display: flex;
  align-items: center;
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

/* ============ 首页：城市导航 ============ */
.city-link {
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color 0.2s, color 0.2s;
}

.city-link:hover {
  background: var(--flower-main);
  color: #fff;
}

.alpha-title {
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 4px solid var(--flower-main);
  font-size: 18px;
  font-weight: 700;
  color: var(--flower-main);
}

/* ============ 资讯卡片（首页 / list 侧栏共用） ============ */
.article-card {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--flower-light);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: box-shadow 0.2s;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
}

.article-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--flower-text);
  transition: color 0.2s;
}

.article-card:hover .article-title {
  color: var(--flower-main-dark);
}

.article-date {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--flower-muted);
}

/* ============ 分类文章区（list.html） ============ */
.intro-text {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.9;
  color: #7a6663;
}

.intro-text:last-child {
  margin-bottom: 0;
}

.intro-text img {
  margin: 0 auto;
  display: block;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
}

.section-head .card-title {
  margin: 0;
}

.section-sub {
  font-size: 12px;
  color: var(--flower-muted);
}

.more-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--flower-muted);
  transition: color 0.2s;
}

.more-link:hover {
  color: var(--flower-main-dark);
}

/* 产品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--flower-light);
  border-radius: 12px;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(240, 152, 152, 0.22);
}

.product-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--flower-light);
}

.product-body {
  padding: 10px 12px 12px;
}

.product-name {
  display: -webkit-box;
  overflow: hidden;
  min-height: 39px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--flower-text);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--flower-main-dark);
}

.product-price small {
  font-size: 11px;
  font-weight: 500;
}

.product-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0f6ef;
  font-size: 11px;
  color: var(--flower-green);
}

/* 分店地址 */
.branch-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--flower-border);
}

.branch-item:first-of-type {
  padding-top: 0;
}

.branch-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.branch-icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--flower-light);
  color: var(--flower-main-dark);
  font-size: 14px;
}

.branch-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.branch-info {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--flower-muted);
}

.branch-info i {
  width: 14px;
  color: var(--flower-main);
}

/* 评论列表 */
.review-item, .tips-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--flower-border);
}

.review-item:first-of-type {
  padding-top: 0;
}

.review-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--flower-light);
  font-size: 12px;
  font-weight: 700;
  color: var(--flower-main-dark);
}

.review-name, .tips-title {
  font-size: 13px;
  font-weight: 600;
}

.review-date {
  margin-left: auto;
  font-size: 11px;
  color: var(--flower-muted);
}

.stars {
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #f6b26b;
}

.review-text, .tips-text {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: #7a6663;
}

/* ============ 响应式：窄屏导航收起 ============ */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  /* 分类导航收进右上角下拉面板 */
  .site-nav {
    position: absolute;
    top: calc(100% - 4px);
    right: 16px;
    z-index: 30;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-width: 120px;
    padding: 8px;
    border: 1px solid var(--flower-light);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav .nav-link {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
  }

  .site-hotline.is-mobile-hidden {
    display: none;
  }
}

/* ============ 窄屏悬浮客服按钮 ============ */
.cs-float-btn {
  display: none;
  font-family: inherit;
}

@media (max-width: 900px) {
  .cs-float-btn {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: block;
    max-width: 320px;
    margin: 0 auto;
    padding: 12px 20px;
    border: 1px solid var(--flower-main);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(240, 152, 152, 0.28);
    color: var(--flower-main-dark);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
  }

  .cs-float-btn.is-copied {
    background: var(--flower-main);
    color: #fff;
  }
  .cs-float-btn span {
    font-size: 14px;
    color: #06c964;
  }

  /* 预留空间，避免悬浮按钮遮挡页面底部内容 */
  body {
    padding-bottom: 84px;
  }
}

@media (max-width: 640px) {
  .card {
    padding: 16px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
