/*
Theme Name: NOKA 挪卡科技
Theme URI: https://www.noka-automation.com
Author: NOKA Team
Author URI: https://www.noka-automation.com
Description: 挪卡自动化科技（常州）有限公司官方WordPress主题 - 工业连接器与自动化解决方案
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nuoka
Tags: industrial, automation, connectors, responsive
*/

/* ============================================
   NOKA Theme - CSS Styles
   ============================================ */

/* Import Tailwind CSS via CDN or use compiled styles */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* CSS Variables */
:root {
    --noka-blue: #00529b;
    --noka-orange: #f39200;
    --noka-light: #e8f4fc;
    --text-dark: #1a1a1a;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #f9fafb;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.hero-bg {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('assets/img/hero-bg.webp');
    background-size: cover;
    background-position: center;
}

a {
    color: var(--noka-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--noka-orange);
}

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

/* ============================================
   Header Styles
   ============================================ */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--noka-blue);
}

.site-logo .logo-divider {
    width: 1px;
    height: 24px;
    background: #d1d5db;
}

.site-logo .logo-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
}

/* Main Navigation */
.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    color: var(--noka-blue);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding-left: 1rem;
    border-left: 1px solid #e5e7eb;
}

.lang-switch a {
    color: var(--noka-blue);
}

.lang-switch .current-lang {
    color: var(--noka-blue);
    font-weight: 600;
}

.lang-switch span {
    color: #d1d5db;
}

/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    background: var(--bg-light);
    padding: 1rem 0;
}

.breadcrumb ul {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-gray);
    list-style: none;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin: 0 0.75rem;
    color: #d1d5db;
}

.breadcrumb a:hover {
    color: var(--noka-blue);
}

.breadcrumb .current {
    color: var(--noka-blue);
    font-weight: 600;
}

/* ============================================
   Product Archive Layout
   ============================================ */
.products-page {
    padding: 3rem 0;
}

.products-layout {
    display: flex;
    gap: 2rem;
}

/* Sidebar - Product Directory */
.product-sidebar {
    width: 25%;
    flex-shrink: 0;
}

.product-directory {
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.directory-header {
    background: var(--noka-blue);
    color: #fff;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.directory-content {
    padding: 0.5rem 0;
}

/* Category Items */
.category-item {
    border-bottom: 1px solid #f3f4f6;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item > button,
.category-item > a {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    color: var(--noka-blue);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s;
}

.category-item > button:hover,
.category-item > a:hover {
    background: var(--bg-light);
}

.category-item > button i {
    font-size: 0.625rem;
    transition: transform 0.3s;
}

.category-item > button.active i {
    transform: rotate(180deg);
}

/* Sub Categories */
.sub-category {
    background: #f9fafb;
}

.sub-category > button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.sub-category > button:hover {
    color: var(--noka-blue);
}

.sub-category > button i {
    font-size: 0.625rem;
}

/* Level 3 - Sub-sub Categories */
.sub-category-content {
    background: #fff;
    padding-left: 1rem;
}

.sub-category-content a {
    display: block;
    padding: 0.5rem 2rem;
    font-size: 0.75rem;
    color: var(--text-gray);
    border-left: 2px solid transparent;
}

.sub-category-content a:hover,
.sub-category-content a.active {
    color: var(--noka-blue);
    border-left-color: var(--noka-blue);
}

/* Product Grid */
.product-content {
    width: 75%;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.product-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--noka-blue);
}

.product-count {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.product-count span {
    font-weight: 700;
    color: var(--noka-orange);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 192px;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card-body {
    padding: 1.25rem;
}

.product-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--noka-blue);
    margin-bottom: 0.5rem;
}

.product-card h3 a:hover {
    color: var(--noka-orange);
}

.product-card p {
    font-size: 0.75rem;
    color: var(--text-gray);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product Overlay */
.product-card .product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 82, 155, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-overlay button {
    background: #fff;
    color: var(--noka-blue);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ============================================
   Single Product Page
   ============================================ */
/* .single-product {
    padding: 3rem 0;
} */

.single-product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.product-gallery img {
    width: 100%;
    border-radius: 0.5rem;
}

.product-info h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--noka-blue);
    margin-bottom: 1rem;
}

.product-description {
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.product-specs {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.product-specs h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--noka-blue);
    margin-bottom: 1rem;
}

.product-specs ul {
    list-style: none;
}

.product-specs li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.product-specs li:last-child {
    border-bottom: none;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #111827;
    color: #fff;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-col h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--noka-blue);
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.8;
    border-left: 2px solid var(--noka-blue);
    padding-left: 1rem;
}

.footer-col h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-col .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer-col .contact-item i {
    color: var(--noka-blue);
    margin-top: 0.25rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* ============================================
   Floating Contact Buttons
   ============================================ */
.floating-contact {
    position: fixed;
    right: 1.5rem;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 100;
}

.floating-btn {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--noka-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.floating-btn:hover {
    background: var(--noka-blue);
    color: #fff;
}

.floating-btn i {
    font-size: 1.25rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .products-layout {
        flex-direction: column;
    }
    
    .product-sidebar,
    .product-content {
        width: 100%;
    }
    
    .main-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .single-product-content {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Optimizations - Add only, don't change existing styles */
@media (max-width: 768px) {
    /* Touch-friendly enhancements */
    .product-card:hover {
        transform: none;
    }

    .product-card:hover img {
        transform: none;
    }

    /* Ensure tap targets are large enough */
    .nav-link,
    .category-item > button,
    .sub-category > button {
        min-height: 44px;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
    }

    .product-card:hover img {
        transform: none;
    }
}
