/* ==================== Global Basic Settings ==================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* ==================== Layout container ==================== */
.main-container {
    display: flex; /* Align the left category and right content side by side */
    padding: 20px;
}

/* Left sidebar */
.category-list {
    width: 200px;
    border-right: 1px solid #ccc;
    margin-right: 20px;
    padding-right: 10px;
}

/* Breadcrumb navigation style */
.breadcrumbs {
    padding: 10px 20px;
    background-color: #eee;
    font-size: 0.9em;
}

.breadcrumbs a {
    text-decoration: none;
    color: #007bff;
}

/* Bottom style */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 20px;
}

/* ==================== Top Header and Shopping Cart ==================== */
header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between; /* Title on the left, shopping cart on the right */
    align-items: center;
    border-bottom: 1px solid #ddd;
    position: relative; 
    z-index: 100; /* Ensure the Header is at the top */
}

/* Shopping cart container */
.shopping-cart {
    position: relative; /* Key: Relative Positioning */
}

/* Shopping Cart Dropdown Content (Hidden by Default) */
.cart-content {
    display: none; 
    position: absolute; /* Absolute positioning: Float */
    right: 0;
    top: 100%; 
    background: white;
    border: 1px solid #999;
    width: 250px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000; 
}

/* Display shopping cart when mouse hovers */
.shopping-cart:hover .cart-content {
    display: block;
}

/* ==================== Home Page: Product List (Grid) ==================== */
.product-grid {
    flex: 1; 
    display: flex;
    flex-wrap: wrap; /* Line breaks are allowed */
    gap: 20px; /* Product spacing */
}

.product-card {
    border: 1px solid #ddd;
    padding: 10px;
    width: 200px;
    text-align: center;
    transition: box-shadow 0.3s; /* Add a small animation */
}

.product-card:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.product-card a {
    text-decoration: none;
    color: #333;
}

/* ==================== Detail Page: Product Detail ==================== */
.product-detail {
    flex: 1;
    display: flex; 
    gap: 30px;
}

.detail-image {
    flex: 1;
}

.detail-image img {
    width: 100%;
    max-width: 400px;
    border: 1px solid #eee;
}

.detail-info {
    flex: 1;
}

.detail-info h2 {
    margin-top: 0;
}

.detail-info .price {
    font-size: 1.5em;
    color: #d9534f;
    font-weight: bold;
}

.detail-info button {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1em;
}