/* ========================================
   GLOBAL VARIABLES & RESET
   ======================================== */
:root {
    --primary-orange: #000000;
    --primary-orange-hover: #333333;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-white: #ffffff;
    --bg-light-peach: #f8f8f8;
    --bg-gray: #f5f5f5;
    --border-light: #e5e5e5;
    --border-gray: #dddddd;
    --shadow-card: 0 6px 18px rgba(0,0,0,0.08);
    --shadow-nav: 0 10px 30px rgba(0,0,0,0.12);
    --radius-card: 16px;
    --radius-hero: 20px;
    --radius-pill: 999px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fafafa;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ========================================
   PAGE CONTAINER
   ======================================== */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    padding-bottom: 110px; /* Space for bottom nav */
}

/* ========================================
   HEADER
   ======================================== */
.top-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    height: 60px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-orange);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-dropdown {
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.language-dropdown:hover {
    border-color: var(--primary-orange);
}

.language-dropdown span {
    font-size: 14px;
    color: var(--text-secondary);
}

.greeting {
    font-size: 14px;
    color: var(--text-secondary);
}

.logout-btn {
    background: none;
    border: 1px solid var(--border-gray);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    display: none;
    min-width: 120px;
    z-index: 1000;
}

.language-dropdown:hover .language-options {
    display: block;
}

.language-options a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    transition: background 0.2s;
}

.language-options a:hover,
.language-options a.active {
    background: var(--bg-gray);
    color: var(--primary-orange);
}

/* ========================================
   BOTTOM NAVIGATION PILL
   ======================================== */
.bottom-nav-pill {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    height: 74px;
    background: var(--bg-white);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-nav);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    min-width: 60px;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    transition: stroke 0.2s;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-item:not(.active) svg {
    stroke: var(--text-secondary);
}

.nav-item:not(.active) span {
    color: var(--text-secondary);
}

.nav-item.active svg {
    stroke: var(--primary-orange);
}

.nav-item.active span {
    color: var(--primary-orange);
}

.nav-item:hover {
    background: var(--bg-gray);
}

/* ========================================
   HERO BANNER
   ======================================== */
.hero-card {
    background: var(--bg-light-peach);
    border-radius: var(--radius-hero);
    padding: 36px;
    margin: 24px 0;
    box-shadow: var(--shadow-card);
    min-height: 260px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-cta {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.hero-cta:hover {
    background: var(--primary-orange-hover);
}

.hero-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 12px;
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.action-tile {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 24px 16px;
    box-shadow: var(--shadow-card);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.action-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.action-tile svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    stroke: var(--primary-orange);
}

.action-tile span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   SECTIONS
   ======================================== */
.section-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 36px 0 24px 0;
}

/* ========================================
   PRODUCT GRID
   ======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-info {
    padding: 16px;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-orange);
    margin-bottom: 12px;
}

.btn-buy {
    width: 100%;
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-buy:hover {
    background: var(--primary-orange-hover);
}

/* ========================================
   EMPTY STATES
   ======================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    stroke: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 24px;
}

.btn-primary {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-orange-hover);
}

/* ========================================
   ACCOUNT PAGE
   ======================================== */
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 36px 0 24px 0;
}

.account-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-primary);
}

.refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: var(--bg-gray);
}

.account-card {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 32px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.account-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.account-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

.account-value.balance {
    color: var(--primary-orange);
    font-weight: bold;
}

.account-menu {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.menu-row {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.menu-row:last-child {
    border-bottom: none;
}

.menu-row:hover {
    background: var(--bg-gray);
}

.menu-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.menu-label {
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.menu-chevron {
    color: var(--text-muted);
}

/* ========================================
   PLACEHOLDER PAGES
   ======================================== */
.placeholder-page {
    text-align: center;
    padding: 120px 20px;
}

.placeholder-page h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.placeholder-page p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ========================================
   ACTIVITY LIST
   ======================================== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius-card);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s;
}

.activity-item:hover {
    box-shadow: var(--shadow-card);
}

.activity-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.activity-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.activity-time {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
    margin: 0;
}

@media (max-width: 768px) {
    .activity-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .activity-time {
        align-self: flex-start;
    }
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--text-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .page-container {
        padding: 0 16px;
    }
    
    .header-container {
        padding: 0 16px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .greeting {
        display: none;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .account-grid {
        grid-template-columns: 1fr;
    }
    
    .bottom-nav-pill {
        width: 95%;
        height: 64px;
    }
    
    .nav-item {
        padding: 6px 12px;
        min-width: 50px;
    }
    
    .nav-item svg {
        width: 20px;
        height: 20px;
    }
    
    .nav-item span {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-card {
        padding: 24px;
        min-height: 200px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
}
