/*     
*██╗ ██████╗  ██████╗  ██╗   ██╗ ███████╗ ██╗      ██████╗ ███╗   ██╗
*██║ ██╔══██╗ ██╔══██╗ ██║   ██║     ██╔╝ ██║     ██╔════╝ ████╗  ██║
*██║ ██║  ██║ ██████╔╝ ██║   ██║   ███╔╝  ██║     ██║      ██╔██╗ ██║
*██║ ██║  ██║ ██╔═══╝  ██║   ██║ ██╔══╝   ██║     ██║      ██║╚██╗██║
*██║ ██████╔╝ ██║      ╚██████╔╝ ███████╗ ██║ ██╗  ██████╗ ██║ ╚████║
*╚═╝ ╚═════╝  ╚═╝       ╚═════╝  ╚══════╝ ╚═╝ ╚═╝  ╚═════╝ ╚═╝  ╚═══╝
*
/*!
Theme Name: ID铺子自制主题
Theme URI: https://www.idpuzi.cn/
Author: 盛海网络
Author URI: #
Description: 一款自制的WordPress主题。更适合idpuzi体质！
Version: 1.3.2
Requires PHP: 5.6
License URI: LICENSE
Text Domain: idpuzi-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

Copyright © 2025 idpuzi.cn. All rights reserved.
本模板为版权所有，未经明确授权，禁止复制、使用、修改或分发。

*/

/* Reset some basic elements */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  background-color: #fff;
}

:root {
  --primary-color: #0073aa;
  --primary-color-hover: #005177;
}

/* 结构布局 */
.site-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (max-width: 768px) {
  .site-main {
    padding: 0 10px;
  }
}

/* 段落和排版 */
.entry-content p,
.post-content p,
.page-content p,
.wp-block-paragraph {
  margin-bottom: 1.5em;
  color: #444;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: #222;
  font-weight: bold;
  margin: 1.5em 0 0.5em;
}

/* 链接 */
a,
.entry-content a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover,
a:focus,
.entry-content a:hover {
  color: var(--primary-color-hover);
  text-decoration: underline;
}

/* 列表 */
ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-content ul,
.entry-content ol {
  margin-left: 2em;
  margin-bottom: 1.5em;
}
.entry-content li {
  margin-bottom: 0.5em;
}

/* 图片、代码块 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

code, pre {
  font-family: Consolas, Monaco, 'Courier New', Courier, monospace;
}

/* 引用 */
.entry-content blockquote {
  border-left: 4px solid #00aeff;
  padding-left: 1em;
  color: #666;
  margin: 1.5em 0;
  background-color: #f9f9f9;
}

/* 页脚 */
.site-footer a {
  color: #555;
}
.site-footer a:hover {
  color: #000;
  text-decoration: underline;
}

/* 文章内容中的图片：默认居中  */
.entry-content img,
.post-content img,
.single-post .wp-block-image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;     
    height: auto;        
}




/* 文章存档页面 */
/* 容器和列表 */
.tech-archive-list {
    list-style: none;
    max-width: 1200px;   /* 最大宽度1200px */
    margin: 20px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222c44;
}

/* 每条列表项 */
.tech-archive-item {
    border-bottom: 1px solid #d0d7f5;
    padding: 12px 0;
}

/* 链接为弹性布局，标题左，时间右 */
.tech-archive-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

/* 左侧圆形图标 */
.tech-archive-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #3a6ef8;
    margin-right: 12px;
    flex-shrink: 0;
}

/* 标题文字 */
.tech-archive-title {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* 时间文字 */
.tech-archive-time {
    font-size: 0.9rem;
    color: #5a6d9e;
    min-width: 100px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 链接hover效果 */
.tech-archive-link:hover .tech-archive-title {
    color: #3a6ef8;
}

/* 响应式处理，窄屏时换行 */
@media (max-width: 768px) {
    .tech-archive-link {
        flex-direction: column;
        align-items: flex-start;
    }
    .tech-archive-time {
        text-align: left;
        margin-top: 6px;
    }
}



/* 通知消息（错误/成功/信息） */
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  position: relative;
  max-width: 1180px;
  margin: 30px auto;
  padding: 20px 30px 20px 70px;
  border-left: 6px solid;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  background-color: #fff;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  color: #333;
}

.woocommerce-error {
  border-color: #e74c3c;
  background: linear-gradient(90deg, #fef0ef 0%, #fdecea 100%);
  color: #b63527;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.woocommerce-message {
  border-color: #27ae60;
  background: linear-gradient(90deg, #ebfef2 0%, #dff7e5 100%);
  color: #1e7f34;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.woocommerce-info {
  border-color: #2980b9;
  background: linear-gradient(90deg, #eef6fb 0%, #d8e9f9 100%);
  color: #1c5a8a;
  box-shadow: 0 4px 15px rgba(41, 128, 185, 0.3);
}

.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
  position: absolute;
  left: 25px;
  top: 22px;
  font-size: 1.6rem;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.15));
}

.woocommerce-error::before {
  content: '⛔';
  color: #c0392b;
}

.woocommerce-message::before {
  content: '✅';
  color: #27ae60;
}

.woocommerce-info::before {
  content: 'ℹ️';
  color: #2980b9;
}

.woocommerce-error a,
.woocommerce-info a,
.woocommerce-message a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.25s ease;
}

