/* ==========================================================================
   GOALDEALLIVE · WordPress 结构补丁
   这里只处理「模板原本没有、但 WordPress 需要」的样式：
   区块内容排版、分页、面包屑、侧栏表单、抽屉、评论、小工具等。
   模板本身的视觉（app.css）保持不动。
   品牌色：藏青 #323141 / 金 #B08D3E / 黑 #141516 / 灰 #808080
   ========================================================================== */

/* ---------------------------------------------------------------- 基础 */

.gdl-front-page > section:first-child,
.gdl-front-page > div:first-child {
  margin-top: 0;
}

/* 首页短代码区块之间不需要额外的空段落 */
.gdl-front-page p:empty,
.gdl-woo-wrap p:empty {
  display: none;
}

/* 图片链接不出现下划线 */
a img {
  border: 0;
}

/* ---------------------------------------------------------------- 页头/页脚补丁 */

.gdl-cart-count.is-empty {
  display: none;
}

/* 抽屉内部滚动，避免长购物车把页面撑开 */
#sidebar-cart .widget_shopping_cart_content {
  height: calc(100vh - 90px);
  overflow-y: auto;
  padding-bottom: 40px;
}

#sidebar-cart .product-list .product-item .item-image img {
  width: 72px;
  height: auto;
  border-radius: 8px;
}

#sidebar-cart .product-list .product-item a.cancel img {
  width: 14px;
  height: 14px;
}

body.gdl-cart-open {
  overflow: hidden;
}

