/*
Theme Name: China Factory OEM
Theme URI: https://chinafactoryoem.com
Author: China Factory OEM Team
Author URI: https://chinafactoryoem.com
Description: Premium dark theme for AI hardware sourcing platform. Modern, fast, and SEO-friendly.
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chinafactoryoem
Tags: business, e-commerce, custom-colors, custom-menu, featured-images
*/

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0A0A0A;
    color: #FFFFFF;
    line-height: 1.6;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.5rem;
    color: #A0A0A0;
}

/* Links */
a {
    color: #00D9FF;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #00B8D9;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00D9FF 0%, #0099CC 100%);
    color: #0A0A0A;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
    color: #0A0A0A;
}

.btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid #00D9FF;
}

.btn-secondary:hover {
    background: #00D9FF;
    color: #0A0A0A;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section */
section {
    padding: 6rem 0;
}

/* Card */
.card {
    background: #1A1A1A;
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid #2A2A2A;
}

.card:hover {
    transform: translateY(-4px);
    border-color: #00D9FF;
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.1);
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 0;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #2A2A2A;
    border-top-color: #00D9FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 1rem;
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 0.5rem;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #00D9FF;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #FFFFFF;
    font-weight: 500;
}

/* Navigation */
.menu-item {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    display: block;
}

.menu-item:hover {
    color: #00D9FF;
}

/* WordPress Menu Classes */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu > li {
    display: inline-block;
    position: relative;
}

/* Dropdown Menu */
.menu li {
    position: relative;
}

.menu .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 0.75rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    list-style: none;
}

.menu li:hover > .sub-menu {
    display: block !important;
    animation: dropdownFade 0.2s ease;
}

.sub-menu li {
    display: block;
}

.sub-menu .menu-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #A0A0A0;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-menu .menu-item:hover {
    color: #00D9FF;
    background: rgba(0, 217, 255, 0.05);
    padding-left: 1.5rem;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown indicator arrow */
.menu > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.4rem;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.2s ease;
}

.menu > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Widget Styles */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    color: #A0A0A0;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #00D9FF;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-numbers {
    padding: 0.5rem 1rem;
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 0.5rem;
    color: #FFFFFF;
    text-decoration: none;
}

.page-numbers.current {
    background: #00D9FF;
    color: #0A0A0A;
    border-color: #00D9FF;
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: #1A1A1A;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
}

.search-submit {
    padding: 1rem 2rem;
    background: #00D9FF;
    color: #0A0A0A;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22C55E;
    color: #22C55E;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #EF4444;
    color: #EF4444;
}

/* ==============================
   Hero Background Animations
   ============================== */

/* Animated Orbs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-1 {
    width: 500px;
    height: 500px;
    background: #00D9FF;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 400px;
    height: 400px;
    background: #0066FF;
    bottom: 20%;
    right: 20%;
    animation-delay: 2s;
}

.hero-orb-3 {
    width: 350px;
    height: 350px;
    background: #7C3AED;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.25;
    }
    75% {
        transform: translate(-30px, -20px) scale(1.05);
        opacity: 0.35;
    }
}

/* Grid Pattern */
.hero-grid {
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
}

.bg-radial-gradient {
    background: radial-gradient(ellipse at center, transparent 0%, #0A0A0A 70%);
}

/* ==============================
   Blog / Article Styles
   ============================== */
.prose {
    color: #D1D5DB;
    font-size: 1.125rem;
    line-height: 1.8;
}

.prose h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.prose h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #2A2A2A;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #FFFFFF;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose p {
    color: #D1D5DB;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.prose a {
    color: #00D9FF;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: #00B8D9;
}

.prose strong {
    color: #FFFFFF;
    font-weight: 600;
}

.prose ul, .prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    color: #D1D5DB;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose li::marker {
    color: #00D9FF;
}

.prose blockquote {
    border-left: 4px solid #00D9FF;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(0, 217, 255, 0.05);
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
    color: #A0A0A0;
    font-style: italic;
    margin-bottom: 0;
}

.prose code {
    background: #1A1A1A;
    color: #00D9FF;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.prose pre {
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 0.75rem;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.prose pre code {
    background: transparent;
    padding: 0;
    color: #D1D5DB;
}

.prose img {
    border-radius: 0.75rem;
    margin: 2rem 0;
    border: 1px solid #2A2A2A;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.prose th {
    background: #1A1A1A;
    color: #FFFFFF;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #00D9FF;
}

.prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #2A2A2A;
    color: #D1D5DB;
}

.prose hr {
    border: none;
    border-top: 1px solid #2A2A2A;
    margin: 3rem 0;
}

/* Blog post meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.post-meta a {
    color: #00D9FF;
}

.post-meta .separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #4B5563;
}

/* Blog post tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #2A2A2A;
}

.post-tags a {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 2rem;
    color: #A0A0A0;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.post-tags a:hover {
    border-color: #00D9FF;
    color: #00D9FF;
    background: rgba(0, 217, 255, 0.05);
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #2A2A2A;
}

.post-navigation a {
    color: #A0A0A0;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-navigation a:hover {
    color: #00D9FF;
}

/* ==============================
   Custom Fields Meta Box
   ============================== */
.theme-meta-box {
    margin-top: 1rem;
}

.theme-meta-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1D2327;
}

.theme-meta-box input,
.theme-meta-box textarea,
.theme-meta-box select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    color: #1D2327;
}