.woocommerce-error a:hover {
  color: #7e221a;
}

.woocommerce-info a:hover {
  color: #154a78;
}

.woocommerce-message a:hover {
  color: #145d2a;
}

.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
  list-style: none;
  margin: 6px 0;
}

.woocommerce-error .notice-dismiss,
.woocommerce-message .notice-dismiss,
.woocommerce-info .notice-dismiss {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.woocommerce-error .notice-dismiss:hover,
.woocommerce-message .notice-dismiss:hover,
.woocommerce-info .notice-dismiss:hover {
  color: #444;
}

.woocommerce-notice-hide {
  opacity: 0;
  transform: scale(0.95);
  height: 0;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* 订单表格 */
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
  padding: 15px 10px;
  border-bottom: 1px solid #eee;
}
.woocommerce-checkout-review-order-table th {
  font-weight: 700;
  background-color: #f7f9fb;
}
.woocommerce-checkout-review-order-table .product-total,
.woocommerce-checkout-review-order-table tfoot td {
  text-align: right;
}
.woocommerce-checkout-review-order-table tfoot tr.order-total th,
.woocommerce-checkout-review-order-table tfoot tr.order-total td {
  color: #27ae60;
  font-size: 1.2rem;
  border-top: 2px solid #ccc;
  padding-top: 22px;
}
.cart-discount td { color: #e67e22; font-weight: 600; }
.tax-rate td { color: #7f8c8d; }

.woocommerce-shipping-methods label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.woocommerce-checkout-review-order-table ul.woocommerce-shipping-methods {
  list-style: none;
  padding: 0;
  margin: 0;
}
.woocommerce-checkout-review-order-table .woocommerce-shipping-totals {
  background-color: #f9f9f9;
}

/* 隐藏 WooCommerce 默认下单按钮 */
#payment .form-row.place-order {
  display: none !important;
}

/* 自动发货标签 */
.auto-deliver-tag {
  display: inline-block;
  border: 1px solid #28a745;
  background-color: #f6ffef;
  color: #28a745;
  font-size: 13px;
  padding: 2px 6px;
  margin-right: 8px;
  border-radius: 3px;
  font-weight: 600;
  vertical-align: middle;
}

/* 评论区 */
/* ===== 评论区域容器 ===== */
.comments-area {
    margin-top: 60px;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* ===== 评论标题 ===== */
.comments-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #222;
    border-left: 4px solid #0073aa;
    padding-left: 12px;
    margin-bottom: 30px;
}

/* ===== 评论列表结构 ===== */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-item {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.comment-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
}

/* ===== 评论内容样式 ===== */
.comment-body {
    flex: 1;
}

.comment-meta {
    font-size: 0.875rem;
    color: #777;
    margin-bottom: 5px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-date {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #aaa;
}

.comment-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-top: 8px;
}

.comment-reply a {
    font-size: 0.875rem;
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-reply a:hover {
    color: #005f8d;
    text-decoration: underline;
}

/* ===== 评论表单样式 ===== */
.comment-form-wrapper {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.custom-comment-form .form-group {
    margin-bottom: 20px;
}

.custom-comment-form .form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.custom-comment-form .form-control:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
    background: #fff;
    outline: none;
}

.custom-comment-form input[type="submit"] {
    background: linear-gradient(135deg, #0073aa, #005f8d);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.custom-comment-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #005f8d, #004a71);
    transform: translateY(-1px);
}

/* ===== 没有评论时提示 ===== */
.no-comments {
    color: #999;
    text-align: center;
    font-size: 1rem;
    margin-top: 30px;
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
    .comment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-avatar {
        margin-bottom: 10px;
    }

    .comments-title {
        font-size: 1.5rem;
    }

    .custom-comment-form input[type="submit"] {
        width: 100%;
        text-align: center;
    }
}