:root {
      --theme-red: #ef483f;
      --theme-red-hover: #d63b33;
      --bg-body: #f4f6f8;
      --bg-card: #ffffff;
      --text-main: #1f2937;
      --text-muted: #6b7280;
      --border-color: #f0f0f0;
      --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0; font-family: var(--font-family); background-color: var(--bg-body);
      color: var(--text-main); line-height: 1.5; -webkit-font-smoothing: antialiased;
    }
    a{-webkit-text-decoration: none;text-decoration: none;color: var(--text-main);transition: color .2s ease, background .2s ease, border-color .2s ease;}
    .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
    blockquote, dd, div, dl, dt, form, h1, h2, h3, h4, h5, h6, li, ol, p, pre, td, th, ul {
    margin: 0;
    padding: 0;
    }
    ul, ol {
    list-style: none;
  }
    /* 导航栏 */
    header { background: var(--bg-card); border-bottom: 1px solid var(--border-color);  top: 0; z-index: 100; }
    .nav-inner { display: flex; justify-content: space-between; align-items: center; height: 70px; }
    .logo {font-size: 24px; font-weight: 800; color: var(--theme-red); text-decoration: none; display: flex;align-items: center;}
    .logo img{max-height: 40px; }
    .nav-links { display: flex; gap: 24px; }
    .nav-links a { text-decoration: none; color: var(--text-main); font-weight: 600; font-size: 15px; transition: color 0.2s; }
    .nav-links a:hover { color: var(--theme-red); }
    .search-box { display: flex; background: #f3f4f6; border-radius: 20px; padding: 6px 16px; align-items: center; border: 1px solid transparent; transition: 0.2s; }
    .search-box:focus-within { background: #fff; border-color: var(--theme-red); }
    .search-box input { border: none; background: transparent; outline: none; width: 200px; font-size: 14px; }

    /* 两栏布局 */
    .layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; margin: 30px auto 60px; align-items: start; }


@media (max-width: 991px) {
  .site-shell { max-width: calc(100% - 32px); }
  .page-grid { grid-template-columns: 1fr; gap: 28px; }
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
.deal-article{margin-bottom: 20px;}
.sale-breadcrumb {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sale-breadcrumb a {
    color: #ef4444; /* 品牌主题红 */
    text-decoration: none;
    transition: color 0.2s;
}

.sale-breadcrumb a:hover {
    color: #dc2626;
    text-decoration: underline;
}

.sale-breadcrumb span[aria-hidden="true"] {
    color: #9ca3af;
    font-size: 12px;
}

/* --- 2. 顶部焦点折扣卡片 (Featured Deal) --- */
.featured-deal {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 2px solid #fee2e2; /* 浅红边框，呼应参考图效果 */
    border-radius: 12px;
    padding: 24px 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.04); /* 极淡的红色呼吸阴影 */
    gap: 32px;
}

.featured-deal__media {
    width: 140px; /* 控制图片大小 */
    flex-shrink: 0;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.featured-deal__media img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.featured-deal__content {
    flex-grow: 1;
}

/* 优化点 A：品牌名改为主题色高亮标签，呼应参考图 */
.featured-deal__brand {
    display: inline-block;
    color: #ef4444; 
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    background-color: #fef2f2; /* 极浅的红色背景 */
    border: 1px solid #fca5a5; /* 红色边框 */
    border-radius: 4px;
    margin-bottom: 12px;
}

.featured-deal__title {
    font-size: 18px; /* 从偏大的 H2 缩小到 18px */
    color: #1f2937;
    margin: 0;
    line-height: 1.5;
    font-weight: 600;
}

.featured-deal__action {
    flex-shrink: 0;
}

.featured-deal__action .direct {
    display: inline-block;
    background-color: #ef4444;
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s;
}

.featured-deal__action .direct:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* --- 3. 文章正文面板 (Article Panel) --- */
.article-panel {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 40px; /* 增加四周留白，提升呼吸感 */
    border: 1px solid #f0f0f0;
}

.article-panel__header {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

/* 优化点 C：正文的大标题字号稍微缩小，不再显得突兀 */
.article-panel__header h1 {
    font-size: 24px; /* 经典且克制的标题大小 */
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.4;
    font-weight: 700;
}

/* 优化点 D：缩小底部的元信息（分类、日期）字号 */
.article-panel__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px; /* 缩小字号为 13px */
    color: #9ca3af;
}

.article-panel__meta a {
    color: #ef4444; /* 分类名使用红色凸显 */
    text-decoration: none;
    font-weight: 500;
}

.article-panel__meta a:hover {
    text-decoration: underline;
}

/* --- 4. 正文排版细节 (Typography) --- */
.article-panel__body {
    font-size: 16px;
    color: #374151; /* 深灰色比纯黑更护眼 */
    line-height: 1.8; /* 拉开行距，提升长文阅读体验 */
}

.article-panel__body p {
    margin-top: 0;
    margin-bottom: 1.2em;
}

.article-panel__body strong {
    color: #111827;
}

.article-panel__body a {
    color: #ef4444;
    text-decoration: none;
}

.article-panel__body a:hover {
    text-decoration: underline;
}

/* 正文图片居中与圆角处理 */
.article-panel__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px auto;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
@media (max-width:767px) {
  .featured-deal { align-items:flex-start; flex-direction:column; padding:20px; }
  .featured-deal__media { width:100%; height:auto; flex-basis:auto; }
  .featured-deal__title { font-size:21px; }
  .featured-deal__action { width:100%; flex-basis:auto; }
  .article-panel { padding:20px; }
  .article-panel__header h1 { font-size:26px; }
  .article-panel__body { font-size:15px; }
}

@media (max-width: 767px) {
  .site-shell { max-width: calc(100% - 24px); }
  .header-inner { min-height: 64px; }
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; z-index: 30; top: 64px; left: 12px; right: 12px; margin: 0; padding: 8px; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; box-shadow: var(--shadow-hover); }
  .primary-nav.is-open { display: block; }
  .primary-nav .mod-menu { display: block; }
  .primary-nav .mod-menu > li > a,
  .primary-nav .mod-menu > li > span { padding: 11px 12px; }
  .primary-nav .mod-menu__sub { position: static; min-width: 0; box-shadow: none; }
  .page-main { padding-block: 18px 40px; }
  .sidebar { display: block; }
  .sidebar > .moduletable,
  .sidebar > .moduletable-card,
  .sidebar > section,
  .sidebar > div:not(.search):not(:empty) { margin-bottom: 16px; padding: 18px; }
}

/* --- 1. 导航外层容器 --- */
.deal-nav {
    width: 100%;
    background-color: #ffffff;
    /* 上下留白，让菜单不要紧贴上下内容 */
    padding: 12px 0; 
    /* 用极浅的底部边框替代原本粗重的红色滚动条轨道，显得更干净 */
    border-bottom: 1px solid #f0f0f0; 
}

/* --- 2. 导航列表 (Flexbox布局 & 隐藏滚动条) --- */
.deal-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0 20px; 
    gap: 16px; 

    overflow-x: auto;
    white-space: nowrap;

    /* 彻底隐藏默认滚动条 */
    -ms-overflow-style: none; 
    scrollbar-width: none; 
        max-width: 1200px;
    margin: 0 auto;
}

/* 兼容 Chrome, Safari 和 Opera 隐藏滚动条 */
.deal-nav-list::-webkit-scrollbar {
    display: none; 
}

/* --- 3. 导航链接基础样式 --- */
.deal-nav-list a {
    display: inline-block;
    text-decoration: none;
    color: #4a4a4a; /* 默认文字使用深灰色，比纯黑更柔和 */
    font-size: 15px;
    font-weight: 500;
    /* 增加内部留白，扩大点击区域 */
    padding: 8px 16px; 
    /* 药丸形圆角 */
    border-radius: 50px; 
    /* 添加平滑的过渡动画，提升交互质感 */
    transition: all 0.3s ease; 
}

/* --- 4. 鼠标悬浮状态 (Hover) --- */
.deal-nav-list li:not(.active) a:hover {
    color: #e53935; /* 品牌红 */
    background-color: #f5f5f5; /* 极浅的灰色背景反馈 */
}

/* --- 5. 选中状态 (Active State) --- */
.deal-nav-list li.active a {
    color: #e53935; /* 突出品牌红文字 */
    /* 浅粉/红色背景，视觉更柔和活泼 (假设您的品牌红是 #e53935，这里用极浅的同色系) */
    background-color: #ffebee; 
    font-weight: 600; /* 文字稍微加粗 */
}
/* --- 1. 整体布局与间距 --- */
.primary-column {
    max-width: 850px; /* 根据您的页面实际宽度可微调 */
}

.sales-category {
    display: flex;
    flex-direction: column;
    gap: 20px; /* 标题和列表之间的间距 */
}

/* --- 2. 顶部标题模块 --- */
.category-header {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.category-header h1 {
    margin: 0;
    font-size: 22px;
    color: #1f2937;
    font-weight: 700;
}

/* --- 3. 折扣卡片列表 --- */
.sales-list {
    display: flex;
    flex-direction: column;
    gap: 16px; /* 卡片之间的间距 */
}

.sale-card {
    display: flex;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

/* 卡片悬浮时的微交互：轻微上浮和阴影 */
.sale-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* --- 4. 卡片图片区域 --- */
.sale-card__media {
    width: 260px; /* 固定图片容器宽度 */
    flex-shrink: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sale-card__media img {
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain; /* 保证品牌 Logo 或图片不被裁剪 */
    border-radius: 6px;
    border: 1px solid #f8f8f8; /* 给图片加一个极淡的边框，防止纯白图片融入背景 */
}

/* --- 5. 卡片内容区域 --- */
.sale-card__content {
    padding: 20px 24px 20px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between; /* 让顶部标题和底部 Meta 两端对齐 */
}

.sale-card__title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.sale-card__title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.sale-card__title a:hover {
    color: #e53935; /* 悬浮时标题变红 */
}

.sale-card__summary {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.6;
    flex-grow: 1;
}

/* --- 6. 底部 Meta 信息与按钮 --- */
.sale-card__meta {
    display: flex;
    align-items: center;
    border-top: 1px dashed #e5e7eb; /* 使用虚线分割，比实线更显精致 */
    padding-top: 16px;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.sale-card__meta a:not(.direct) {
    color: #6b7280;
    text-decoration: none;
}

.sale-card__meta a:not(.direct):hover {
    color: #e53935;
    text-decoration: underline;
}

/* "Shop Now" 按钮优化 */
.sale-card__meta .direct {
    margin-left: auto; /* 核心魔法：将按钮自动推到最右侧 */
    background-color: #ef4444;
    color: #ffffff;
    padding: 8px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
}

.sale-card__meta .direct:hover {
    background-color: #dc2626; /* 悬浮时加深红色 */
}

/* --- 7. 分页器优化 --- */
.pagination-wrap {
    margin-top: 32px;
    margin-bottom: 40px;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
    justify-content: center;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-item:not(.disabled):not(.active) .page-link:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.page-item.active .page-link {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.page-item.disabled .page-link {
    background-color: #f9fafb;
    color: #d1d5db;
    cursor: not-allowed;
}

/* ==========================================================
   Related articles module
   ========================================================== */

.related-article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;

  margin: 0;
  padding: 0;
  list-style: none;
}

.related-article-item {
  margin: 0;
  padding: 0;
}

.related-article-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 8px;

  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-main, #1f2937);

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.related-article-link:hover {
  border-color: var(--border-color, #e5e7eb);
  background: #f8faf9;
}

/* 缩略图 */
.related-article-image {
  width: 76px;
  height: 60px;
  flex: 0 0 76px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 3px;
  overflow: hidden;

  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 7px;
  background: #ffffff;
}

.related-article-image img {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;
  border-radius: 5px;
}

/* 标题 */
.related-article-title {
  min-width: 0;

  display: -webkit-box;
  overflow: hidden;

  color: var(--text-main, #1f2937);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-article-link:hover .related-article-title {
  color: var(--theme-red, #ef483f);
}

/* ==========================================================
   Articles Category module
   ========================================================== */

.category-article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;

  margin: 0;
  padding: 0;
  list-style: none;
}

.category-article-item {
  margin: 0;
  padding: 0;
}

.category-article-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 8px;

  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-main, #1f2937);

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.category-article-link:hover {
  border-color: var(--border-color, #e5e7eb);
  background: #f8faf9;
}

/* 图片 */
.category-article-image {
  width: 76px;
  height: 60px;
  flex: 0 0 76px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 3px;
  overflow: hidden;

  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 7px;
  background: #ffffff;
}

.category-article-image img {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;
  border-radius: 5px;
}

/* 标题 */
.category-article-title {
  min-width: 0;

  display: -webkit-box;
  overflow: hidden;

  color: var(--text-main, #1f2937);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-article-link:hover .category-article-title {
  color: var(--theme-red, #ef483f);
}

/* 分组标题 */
.category-article-group {
  margin-bottom: 20px;
}

.category-article-group:last-child {
  margin-bottom: 0;
}

.category-article-group__title {
  margin: 0 0 12px;
  padding-bottom: 10px;

  border-bottom: 1px solid var(--border-color, #e5e7eb);
  color: var(--text-main, #1f2937);

  font-size: 16px;
  line-height: 1.4;
}

/* 模块放在正文底部时显示两列 */
.primary-column .category-article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 590px) {
  .primary-column .category-article-list {
    grid-template-columns: 1fr;
  }

  .category-article-image {
    width: 82px;
    height: 64px;
    flex-basis: 82px;
  }
}

@media (max-width: 767px) {
  .related-article-image {
    width: 82px;
    height: 64px;
    flex-basis: 82px;
  }
}

/* right */
    .goodbuy-block { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
    .goodbuy-block h3 { margin: 0 0 16px 0; font-size: 16px; border-bottom: 2px solid var(--bg-body); padding-bottom: 10px; }
    .category-list { list-style: none; padding: 0; margin: 0; }
    .category-list li { margin-bottom: 12px; }
    .category-list a { color: var(--text-main); text-decoration: none; font-size: 14px; display: flex; justify-content: space-between; }
    .category-list a:hover { color: var(--theme-red); }
    .category-list span { color: var(--text-muted); background: var(--bg-body); padding: 2px 8px; border-radius: 10px; font-size: 12px; }

    .tag-list ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tag-list a { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 7px 8px; border: 1px solid var(--border-color); border-radius: 6px; background: #f8faf9;color:var(--text-muted ); text-align: center; font-size: 12px; font-weight: 600; line-height: 1.35; }
    .tag-list a:hover { border-color: #3b535a; background: #3b535a; color: #fff; }

.brands ul{display: flex;flex-wrap: wrap;border-radius: 10px;justify-content: space-between;}
.brands img{width: 100%;height: 60px;object-fit: contain;}
.brands ul li{width: 48%;margin-bottom: 10px;}
.brands ul li div{margin: 0;border-radius: 10px;}
.brands ul li div a{display: block;border: 1px solid var(--border-color);border-radius: 8px;color: var(--text-main);}
.brands ul li span{text-align: center;display: block;padding: 10px;border-top: 1px #f0f0f0 solid;}
.goodbuy-late { list-style: none; padding: 0; margin: 0; }
    .goodbuy-late li { margin-bottom: 16px; }
    .goodbuy-late li:last-child { margin-bottom: 0; }
    
    .goodbuy-late a {
      display: flex;
      align-items: center;
      gap: 12px;
      text-decoration: none;
      padding: 6px;
      margin: -6px;
      border-radius: 6px;
      transition: background 0.2s;
    }
    .goodbuy-late a:hover {
      background: var(--bg-body);
    }
    .store-icon {
      width: 44px;
      height: 44px;
      border-radius: 8px;
      border: 1px solid var(--border-color);
      background: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0; 
      overflow: hidden;
    }
    
    .store-details {
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      overflow: hidden; 
    }
    .store-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-main);
      line-height: 1.3;
      margin-bottom: 2px;
      transition: color 0.2s;
      display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .goodbuy-late a:hover .store-name { color: var(--theme-red); }
    
   .store-icon figure {
    width: 100%;
    height: 100%;
    margin: 0;
}

.store-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* ==========================================================================
   Joomla Pagination
   ========================================================================== */

.pagination__wrapper {
    width: 100%;
    margin: 30px 0 10px;
}

/* 页码总数说明 */
.pagination__wrapper .text-end {
    margin: 0 0 12px;
    color: var(--text-muted, #66737c);
    font-size: 13px;
    text-align: center;
}

/* links.php 中的外层工具栏 */
.pagination__wrapper .pagination-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* 页码列表 */
.pagination__wrapper ul.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 每一个页码 */
.pagination__wrapper .page-item {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 普通页码 */
.pagination__wrapper .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border-color, #dfe3e6);
    border-radius: 5px;
    background: #fff;
    color: var(--text-main, #17232b);
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

/* 鼠标经过 */
.pagination__wrapper a.page-link:hover {
    color: var(--theme-red, #ef483f);
    border-color: var(--theme-red, #ef483f);
    background: #fff7f6;
}

/* 当前页 */
.pagination__wrapper .page-item.active .page-link {
    color: #fff;
    border-color: var(--theme-red, #ef483f);
    background: var(--theme-red, #ef483f);
    font-weight: 600;
    pointer-events: none;
}

/* 不可点击的上一页和下一页 */
.pagination__wrapper .page-item.disabled .page-link {
    color: #a9b0b5;
    border-color: var(--border-color, #dfe3e6);
    background: #f3f5f6;
    cursor: default;
    pointer-events: none;
}

/* 每页显示数量 */
.pagination__wrapper .limit {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    color: var(--text-muted, #66737c);
    font-size: 13px;
}

.pagination__wrapper .limit select {
    height: 38px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--border-color, #dfe3e6);
    border-radius: 5px;
    background-color: #fff;
    color: var(--text-main, #17232b);
}
/* 分页方向符号：不依赖 Joomla 图标字体 */
.pagination__wrapper .icon-angle-double-left::before {
    content: "«";
}

.pagination__wrapper .icon-angle-left::before {
    content: "‹";
}

.pagination__wrapper .icon-angle-right::before {
    content: "›";
}

.pagination__wrapper .icon-angle-double-right::before {
    content: "»";
}

.pagination__wrapper [class*="icon-angle"]::before {
    font-family: Arial, sans-serif !important;
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
}

/* 手机 */
@media (max-width: 600px) {
    .pagination__wrapper {
        margin-top: 22px;
    }

    .pagination__wrapper ul.pagination {
        gap: 4px;
    }

    .pagination__wrapper .page-link {
        min-width: 34px;
        height: 34px;
        padding: 0 9px;
        font-size: 13px;
    }

    .pagination__wrapper .limit {
        width: 100%;
        justify-content: center;
        margin: 12px 0 0;
    }
}

@media (max-width: 767px) {
  .deal-nav { max-width: calc(100% - 24px); margin-top: 14px; }
  .category-header { padding: 18px; }
  .sale-article__intro { align-items: flex-start; flex-direction: column; }
  .sale-article__media { width: 100%; flex-basis: auto; }
  .sale-article__heading h1 { font-size: 20px; }
  .sale-article__meta { flex-wrap: wrap; }
  .sale-article__meta .direct { width: 100%; margin-left: 0; }
  .sale-article__body { padding: 20px; }
}
/* ==========================================================================
   Mobile Sale Cards
   ========================================================================== */

@media (max-width: 768px) {
    .sale-card {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        column-gap: 14px;
        row-gap: 8px;
        align-items: start;
        padding: 14px;
    }

    /* 让标题、摘要和 meta 直接参与外层网格 */
    .sale-card__content {
        display: contents;
    }

    .sale-card__media {
        grid-column: 1;
        grid-row: 1 / 3;
        display: block;
        width: 120px;
        aspect-ratio: 4 / 3;
        padding: 5px;
        overflow: hidden;
        border: 1px solid var(--border-color, #dfe3e6);
        border-radius: 6px;
        background: #fff;
    }

    .sale-card__media img {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: 4px;
        object-fit: cover;
    }

    .sale-card__title {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        margin: 0;
        font-size: 17px;
        line-height: 1.35;
        letter-spacing: 0;
    }

    .sale-card__title a {
        color: var(--text-main, #17232b);
        text-decoration: none;
    }

    .sale-card__summary {
        grid-column: 2;
        grid-row: 2;
        display: -webkit-box;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        color: var(--text-muted, #66737c);
        font-size: 12px;
        line-height: 1.5;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .sale-card__meta {
        grid-column: 1 / -1;
        grid-row: 3;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
        width: 100%;
        margin-top: 5px;
        padding-top: 12px;
        border-top: 1px solid var(--border-color, #dfe3e6);
        font-size: 11px;
    }

    .sale-card__meta time {
        color: var(--text-muted, #66737c);
        white-space: nowrap;
    }

    .sale-card__meta > a:not(.direct) {
        min-width: 0;
        overflow: hidden;
        color: var(--text-muted, #66737c);
        line-height: 1.3;
        text-decoration: none;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sale-card__meta .direct {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 100px;
        min-height: 38px;
        padding: 8px 13px;
        border-radius: 4px;
        background: var(--theme-red, #ef483f);
        color: #fff;
        font-size: 12px;
        line-height: 1;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
    }

    .sale-card__meta .direct:hover {
        background: var(--theme-red-hover, #d63b33);
        color: #fff;
    }
}
@media (max-width: 420px) {
    .sale-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 9px 12px;
        padding: 12px;
    }

    .sale-card__media {
        width: 96px;
    }

    .sale-card__title {
        font-size: 16px;
    }

    .sale-card__summary {
        -webkit-line-clamp: 2;
    }

    .sale-card__meta {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .sale-card__meta .direct {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 3px;
    }
}

/* Joomla 6 sales template shell */
.page-main { padding:30px 0 60px; }
.page-grid { display:grid; grid-template-columns:minmax(0, 1fr) 300px; gap:30px; align-items:start; }
.primary-column { min-width:0; }
.sidebar { min-width:0; }
@media (max-width:991px) {
  .site-shell { max-width:calc(100% - 32px); }
  .page-grid { grid-template-columns:minmax(0, 1fr); gap:28px; }
  .sidebar { width:100%; }
}
@media (max-width:767px) {
  html, body { overflow-x:hidden; }
  .site-shell { max-width:calc(100% - 24px); }
  .page-main { padding:18px 0 40px; }
  .featured-deal,
  .article-panel { width:100%; }
  .sale-breadcrumb{white-space: nowrap;flex-wrap: nowrap;text-e}
}

@media (max-width:991px) {
  .layout { grid-template-columns:minmax(0, 1fr); gap:28px; }
  .layout .sidebar { width:100%; }
}
@media (max-width:767px) {
  .container.layout { width:100%; margin:18px auto 40px; padding-inline:12px; }
}
/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

/* 桌面端隐藏菜单按钮 */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 9px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 1px;
    background: var(--text-main, #17232b);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 打开时变成关闭符号 */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
    header {
        position: relative;
        z-index: 100;
    }

    .nav-inner {
        position: relative;
        min-height: 64px;
    }

    .nav-toggle {
        display: block;
        flex: 0 0 40px;
        margin-left: auto;
    }

    /* 手机端下拉菜单 */
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 100;
        display: none;
        width: 100%;
        background: #1d1d1d;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-nav .nav-links,
    .primary-nav ul {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .primary-nav .nav-item,
    .primary-nav li {
        display: block;
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .primary-nav li:last-child {
        border-bottom: 0;
    }

    .primary-nav a {
        display: block;
        width: 100%;
        padding: 14px 20px;
        color: #fff;
        font-size: 14px;
        line-height: 1.4;
        font-weight: 500;
        text-decoration: none;
        box-sizing: border-box;
    }

    .primary-nav a:hover,
    .primary-nav .current > a,
    .primary-nav .active > a {
        color: #fff;
        background: var(--theme-red, #ef483f);
    }

    /* 手机端隐藏顶部搜索框，需要保留时删除这段 */
    .search-box {
        display: none;
    }
}
/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    width: 100%;
    margin-top: 50px;
    border-top: 1px solid var(--border-color, #dfe3e6);
    background: #fff;
    color: var(--text-muted, #66737c);
}

.site-footer .site-shell {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 34px 20px 24px;
    box-sizing: border-box;
}

.footer-copy {
    width: 100%;
}

.footer-copy p {
    margin: 0;
    letter-spacing: 0;
}

.foot-desc-1 {
    max-width: 900px;
    color: var(--text-muted, #66737c);
    font-size: 14px;
    line-height: 1.7;
}

.foot-desc-2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 18px !important;
    color: var(--text-main, #17232b);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}

.foot-desc-2 a {
    position: relative;
    margin-right: 0 !important;
    color: var(--text-muted, #66737c);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.foot-desc-2 a:hover {
    color: var(--theme-red, #ef483f);
}

.foot-desc-2 a:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -10px;
    width: 1px;
    height: 12px;
    background: var(--border-color, #dfe3e6);
    transform: translateY(-50%);
}

.foot-desc-3 {
    margin-top: 22px !important;
    padding-top: 18px;
    border-top: 1px solid var(--border-color, #dfe3e6);
    color: var(--text-muted, #66737c);
    font-size: 12px;
    line-height: 1.5;
}
/* Mobile Footer */
@media (max-width: 767px) {
    .site-footer {
        margin-top: 36px;
    }

    .site-footer .site-shell {
        padding: 26px 16px 20px;
    }

    .foot-desc-1 {
        font-size: 13px;
        line-height: 1.65;
    }

    .foot-desc-2 {
        gap: 10px 16px;
        margin-top: 16px !important;
        font-size: 12px;
    }

    .foot-desc-2 a:not(:last-child)::after {
        right: -8px;
    }

    .foot-desc-3 {
        margin-top: 18px !important;
        padding-top: 15px;
        font-size: 11px;
    }
}