/* ================================================================
   LAYOUT.CSS - Alibaba.com Style Layout
   ================================================================ */

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== HEADER - ALIBABA STYLE ===== */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Top Bar */
.header-top {
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 0;
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.header-top-left {
    display: flex;
    gap: 20px;
}

.header-top-right {
    display: flex;
    gap: 20px;
}

.header-top a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.header-top a:hover {
    color: var(--accent-orange);
}

/* Main Header */
.header-main {
    padding: 16px 0;
}

.header-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 24px;
    align-items: center;
}

/* Logo */
.logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-orange);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search Bar - Alibaba Style */
.search-container {
    position: relative;
}

.search-form {
    display: flex;
    border: 2px solid var(--accent-orange);
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-white);
}

.search-input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    outline: none;
    font-size: var(--font-size-base);
}

.search-btn {
    padding: 10px 32px;
    background: var(--accent-orange);
    color: var(--bg-white);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-btn:hover {
    background: var(--accent-orange-dark);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 24px;
    align-items: center;
}

.header-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: var(--font-size-xs);
    transition: color var(--transition-fast);
}

.header-action-btn:hover {
    color: var(--accent-orange);
}

.header-action-icon {
    font-size: 24px;
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Navigation Bar */
.header-nav {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
}

.header-nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
}

.nav-link {
    padding: 12px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-orange);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-orange);
}

/* ===== MAIN CONTENT ===== */
main {
    min-height: calc(100vh - 400px);
    background: var(--bg-white);
}

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

/* ===== FOOTER - ALIBABA STYLE ===== */
footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 48px 0 24px;
    margin-top: 64px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--bg-white);
    margin-bottom: 16px;
    font-size: var(--font-size-base);
    font-weight: 600;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--accent-orange);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.5);
}

.footer-social {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--accent-orange);
    transform: translateY(-2px);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
    padding: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .header-main-content {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .search-form {
        display: none;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .header-action-btn span {
        display: none;
    }
    
    .header-nav-content {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}