/* ========================================
   Reloop Electronics Hub - Main Stylesheet
   Color Scheme: White & Blue
   ======================================== */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Primary Color Scheme */
.bg-primary {
    background-color: #0d6efd !important;
}

.text-primary {
    color: #0d6efd !important;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-outline-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-header {
    background-color: white;
    border-bottom: 2px solid #0d6efd;
    border-radius: 12px 12px 0 0 !important;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Product Card */
.product-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.product-card .card-img-top {
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Form Styles */
.form-control:focus, 
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Rating Stars */
.rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.3rem;
}

.rating input {
    display: none;
}

.rating label {
    cursor: pointer;
    font-size: 2rem;
    color: #ddd;
}

.rating label:before {
    content: "★";
}

.rating input:checked ~ label {
    color: #ffc107;
}

.rating label:hover,
.rating label:hover ~ label {
    color: #ffc107;
}

/* Badge Styles */
.badge-condition {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(13, 110, 253, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

/* Dashboard Statistics Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border-radius: 12px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Table Styles */
.table th {
    font-weight: 600;
    border-bottom: 2px solid #0d6efd;
}

.table td {
    vertical-align: middle;
}

/* Pagination */
.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-link {
    color: #0d6efd;
}

.page-link:hover {
    color: #0a58ca;
}

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

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    margin-top: 10px;
}

.dropdown-item {
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #0d6efd;
    color: white;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
}

/* Category Card */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    background-color: #0d6efd;
    color: white;
    transform: translateY(-3px);
}

.category-card:hover i,
.category-card:hover p {
    color: white !important;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #0d6efd !important;
    text-decoration: underline !important;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
}

.modal-header {
    border-bottom: 2px solid #0d6efd;
}

/* Image Gallery */
.cursor-pointer {
    cursor: pointer;
    transition: opacity 0.3s;
}

.cursor-pointer:hover {
    opacity: 0.8;
}

/* Carousel Controls */
.carousel-control-prev-icon, 
.carousel-control-next-icon {
    background-size: 50%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .stat-card h2 {
        font-size: 1.5rem;
    }
    
    .product-card .card-title {
        font-size: 0.9rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-group .btn {
        margin: 0;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.text-justify {
    text-align: justify;
}

/* Payment Method Cards */
.payment-method-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.payment-method-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.payment-method-card.border-primary {
    border-color: #0d6efd !important;
}

/* Sticky Sidebar */
.sticky-top {
    position: sticky;
    top: 80px;
    z-index: 1;
}

/* Image Preview */
.image-preview {
    position: relative;
    display: inline-block;
}

.image-preview .remove-image {
    position: absolute;
    top: -10px;
    right: -10px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}