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

.product-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-id {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.product-detail-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin: 1rem 0;
}

.product-id-large {
    color: white;
    font-weight: bold;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-text {
    line-height: 1.6;
    white-space: pre-wrap;
}

.product-detail-summary {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e60012;
}

.review-summary-box {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    margin: 1rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.review-summary-placeholder {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.review-toggle {
    color: #e60012;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.review-toggle:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #e60012;
    color: white;
}

.btn-primary:hover {
    background-color: #cc0010;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e60012;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: 2px solid #e60012;
    color: #e60012;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover,
.nav-btn.active {
    background: #e60012;
    color: white;
}

.main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.search-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-container h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#search-input:focus {
    outline: none;
    border-color: #e60012;
}

#search-btn {
    background: #e60012;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

#search-btn:hover {
    background: #cc0010;
}

.search-options {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-options select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

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

.product-info {
    padding: 1rem;
}

.product-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: #e60012;
    font-weight: bold;
    font-size: 1.1rem;
}

.product-date {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.categories-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.categories-container h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.category-card {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    background: #e60012;
    color: white;
    border-color: #e60012;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: #e60012;
    color: white;
    border-color: #e60012;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #e60012;
    color: white;
    border-color: #e60012;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
}

.close:hover {
    color: #e60012;
}

.product-detail-header {
    margin-bottom: 1.5rem;
}

.product-detail-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-detail-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-detail-price {
    font-size: 1.2rem;
    color: #e60012;
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-detail-info {
    margin-bottom: 1.5rem;
}

.product-detail-info h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.product-detail-info p {
    color: #666;
    line-height: 1.6;
}

.product-detail-reviews {
    margin-bottom: 1.5rem;
}

.product-detail-reviews h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.product-detail-reviews h4 {
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    color: #333;
    font-size: 1rem;
}

.review-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #e60012;
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #333;
}

.review-details {
    margin-top: 1rem;
}

.review-item {
    background: white;
    border: 1px solid #eee;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
}

.tag {
    display: inline-block;
    background: #e60012;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: #e60012;
    color: white;
}

.btn-primary:hover {
    background: #cc0010;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e60012;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 15px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}