/* Global Styles */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Product Card Styles */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

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

.product-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5rem;  /* Approximately 3 lines of text */
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Button Styles */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
    transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
    background-color: var(--light-gray);
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Category Section */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 200px;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
}

/* Footer Styles */
footer {
    background-color: var(--light-gray);
    padding: 4rem 0;
    margin-top: auto;
}

footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

/* Cart Dropdown Styles */
.cart-dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.cart-dropdown-item:last-child {
    border-bottom: none;
}

.cart-dropdown-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-dropdown-item .item-details {
    flex-grow: 1;
}

.cart-dropdown-item .item-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.cart-dropdown-item .item-price {
    font-size: 0.875rem;
    color: var(--bs-primary);
    font-weight: 500;
}

.cart-dropdown-item .item-quantity {
    font-size: 0.875rem;
    color: #666;
}

.cart-dropdown-item .remove-item {
    color: #dc3545;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
}

.cart-dropdown-item .remove-item:hover {
    color: #bb2d3b;
}

.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Prevent dropdown from closing when clicking inside */
.dropdown-menu.show {
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-card img {
        height: 250px;
    }
}

/* Breadcrumb Responsive Styles */
@media (max-width: 768px) {
    .breadcrumb {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
        display: flex;
        align-items: center;
    }

    .breadcrumb-item {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .breadcrumb-item:not(:last-child)::after {
        content: '/';
        margin: 0 0.5rem;
        color: #6c757d;
    }

    .breadcrumb-item a {
        max-width: 100px;
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Search Bar */
.search-form input {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    border-radius: 4px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}
