/*
Theme Name: XINEEE
Theme URI: https://www.xineee.com
Description: Shenzhen trading company WordPress theme - Electronic Components Sourcing, HK Logistics, Cross-border E-commerce Fulfillment. Built with TailwindCSS.
Version: 1.0.0
Author: XINEEE Team
Author URI: https://www.xineee.com
Requires PHP: 5.3
Text Domain: xineee-theme
Tags: trading, logistics, electronics, shenzhen, hong-kong, tailwindcss
*/

/* =========================================================
   CSS VARIABLES & BASE STYLES
   ========================================================= */
:root {
    --brand-50: #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --brand-300: #93c5fd;
    --brand-400: #60a5fa;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-800: #1e40af;
    --brand-900: #1e3a8a;

    --industrial-50: #f0f9ff;
    --industrial-100: #e0f2fe;
    --industrial-200: #bae6fd;
    --industrial-300: #7dd3fc;
    --industrial-400: #38bdf8;
    --industrial-500: #0ea5e9;
    --industrial-600: #0284c7;
    --industrial-700: #0369a1;
    --industrial-800: #075985;
    --industrial-900: #0c4a6e;

    --success-500: #22c55e;
    --warning-500: #f59e0b;
    --danger-500: #ef4444;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* =========================================================
   TAILWIND CSS RESET OVERRIDE
   ========================================================= */
body {
    font-family: var(--font-sans);
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */
.site-header {
    transition: all 0.3s ease;
}
.site-header.scrolled {
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.mobile-menu.open {
    transform: translateX(0);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}
.animate-fade-in-up-delay-1 { animation-delay: 0.15s; opacity: 0; }
.animate-fade-in-up-delay-2 { animation-delay: 0.3s; opacity: 0; }
.animate-fade-in-up-delay-3 { animation-delay: 0.45s; opacity: 0; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.35);
    color: #fff;
}
.btn-secondary {
    background: transparent;
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.4);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}

/* =========================================================
   CARDS
   ========================================================= */
.feature-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.09);
    border-color: #93c5fd;
}

.product-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.product-card .thumb {
    aspect-ratio: 4/3;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   STATS COUNTER
   ========================================================= */
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
}
.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* =========================================================
   SECTION STYLES
   ========================================================= */
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
.section-subtitle {
    font-size: 1.0625rem;
    color: #64748b;
    margin-top: 0.75rem;
}

/* =========================================================
   LOGISTICS TIMELINE (Shenzhen -> HK -> Global)
   ========================================================= */
.logistics-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.timeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    position: relative;
}
.timeline-node .icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}
.timeline-connector {
    flex: 0 0 60px;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #38bdf8);
    position: relative;
}
.timeline-connector::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left: 6px solid #38bdf8;
}

/* =========================================================
   FORMS
   ========================================================= */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease;
    font-family: var(--font-sans);
}
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* =========================================================
   ARTICLE LISTING CARDS (archive, index, search)
   ========================================================= */
.article-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
    border-color: #93c5fd;
}
.article-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.article-card .card-category {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2563eb;
    margin-bottom: 0.5rem;
}
.article-card .card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    transition: color 0.15s ease;
}
.article-card:hover .card-title {
    color: #2563eb;
}
.article-card .card-excerpt {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 0.75rem;
}
.article-card .card-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

/* List layout (horizontal) */
.article-card.list-layout {
    flex-direction: row;
}
.article-card.list-layout .card-image {
    width: 240px;
    min-height: 180px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .article-card.list-layout {
        flex-direction: column;
    }
    .article-card.list-layout .card-image {
        width: 100%;
        min-height: auto;
    }
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.15s ease;
}
.pagination-wrapper .page-numbers:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.pagination-wrapper .page-numbers.current {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.pagination-wrapper .page-numbers.dots {
    border: none;
    background: transparent;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
}
.footer-heading {
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.footer-link:hover {
    color: #fff;
}

/* =========================================================
   WHATSAPP FLOATING BUTTON
   ========================================================= */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    transition: all 0.3s ease;
    animation: whatsapp-pulse 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,211,102,0.5);
}
@keyframes whatsapp-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 20px rgba(37,211,102,0.6); }
}

/* =========================================================
   ARTICLE PROSE --- BLOG POST CONTENT
   ========================================================= */
