/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255,255,255,0.1);
}

.admin-btn {
    background: #ff9800;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1a237e;
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.filter-buttons a {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
}

.filter-buttons a:hover,
.filter-buttons a.active {
    background: #1a237e;
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: gold;
    color: #333;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-provider {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.product-provider.amazon { background: #ff9900; }
.product-provider.hosting { background: #2196f3; }
.product-provider.starlink { background: #673ab7; }

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1a237e;
}

.product-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-category {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e91e63;
}

.buy-btn {
    background: #4caf50;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

.buy-btn:hover {
    background: #388e3c;
}

.product-stats {
    color: #888;
    font-size: 0.8rem;
}

/* Footer */
footer {
    background: #1a237e;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer p {
    margin: 0.5rem 0;
}

/* Admin Styles */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.login-form {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a237e;
}

.login-note {
    margin-top: 2rem;
    padding: 1rem;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 0.9rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logout-btn {
    background: #f44336;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stat-card h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #1a237e;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: #1a237e;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.product-form {
    max-width: 800px;
}

.btn {
    background: #4caf50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #388e3c;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-danger {
    background: #f44336;
}

.btn-danger:hover {
    background: #d32f2f;
}

/* Products List Table */
.products-list table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.products-list th,
.products-list td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.products-list th {
    background: #f5f5f5;
    font-weight: bold;
    color: #666;
}

.products-list tr:hover {
    background: #f9f9f9;
}

.provider-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: white;
}

.provider-badge.amazon { background: #ff9900; }
.provider-badge.hosting { background: #2196f3; }
.provider-badge.starlink { background: #673ab7; }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
    background: white;
    border-radius: 10px;
}

.no-products i {
    color: #ddd;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    header nav {
        margin-top: 1rem;
    }
    
    header nav a {
        margin: 0 0.5rem;
        display: inline-block;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .products-list {
        overflow-x: auto;
    }
}
/* Add these to existing CSS */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.welcome {
    color: #666;
    margin-top: 5px;
}

.welcome small {
    color: #888;
    font-size: 0.9rem;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.featured-star {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== BASE FONT SETTINGS ===== */
:root {
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-secondary: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
    
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* ===== RESET AND BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--line-height-normal);
    font-weight: var(--font-weight-normal);
    color: #374151; /* Standard gray color */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY SCALE ===== */
h1, .h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: 1rem;
    color: #111827; /* Dark gray */
}

h2, .h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: 0.75rem;
    color: #1f2937;
}

h3, .h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: 0.5rem;
    color: #374151;
}

h4, .h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    margin-bottom: 0.5rem;
    color: #4b5563;
}

h5, .h5 {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    margin-bottom: 0.5rem;
    color: #6b7280;
}

h6, .h6 {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    margin-bottom: 0.5rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== TEXT UTILITIES ===== */
.text-xs {
    font-size: var(--text-xs);
    line-height: var(--line-height-normal);
}

.text-sm {
    font-size: var(--text-sm);
    line-height: var(--line-height-normal);
}

.text-base {
    font-size: var(--text-base);
    line-height: var(--line-height-normal);
}

.text-lg {
    font-size: var(--text-lg);
    line-height: var(--line-height-normal);
}

.text-xl {
    font-size: var(--text-xl);
    line-height: var(--line-height-tight);
}

.text-2xl {
    font-size: var(--text-2xl);
    line-height: var(--line-height-tight);
}

.text-3xl {
    font-size: var(--text-3xl);
    line-height: var(--line-height-tight);
}

/* Font weights */
.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); }

/* Line heights */
.leading-tight { line-height: var(--line-height-tight); }
.leading-normal { line-height: var(--line-height-normal); }
.leading-relaxed { line-height: var(--line-height-relaxed); }

/* Text colors */
.text-gray-50 { color: #f9fafb; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }

.text-primary { color: #1a237e; }
.text-secondary { color: #4caf50; }
.text-danger { color: #f44336; }
.text-warning { color: #ff9800; }
.text-info { color: #2196f3; }
.text-success { color: #4caf50; }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Text transforms */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* Letter spacing */
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* ===== SPECIFIC ELEMENTS ===== */
p {
    margin-bottom: 1rem;
    color: #4b5563;
}

small, .small {
    font-size: var(--text-sm);
    color: #6b7280;
}

strong, b {
    font-weight: var(--font-weight-semibold);
}

em, i {
    font-style: italic;
}

code, pre, kbd, samp {
    font-family: var(--font-secondary);
    font-size: var(--text-sm);
}

pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #dc2626;
}

/* ===== FORM ELEMENTS ===== */
input, select, textarea, button {
    font-family: inherit;
    font-size: var(--text-base);
    line-height: var(--line-height-normal);
}

input, select, textarea {
    font-size: var(--text-base);
    color: #374151;
}

::placeholder {
    color: #9ca3af;
    font-size: var(--text-sm);
}

label {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    color: #374151;
    margin-bottom: 0.25rem;
    display: block;
}

/* ===== ADMIN SPECIFIC ===== */
.admin-container {
    font-size: var(--text-base);
    line-height: var(--line-height-normal);
}

.admin-header h1 {
    font-size: var(--text-2xl);
    margin-bottom: 0.25rem;
}

.welcome {
    font-size: var(--text-sm);
    color: #6b7280;
}

.welcome small {
    font-size: var(--text-xs);
    color: #9ca3af;
}

/* Tables */
table {
    font-size: var(--text-sm);
}

th {
    font-size: var(--text-xs);
    font-weight: var(--font-weight-semibold);
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    font-size: var(--text-sm);
    color: #374151;
}

/* Alerts */
.alert {
    font-size: var(--text-sm);
    padding: 0.75rem 1rem;
}

/* Cards */
.stat-card .stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
}

.stat-card .stat-label {
    font-size: var(--text-xs);
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.025em;
}

.btn-small {
    font-size: var(--text-xs);
    padding: 0.25rem 0.5rem;
}

/* Badges */
.provider-badge, .category-badge, .featured-badge {
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.025em;
}

/* Activity log */
.activity-action {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
}

.activity-details {
    font-size: var(--text-sm);
    color: #6b7280;
}

.activity-time {
    font-size: var(--text-xs);
    color: #9ca3af;
}

/* Form elements in admin */
.form-group label {
    font-size: var(--text-sm);
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-size: var(--text-sm);
    padding: 0.5rem 0.75rem;
}

/* Tabs */
.admin-tab {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
}

/* Modal */
.modal-content {
    font-size: var(--text-sm);
}

.modal-header h2 {
    font-size: var(--text-lg);
}

/* Pagination */
.pagination a,
.pagination span {
    font-size: var(--text-sm);
    min-width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Search box */
.search-box input {
    font-size: var(--text-sm);
}

/* Quick stats */
.quick-stat {
    font-size: var(--text-xs);
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    h1, .h1 { font-size: var(--text-2xl); }
    h2, .h2 { font-size: var(--text-xl); }
    h3, .h3 { font-size: var(--text-lg); }
    
    .admin-header h1 {
        font-size: var(--text-xl);
    }
    
    .admin-tab {
        font-size: var(--text-xs);
        padding: 0.75rem 1rem;
    }
    
    table {
        font-size: var(--text-xs);
    }
    
    .btn {
        font-size: var(--text-xs);
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .admin-container {
        padding: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: var(--text-xl);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .admin-tabs,
    .header-actions,
    .btn {
        display: none !important;
    }
}
