/*
Theme Name: ZXY Sourcing
Theme URI: https://zhixiaoyi.com
Author: ZXY Sourcing
Author URI: https://zhixiaoyi.com
Description: A professional B2B WordPress theme for ZXY Sourcing — Smart Pet Supplies & Technology Wholesale. Tailored for the pet industry supply chain, featuring pet product wholesale, customization, and procurement. Built with Tailwind CSS for a clean, modern, and responsive design.
Version: 1.0.2
License: GPL v2 or later
Text Domain: zxy-sourcing
Tags: pet-supplies, b2b, wholesale, tailwindcss, responsive, custom-header, custom-menu, translation-ready

ZXY Sourcing WordPress Theme, (C) 2026 ZXY Sourcing
*/

/* Tailwind CSS is loaded via CDN in functions.php */
/* Additional custom styles below */

:root {
  --zxy-primary: #2563eb;
  --zxy-primary-dark: #1d4ed8;
  --zxy-secondary: #059669;
  --zxy-accent: #f59e0b;
  --zxy-dark: #1e293b;
  --zxy-gray: #64748b;
  --zxy-light: #f8fafc;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* WhatsApp float button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  transform: translateY(-3px);
  color: #fff;
}

.whatsapp-float.pulse {
  animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Custom utility classes */
.text-zxy-primary { color: var(--zxy-primary); }
.bg-zxy-primary { background-color: var(--zxy-primary); }
.text-zxy-secondary { color: var(--zxy-secondary); }
.bg-zxy-secondary { background-color: var(--zxy-secondary); }

/* WordPress alignment classes */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--zxy-gray); }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }

/* ═══════════════════════════════════════════════
   Article Content Prose — zxy-article-content
   ═══════════════════════════════════════════════ */
body .zxy-article-content {
  color: #374151;
  line-height: 1.85;
  font-size: 1.0625rem;
  word-break: break-word;
  max-width: 100%;
}

/* ── Lead / first paragraph ── */
body .zxy-article-content > p:first-of-type {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #4b5563;
  margin-bottom: 1.75em;
}

/* ── Headings: clear hierarchy with accent bar ── */
body .zxy-article-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2.8em;
  margin-bottom: 0.75em;
  padding-left: 0.75rem;
  border-left: 4px solid #2563eb;
  line-height: 1.3;
}

body .zxy-article-content h2:first-child { margin-top: 0; }

body .zxy-article-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2.2em;
  margin-bottom: 0.65em;
  line-height: 1.4;
  padding-bottom: 0.35em;
  border-bottom: 1px dashed #e2e8f0;
}

body .zxy-article-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

/* ── Paragraph spacing — generous vertical rhythm ── */
body .zxy-article-content p {
  margin-bottom: 1.4em;
}

body .zxy-article-content p:last-child {
  margin-bottom: 0;
}

/* ── Links ── */
body .zxy-article-content a {
  color: #2563eb;
  text-decoration: none;
  background-image: linear-gradient(#2563eb, #2563eb);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.2s ease, color 0.2s ease;
}

body .zxy-article-content a:hover {
  color: #1d4ed8;
  background-size: 100% 2px;
}

/* ── Lists ── */
body .zxy-article-content ul,
body .zxy-article-content ol {
  margin: 1.25em 0 1.5em 0;
  padding-left: 1.6em;
}

body .zxy-article-content ul {
  list-style: none;
}

body .zxy-article-content ul li {
  position: relative;
  padding-left: 0.25em;
}

body .zxy-article-content ul li::before {
  content: '';
  position: absolute;
  left: -1.3em;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

body .zxy-article-content ol {
  list-style-type: none;
  counter-reset: article-ol;
}

body .zxy-article-content ol li {
  counter-increment: article-ol;
  position: relative;
  padding-left: 0.25em;
}

body .zxy-article-content ol li::before {
  content: counter(article-ol) '.';
  position: absolute;
  left: -1.8em;
  font-weight: 700;
  color: #2563eb;
  font-size: 0.9em;
}

body .zxy-article-content li {
  margin-bottom: 0.55em;
  line-height: 1.75;
}

body .zxy-article-content li:last-child {
  margin-bottom: 0;
}

/* ── Blockquote — callout style ── */
body .zxy-article-content blockquote {
  border-left: 4px solid #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  padding: 1.25em 1.5em;
  margin: 2em 0;
  border-radius: 0 1rem 1rem 0;
  color: #1e3a5f;
  font-size: 1.05rem;
  position: relative;
}

body .zxy-article-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.35em;
  left: 0.3em;
  font-size: 3rem;
  color: #bfdbfe;
  line-height: 1;
  font-family: Georgia, serif;
  pointer-events: none;
}

body .zxy-article-content blockquote p {
  margin-bottom: 0.5em;
  position: relative;
  z-index: 1;
}

body .zxy-article-content blockquote p:last-child {
  margin-bottom: 0;
}

body .zxy-article-content blockquote cite {
  display: block;
  margin-top: 0.75em;
  font-size: 0.85em;
  color: #64748b;
  font-style: normal;
}

/* ── Images — card-like treatment ── */
body .zxy-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 2em auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

body .zxy-article-content figure {
  margin: 2em 0;
}

body .zxy-article-content figure img {
  margin-bottom: 0;
  border-radius: 1rem 1rem 0 0;
}

body .zxy-article-content figcaption,
body .zxy-article-content .wp-element-caption {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  padding: 0.75em 1em 0.5em;
  background: #f8fafc;
  border-radius: 0 0 1rem 1rem;
  margin-top: 0;
}

/* ── Tables — striped, clean ── */
body .zxy-article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2em 0;
  font-size: 0.9375rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}

