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

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

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

/* Header */
.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: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff6600;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.nav a:hover {
    color: #ff6600;
}

.btn-publish {
    background: #ff6600;
    color: white !important;
    padding: 8px 20px;
    border-radius: 4px;
}

/* Main */
.main {
    min-height: calc(100vh - 150px);
    padding: 20px 0;
}

/* Search Section */
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
    color: white;
    text-align: center;
}

.search-section h1 {
    font-size: 36px;
    margin-bottom: 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

.search-box button {
    padding: 12px 30px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

/* Category Section */
.category-section {
    padding: 40px 0;
}

.category-section h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.category-item {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.category-item .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* Recommend Section */
.recommend-section {
    padding: 40px 0;
}

.recommend-section h2 {
    margin-bottom: 30px;
    font-size: 28px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.info-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.3s;
}

.info-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.info-item img {
    width: 200px;
    height: 150px;
    object-fit: cover;
}

.info-content {
    padding: 15px;
    flex: 1;
}

.info-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.price {
    color: #ff6600;
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0;
}

.desc {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.meta {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

/* List Page */
.list-page {
    display: flex;
    gap: 20px;
}

.sidebar {
    width: 250px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    margin-bottom: 15px;
    color: #666;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-group input {
    margin-right: 8px;
}

.list-content {
    flex: 1;
}

.list-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sort-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.info-list-page {
    display: grid;
    gap: 20px;
}

.info-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.3s;
}

.info-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.info-card img {
    width: 300px;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover {
    background: #f5f5f5;
}

.page-btn.active {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

/* Detail Page */
.detail-page {
    display: flex;
    gap: 20px;
}

.detail-main {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 30px;
}

.image-gallery {
    margin-bottom: 30px;
}

.main-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.thumb-list {
    display: flex;
    gap: 10px;
}

.thumb-list img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.thumb-list img:hover {
    opacity: 1;
}

.detail-info h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.price-section {
    margin: 20px 0;
}

.price-big {
    font-size: 36px;
    color: #ff6600;
    font-weight: bold;
}

.price-unit {
    font-size: 18px;
    color: #666;
}

.info-tags {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.tag {
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
}

.info-detail, .info-desc {
    margin: 30px 0;
}

.info-detail h3, .info-desc h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.info-detail ul {
    list-style: none;
}

.info-detail li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.detail-sidebar {
    width: 300px;
}

.contact-card, .publisher-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.contact-card h3, .publisher-card h3 {
    margin-bottom: 15px;
}

.btn-contact {
    width: 100%;
    padding: 12px;
    background: #ff6600;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

/* Publish Page */
.publish-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
}

.publish-page h1 {
    margin-bottom: 30px;
    text-align: center;
}

.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #666;
}

.category-select {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.radio-card {
    display: block;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-card input {
    display: none;
}

.radio-card:hover {
    border-color: #ff6600;
}

.radio-card input:checked + span {
    color: #ff6600;
}

.radio-card input:checked ~ .radio-card {
    border-color: #ff6600;
    background: #fff5f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.upload-btn {
    display: inline-block;
    padding: 15px 30px;
    background: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-btn:hover {
    background: #e0e0e0;
}

.upload-btn span {
    display: block;
    margin-bottom: 5px;
}

.upload-btn small {
    color: #999;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.btn-submit, .btn-reset {
    padding: 12px 50px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit {
    background: #ff6600;
    color: white;
}

.btn-submit:hover {
    background: #ff7700;
}

.btn-reset {
    background: #f0f0f0;
    color: #333;
}

.btn-reset:hover {
    background: #e0e0e0;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .list-page {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .info-card {
        flex-direction: column;
    }
    
    .info-card img {
        width: 100%;
    }
    
    .detail-page {
        flex-direction: column;
    }
    
    .detail-sidebar {
        width: 100%;
    }
    
    .category-select {
        grid-template-columns: repeat(2, 1fr);
    }
}
