* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

header {
    background-color: #4a90e2;
    color: white;
    padding: 20px;
}

header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-align: center;
}

header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

#auth-nav {
    font-size: 14px;
    opacity: 0.95;
}

#auth-nav a {
    color: white;
}

header nav a:hover {
    text-decoration: underline;
}

.breadcrumb {
    background-color: #f0f0f0;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li + li::before {
    content: ">";
    margin-right: 10px;
    color: #666;
}

.breadcrumb a {
    color: #4a90e2;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.welcome {
    text-align: center;
    padding: 40px 20px;
    background-color: #f0f0f0;
    margin-bottom: 30px;
}

.welcome h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
}

.welcome p {
    font-size: 18px;
    color: #666;
}

.products {
    margin-top: 30px;
}

.products h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.category-filter {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-filter label {
    font-weight: bold;
    color: #333;
}

.category-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.product-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product {
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #fff;
    flex: 1 1 250px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 10px;
}

.product-image {
    font-size: 60px;
    text-align: center;
    margin-bottom: 10px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.product-image img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.product-name {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.product-link:hover .product-name {
    text-decoration: underline;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 10px;
    text-align: center;
}

.add-to-cart-btn {
    padding: 10px 16px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background-color: #357abd;
}

.shopping-list-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4a90e2;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 100;
    font-size: 14px;
}

.shopping-list {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: right 0.3s ease;
    pointer-events: none;
}

.shopping-list-trigger:hover ~ .shopping-list-overlay,
.shopping-list-trigger:hover ~ .shopping-list {
    pointer-events: auto;
}

.shopping-list-trigger:hover ~ .shopping-list-overlay {
    opacity: 1;
}

.shopping-list-trigger:hover ~ .shopping-list {
    right: 0;
}

.shopping-list:hover {
    right: 0;
    pointer-events: auto;
}

.shopping-list-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.shopping-list-trigger:hover ~ .shopping-list-overlay {
    opacity: 1;
    pointer-events: auto;
}

.shopping-list:hover,
.shopping-list-overlay:hover ~ .shopping-list {
    right: 0;
    pointer-events: auto;
}

.shopping-list-overlay:hover {
    opacity: 1;
    pointer-events: auto;
}

.shopping-list-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shopping-list-header h2 {
    font-size: 20px;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: default;
    color: #666;
    line-height: 1;
    pointer-events: none;
}

.shopping-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-items {
    list-style: none;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.cart-item-price {
    display: block;
    color: #e74c3c;
    font-size: 14px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-qty label {
    font-size: 12px;
    color: #666;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.cart-item-qty input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.qty-btn {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 30px;
}

.qty-btn:hover {
    background-color: #357abd;
}

.remove-item-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.remove-item-btn:hover {
    background-color: #c0392b;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.shopping-list-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
}

.cart-total strong {
    color: #e74c3c;
    font-size: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.checkout-btn:hover {
    background-color: #219150;
}

.product-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.product-detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.product-detail-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.product-detail-content {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-detail-image {
    flex: 1;
    text-align: center;
    font-size: 120px;
    background-color: #f0f0f0;
    padding: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.product-detail-info {
    flex: 1;
}

.product-detail-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.product-detail-info .price {
    font-size: 28px;
    margin: 15px 0;
    text-align: left;
}

.product-detail-info p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #666;
}

.product-detail-info ul {
    margin: 15px 0;
    padding-left: 20px;
    color: #666;
}

.product-detail-info ul li {
    margin-bottom: 8px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.back-link:hover {
    background-color: #357abd;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .product-detail-content {
        flex-direction: column;
    }

    .product-list {
        justify-content: center;
    }

    .shopping-list {
        width: 100%;
        right: -100%;
    }

    .shopping-list-trigger {
        bottom: 15px;
        right: 15px;
        padding: 12px 16px;
    }
}
