/* Arc'teryx Outlet Tracker Custom Styles */

:root {
    --arcteryx-black: #000000;
    --arcteryx-grey: #666666;
    --arcteryx-light-grey: #f5f5f5;
    --arcteryx-red: #e31837;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    height: 100vh;
    overflow: hidden;
}

.page-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 80px; /* Space for fixed footer */
}

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

.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    border-radius: 0.5rem;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e3e6ea;
    font-weight: 600;
}

/* Statistics Cards */
.card.text-white h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.card.text-white h5 {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

.card.text-white small {
    opacity: 0.8;
}

/* Tables */
.table {
    font-size: 0.95rem;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Product Images */
.img-thumbnail {
    border: 2px solid #dee2e6;
}

.img-thumbnail:hover {
    border-color: var(--arcteryx-red);
    cursor: pointer;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .card h2 {
        font-size: 2rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        font-size: 0.75rem;
    }
}

/* DataTables customization */
.dataTables_wrapper .dataTables_length select {
    width: auto;
    display: inline-block;
}

.dataTables_wrapper .dataTables_filter input {
    width: auto;
    display: inline-block;
    margin-left: 0.5rem;
}

/* DataTables processing indicator */
.dataTables_processing {
    z-index: 100;
}

/* Scrollable table styling */
.dataTables_scrollHead {
    background: #fff;
    border-bottom: 2px solid #dee2e6;
}

.dataTables_scrollBody {
    border-bottom: 1px solid #dee2e6;
}

/* Enhanced table styling */
#products-table {
    border-collapse: separate;
    border-spacing: 0;
}

#products-table td,
#products-table th {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
}

#products-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

#products-table tbody tr {
    transition: background-color 0.15s ease;
}

#products-table tbody tr:hover {
    background-color: #e3f2fd !important;
}

#products-table td {
    border-color: #f0f0f0;
}

#products-table td:first-child img {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Column widths */
#products-table th:nth-child(1) { width: 60px; }
#products-table th:nth-child(2) { min-width: 180px; }

/* Header with inline filters */
#products-table thead th {
    vertical-align: top;
    padding-bottom: 0.5rem;
}

#products-table thead th > div:first-child {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

#products-table thead .form-control,
#products-table thead .form-select {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    font-weight: normal;
}

#products-table thead .form-check {
    margin: 0;
}

#products-table thead .form-check-label {
    font-weight: normal;
    font-size: 0.75rem;
}

/* Prevent layout shift during pagination */
.dataTables_wrapper {
    min-height: 400px;
    position: relative;
}


/* Enhanced pagination styling */
.dataTables_paginate .paginate_button {
    transition: all 0.15s ease !important;
}

.dataTables_paginate .paginate_button:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dataTables_paginate .paginate_button.current {
    font-weight: 600 !important;
}

/* Chart container */
canvas {
    max-height: 300px;
}

/* Product detail page */
#main-image {
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
}

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

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}