/*
Theme Name: RunGo Bag
Theme URI: https://www.rungobag.com
Author: RunGo Team
Description: WordPress theme for eco bag manufacturer - replicating rungobag.com design. Features: Custom post types for Products, Certificates, Cooperation Cases. Customizer for all content. Auto image save, link/ad removal on paste.
Version: 1.0.0
Text Domain: runbag-theme
Requires at least: 5.8
Tested up to: 6.4
License: GNU General Public License v2 or later
*/

/* ============================================
   CSS Variables (from rungobag.com)
   ============================================ */
:root {
    --background: #ededed;
    --font: #333333;
    --brand: #0371b8;
    --accent: #f3f5f8;
    --secondary: #f36c1e;
    --white: #ffffff;
    --dark: #1a1a1a;
    --gray: #666666;
    --light-gray: #f5f5f5;
    --border: #e0e0e0;
    --success: #28a745;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 4px;
    --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    color: var(--brand);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    line-height: 1.3;
    margin-bottom: 0.5em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo img {
    height: 45px;
    width: auto;
}

.site-logo .brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.5px;
}

.site-logo .brand-tagline {
    font-size: 0.7rem;
    color: var(--gray);
    display: block;
    margin-top: -4px;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 10px 18px;
    color: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
    color: var(--brand);
    background: var(--accent);
}

/* Dropdown */
.main-nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    flex-direction: column;
    z-index: 100;
}

.main-nav ul li:hover > ul {
    display: flex;
}

.main-nav ul li ul li a {
    padding: 10px 20px;
    font-size: 0.85rem;
    text-transform: none;
}

/* Hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--font);
    transition: var(--transition);
}

/* Header CTA */
.header-cta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-cta .btn-inquiry {
    background: var(--brand);
    color: var(--white);
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.header-cta .btn-inquiry:hover {
    background: var(--secondary);
    color: var(--white);
}

/* ============================================
   Hero Banner
   ============================================ */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, var(--brand) 0%, #024e7a 100%);
    color: var(--white);
    overflow: hidden;
}

.hero-slider {
    position: relative;
}

.hero-slide {
    display: none;
    position: relative;
    min-height: 500px;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    display: block;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.8rem;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn-hero {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 14px 36px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.hero-content .btn-hero:hover {
    background: #e05d10;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Section Styles
   ============================================ */
.section {
    padding: 60px 0;
}

.section-white {
    background: var(--white);
}

.section-gray {
    background: var(--background);
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--gray);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--brand);
    margin: 15px auto 0;
}

/* ============================================
   Hot Products Grid
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card-img {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: var(--light-gray);
}

.product-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-card-body {
    padding: 15px;
}

.product-card-body h3 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.product-card-body .product-category {
    font-size: 0.8rem;
    color: var(--brand);
    font-weight: 500;
}

/* ============================================
   Company Profile
   ============================================ */
.company-profile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.company-text h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.company-text p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.company-text .btn-more {
    display: inline-block;
    background: var(--brand);
    color: var(--white);
    padding: 10px 25px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.company-text .btn-more:hover {
    background: var(--secondary);
    color: var(--white);
}

/* ============================================
   OEM / Services Grid
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-card:hover img {
    transform: scale(1.08);
}

.service-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============================================
   Stats Counter
   ============================================ */
.stats-section {
    background: var(--brand);
    color: var(--white);
    padding: 50px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.stat-item .stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* ============================================
   Certification & Cooperation
   ============================================ */
.cert-carousel,
.coop-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.cert-carousel::-webkit-scrollbar,
.coop-carousel::-webkit-scrollbar {
    height: 6px;
}

.cert-carousel::-webkit-scrollbar-thumb,
.coop-carousel::-webkit-scrollbar-thumb {
    background: var(--brand);
    border-radius: 3px;
}

.cert-item,
.coop-item {
    flex: 0 0 200px;
    scroll-snap-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.cert-item:hover,
.coop-item:hover {
    transform: scale(1.03);
}

.cert-item img,
.coop-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* ============================================
   Contact Form
   ============================================ */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--gray);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(3,113,184,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: var(--brand);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--secondary);
}

.contact-map {
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    font-size: 0.85rem;
    line-height: 1.8;
}

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

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.8rem;
}

/* ============================================
   Single Product Page
   ============================================ */
.single-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

.product-gallery {
    position: relative;
}

.product-gallery .main-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--light-gray);
    margin-bottom: 10px;
}

.product-gallery .main-image img {
    width: 100%;
    height: 400px;
    object-fit: contain;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
}

.product-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-thumbnails img.active,
.product-thumbnails img:hover {
    border-color: var(--brand);
}

.product-info h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.product-info .product-sku {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.product-info .product-description {
    line-height: 1.8;
    margin-bottom: 20px;
}

.product-attributes {
    margin-bottom: 20px;
}

.product-attributes dt {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 3px;
}

.product-attributes dd {
    margin-bottom: 10px;
}

/* ============================================
   Blog / Article
   ============================================ */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-content h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.article-meta {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
}

.article-body {
    line-height: 1.9;
    font-size: 1rem;
}

.article-body p {
    margin-bottom: 1em;
}

.article-body img {
    border-radius: var(--radius);
    margin: 1.5em 0;
    box-shadow: var(--shadow);
}

.article-body h2, .article-body h3 {
    margin-top: 1.5em;
}

/* Featured image */
.featured-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 25px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li ul {
        position: static;
        box-shadow: none;
        padding-left: 20px;
    }

    .company-profile,
    .contact-section,
    .single-product {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content {
        padding: 60px 20px;
    }

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

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

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

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
}
