/* Enhanced UI styles for MEDIA PHONE */

/* Global improvements */
body {
    font-family: 'Poppins', 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
}

/* Logo enhancement */
.navbar-brand img {
    max-height: 70px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Enhanced navbar */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 1rem;
}

.navbar .container-fluid {
    padding: 0 2rem;
}

.navbar-nav .nav-link {
    font-size: 16px;
    font-weight: 500;
    color: #333 !important;
    padding: 0.8rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #c41e3a !important;
    background-color: rgba(196, 30, 58, 0.08);
    transform: translateY(-2px);
}

.navbar-nav .nav-item.active .nav-link {
    color: #c41e3a !important;
    font-weight: 600;
}

.navbar-nav .nav-item.active::after {
    content: '';
    display: block;
    width: 70%;
    margin: -3px auto 0;
    height: 3px;
    background-color: #c41e3a;
    border-radius: 3px;
}

/* Search form improvements */
.form-inline .input-group {
    min-width: 260px;
}

.form-inline .form-control {
    border-radius: 20px 0 0 20px;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    font-size: 15px;
    height: calc(1.5em + 1rem + 2px);
    box-shadow: none;
    transition: all 0.3s ease;
}

.form-inline .form-control:focus {
    border-color: #c41e3a;
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.15);
}

.form-inline .input-group-append .btn {
    border-radius: 0 20px 20px 0;
    height: calc(1.5em + 1rem + 2px);
    padding: 0.5rem 1rem;
    background-color: #c41e3a;
    border-color: #c41e3a;
    color: white;
    transition: all 0.3s ease;
}

.form-inline .input-group-append .btn:hover {
    background-color: #a01829;
    transform: translateX(2px);
}

/* Card enhancements */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: contain;
    padding: 1.5rem;
    background-color: #f9f9f9;
}

.card-body {
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
    height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card .brand {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
}

.card .price {
    margin-top: 0.75rem;
}

.current-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: #c41e3a;
}

.original-price {
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.sale-badge {
    top: 10px;
    right: 10px;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 4px;
    background-color: #dc3545;
}

/* Button styling */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #a01829;
    border-color: #8b1523;
    transform: translateY(-2px);
}

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

.btn-outline-primary:hover {
    background-color: #c41e3a;
    color: white;
    transform: translateY(-2px);
}

/* Filter sidebar improvements */
.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label.font-weight-bold {
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 1rem;
}

.custom-control {
    margin-bottom: 0.5rem;
}

.custom-control-label {
    cursor: pointer;
    font-size: 0.95rem;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #c41e3a;
    border-color: #c41e3a;
}

/* Pagination enhancements */
.pagination {
    margin-top: 2rem;
}

.page-item .page-link {
    color: #c41e3a;
    border: none;
    padding: 0.5rem 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
    margin: 0 3px;
    border-radius: 5px;
}

.page-item.active .page-link {
    background-color: #c41e3a;
    color: white;
}

.page-item .page-link:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
}

/* Top banner improvements */
.bg-primary.text-white.py-2 {
    padding: 0.6rem 0 !important;
}

.bg-primary.text-white.py-2 .container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
}

.top-bar-info {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    margin-right: 1.5rem;
}

.top-bar-info i {
    margin-right: 0.5rem;
}

/* Home page category cards */
.category-card {
    border-radius: 10px;
    background-color: white;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, #c41e3a, #a01829);
    opacity: 0;
    transition: all 0.3s ease;
}

.category-card:hover::before {
    opacity: 1;
}

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

.category-card img {
    height: 180px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    width: 100%;
}

.category-card:hover img {
    transform: scale(1.15);
}

.category-card h3 {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Toast notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    z-index: 9999;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.toast-header {
    background-color: #c41e3a;
    color: white;
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 0.75rem 1rem;
}

.toast-header strong {
    font-weight: 600;
}

.toast-header .close {
    color: white;
    opacity: 0.8;
}

.toast-body {
    padding: 1rem;
    background-color: white;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

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

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

/* Responsive improvements */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
    }
    
    .category-card img {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .card-img-top {
        height: 180px;
    }
    
    .form-inline .input-group {
        width: 100%;
    }
    
    .top-bar-info {
        display: block;
        margin-bottom: 0.5rem;
    }
}
