/**
 * Ecommerce Typography Styles
 * 
 * Typography system based on Korean Cosmetics Color Palette
 * Consistent styling for headings, body text, links, and buttons
 */

/* ========================================
   CSS Custom Properties (Color Palette)
   ======================================== */

:root {
    /* Primary Colors */
    --color-primary: #f53163;
    --color-primary-light: #ff6b8a;
    --color-primary-dark: #d11a4a;
    
    /* Secondary Colors */
    --color-secondary: #b6666f;
    --color-secondary-light: #e4c2c1;
    --color-secondary-muted: #d1a080;
    
    /* Status Colors */
    --color-success: #7cb082;
    --color-danger: #e57373;
    --color-warning: #d1a080;
    --color-info: #e4c2c1;
    
    /* Background Colors */
    --color-bg-soft-pink: #fef2f2;
    --color-bg-warm-beige: #c8c4c2;
    --color-bg-dusty-rose: #f5ebe9;
    
    /* Text Colors */
    --color-text-primary: #4a3f3f;
    --color-text-secondary: #7a6b6b;
    --color-text-muted: #a89a9a;
    
    /* Typography */
    --font-family-base: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-base: 1.7;
    --letter-spacing-base: 0.2px;
}

/* ========================================
   1. Base Typography
   ======================================== */

body {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    letter-spacing: var(--letter-spacing-base);
    color: var(--color-text-primary);
}

/* ========================================
   2. Headings (h1 - h6)
   ======================================== */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1, .h1 {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.5px;
}

h2, .h2 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.3px;
}

h3, .h3 {
    font-size: 1.75rem;
    font-weight: var(--font-weight-semibold);
}

h4, .h4 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
}

h5, .h5 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
}

h6, .h6 {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
}

/* Display Headings */
.display-1 {
    font-size: 4rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    letter-spacing: -1px;
}

.display-2 {
    font-size: 3.5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    letter-spacing: -0.8px;
}

.display-3 {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.display-4 {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

.display-5 {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.25;
}

.display-6 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
}

/* Heading Variants */
.heading-primary {
    color: var(--color-primary);
}

.heading-secondary {
    color: var(--color-secondary);
}

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

.heading-underline {
    position: relative;
    display: inline-block;
}

.heading-underline::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

.heading-underline-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ========================================
   3. Paragraphs & Body Text
   ======================================== */

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    font-size: 1rem;
    line-height: var(--line-height-base);
}

.lead {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    color: #000;
    line-height: 1.8;
}

.small, small {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.text-small {
    font-size: 0.875rem !important;
}

.text-tiny {
    font-size: 0.75rem !important;
}

/* Text Colors */
.text-primary {
    color: var(--color-text-primary) !important;
}

.text-secondary {
    color: var(--color-text-secondary) !important;
}

.text-muted-custom {
    color: var(--color-text-muted) !important;
}

.text-brand {
    color: var(--color-primary) !important;
}

.text-brand-secondary {
    color: var(--color-secondary) !important;
}

/* Text Weights */
.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); }

/* ========================================
   4. Links
   ======================================== */

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

a:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 49, 99, 0.15);
    border-radius: 2px;
}

/* Link Variants */
.link-secondary {
    color: var(--color-secondary);
}

.link-secondary:hover {
    color: var(--color-primary);
}

.link-dark {
    color: var(--color-text-primary);
}

.link-dark:hover {
    color: var(--color-primary);
}

.link-underline {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-hover-slide {
    position: relative;
}

.link-hover-slide:hover {
    padding-left: 8px;
}

/* ========================================
   5. Buttons
   ======================================== */

/* Base Button */
.btn {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-medium);
    border-radius: 10px;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    transition: all 0.25s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 49, 99, 0.2);
}

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-xl {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    border-radius: 12px;
}

/* Primary Button */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 49, 99, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(245, 49, 99, 0.25);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    border: 2px solid var(--color-secondary);
}

.btn-secondary:hover {
    background-color: #9a555d;
    border-color: #9a555d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(182, 102, 111, 0.35);
}

/* Outline Primary Button */
.btn-outline-primary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 49, 99, 0.25);
}

/* Outline Secondary Button */
.btn-outline-secondary {
    background-color: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary-light);
}

.btn-outline-secondary:hover {
    background-color: var(--color-bg-dusty-rose);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

/* Ghost Button */
.btn-ghost {
    background-color: transparent;
    color: var(--color-text-secondary);
    border: none;
}

.btn-ghost:hover {
    background-color: var(--color-bg-soft-pink);
    color: var(--color-primary);
}

/* Success Button */
.btn-success-custom {
    background-color: var(--color-success);
    color: white;
    border: 2px solid var(--color-success);
}

.btn-success-custom:hover {
    background-color: #6a9a70;
    border-color: #6a9a70;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 176, 130, 0.35);
}

/* Danger Button */
.btn-danger-custom {
    background-color: var(--color-danger);
    color: white;
    border: 2px solid var(--color-danger);
}

.btn-danger-custom:hover {
    background-color: #d45f5f;
    border-color: #d45f5f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 115, 115, 0.35);
}

/* Warning Button */
.btn-warning-custom {
    background-color: var(--color-warning);
    color: white;
    border: 2px solid var(--color-warning);
}

.btn-warning-custom:hover {
    background-color: #b88a6a;
    border-color: #b88a6a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(209, 160, 128, 0.35);
}

/* Dark Button */
.btn-dark-custom {
    background-color: var(--color-text-primary);
    color: white;
    border: 2px solid var(--color-text-primary);
}

.btn-dark-custom:hover {
    background-color: #352b2b;
    border-color: #352b2b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 63, 63, 0.35);
}

/* Light Button */
.btn-light-custom {
    background-color: white;
    color: var(--color-text-primary);
    border: 2px solid var(--color-secondary-light);
}

.btn-light-custom:hover {
    background-color: var(--color-bg-soft-pink);
    border-color: var(--color-secondary);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

/* Rounded Pill Button */
.btn-pill {
    border-radius: 50px;
}

/* Icon Button */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}

.btn-icon.btn-lg {
    width: 48px;
    height: 48px;
}

/* ========================================
   6. Navbar & Navigation Links
   ======================================== */

.navbar-nav .nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--color-primary);
    background-color: var(--color-bg-soft-pink);
}

.navbar-nav .nav-link.active {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   7. Section Titles & Dividers
   ======================================== */

.section-title {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

.section-title-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    margin-top: 1rem;
}

/* ========================================
   8. Labels & Badges
   ======================================== */

.label {
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}

.label-primary {
    color: var(--color-primary);
}

.badge {
    font-weight: var(--font-weight-semibold);
    border-radius: 20px;
    padding: 0.35em 0.75em;
}

.badge-primary {
    background-color: var(--color-primary);
}

.badge-secondary {
    background-color: var(--color-secondary);
}

/* ========================================
   9. Lists
   ======================================== */

ul, ol {
    color: var(--color-text-secondary);
    line-height: var(--line-height-base);
}

.list-inline-item {
    color: var(--color-text-secondary);
}

/* ========================================
   10. Responsive Typography
   ======================================== */

@media (max-width: 768px) {
    h1, .h1 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
    
    h3, .h3 {
        font-size: 1.5rem;
    }
    
    .display-1 {
        font-size: 2.5rem;
    }
    
    .display-2 {
        font-size: 2rem;
    }
    
    .display-3 {
        font-size: 1.75rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 576px) {
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    .display-1 {
        font-size: 2rem;
    }
    
    .display-2 {
        font-size: 1.75rem;
    }
}
