/* Custom Styles for SaleBuzz E-Commerce */

:root {
    --primary-color: #D62828;
    --secondary-color: #000000;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 90px;
}

/* Navbar Enhancements */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}

.navbar-brand span {
    color: var(--primary-color);
}

.navbar-light .navbar-nav .nav-link {
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-weight: 600;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    transform: translateY(-2px);
    color: #b02121 !important;
}

/* Dropdown Item Enhancements */
.dropdown-item:active,
.dropdown-item.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Button Enhancements */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #b02121;
    border-color: #b02121;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Bootstrap Utility Overrides */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Hero Section */
.bg-light {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%) !important;
}

/* Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Price Display */
.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
}

/* Category selection hover */
.list-group-item-action:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.list-group-item.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Breadcrumb styling */
.breadcrumb-container {
    background-color: var(--primary-color) !important;
    padding: 12px 0;
    margin-bottom: 0;
}

.breadcrumb-container .breadcrumb-item,
.breadcrumb-container .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
}

.breadcrumb-container .breadcrumb-item.active {
    color: white !important;
    font-weight: 600;
}

.breadcrumb-container .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Category Cards */
.category-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b02121 100%);
    color: white;
    border-color: var(--primary-color);
}

.category-card:hover .card-title,
.category-card:hover .card-text {
    color: var(--primary-color) !important;
}

/* Footer */
footer a {
    text-decoration: none;
    transition: color 0.3s ease;
    color: #ffffff !important;
}

footer a:hover {
    color: #ffffff !important;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Alert Enhancements */
.alert {
    border-radius: 10px;
    border: none;
}

/* Form Enhancements */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(214, 40, 40, 0.25);
}

/* Badge Styles */
.badge {
    padding: 0.5em 0.8em;
    border-radius: 6px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.2rem;
    }

    .lead {
        font-size: 0.95rem;
    }

    .navbar-brand img {
        height: 60px !important;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .card {
        margin-bottom: 20px;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Image Placeholder */
.img-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 3rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 12px;
}

.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.2);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-link.facebook-link:hover {
    background-color: #3b5998;
    color: white;
}

.social-link i {
    display: flex;
    align-items: center;
    justify-content: center;
}