/* TNNCorporation Enhanced & Branded Professional Stylesheet */
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties (Variables) - Matched with TNN Logo */
:root {
    /* Brand Colors from Logo */
    primary-red: #d71920; /* Extracted from TNN Logo */
    primary-gray: #58595b; /* Extracted from TNN Logo */
    
    /* Derived Shades for UI Consistency */
    dark-red: #b01017;
    light-red: #fde8e9;
    dark-gray: #3a3b3d;
    light-gray: #f8fafc;
    border-color: #e2e8f0;
    white: #ffffff;
    black: #1a1a1a;

    /* Text Colors for Readability and Branding */
    text-primary: #3a3b3d; /* Aligned with dark gray */
    text-secondary: #58595b; /* Aligned with primary gray */

    /* Accent Colors (Kept for status messages) */
    success: #10b981;
    warning: #f59e0b;
    info: #06b6d4;
    
    /* Shadows */
    shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Gradients - Updated with new brand colors */
    gradient-primary: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    gradient-secondary: linear-gradient(135deg, var(--dark-gray) 0%, #1f2937 100%);
    gradient-light: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    
    /* Transitions */
    transition-fast: 0.15s ease-in-out;
    transition-normal: 0.3s ease-in-out;
    transition-slow: 0.5s ease-in-out;
    
    /* Border Radius */
    radius-sm: 0.375rem;
    radius-md: 0.5rem;
    radius-lg: 0.75rem;
    radius-xl: 1rem;
    radius-2xl: 1.5rem;
    radius-full: 9999px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Prompt', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--white);
    font-size: 16px;
    font-weight: 400;
}

/* Navigation Bar Styles */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    transition: all var(--transition-normal);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.navbar-brand {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary-red);
    text-decoration: none;
    letter-spacing: -0.025em;
    font-family: 'Prompt', sans-serif;
    transition: all var(--transition-normal);
}

.navbar-brand:hover {
    color: var(--dark-red);
    transform: scale(1.02);
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.navbar-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    position: relative;
    font-size: 0.95rem;
}

.navbar-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.navbar-nav a:hover::before,
.navbar-nav a.active::before {
    opacity: 1;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--white);
    transform: translateY(-1px);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.mobile-menu-toggle:hover {
    background: var(--light-gray);
}

@media (max-width: 768px) {
    .navbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
    }

    .navbar-nav.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }
    
    .navbar-container {
        padding: 0 1rem;
    }
}

/* Header Styles */
.page-header {
    background: var(--gradient-primary);
    color: white;
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300" fill="rgba(255,255,255,0.1)"><path d="M0,100 C150,200 350,0 500,100 C650,200 850,0 1000,100 L1000,300 L0,300 Z"/></svg>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.3;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    letter-spacing: -0.025em;
    font-family: 'Prompt', sans-serif;
}

.header-content p {
    font-size: 1.375rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    text-align: center;
    min-width: 140px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-red);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--light-gray);
}

.btn-secondary {
    background: var(--primary-red);
    color: white;
    border: 2px solid var(--primary-red);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: var(--dark-red);
    border-color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Layout Containers */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    font-family: 'Prompt', sans-serif;
    letter-spacing: -0.025em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 400;
}

/* Product Grid */
.product-list {
    display: grid;
   grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-item {
    background: var(--white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    border: 1px solid var(--border-color);
    group: hover;
}

.product-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(215, 25, 32, 0.2);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform var(--transition-slow);
    background: var(--gradient-light);
}

.product-item:hover .product-image {
    transform: scale(1.05);
}

.product-content {
    padding: 2rem;
}

.product-name {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
    font-family: 'Prompt', sans-serif;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
}

.product-item .btn {
    width: 100%;
    margin-top: 1rem;
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--gradient-light);
    border-radius: var(--radius-2xl);
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.no-products h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-products p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Stats Section */
.stats-section {
    text-align: center;
    background: var(--gradient-light);
    padding: 6rem 0;
    margin: 6rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    }

.stats-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stats-grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: center;
}

.stat-item {
    padding: 2rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Footer */
.page-footer {
    background: var(--gradient-secondary);
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 6rem;
}

.page-footer p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Security Notice */
.security-notice {
    background: var(--light-red);
    border-left: 4px solid var(--primary-red);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-red);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Handling */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--white);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.1);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: var(--white);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.table tr:hover {
    background: rgba(215, 25, 32, 0.02);
}

/* Alert Styles */
.alert {
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fed7aa;
    color: #d97706;
}

.alert-info {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0284c7;
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--light-gray);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--light-gray);
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-normal);
    font-weight: 500;
    background: var(--white);
}

.pagination a:hover {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    transform: translateY(-1px);
}

.pagination .current {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 4rem 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.75rem;
    }
    
    .header-content p {
        font-size: 1.125rem;
    }
    
    .product-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .container {
        padding: 3rem 1rem;
    }
    
    .stats-grid {
    grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 1rem;
        height: 70px;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .header-content h1 {
        font-size: 2.25rem;
    }
    
    .header-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .product-content {
        padding: 1.5rem;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .page-header {
        padding: 6rem 0 4rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-menu-toggle,
    .btn,
    .security-notice {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
    
    .page-header {
        background: none !important;
        color: black !important;
    }
    
    .product-item,
    .card,
    .stat-item {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gray);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
}