/**
 * Phase 2: UI/UX Enhancements
 * Pacific BioEngineering Website
 * 
 * Features:
 * - Sticky navigation
 * - Max-width containers (1400px)
 * - Enhanced product cards with hover effects
 * - Category badges with colors
 * - Improved typography
 * 
 * @version 1.0
 * @date May 10, 2026
 */

/* ========================================
   1. STICKY NAVIGATION
   ======================================== */

header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: box-shadow 0.3s ease !important;
}

header.scrolled {
    box-shadow: 0 4px 12px rgba(43, 114, 147, 0.12) !important;
}

/* ========================================
   2. MAX-WIDTH CONTAINERS (1400px)
   ======================================== */

.container,
.product-detail-page,
section:not(.hero) {
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* Specific sections that need max-width */
.about,
.product-categories,
.core-principles,
.key-values,
.steps-excellence,
.innovation,
.contact-section {
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Mobile responsive containers */
@media (max-width: 768px) {
    .container,
    .product-detail-page,
    section:not(.hero) {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ========================================
   3. ENHANCED PRODUCT CARDS
   ======================================== */

.product-card {
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    overflow: hidden !important;
    background: white !important;
    border: 1px solid rgba(15, 116, 144, 0.08) !important;
}

.product-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 24px rgba(15, 116, 144, 0.15) !important;
    border-color: rgba(15, 116, 144, 0.2) !important;
}

.product-card-image {
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%) !important;
}

.product-card-image img {
    transition: transform 0.4s ease !important;
}

.product-card:hover .product-card-image img {
    transform: scale(1.08) !important;
}

.product-card-content {
    padding: 20px !important;
}

.product-card-content h3 {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1a3a52 !important;
    margin-bottom: 8px !important;
    transition: color 0.3s ease !important;
}

.product-card:hover .product-card-content h3 {
    color: #0f7490 !important;
}

.product-card-content .composition {
    font-size: 14px !important;
    color: #666 !important;
    margin-bottom: 12px !important;
}

/* ========================================
   4. CATEGORY BADGES
   ======================================== */

.category-badge {
    display: inline-block !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Category-specific colors */
.category-badge.anti-allergic,
.category-badge[data-category="anti-allergic"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.category-badge.anti-diarrheal,
.category-badge[data-category="anti-diarrheal"],
.category-badge.gastrointestinal,
.category-badge[data-category="gastrointestinal"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white !important;
}

.category-badge.anti-emetic,
.category-badge[data-category="anti-emetic"] {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    color: white !important;
}

.category-badge.anti-fungal,
.category-badge[data-category="anti-fungal"] {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
    color: white !important;
}

.category-badge.antibiotic,
.category-badge[data-category="antibiotic"],
.category-badge.anti-infective,
.category-badge[data-category="anti-infective"] {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
    color: white !important;
}

/* Default badge color */
.category-badge:not([data-category]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

/* ========================================
   5. IMPROVED TYPOGRAPHY
   ======================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif !important;
    line-height: 1.6 !important;
    color: #2c3e50 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.02em !important;
}

h1 {
    font-size: 2.5rem !important;
    color: #1a3a52 !important;
}

h2 {
    font-size: 2rem !important;
    color: #1a3a52 !important;
}

h3 {
    font-size: 1.5rem !important;
    color: #2c3e50 !important;
}

h4 {
    font-size: 1.25rem !important;
    color: #2c3e50 !important;
}

p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: #666 !important;
    margin-bottom: 1rem !important;
}

/* Responsive typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    h4 {
        font-size: 1.1rem !important;
    }
    
    p {
        font-size: 0.95rem !important;
    }
}

/* ========================================
   6. BUTTON ENHANCEMENTS
   ======================================== */

.btn,
button:not(.nav-toggle):not(.modal-close):not(.notification-close) {
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.btn:hover,
button:not(.nav-toggle):not(.modal-close):not(.notification-close):hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #0f7490 0%, #1aa89e 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d5f78 0%, #168b8e 100%) !important;
}

/* ========================================
   7. CARD ENHANCEMENTS (GENERAL)
   ======================================== */

.card {
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(15, 116, 144, 0.08) !important;
    background: white !important;
}

.card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 16px rgba(15, 116, 144, 0.12) !important;
}

/* ========================================
   8. LOADING STATES
   ======================================== */

.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
    position: relative !important;
}

.loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 40px !important;
    height: 40px !important;
    margin: -20px 0 0 -20px !important;
    border: 4px solid #f3f3f3 !important;
    border-top: 4px solid #0f7490 !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   9. SMOOTH SCROLLING
   ======================================== */

html {
    scroll-behavior: smooth !important;
}

/* ========================================
   10. FOCUS STATES (ACCESSIBILITY)
   ======================================== */

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #0f7490 !important;
    outline-offset: 2px !important;
}

/* ========================================
   11. SELECTION STYLING
   ======================================== */

::selection {
    background: rgba(15, 116, 144, 0.2) !important;
    color: #1a3a52 !important;
}

::-moz-selection {
    background: rgba(15, 116, 144, 0.2) !important;
    color: #1a3a52 !important;
}

/* ========================================
   12. SCROLLBAR STYLING (WEBKIT)
   ======================================== */

::-webkit-scrollbar {
    width: 12px !important;
}

::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0f7490 0%, #1aa89e 100%) !important;
    border-radius: 6px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0d5f78 0%, #168b8e 100%) !important;
}

/* ========================================
   13. MOBILE OPTIMIZATIONS
   ======================================== */

@media (max-width: 480px) {
    .container,
    .product-detail-page,
    section:not(.hero) {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .product-card {
        margin-bottom: 16px !important;
    }
    
    .category-badge {
        font-size: 11px !important;
        padding: 5px 12px !important;
    }
}

/* ========================================
   14. PRINT STYLES
   ======================================== */

@media print {
    header {
        position: static !important;
    }
    
    .product-card:hover {
        transform: none !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }
}

