/* ========================================
   GLOBAL STYLES - SHOPEE INSPIRED
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   MAIN HEADER
   ======================================== */
.main-header {
    background: linear-gradient(-180deg, #f53d2d, #f63);
    padding: 0.45rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    z-index: 1000 !important;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo a {
    display: block;
    color: white;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Search Bar */
.search-container {
    flex: 1;
}

.search-bar {
    display: flex;
    background: white;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.09);
}

.search-input {
    flex: 1;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.search-btn {
    background: #fb5533;
    color: white;
    padding: 0 24px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #d73211;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-icon {
    position: relative;
    color: white;
    font-size: 24px;
    transition: opacity 0.2s;
}

.cart-icon:hover {
    opacity: 0.8;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: white;
    color: #ee4d2d;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
}

.profile-dropdown-container {
    position: relative;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: pointer;
}

.profile-link:hover {
    background: rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    font-size: 28px;
}

.profile-name {
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.profile-dropdown-container.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(0, 0, 0, 0.87);
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    color: rgba(0, 0, 0, 0.54);
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.dropdown-item.logout {
    color: #ee4d2d;
}

.dropdown-item.logout i {
    color: #ee4d2d;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.09);
    margin: 4px 0;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    transition: all 0.2s;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}
/* ========================================
   FOOTER
======================================== */

.main-footer {
    background: white;
    margin-top: 60px;
    padding: 40px 0 20px;
    border-top: 4px solid #ee4d2d;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: #222;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #666;
    font-size: 13px;
}

.footer-section ul li a:hover {
    color: #ee4d2d;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border-radius: 50%;
    color: #666;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #ee4d2d;
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 13px;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .top-nav-left,
    .top-nav-right {
        font-size: 11px;
        gap: 5px;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .logo {
        order: 1;
    }
    
    .header-actions {
        order: 2;
    }
    
    .search-container {
        order: 3;
        width: 100%;
    }
    
    .search-suggestions {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}