/* ═══════════════════════════════════════
   AutoNexus Theme — Main Stylesheet
   ═══════════════════════════════════════ */

/* RESET */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--anx-font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--anx-text);
    background: var(--anx-white);
}

a { color: var(--anx-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--anx-accent); }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 { font-family: var(--anx-font-heading); font-weight: 700; line-height: 1.25; color: var(--anx-secondary); }

/* Container */
.anx-container {
    width: 100%;
    max-width: var(--anx-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.anx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--anx-radius); font-family: var(--anx-font-heading);
    font-weight: 600; font-size: 14px; border: none; cursor: pointer;
    transition: all 0.2s; text-decoration: none;
}

.anx-btn-primary { background: var(--anx-primary); color: #fff; }
.anx-btn-primary:hover { background: var(--anx-accent); color: #fff; transform: translateY(-1px); }
.anx-btn-secondary { background: var(--anx-secondary); color: #fff; }
.anx-btn-secondary:hover { background: #2d3a42; color: #fff; }
.anx-btn-outline { background: transparent; color: var(--anx-primary); border: 2px solid var(--anx-primary); }
.anx-btn-outline:hover { background: var(--anx-primary); color: #fff; }

/* ═══════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════ */

.anx-topbar {
    background: var(--anx-secondary);
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.anx-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    gap: 20px;
}

.anx-topbar-left,
.anx-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.anx-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.anx-topbar-item:hover { color: #fff; }

.anx-topbar-stock {
    color: var(--anx-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .anx-topbar-left { display: none; }
    .anx-topbar-hours { display: none; }
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */

.anx-header {
    position: relative;
    z-index: 1000;
    transition: all 0.3s;
}

/* Dark header */
.anx-header--dark {
    background: var(--anx-secondary);
    color: #fff;
}

.anx-header--dark .anx-nav-list > li > a { color: rgba(255,255,255,0.85); }
.anx-header--dark .anx-nav-list > li > a:hover,
.anx-header--dark .anx-nav-list > li.current-menu-item > a { color: #fff; }

/* Light header */
.anx-header--light {
    background: #fff;
    color: var(--anx-text);
    box-shadow: 0 1px 0 var(--anx-border);
}

.anx-header--light .anx-nav-list > li > a { color: var(--anx-text); }
.anx-header--light .anx-nav-list > li > a:hover { color: var(--anx-primary); }

/* Sticky */
.anx-header--sticky.is-stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--anx-secondary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: anx-slideDown 0.3s ease;
}

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

.anx-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 30px;
}

/* Logo */
.anx-header-logo { flex-shrink: 0; }
.anx-header-logo img,
.anx-header-logo .custom-logo { height: 45px; width: auto; }
.anx-header-logo a { display: flex; align-items: center; }

/* Nav */
.anx-header-nav { flex: 1; display: flex; justify-content: center; }

.anx-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.anx-nav-list > li > a {
    display: block;
    padding: 10px 16px;
    font-family: var(--anx-font-heading);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--anx-radius);
    transition: all 0.2s;
}

.anx-nav-list > li > a:hover {
    background: rgba(255,255,255,0.08);
}

/* Dropdown */
.anx-nav-list > li { position: relative; }

.anx-nav-list .sub-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: var(--anx-radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    z-index: 100;
}

.anx-nav-list > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.anx-nav-list .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--anx-text);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}

.anx-nav-list .sub-menu a:hover {
    background: var(--anx-light);
    color: var(--anx-primary);
    padding-left: 24px;
}

/* Header Actions */
.anx-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.anx-header-search-toggle {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.anx-header-search-toggle:hover { background: rgba(255,255,255,0.1); }

.anx-header-cta {
    background: var(--anx-primary);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: var(--anx-radius);
    font-family: var(--anx-font-heading);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.anx-header-cta:hover { background: var(--anx-accent); transform: translateY(-1px); }

/* Mobile toggle */
.anx-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.anx-mobile-toggle span {
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Search overlay */
.anx-search-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--anx-secondary);
    padding: 20px 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.anx-search-overlay.active { display: block; }

.anx-search-form {
    display: flex;
    gap: 0;
}

.anx-search-input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 14px 20px;
    font-size: 16px;
    font-family: var(--anx-font-body);
    border-radius: var(--anx-radius) 0 0 var(--anx-radius);
    outline: none;
    transition: border-color 0.2s;
}

.anx-search-input::placeholder { color: rgba(255,255,255,0.4); }
.anx-search-input:focus { border-color: var(--anx-primary); }

.anx-search-submit {
    background: var(--anx-primary);
    color: #fff;
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    border-radius: 0 var(--anx-radius) var(--anx-radius) 0;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.anx-search-submit:hover { background: var(--anx-accent); }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */

/* Newsletter */
.anx-footer-newsletter {
    background: var(--anx-primary);
    color: #fff;
    padding: 28px 0;
}

.anx-newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.anx-newsletter-text h4 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 2px;
}

.anx-newsletter-text p {
    font-size: 13px;
    opacity: 0.85;
}

.anx-newsletter-form {
    display: flex;
    gap: 0;
    flex-shrink: 0;
    max-width: 420px;
    width: 100%;
}

.anx-newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-right: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 14px;
    font-family: var(--anx-font-body);
    border-radius: var(--anx-radius) 0 0 var(--anx-radius);
    outline: none;
}

.anx-newsletter-input::placeholder { color: rgba(255,255,255,0.5); }

.anx-newsletter-btn {
    background: var(--anx-secondary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-weight: 700;
    font-family: var(--anx-font-heading);
    font-size: 14px;
    cursor: pointer;
    border-radius: 0 var(--anx-radius) var(--anx-radius) 0;
    transition: background 0.2s;
    white-space: nowrap;
}

.anx-newsletter-btn:hover { background: #2d3a42; }

/* Main footer */
.anx-footer-main {
    background: var(--anx-secondary);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 30px;
}

.anx-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.anx-footer-logo img,
.anx-footer-logo .custom-logo { height: 40px; width: auto; margin-bottom: 16px; filter: brightness(10); }

.anx-footer-desc {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 300px;
}

.anx-footer-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.anx-footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--anx-primary);
}

.anx-footer-links {
    list-style: none;
}

.anx-footer-links li { margin-bottom: 10px; }

.anx-footer-links a {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    transition: all 0.2s;
    text-decoration: none;
}

.anx-footer-links a:hover { color: #fff; padding-left: 4px; }

.anx-footer-contact {
    list-style: none;
}

.anx-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13px;
}

.anx-footer-contact li svg { flex-shrink: 0; margin-top: 2px; color: var(--anx-primary); }
.anx-footer-contact a { color: rgba(255,255,255,0.7); }
.anx-footer-contact a:hover { color: #fff; }

/* Social */
.anx-social-links {
    display: flex;
    gap: 8px;
}

.anx-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
}

.anx-social-icon:hover { background: var(--anx-primary); color: #fff; transform: translateY(-2px); }

/* Copyright */
.anx-footer-bottom {
    background: rgba(0,0,0,0.15);
    padding: 16px 0;
}

.anx-footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

.anx-footer-bottom-links { display: flex; gap: 20px; }
.anx-footer-bottom-links a { color: rgba(255,255,255,0.45); }
.anx-footer-bottom-links a:hover { color: #fff; }

/* ═══════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════ */

.anx-page-content {
    padding: 40px 0;
    min-height: 50vh;
}

.anx-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.anx-post-card {
    background: #fff;
    border: 1px solid var(--anx-border);
    border-radius: var(--anx-radius);
    overflow: hidden;
    transition: all 0.2s;
}

.anx-post-card:hover { box-shadow: var(--anx-shadow-hover); transform: translateY(-2px); }
.anx-post-thumb img { width: 100%; height: 200px; object-fit: cover; }
.anx-post-body { padding: 16px; }
.anx-post-title { font-size: 16px; margin-bottom: 8px; }
.anx-post-title a { color: var(--anx-secondary); }
.anx-post-title a:hover { color: var(--anx-primary); }
.anx-post-excerpt { font-size: 13px; color: var(--anx-text-light); }

.anx-search-title {
    font-size: 22px;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--anx-border);
}

.anx-search-title span { color: var(--anx-primary); }

.anx-no-content { text-align: center; padding: 60px 20px; }
.anx-no-content h2 { margin-bottom: 10px; }
.anx-no-content p { color: var(--anx-text-light); }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 1024px) {
    .anx-header-nav { display: none; }
    .anx-mobile-toggle { display: flex; color: inherit; }
    .anx-header-cta { display: none; }

    .anx-header-nav.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--anx-secondary);
        padding: 20px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    }

    .anx-header-nav.is-open .anx-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .anx-header-nav.is-open .anx-nav-list > li > a {
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        color: rgba(255,255,255,0.85);
    }

    .anx-header-nav.is-open .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.15);
        border-radius: 0;
        padding: 0;
    }

    .anx-header-nav.is-open .sub-menu a {
        color: rgba(255,255,255,0.7);
        padding-left: 36px;
    }

    .anx-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .anx-newsletter-inner { flex-direction: column; text-align: center; }
    .anx-newsletter-form { max-width: 100%; }
    .anx-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .anx-footer-grid { grid-template-columns: 1fr; }
    .anx-posts-grid { grid-template-columns: 1fr; }
    .anx-footer-bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
    .anx-header-inner { height: 60px; }
}