body .zxy-article-content thead th {
  background: #1e293b;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}

body .zxy-article-content th,
body .zxy-article-content td {
  padding: 0.75em 1em;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

body .zxy-article-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

body .zxy-article-content tbody tr:hover {
  background: #eff6ff;
}

body .zxy-article-content tbody tr:last-child td {
  border-bottom: none;
}

/* ── Inline code ── */
body .zxy-article-content code {
  background: #fef2f2;
  padding: 0.2em 0.45em;
  border-radius: 0.3rem;
  font-size: 0.88em;
  color: #be123c;
  font-family: 'SF Mono', 'Fira Code', monospace;
  white-space: nowrap;
}

/* ── Pre / code block ── */
body .zxy-article-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.5em;
  border-radius: 1rem;
  overflow-x: auto;
  margin: 2em 0;
  font-size: 0.875rem;
  line-height: 1.7;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

body .zxy-article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
  white-space: pre;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Horizontal rule — decorative ── */
body .zxy-article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #cbd5e1, transparent);
  margin: 2.5em 0;
}

/* ── WP block patterns ── */
body .zxy-article-content .wp-block-group.has-background {
  padding: 1.5em 1.75em;
  border-radius: 1rem;
  margin: 1.75em 0;
}

body .zxy-article-content .wp-block-separator {
  border: none;
  height: 2px;
  background: #e2e8f0;
  margin: 2em auto;
  max-width: 8rem;
}

body .zxy-article-content .wp-block-pullquote {
  border-top: 3px solid #2563eb;
  border-bottom: 3px solid #2563eb;
  padding: 2em 0;
  margin: 2em 0;
  text-align: center;
  font-size: 1.2rem;
  color: #1e293b;
}

body .zxy-article-content .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: #2563eb;
  color: #fff !important;
  padding: 0.75em 1.5em;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none !important;
  background-image: none !important;
  transition: background 0.2s ease, transform 0.15s ease;
}

body .zxy-article-content .wp-block-button__link:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

/* ── Gutenberg media & text ── */
body .zxy-article-content .wp-block-media-text {
  margin: 2em 0;
  gap: 1.5em;
}

body .zxy-article-content .wp-block-media-text__content {
  padding: 0;
}

/* ── Smooth scroll target offset (for TOC jumps) ── */
body .zxy-article-content h2[id],
body .zxy-article-content h3[id] {
  scroll-margin-top: 5rem;
}

/* ═══════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════ */

/* ── Line clamp utility (Tailwind 2 fallback) ── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Pagination active link ── */
.page-numbers.current {
  background-color: #2563eb;
  color: #fff;
  border-color: #2563eb;
  pointer-events: none;
}

.page-numbers.dots {
  border: none;
  color: #9ca3af;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   Responsive — article content
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  body .zxy-article-content {
    font-size: 1rem;
    line-height: 1.75;
  }

  body .zxy-article-content > p:first-of-type {
    font-size: 1.075rem;
    line-height: 1.7;
    margin-bottom: 1.5em;
  }

  body .zxy-article-content h2 {
    font-size: 1.35rem;
    margin-top: 2em;
    padding-left: 0.6rem;
    border-left-width: 3px;
  }

  body .zxy-article-content h3 {
    font-size: 1.15rem;
    margin-top: 1.6em;
  }

  body .zxy-article-content h4 {
    font-size: 1.05rem;
  }

  body .zxy-article-content blockquote {
    padding: 1em 1.25em;
    font-size: 0.95rem;
  }

  body .zxy-article-content img {
    border-radius: 0.75rem;
    margin: 1.5em auto;
  }

  body .zxy-article-content figure {
    margin: 1.5em 0;
  }

  body .zxy-article-content table {
    font-size: 0.85rem;
  }

  body .zxy-article-content th,
  body .zxy-article-content td {
    padding: 0.5em 0.6em;
  }
}
