/* 中文注释：下载页样式；功能：统一下载按钮样式，支持hover展开；用法：通过.download-dropdown实现下拉菜单 */

/* 中文注释：简化下载区域样式；功能：容纳主按钮和发布时间；用法：在插件卡片中作为下载按钮区域，默认左对齐，由上层布局控制整体位置。 */ 
.download-simple {
  margin-top: 16px;
  text-align: left;
}

/* 中文注释：功能名称【下载页统一售价提示样式】；用法：在插件区域顶部居中展示警示文案，强调官方统一零售价；通过显著增大与下方卡片间距，让提示语整体更靠上，形成清晰分区。 */
.downloads-price-warning {
  max-width: 960px;
  margin: 0 auto 56px;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: #b45309;
}

/* 中文注释：功能名称【插件价格与操作区域布局】；用法：在单个插件卡片内将统一售价文案和下载/购买按钮排成上下两行，上行显示价格，下行左侧为下载按钮、右侧为立即购买按钮。 */
.product-price-row {
  margin-top: 24px;
}

.product-price-text {
  font-size: 14px;
  color: #0f172a;
  font-weight: 500;
  margin-bottom: 8px;
}

/* 中文注释：功能名称【统一售价数字高亮】；用法：在“全网统一零售价”文案中仅对数字部分（如 298、499）使用品牌橙色高亮，强化价格记忆点。 */
.product-price-text .product-price-number {
  color: var(--primary);
  font-weight: 600;
}

.product-price-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: nowrap;
}

.product-wechat-share-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.product-wechat-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.product-wechat-share-btn img {
  width: 14px;
  height: 14px;
}

.product-wechat-share-btn:hover {
  background: rgba(17, 24, 39, 0.04);
  border-radius: 8px;
}

.download-local-center,
.free-tool-section {
  position: relative;
  padding-top: 36px;
}

