/* Custom styles for E-Commerce Store */

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card {
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-primary:hover {
    background-color: #764ba2;
    border-color: #764ba2;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.table img {
    border-radius: 5px;
}

.alert {
    border-radius: 10px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

footer {
    margin-top: auto;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.badge {
    font-size: 0.75em;
}

.product-image {
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

/* Product Card Image Standardization - Consistent 300x300px */
.card-img-top {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 5px 5px 0 0;
}

/* Ensure consistent card height and layout */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-text {
    flex: 1;
}

/* Sidebar Compact Styling */
.sidebar-card {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.sidebar-card .card-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.sidebar-card .card-body {
    padding: 0.75rem;
}

.sidebar-card .list-group-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.sidebar-card .list-group-item a {
    color: #495057;
    text-decoration: none;
}

.sidebar-card .list-group-item a:hover {
    color: #667eea;
}

.sidebar-card .text-muted {
    font-size: 0.8rem;
}

/* Compact Recently Viewed */
.recently-viewed-compact {
    font-size: 0.85rem;
}

.recently-viewed-compact .card-body {
    padding: 0.5rem;
}

/* Responsive image sizing */
@media (max-width: 1200px) {
    .card-img-top {
        height: 250px;
    }
}

@media (max-width: 992px) {
    .card-img-top {
        height: 220px;
    }
}

@media (max-width: 768px) {
    .card-img-top {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .card-img-top {
        height: 180px;
    }
}

@media (max-width: 400px) {
    .card-img-top {
        height: 150px;
    }
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.quantity-selector {
    width: 80px;
}

.cart-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.checkout-form {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
    }
    
    .hero img {
        margin-top: 20px;
    }
}
