/*
Theme Name: Wheelox
Theme URI: https://wheelox.com
Author: Wheelox Team
Author URI: https://wheelox.com
Description: A premium WordPress theme for wheel/rim businesses with vehicle model wheel showcase, customization tool, and factory introduction. Black-red-white color scheme, fully responsive.
Version: 1.0.0
License: GPL v2 or later
Text Domain: wheelox
*/

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

body {
    font-family: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #111111;
    line-height: 1.6;
    font-size: 16px;
}

/* Black-Red-White Color Scheme */
:root {
    --black: #000000;
    --dark-gray: #1a1a1a;
    --red: #e63946;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--black);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

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

a:hover {
    color: var(--red);
}

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

/* ===== Header & Logo (Desktop: centered logo + centered menu) ===== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0 10px;
    text-align: center;
}

.site-logo {
    margin-bottom: 15px;
}

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

.site-logo a {
    font-size: 2rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: 2px;
}

.site-logo a:hover {
    color: var(--red);
}

.site-logo .logo-text {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--black) 60%, var(--red) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Desktop Navigation (centered) */
.main-navigation {
    text-align: center;
    margin-top: 5px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px 0;
    display: inline-block;
    position: relative;
    color: var(--black);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--red);
    transition: width 0.3s;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
    width: 100%;
}

/* Sticky Navigation for Desktop (fixed on scroll) */
.main-navigation.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 12px 0;
    margin-top: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.main-navigation.sticky-nav ul {
    gap: 2rem;
}

/* Placeholder when sticky is active */
.nav-placeholder {
    display: none;
}

/* ===== Hero / Page Headers ===== */
.page-header {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.page-header h1 {
    margin-bottom: 10px;
    font-size: 2.2rem;
}

/* ===== Grid System (Wheel Showcase) ===== */
.wheels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.wheel-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.wheel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--red);
}

.wheel-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.wheel-card-content {
    padding: 20px;
}

.wheel-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--black);
}

.wheel-card .vehicle-model {
    color: var(--red);
    font-weight: 600;
    margin-bottom: 12px;
    display: inline-block;
    background: rgba(230,57,70,0.1);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
}

.wheel-card p {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    background: var(--black);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn:hover {
    background: var(--red);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--black);
    color: var(--black);
}

.btn-outline:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* ===== Customization Form ===== */
.customization-form {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 20px;
    margin: 40px 0;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--black);
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.2s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(230,57,70,0.2);
}

.preview-wheel {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
    border: 1px dashed var(--red);
}

/* ===== Factory Intro Section ===== */
.factory-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin: 40px 0;
    align-items: center;
}

.factory-text {
    flex: 1;
}

.factory-text h2 {
    color: var(--red);
    margin-bottom: 20px;
}

.factory-image {
    flex: 1;
}

.factory-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: var(--black);
    color: var(--white);
    padding: 15px 25px;
    border-radius: 12px;
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--red);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--black);
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

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

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

.footer-col a {
    color: #ccc;
}

.footer-col a:hover {
    color: var(--red);
}

.copyright {
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.85rem;
}

/* ===== RESPONSIVE: MOBILE (max-width: 768px) ===== */
@media (max-width: 768px) {
    /* Make header fixed so it scrolls with page */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 12px 0;
        background: var(--white);
        z-index: 1000;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    /* Adjust container inside header to flex row */
    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 15px;
    }

    /* Logo left, no bottom margin */
    .site-logo {
        margin-bottom: 0;
        text-align: left;
        flex: 0 0 auto;
    }

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

    .site-logo .logo-text {
        font-size: 1.5rem;
    }

    /* Hide desktop navigation */
    .main-navigation {
        display: none;
    }

    /* Hamburger button - align right */
    .hamburger {
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1002;
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        margin-left: auto;
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--black);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Mobile menu overlay (fullscreen) */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--black);
        z-index: 1001;
        overflow-y: auto;
        padding: 30px 20px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mobile-menu-overlay.active {
        transform: translateX(0);
    }

    /* Close button inside overlay */
    .close-mobile-menu {
        position: absolute;
        top: 20px;
        right: 20px;
        background: transparent;
        border: none;
        color: var(--white);
        font-size: 2rem;
        cursor: pointer;
        padding: 5px 10px;
        line-height: 1;
    }

    /* Overlay logo */
    .mobile-logo {
        margin-top: 60px;
        margin-bottom: 30px;
        text-align: center;
    }

    .mobile-logo img {
        max-height: 60px;
        width: auto;
    }

    .mobile-logo .logo-text {
        font-size: 2rem;
        font-weight: 800;
        background: linear-gradient(135deg, var(--white) 60%, var(--red) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    /* Mobile menu items */
    .mobile-menu {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .mobile-menu li {
        margin: 20px 0;
    }

    .mobile-menu a {
        color: var(--white);
        font-size: 1.5rem;
        font-weight: 600;
        display: inline-block;
        padding: 8px 0;
        transition: 0.2s;
    }

    .mobile-menu a:hover {
        color: var(--red);
        transform: scale(1.05);
    }

    /* Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
    }

    /* Add padding to main content to prevent it from hiding under fixed header */
    .site-main {
        padding-top: 70px;
    }

    /* Other responsive overrides */
    .wheels-grid {
        grid-template-columns: 1fr;
    }

    .factory-content {
        flex-direction: column;
    }

    .customization-form {
        padding: 25px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ===== DESKTOP: hide mobile-only elements ===== */
@media (min-width: 769px) {
    .hamburger,
    .mobile-menu-overlay {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .stat-item {
        width: 100%;
    }
}