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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

header {
    background-color: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    height: 65px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

nav a:hover {
    color: #007bff;
}

main {
    padding: 40px 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.result-count {
    color: #666;
    margin-bottom: 30px;
}

.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    list-style: none;
}

@media (max-width: 1024px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: 1fr;
    }
}

.product {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
    background: white;
}

.product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #f8f9fa;
}

.product-info {
    padding: 15px;
}

.product h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
}

/* Product Detail Page */
.product-details {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.product-details .product-image {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.product-details .product-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.product-details .product-info h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-details .product-info .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    margin: 30px 0 20px 0;
}

.product-details .buy-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.product-details .buy-button:hover {
    background-color: #0056b3;
}

.product-description {
    margin-bottom: 30px;
}

.product-description h2 {
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

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

@media (max-width: 768px) {
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .product-details .product-image {
        position: relative;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    text-decoration: none;
    color: #666;
}

.footer-widget a:hover {
    color: #007bff;
}

.footer-widget p {
    color: #666;
    line-height: 1.8;
}

/* Product Detail Page */
.product-details {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.product-details .product-image {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.product-details .product-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.product-details .product-info h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-details .product-info .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    margin: 30px 0 20px 0;
}

.product-details .buy-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.product-details .buy-button:hover {
    background-color: #0056b3;
}

.product-description {
    margin-bottom: 30px;
}

.product-description h2 {
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

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

@media (max-width: 768px) {
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .product-details .product-image {
        position: relative;
    }
}

footer {
    background-color: #f8f9fa;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
}
