/* ===================================
   MODERN TYPOGRAPHY SYSTEM
   Thiết kế chữ hiện đại và thân thiện
   =================================== */

/* Import Google Fonts - Modern & Friendly */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===================================
   ROOT VARIABLES - Design System
   =================================== */
:root {
    /* Typography Scale */
    --font-family-primary: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-heading: 'Poppins', 'Inter', sans-serif;
    --font-family-body: 'Inter', sans-serif;
    
    /* Font Sizes - Responsive Scale */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Colors - Modern Palette */
    --color-text-primary: #1a202c;
    --color-text-secondary: #4a5568;
    --color-text-muted: #718096;
    --color-text-light: #a0aec0;
    --color-accent: #3182ce;
    --color-accent-light: #63b3ed;
}

/* ===================================
   BASE TYPOGRAPHY RESET
   =================================== */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-normal);
    letter-spacing: -0.01em;
}

/* ===================================
   HEADING STYLES - Modern Hierarchy
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
    margin: 0 0 1rem 0;
    letter-spacing: -0.025em;
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===================================
   PARAGRAPH & TEXT STYLES
   =================================== */
p {
    margin: 0 0 1.25rem 0;
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
}

.lead {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-normal);
    margin-bottom: 1.5rem;
}

.text-small {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
    color: var(--color-text-muted);
}

.text-large {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
}

/* ===================================
   LINKS - Modern Style
   =================================== */
a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: var(--font-weight-medium);
}

a:hover, a:focus {
    color: var(--color-accent-light);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ===================================
   BUTTONS - Modern Typography
   =================================== */
button, .btn {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: 1;
    letter-spacing: 0.025em;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

/* ===================================
   FORM ELEMENTS - Modern Typography
   =================================== */
input, textarea, select {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: 4px;
    display: block;
    letter-spacing: 0.025em;
}

/* ===================================
   RESPONSIVE TYPOGRAPHY
   =================================== */
@media (max-width: 768px) {
    :root {
        --font-size-4xl: 2rem;      /* 32px */
        --font-size-3xl: 1.5rem;    /* 24px */
        --font-size-2xl: 1.25rem;   /* 20px */
        --font-size-xl: 1.125rem;   /* 18px */
    }
    
    body {
        font-size: var(--font-size-sm);
        line-height: var(--line-height-relaxed);
    }
    
    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.75rem;
    }
    
    p {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    :root {
        --font-size-4xl: 1.75rem;   /* 28px */
        --font-size-3xl: 1.375rem;  /* 22px */
        --font-size-2xl: 1.125rem;  /* 18px */
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

.line-height-tight { line-height: var(--line-height-tight); }
.line-height-normal { line-height: var(--line-height-normal); }
.line-height-relaxed { line-height: var(--line-height-relaxed); }

/* ===================================
   SPECIFIC WEBSITE OVERRIDES
   =================================== */

/* Product Titles */
.product-title, h1.product-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    line-height: var(--line-height-tight);
    margin-bottom: 1rem;
}

/* Section Titles */
.section-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Article Titles */
.article-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-snug);
    margin-bottom: 0.75rem;
}

/* Category Titles */
.categories-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

/* Menu Items */
.menu-item, .nav-item {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.025em;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-normal);
}

/* Footer Text */
.footer-text {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-muted);
}

/* Card Descriptions */
.card-description, .product-description {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

/* Price Text */
.price, .product-price {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
}

/* Search Header Override - Maintain White Text */
.search-header h1,
.search-header h2,
.search-header h3,
.search-header h4,
.search-header h5,
.search-header h6,
.search-header p {
    color: white !important;
}

.search-header a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.search-header a:hover {
    color: white !important;
}
