﻿/*
Theme Name: Autoasjad
Theme URI: https://autoasjad.ee
Author: Autoasjad
Author URI: https://autoasjad.ee
Description: Custom theme for Autoasjad auto parts store
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: autoasjad
Tags: woocommerce, shop, auto-parts
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

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

.header-top {
    padding: 16px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Logo */
.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 20px;
    transition: opacity 0.3s;
}

.site-logo a:hover {
    opacity: 0.8;
}

.logo-text {
    white-space: nowrap;
}

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

.nav-item {
    position: relative;
}

.main-navigation .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: #333;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s;
    text-decoration: none;
}

.main-navigation .nav-link:hover {
    background: #f5f5f5;
    color: #0066cc;
}

.dropdown-arrow {
    margin-left: 4px;
    transition: transform 0.3s;
}

/* Megamenu is controlled by inline CSS in header.php */

/* Search */
.header-search {
    flex: 1;
    max-width: 500px;
}

.header-search form {
    position: relative;
    display: flex;
}

.header-search input[type='search'] {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.header-search input[type='search']:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.header-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.header-search button:hover {
    color: #0066cc;
}

/* Cart */
.header-cart {
    margin-left: auto;
}

.header-cart .cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    color: #333;
    transition: all 0.3s;
    text-decoration: none;
}

.header-cart .cart-link:hover {
    background: #f5f5f5;
    color: #0066cc;
}

.header-cart .cart-count {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #0066cc;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Header Bottom - Auto Filter Row */
.header-bottom {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 12px 0;
}

.header-bottom .container {
    display: flex;
    align-items: center;
}

.header-bottom form {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.header-bottom label {
    font-weight: 500;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.header-bottom select {
    padding: 10px 35px 10px 15px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
    appearance: none;
    background-image: url('data:image/svg+xml,%3Csvg width=\'12\' height=\'8\' viewBox=\'0 0 12 8\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M1 1.5L6 6.5L11 1.5\' stroke=\'%23666\' stroke-width=\'2\' stroke-linecap=\'round\'/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.header-bottom select:hover {
    border-color: #0066cc;
}

.header-bottom select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.header-bottom select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.header-bottom button[type='submit'] {
    padding: 10px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    margin-left: auto;
}

.header-bottom button[type='submit']:hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,102,204,0.3);
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 12px 20px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s;
}

.mobile-filter-toggle:hover {
    background: #0052a3;
}

.mobile-filter-toggle svg {
    transition: transform 0.3s;
}

.mobile-filter-toggle.active svg {
    transform: rotate(180deg);
}

/* Main Content */
.site-content {
    padding: 40px 0;
    background: #fff;
    min-height: 60vh;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.site-footer a {
    color: #fff;
}

/* WooCommerce Overrides */
.woocommerce .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.woocommerce ul.products li.product {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 18px;
    margin: 10px 0;
}

.woocommerce ul.products li.product .price {
    font-size: 20px;
    font-weight: 700;
    color: #0066cc;
}

.woocommerce .button {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.woocommerce .button:hover {
    background: #0052a3;
    text-decoration: none;
}

/* Content Wrapper */
.content-wrapper {
    padding: 40px 0;
    background: #fff;
    min-height: 60vh;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        gap: 15px;
    }
    
    .logo-text {
        display: none;
    }
    
    .header-search {
        max-width: 200px;
    }
    
    .header-search input[type='search'] {
        padding: 10px 45px 10px 15px;
        font-size: 14px;
    }
    
    .woocommerce .products {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    /* Mobile Filter Styles */
    .mobile-filter-toggle {
        display: flex;
    }
    
    .header-bottom {
        padding: 0;
    }
    
    .header-bottom .container {
        display: block;
        padding: 12px 20px;
    }
    
    .header-bottom form {
        display: none !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding-top: 12px;
    }
    
    .header-bottom form.active {
        display: flex !important;
    }
    
    .header-bottom form > * {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .header-bottom label {
        font-size: 13px;
        margin-top: 8px;
        margin-bottom: 6px;
        display: block;
    }
    
    .header-bottom select {
        min-width: 100% !important;
        margin-bottom: 0;
    }
    
    .header-bottom button[type='submit'] {
        margin-top: 16px;
    }
    
    /* Megamenu mobile adjustments */
    .main-navigation .nav-link {
        padding: 12px 20px;
        font-size: 14px;
    }
}