.download-share-bar.compact {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.download-share-bar.compact .hy-share-trigger {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.product-price-actions .download-simple {
  flex: 0 0 auto;
  margin-top: 0;
}

.product-buy-wrap {
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
}

/* 中文注释：功能名称【立即购买描边按钮】；用法：尺寸与下载主按钮保持一致，仅以描边区分层级，避免视觉割裂。 */
.product-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-buy-btn:hover {
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.10);
}

/* 中文注释：功能名称【插件发布时间居中展示】；用法：在两个按钮下方整体居中显示“当前版本发布时间：YYYY-MM-DD”。 */
.product-price-row .release-date-text {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

/* 中文注释：下载下拉容器；功能：相对定位，用于绝对定位下拉菜单；用法：position relative */
.download-dropdown {
  position: relative;
  display: inline-block;
}

/* 中文注释：主下载按钮；功能：默认显示一个版本号+下载文字；用法：点击或hover时展开下拉，按钮内部内容始终保持单行展示。 */
.download-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 中文注释：功能名称【下载与购买按钮统一尺寸】；用法：强制下载与立即购买按钮高度一致并整体变扁，通过固定高度与去除多余内边距，避免一高一低，同时保持两侧按钮视觉宽度一致但不过于宽。 */
.download-main-btn,
.product-buy-btn {
  height: 40px;
  padding: 0 24px;
  line-height: 1;
  min-width: 180px;
}

@media (max-width: 640px) {
  .download-section .product-card {
    color-scheme: light;
  }

  .download-list {
    justify-items: center;
  }

  .download-section .product-card {
    width: min(520px, 100%);
    padding: 20px;
    gap: 20px;
  }

  .download-section .product-card .product-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .download-section .product-card .product-header img,
  .download-section .product-card .product-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 16px;
  }

  .download-section .product-card h2 {
    font-size: 20px;
    color: #0f172a;
  }

  .download-section .product-card .tagline {
    font-size: 14px;
    color: #475569;
  }

  .download-section .product-description {
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
  }

  .product-price-text {
    color: #0f172a;
  }

  .product-price-row .release-date-text {
    color: #64748b;
  }

  .product-price-actions {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .product-price-actions .download-simple,
  .product-buy-wrap {
    width: auto;
    margin-left: 0;
    justify-content: flex-start;
  }

  .download-dropdown,
  .download-main-btn,
  .product-buy-btn {
    width: auto;
    min-width: 140px;
  }

  .download-main-btn,
  .product-buy-btn {
    height: 38px;
    padding: 0 18px;
    font-size: 14px;
  }

  .product-price-row .release-date-text {
    text-align: center;
    margin-top: 12px;
  }

  .product-wechat-share-row {
    justify-content: flex-end;
    margin-top: 4px;
  }

  .product-wechat-share-btn {
    font-size: 12px;
    padding: 4px 6px;
  }

  .download-local-center,
  .free-tool-section {
    padding-top: 32px;
  }

  .download-share-bar.compact {
    top: 4px;
    right: 4px;
    gap: 8px;
  }

  .download-share-bar.compact .hy-share-trigger {
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
  }
}

.download-main-btn:hover {
  background: var(--primary-dark);
}

/* 中文注释：版本号文字；功能：合并显示版本号到按钮；用法：位于“下载”右侧，细体小号 */
.version-text {
  font-weight: 400;
  font-size: 14px;
  opacity: 0.9;
}

/* 中文注释：下拉箭头；功能：指示可展开状态；用法：hover时旋转 */
.dropdown-arrow {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.download-dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* 中文注释：下拉菜单；功能：hover时显示两个版本选项；用法：absolute定位，默认隐藏 */
.download-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 10;
}

.download-dropdown:hover .download-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 中文注释：功能名称【插件价格徽章样式】；用法：固定在下载卡片右下角，使用黑金配色展示“298元/499元”等统一售价，提升整体高级感且不干扰主操作按钮。 */
.download-price-badge {
  position: absolute;
  right: 24px;
  bottom: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #facc6b;
  background: radial-gradient(circle at 0% 0%, #111827 0, #020617 55%, #000000 100%);
  border: 1px solid rgba(250, 204, 21, 0.85);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.9),
    0 8px 18px rgba(15, 23, 42, 0.65),
    0 0 18px rgba(250, 204, 21, 0.35);
  pointer-events: none;
}

/* 中文注释：下载选项；功能：分别展示mac和windows版本；用法：flex布局，左右分布 */
.download-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.download-option:last-child {
  border-bottom: none;
}

.download-option:hover {
  background: var(--surface);
}

.download-option .platform {
  font-weight: 600;
}

.download-option .version {
  color: var(--muted);
  font-size: 14px;
}

/* 中文注释：发布时间文案；功能：展示版本发布时间；用法：按钮下方小号浅色文字 */
.release-date-text {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* 中文注释：空状态；功能：无下载链接时显示；用法：居中灰色文字 */
.download-simple .empty {
  color: var(--muted);
  font-style: italic;
  margin: 24px 0;
}

/* 中文注释：本地部署信息模块；功能：展示百度云链接与发布时间；用法：出现在插件下载卡片下方 */
.product-local-deploy {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  text-align: left;
}

.local-deploy-header {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.local-deploy-tip {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.local-deploy-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.local-deploy-link-text {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  background: #e5f0ff;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  font-size: 13px;
  color: #1d4ed8;
  word-break: break-all;
}

.local-deploy-copy-btn {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid rgba(37, 99, 235, 0.85);
  background: #fff;
  color: #1d4ed8;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.local-deploy-copy-btn:hover {
  background: #eff6ff;
}

.local-deploy-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* 中文注释：功能名称【赠送素材整合网格排版】；用法：仅在软件下载页“赠送素材整合”区域针对 .download-list 做细化排版，保持与全局下载卡片风格一致，同时不影响其他页面使用 .download-list 的布局 */
#download-gift .download-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

#download-gift .product-card {
  height: 100%;
}

@media (max-width: 1024px) {
  #download-gift .download-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #download-gift .download-list {
    grid-template-columns: 1fr;
  }
}

/* 中文注释：功能名称【赠送素材整合卡片视觉统一】；用法：仅在“赠送素材整合”模块中微调标题与链接块的间距字号，让整体观感与插件下载、本地部署卡片保持一致 */
#download-gift .product-header h2 {
  font-size: 20px;
  margin: 0 0 4px;
}

#download-gift .product-header .tagline {
  font-size: 14px;
}

#download-gift .product-local-deploy {
  margin-top: 16px;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .download-dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 100%;
    margin-bottom: 8px;
    margin-top: 0;
  }
  
  .download-main-btn {
    width: 100%;
    justify-content: center;
  }
  
  .local-deploy-link-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .local-deploy-copy-btn {
    width: 100%;
    text-align: center;
  }
}