.article-prose {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #334155;
    max-width: 100%;
}

.article-prose > * + * {
    margin-top: 1.5rem;
}

.article-prose h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    scroll-margin-top: 5rem;
}
.article-prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    scroll-margin-top: 5rem;
    padding-left: 0.75rem;
    border-left: 4px solid #3b82f6;
}
.article-prose h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 5rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.article-prose h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #0ea5e9);
    border-radius: 2px;
}
.article-prose h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-prose p {
    margin-bottom: 1.25rem;
}

.article-prose a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.article-prose a:hover {
    color: #1e40af;
}

.article-prose ul,
.article-prose ol {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1.75rem;
}
.article-prose ul { list-style: none; }
.article-prose ul li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}
.article-prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3b82f6;
}
.article-prose ol {
    list-style: none;
    counter-reset: prose-ol;
}
.article-prose ol li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
    counter-increment: prose-ol;
}
.article-prose ol li::before {
    content: counter(prose-ol);
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-prose blockquote {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #1e293b;
    position: relative;
    overflow: hidden;
}
.article-prose blockquote::before {
    content: '\201C';
    position: absolute;
    top: -10px;
    left: 12px;
    font-size: 4rem;
    color: #93c5fd;
    font-family: Georgia, serif;
    line-height: 1;
    opacity: 0.5;
}
.article-prose blockquote p:last-child {
    margin-bottom: 0;
}

.article-prose img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    max-width: 100%;
}
.article-prose img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.article-prose figure {
    margin: 2rem 0;
}
.article-prose figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

.article-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.article-prose th {
    background: #1e293b;
    color: #ffffff;
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.article-prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.article-prose tr:nth-child(even) td {
    background: #f8fafc;
}
.article-prose tr:hover td {
    background: #eff6ff;
}

.article-prose pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    position: relative;
}
.article-prose pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #0ea5e9, #10b981);
    border-radius: 0.75rem 0.75rem 0 0;
}
.article-prose code {
    font-family: var(--font-mono);
    font-size: 0.875em;
}
.article-prose :not(pre) > code {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    border: 1px solid #bfdbfe;
}

.article-prose hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2.5rem 0;
    position: relative;
}
.article-prose hr::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}

.article-prose strong {
    font-weight: 700;
    color: #0f172a;
}

.article-prose .article-toc {
    scroll-margin-top: 5rem;
}

/* =========================================================
   SINGLE POST PAGE LAYOUT
   ========================================================= */
.single-post-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%);
}
.single-post-meta {
    font-size: 0.8125rem;
    color: #94a3b8;
}
.single-post-meta a {
    color: #60a5fa;
    text-decoration: none;
}
.single-post-meta a:hover {
    text-decoration: underline;
}

/* Tags */
.post-tags a {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
    margin: 0.25rem;
}
.post-tags a:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

/* Related posts */
.related-post-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
}
.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: #93c5fd;
}
.related-post-card .related-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    padding: 0.75rem 1rem;
    transition: color 0.15s ease;
}
.related-post-card:hover .related-title {
    color: #2563eb;
}

/* =========================================================
   READING PROGRESS BAR
   ========================================================= */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #0ea5e9);
    z-index: 99999;
    transition: width 0.1s ease;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: none;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background: #2563eb;
}

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb {
    font-size: 0.8125rem;
    color: #94a3b8;
}
.breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb .separator {
    margin: 0 0.375rem;
    color: #475569;
}

/* =========================================================
   SEARCH RESULTS
   ========================================================= */
.search-highlight {
    background: #fef08a;
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .section-title { font-size: 1.5rem; }
    .stat-number { font-size: 2rem; }
    .timeline-node { padding: 1rem; }
    .timeline-connector { flex: 0 0 30px; }
    .whatsapp-float { width: 52px; height: 52px; bottom: 1rem; right: 1rem; }
    .article-prose { font-size: 1rem; }
    .article-prose h1 { font-size: 1.375rem; }
    .article-prose h2 { font-size: 1.25rem; }
    .article-prose h3 { font-size: 1.125rem; }
    .article-card .card-title { font-size: 0.9375rem; }
}

/* WP Block Editor Alignment */
.alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
}
.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}
@media (max-width: 768px) {
    .alignwide { margin-left: 0; margin-right: 0; }
}

