/* Main Stylesheet for Fitness Store */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    margin-top: 56px;
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-icon {
    font-size: 10rem;
    opacity: 0.3;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Sections */
.products-section {
    background-color: white;
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

/* Main Content - Takes up available space */
main {
    flex: 1 0 auto;
}

/* Footer - Stays at bottom */
footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.social-link i {
    line-height: 1;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Tables */
.table {
    background-color: white;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
}

/* Responsive - Mobile First Approach */
@media (max-width: 576px) {
    /* Typography */
    h1, .h1 {
        font-size: 1.75rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 30px 0;
        margin-top: 56px;
    }
    
    .hero-icon {
        font-size: 4rem;
        margin-top: 20px;
    }
    
    .min-vh-50 {
        min-height: auto;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Forms */
    .form-control, .form-select {
        padding: 8px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Navbar */
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav {
        margin-top: 10px;
    }
    
    .navbar-nav .nav-link {
        padding: 8px 0;
    }
    
    /* Footer */
    footer {
        padding: 20px 0 !important;
    }
    
    footer .row {
        text-align: center !important;
    }
    
    footer .col-md-6 {
        margin-bottom: 20px;
    }
    
    footer .text-md-end {
        text-align: center !important;
    }
    
    /* Social Links */
    .social-links {
        justify-content: center;
        margin-top: 20px;
        margin-bottom: 15px;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    /* Product grid */
    .products-section .row {
        margin-left: -7.5px;
        margin-right: -7.5px;
    }
    
    .products-section .row > [class*="col-"] {
        padding-left: 7.5px;
        padding-right: 7.5px;
    }
    
    /* Login/Register forms */
    .col-md-6.col-lg-5 {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Card padding on mobile */
    .card.shadow .card-body {
        padding: 1.25rem;
    }
    
    /* Button groups */
    .btn-group,
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .btn-group .btn,
    .d-flex.gap-2 .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-group .btn:last-child,
    .d-flex.gap-2 .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Alerts */
    .alert {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    /* Badges */
    .badge {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    /* Text alignment */
    .text-md-end {
        text-align: center !important;
    }
    
    /* Spacing utilities */
    .mb-md-0 {
        margin-bottom: 1rem !important;
    }
    
    /* List groups */
    .list-group-item {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    /* Tables */
    .table-responsive {
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .table th,
    .table td {
        padding: 8px 4px;
        white-space: nowrap;
    }
    
    .table th:first-child,
    .table td:first-child {
        padding-left: 8px;
    }
    
    .table th:last-child,
    .table td:last-child {
        padding-right: 8px;
    }
    
    /* Hide less important columns on mobile */
    .table .d-none-mobile {
        display: none !important;
    }
    
    /* Container padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mt-5 {
        margin-top: 2rem !important;
    }
}

@media (max-width: 768px) {
    /* Tablet and below */
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-icon {
        font-size: 6rem;
    }
    
    .display-4 {
        font-size: 2.25rem;
    }
    
    /* Dashboard */
    .dashboard .row > div {
        margin-bottom: 20px;
    }
    
    /* Product cards */
    .product-card .card-img-top {
        height: 180px;
    }
    
    /* Account settings tabs */
    .list-group {
        margin-bottom: 20px;
    }
    
    /* Account settings layout */
    .account-settings .col-md-3 {
        margin-bottom: 20px;
    }
    
    .account-settings .col-md-9 {
        padding-left: 0;
    }
    
    /* Tables - make horizontal scroll on mobile */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 992px) {
    /* Small desktop and tablets */
    .card-body {
        padding: 1.25rem;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

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

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}
