/* Truly Collectables Custom Styles */

:root {
    --primary-color: #0000FF; /* Blue */
    --text-color: #000000; /* Black */
    --bg-color: #FFFFFF; /* White */
    --border-color: #dee2e6;
    --hover-bg: #f8f9fa;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Override Bootstrap primary color */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0000CC;
    border-color: #0000CC;
}

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

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

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

/* Navbar */
.navbar-brand {
    font-size: 1.8rem;
    font-family: 'Brush Script MT', 'BrushScript BT', 'Segoe Script', 'Apple Chancery', cursive !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-color);
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Card styles */
.card {
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-img-top {
    width: 100%;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 0.5rem;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0000CC 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    font-weight: 700;
    font-size: 2.5rem;
}

/* Buttons */
.btn {
    border-radius: 0.25rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
}

.btn-sm {
    padding: 0.25rem 1rem;
}

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

/* Alert messages */
.alert {
    border-radius: 0.25rem;
}

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

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Price tag */
.price-tag {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Condition badges */
.badge-mint {
    background-color: #28a745;
}

.badge-near-mint {
    background-color: #20c997;
}

.badge-excellent {
    background-color: #17a2b8;
}

.badge-good {
    background-color: #ffc107;
}

.badge-played {
    background-color: #6c757d;
}

/* Order status badges */
.badge-pending {
    background-color: #ffc107;
}

.badge-processing {
    background-color: #17a2b8;
}

.badge-shipped {
    background-color: #007bff;
}

.badge-completed {
    background-color: #28a745;
}

.badge-cancelled {
    background-color: #dc3545;
}

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

.table thead {
    background-color: #f8f9fa;
}

/* Image viewer */
.product-image-main {
    max-height: 500px;
    object-fit: contain;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 1rem;
}

/* Filter sidebar */
.filter-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.filter-section h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Tree navigation text overflow */
.tree-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-item.set {
    white-space: normal;
    word-wrap: break-word;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Cart items */
.cart-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    background-color: white;
}

.cart-item img {
    max-width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Dashboard cards */
.dashboard-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0000CC 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .card-img-top {
        max-height: 250px;
    }

    .dashboard-card {
        padding: 1.5rem;
    }

    .dashboard-card h3 {
        font-size: 2rem;
    }

    /* Tree navigation mobile */
    .tree-navigation {
        font-size: 0.85rem;
    }

    .filter-section {
        padding: 1rem;
    }

    /* Sticky filter toggle for mobile */
    .mobile-filter-toggle {
        position: sticky;
        top: 60px;
        z-index: 100;
        background: white;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    /* Table responsive improvements */
    .table-responsive {
        font-size: 0.875rem;
    }

    /* Smaller buttons on mobile */
    .btn-sm {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Product price on mobile */
    .price-tag {
        font-size: 1.2rem;
    }

    /* Card title smaller on mobile */
    .card-title {
        font-size: 0.95rem;
    }

    /* Navbar brand smaller */
    .navbar-brand {
        font-size: 1.4rem;
    }

    /* Form controls full width */
    .form-control, .form-select {
        font-size: 1rem;
    }

    /* Admin dashboard buttons */
    .d-flex.flex-wrap.gap-2 {
        gap: 0.5rem !important;
    }

    .d-flex.flex-wrap.gap-2 .btn {
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .product-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Stack filter sidebar on small screens */
    .filter-section {
        margin-bottom: 1rem;
    }

    /* Card images smaller */
    .card-img-top {
        max-height: 200px;
    }

    /* Price smaller */
    .price-tag {
        font-size: 1rem;
    }

    /* Breadcrumb smaller text */
    .breadcrumb {
        font-size: 0.85rem;
    }

    /* Modal full screen on mobile */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
    }

    .modal-xl {
        max-width: 100%;
    }

    /* Product detail image */
    .product-image-main {
        max-height: 300px;
    }

    /* Card detail thumbnails */
    .img-thumbnail {
        height: 60px !important;
    }

    /* Hero buttons full width */
    .hero .btn-lg {
        width: 100%;
    }

    /* Search bar full width */
    .hero .input-group {
        width: 100%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices - larger tap targets */
    .btn {
        min-height: 44px;
        padding: 0.6rem 1.2rem;
    }

    .tree-item {
        padding: 0.6rem;
        min-height: 44px;
    }

    .form-control, .form-select {
        min-height: 44px;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }

    /* Disable hover effects on touch */
    .card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Utility classes */
.text-muted-custom {
    color: #6c757d;
}

.border-bottom-custom {
    border-bottom: 2px solid var(--primary-color);
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Accessibility - focus states */
a:focus, button:focus, .form-control:focus, .form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Improve table readability on mobile */
@media (max-width: 768px) {
    .table {
        font-size: 0.85rem;
    }

    .table td, .table th {
        padding: 0.5rem;
    }

    /* Stack action buttons vertically on mobile */
    .table .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
    }

    /* Image thumbnails smaller */
    .table img {
        max-width: 50px !important;
        height: 50px !important;
    }
}