/* 移动端菜单：把 WP 生成的菜单补成模板的移动端样式 */
.mobile-nav__container .main-menu__list {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav__container .main-menu__list > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav__container .main-menu__list > li > a {
  display: block;
  padding: 12px 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
}

.mobile-nav__container .main-menu__list .sub-menu {
  list-style: none;
  margin: 0 0 8px;
  padding-left: 16px;
}

.mobile-nav__container .main-menu__list .sub-menu a {
  display: block;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

/* 页脚表单里的内联 SVG 图标 */
.newsletter-form > svg {
  position: absolute;
  top: 50%;
  left: clamp(12px, 0.833vw, 32px);
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}

.newsletter-form > svg ~ input {
  padding-left: clamp(40px, 2.5vw, 60px);
}

/* 侧栏搜索表单 */
.sidebar .newsletter-form,
.shop-sidebar .newsletter-form {
  display: block;
}

.sidebar .newsletter-form input,
.shop-sidebar .newsletter-form input {
  width: 100%;
  border: 0;
  background: transparent;
}

.sidebar .newsletter-form input + button,
.shop-sidebar .newsletter-form input + button {
  position: relative;
  /* 重置 app.css 里按钮内嵌输入框时的 absolute 偏移（right/top 对 relative 会产生 5px 错位） */
  right: auto;
  top: auto;
  width: 100%;
  margin-top: 12px;
}

/* ---------------------------------------------------------------- 表单与提示 */

.gdl-form-msg {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
}

.gdl-form-msg.is-success {
  color: #1f7a3f;
}

.gdl-form-msg.is-error {
  color: #c0392b;
}

.gdl-inline-search {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.gdl-inline-search input[type="search"] {
  flex: 1 1 240px;
  min-width: 0;
  height: 52px;
  padding: 0 24px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #ffffff;
  color: #323141;
}

.gdl-inline-search input[type="search"]::placeholder {
  color: #808080;
}

/* ---------------------------------------------------------------- 分页 */

.gdl-pagination ul {
  gap: 8px;
}

.gdl-pagination a,
.gdl-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #ffffff;
  color: #141516;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gdl-pagination a:hover {
  border-color: #B08D3E;
  color: #B08D3E;
}

.gdl-pagination .current {
  border-color: #323141;
  background: #323141;
  color: #ffffff;
}

.gdl-pagination .dots {
  border: 0;
  background: transparent;
}

/* ---------------------------------------------------------------- 面包屑 */

.gdl-breadcrumb,
.gdl-breadcrumb-text {
  font-size: 14px;
}

.gdl-breadcrumb a:hover,
.gdl-breadcrumb-text a:hover {
  color: #B08D3E;
}

/* ---------------------------------------------------------------- 文章列表卡片补丁 */

.blog-grid-page .blog-card,
.gdl-related .blog-card,
.blog-section .blog-card {
  display: block;
  text-decoration: none;
}

.blog-card .image-box img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.blog-card .text-box .cus-btn {
  display: inline-flex;
}

.blog-card .text-box img.br-50perc {
  width: 28px;
  height: 28px;
  object-fit: cover;
}

/* ---------------------------------------------------------------- 文章正文排版 */

.gdl-entry-content {
  color: #464646;
  font-size: 16px;
  line-height: 1.85;
}

.gdl-entry-content > * + * {
  margin-top: 24px;
}

.gdl-entry-content h1,
.gdl-entry-content h2,
.gdl-entry-content h3,
.gdl-entry-content h4,
.gdl-entry-content h5,
.gdl-entry-content h6 {
  margin-bottom: 16px;
  color: #141516;
  font-family: "Maven Pro", sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

.gdl-entry-content h2 {
  font-size: 30px;
}

.gdl-entry-content h3 {
  font-size: 24px;
}

.gdl-entry-content h4 {
  font-size: 20px;
}

.gdl-entry-content a {
  color: #B08D3E;
  text-decoration: underline;
}

.gdl-entry-content ul,
.gdl-entry-content ol {
  padding-left: 22px;
}

.gdl-entry-content li + li {
  margin-top: 8px;
}

.gdl-entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.gdl-entry-content blockquote {
  margin: 32px 0;
  padding: 24px 32px;
  border-left: 4px solid #B08D3E;
  background: #F7F7F7;
  border-radius: 0 16px 16px 0;
  color: #323141;
  font-size: 18px;
  font-style: normal;
}

.gdl-entry-content blockquote cite {
  display: block;
  margin-top: 12px;
  color: #808080;
  font-size: 14px;
  font-style: normal;
}

.gdl-entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.gdl-entry-content th,
.gdl-entry-content td {
  padding: 12px 16px;
  border: 1px solid #e6e6e6;
  text-align: left;
}

.gdl-entry-content th {
  background: #F7F7F7;
  color: #141516;
}

.gdl-entry-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #f2f2f2;
  font-size: 14px;
}

.gdl-entry-content pre {
  padding: 20px;
  border-radius: 12px;
  background: #1f1f1f;
  color: #f5f5f5;
  overflow-x: auto;
}

/* 文章内的标签 */
.gdl-tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  color: #141516;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gdl-tag:hover {
  border-color: #B08D3E;
  background: #B08D3E;
  color: #ffffff;
}

/* 上一篇 / 下一篇 */
.gdl-post-nav-link {
  flex: 1 1 260px;
  padding: 20px 24px;
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gdl-post-nav-link:hover {
  border-color: #B08D3E;
  background: #F7F7F7;
}

.gdl-page-links {
  font-size: 14px;
}

.gdl-page-links a {
  display: inline-block;
  margin: 0 6px;
  color: #B08D3E;
}

/* ---------------------------------------------------------------- 评论 */

.gdl-entry-content .comment-respond,
.blog-detail-page .comment-respond {
  margin-top: 48px;
}

.comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-list .comment-body {
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: #F7F7F7;
}

.comment-list .children {
  margin: 0;
  padding-left: 32px;
  list-style: none;
}

.comment-list .comment-author img {
  border-radius: 50%;
  margin-right: 12px;
}

.comment-list .comment-metadata {
  font-size: 13px;
  color: #808080;
}

.comment-list .comment-metadata a {
  color: #808080;
  text-decoration: none;
}

.comment-respond .form-submit input[type="submit"],
.comment-respond button[type="submit"] {
  padding: 12px 32px;
  border: 0;
  border-radius: 999px;
  background: #323141;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.comment-respond .form-submit input[type="submit"]:hover,
.comment-respond button[type="submit"]:hover {
  background: #B08D3E;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 18px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  color: #323141;
}

.comment-form label {
  display: block;
  margin-bottom: 8px;
  color: #141516;
  font-weight: 500;
}

/* ---------------------------------------------------------------- 小工具 */

.sidebar .widget,
.shop-sidebar .widget {
  margin-bottom: 24px;
}

.sidebar .widget .widget-title,
.shop-sidebar .widget .widget-title {
  margin-bottom: 16px;
  color: #141516;
  font-family: "Maven Pro", sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.sidebar .widget ul,
.shop-sidebar .widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .widget ul li,
.shop-sidebar .widget ul li {
  margin-bottom: 10px;
}

.sidebar .widget ul li a,
.shop-sidebar .widget ul li a {
  color: #141516;
}

.sidebar .widget ul li a:hover,
.shop-sidebar .widget ul li a:hover {
  color: #B08D3E;
}

.sidebar .widget select,
.shop-sidebar .widget select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
}

/* ---------------------------------------------------------------- 404 / 空状态 */

.gdl-404-code {
  font-size: clamp(72px, 8vw, 140px);
  line-height: 1;
  color: #323141;
}

.gdl-no-results {
  border-radius: 16px;
}

/* ---------------------------------------------------------------- 区块编辑器（Gutenberg）内容 */

.alignwide {
  width: min(1400px, calc(100% + 0px));
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.wp-block-image {
  margin-bottom: 24px;
}

.wp-block-image img {
  border-radius: 16px;
}

.wp-block-image figcaption {
  margin-top: 8px;
  color: #808080;
  font-size: 13px;
  text-align: center;
}

.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  background: #323141;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.wp-block-button__link:hover {
  background: #B08D3E;
  color: #ffffff;
}

.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 24px;
}

.wp-block-column {
  flex: 1 1 0;
  min-width: 0;
}

.wp-block-separator {
  border: 0;
  border-top: 1px solid #e6e6e6;
  margin: 40px auto;
  max-width: 100%;
}

.wp-block-table {
  overflow-x: auto;
}

.wp-block-quote {
  margin: 32px 0;
  padding: 24px 32px;
  border-left: 4px solid #B08D3E;
  background: #F7F7F7;
  border-radius: 0 16px 16px 0;
}

.wp-block-quote cite {
  display: block;
  margin-top: 12px;
  color: #808080;
  font-size: 14px;
}

/* 编辑器配色盘对应的前台颜色 */
.has-gdl-navy-color { color: #323141; }
.has-gdl-navy-background-color { background-color: #323141; }
.has-gdl-gold-color { color: #B08D3E; }
.has-gdl-gold-background-color { background-color: #B08D3E; }
.has-gdl-black-color { color: #141516; }
.has-gdl-black-background-color { background-color: #141516; }
.has-gdl-light-color { color: #F5F5F5; }
.has-gdl-light-background-color { background-color: #F5F5F5; }
.has-gdl-white-color { color: #FFFFFF; }
.has-gdl-white-background-color { background-color: #FFFFFF; }

/* ---------------------------------------------------------------- Elementor / 页面构建器兼容 */

.elementor-page .gdl-entry-content,
.elementor-page .page-content-wrapper {
  padding-top: 0;
}

.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 1400px;
}

/* 全宽页模板：内容区不再加左右内边距，交给构建器控制 */
.gdl-template-fullwidth .gdl-entry-content > * + * {
  margin-top: 0;
}

.gdl-template-fullwidth .page-content-wrapper {
  padding-top: 0;
  padding-bottom: 0;
}

.gdl-template-fullwidth .container-fluid {
  padding-left: 0;
  padding-right: 0;
}

/* ---------------------------------------------------------------- 响应式微调 */

@media (max-width: 991px) {
  .gdl-inline-search {
    gap: 8px;
  }

  .comment-list .children {
    padding-left: 16px;
  }
}

@media (max-width: 575px) {
  .gdl-entry-content {
    font-size: 15px;
  }

  .gdl-entry-content h2 {
    font-size: 24px;
  }

  .gdl-entry-content h3 {
    font-size: 20px;
  }

  .gdl-post-nav-link {
    flex: 1 1 100%;
  }

  .wp-block-columns {
    gap: 20px;
  }
}

/* ---- 移动端汉堡按钮图标（模板 CSS 未给 img 设尺寸，默认 0x0 不可见） ---- */
.main-menu__toggler.mobile-nav__toggler img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
.main-menu__toggler.mobile-nav__toggler {
  flex-shrink: 0;
}

/* ---- 小屏：压缩头部布局，防止按钮组溢出（logo 过宽把汉堡挤出屏幕） ---- */
@media (max-width: 575px) {
  header .header-logo img {
    max-width: 150px;
    height: auto;
  }
  header .header-buttons {
    gap: 8px;
  }
  header .header-buttons .header-button-box {
    padding: 7px 8px;
  }
}

/* 移动菜单里的下拉展开箭头 */
.mobile-nav__container .dropdown > a .dropdown-toggler-btn {
  margin-left: auto;
  cursor: pointer;
}

/* ---------------------------------------------------------------- 球员区（v1.1.6） */
/* 卡片带链接时整卡为 <a>，保持与 div 版一致的布局 */
a.team-block {
  display: block;
  text-decoration: none;
}
