/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Template: astra
Version: 1.0.0
Description: Alibaba-style Marketplace Child Theme
Text Domain: astra-child
*/

/* ========== GLOBAL VARIABLES & RESET ========== */
:root {
    --primary-color: #FF6A00;
    --secondary-color: #005AA0;
    --light-gray: #F5F5F5;
    --dark-gray: #333333;
    --border-color: #e6e6e6;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-heavy: 0 10px 30px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER SECTION ========== */
.alibaba-header {
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.alibaba-header.sticky {
    box-shadow: var(--shadow-light);
}

.alibaba-top-bar {
    background-color: #f8f8f8;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.alibaba-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left span {
    margin-right: 20px;
    cursor: pointer;
}

.top-bar-left span:hover {
    color: var(--primary-color);
}

.language-selector select {
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 5px;
}

.alibaba-main-header {
    padding: 15px 0;
}

.alibaba-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alibaba-logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.alibaba-search-box {
    flex: 1;
    max-width: 600px;
    margin: 0 30px;
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    overflow: hidden;
}

.alibaba-search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
}

.alibaba-search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.alibaba-search-box button:hover {
    background: #e55a00;
}

.alibaba-user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.alibaba-user-actions a {
    color: var(--dark-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.alibaba-user-actions a:hover {
    color: var(--primary-color);
}

.cart-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-left: 5px;
}

/* ========== NAVIGATION MENU ========== */
.alibaba-main-nav {
    background: var(--light-gray);
    padding: 12px 0;
}

.alibaba-nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    overflow-x: auto;
    white-space: nowrap;
}

.alibaba-nav-menu::-webkit-scrollbar {
    height: 3px;
}

.alibaba-nav-menu li {
    position: relative;
}

.alibaba-nav-menu a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s;
}

.alibaba-nav-menu a:hover {
    color: var(--primary-color);
}

.alibaba-nav-menu .has-dropdown::after {
    content: '▾';
    margin-left: 5px;
    font-size: 12px;
}

/* ========== HERO SECTION ========== */
.alibaba-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0;
    text-align: center;
    color: white;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.alibaba-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,0 L1000,0 L1000,100 L0,100 Z" fill="white" opacity="0.1"/></svg>');
    background-size: cover;
}

.alibaba-hero-content {
    position: relative;
    z-index: 1;
}

.alibaba-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.alibaba-hero p {
    font-size: 20px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.hero-search-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    padding: 5px;
    display: flex;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-search-input {
    flex: 1;
    padding: 20px 25px;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 16px;
    outline: none;
}

.hero-search-category {
    padding: 20px;
    border: none;
    border-left: 1px solid #eee;
    background: white;
    font-size: 16px;
    min-width: 150px;
}

.hero-search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 0 50px 50px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.hero-search-button:hover {
    background: #e55a00;
}

/* ========== CATEGORIES SECTION ========== */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 60px;
}

.category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.category-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.category-card p {
    color: #666;
    font-size: 14px;
}

/* ========== PRODUCTS SECTION ========== */
.products-section {
    padding: 60px 0;
    background: var(--light-gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.product-image {
    height: 200px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
    height: 40px;
    overflow: hidden;
}

.product-price {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.product-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    text-decoration: none;
}

.product-button:hover {
    background: #004080;
}

/* ========== RFQ FORM SECTION ========== */
.rfq-section {
    padding: 60px 0;
    background: white;
}

.rfq-form-container {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.rfq-form-container h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

.rfq-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.rfq-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.rfq-form input,
.rfq-form select,
.rfq-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.rfq-form input:focus,
.rfq-form select:focus,
.rfq-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.rfq-form button {
    grid-column: 1 / -1;
    padding: 18px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.rfq-form button:hover {
    background: #e55a00;
}

/* ========== FOOTER ========== */
.alibaba-footer {
    background: var(--dark-gray);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #bbb;
    font-size: 14px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .alibaba-header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .alibaba-search-box {
        width: 100%;
        margin: 20px 0;
    }
    
    .alibaba-user-actions {
        width: 100%;
        justify-content: center;
    }
    
    .alibaba-nav-menu {
        gap: 15px;
        font-size: 14px;
    }
    
    .alibaba-hero h1 {
        font-size: 32px;
    }
    
    .alibaba-hero p {
        font-size: 18px;
    }
    
    .hero-search-container {
        flex-direction: column;
        border-radius: 10px;
    }
    
    .hero-search-input,
    .hero-search-category,
    .hero-search-button {
        width: 100%;
        border-radius: 10px;
        margin-bottom: 10px;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rfq-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .categories-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .alibaba-logo h1 {
        font-size: 24px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
}

/* ========== WOOCOMMERCE OVERRIDES ========== */
.woocommerce ul.products li.product {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.woocommerce ul.products li.product:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.woocommerce span.onsale {
    background: var(--primary-color);
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: var(--primary-color);
    color: white;
    border-radius: 5px;
    transition: background 0.3s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: #e55a00;
}

/* ========== DOKAN OVERRIDES ========== */
.dokan-single-store {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
    transition: all 0.3s ease;
}

.dokan-single-store:hover {
    box-shadow: var(--shadow-medium);
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

.p-20 { padding: 20px; }
.p-40 { padding: 40px; }

.bg-light { background: var(--light-gray); }
.bg-white { background: white; }

.shadow-light { box-shadow: var(--shadow-light); }
.shadow-medium { box-shadow: var(--shadow-medium); }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 15px; }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* ========== LOADING SPINNER ========== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}