:root {
    --primary-color: #4d904d;
    --primary-light: #7bb57b;
    --primary-dark: #356935;
    --secondary-color: #ff9800;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --error-color: #e74c3c;
    --success-color: #27ae60;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 標頭樣式 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-color);
}

.user-actions {
    display: flex;
    align-items: center;
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin-right: 10px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

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

.btn-block {
    display: block;
    width: 100%;
}

.btn-light {
    background-color: white;
    color: var(--primary-color);
    padding: 12px 24px;
    font-size: 16px;
}

.btn-light:hover {
    background-color: #f0f0f0;
}

/* 主橫幅 */
.hero-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    text-align: center;
    margin-bottom: 50px;
}

.hero-banner h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-banner p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
}

.hero-search {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
}

.hero-search input {
    flex: 1;
    padding: 18px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.hero-search button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

/* 類別區塊 */
.categories {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: var(--primary-dark);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.category-item {
    background-color: white;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-light);
    color: white;
}

.category-item:hover .category-name {
    color: white;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 10px;
}

.category-count {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.category-item:hover .category-count {
    color: rgba(255, 255, 255, 0.8);
}

/* 熱門廢品 */
.featured-products {
    padding: 50px 0;
}

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

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

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

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.product-content {
    padding: 20px;
}

.product-badge {
    background-color: #ff6b6b;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.product-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.4;
}

.product-spec {
    color: #666;
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-origin {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-supplier {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.4;
}

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

.btn-detail {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-detail:hover {
    background-color: var(--primary-dark);
}

.btn-quote {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-quote:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 平台優勢 */
.platform-advantages {
    background-color: var(--light-gray);
    padding: 70px 0;
    margin: 50px 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px;
}

.advantage-item {
    text-align: center;
    padding: 25px;
}

.advantage-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.advantage-title {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

/* 行動呼籲 */
.cta-section {
    background-color: var(--primary-color);
    color: white;
    padding: 70px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 25px;
}

.cta-section p {
    max-width: 800px;
    margin: 0 auto 35px;
    font-size: 20px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* 模態框 */
.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: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* 表單樣式 */
.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 var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 警告訊息 */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #ffeaea;
    color: var(--error-color);
    border: 1px solid #ffcdd2;
}

.alert-success {
    background-color: #e8f5e9;
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

/* 狀態標籤 */
.status-active {
    color: var(--success-color);
    font-weight: 500;
}

.status-inactive {
    color: #666;
}

.status-pending {
    color: #f39c12;
}

.status-sold, .status-fulfilled {
    color: #3498db;
}

.status-expired {
    color: #95a5a6;
}

.status-rejected {
    color: var(--error-color);
}

/* 頁腳樣式 */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 50px 0 25px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
}

.footer-column h3 {
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

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

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #aaa;
}

/* 在現有的頁腳樣式基礎上添加 */

/* 聯繫信息圖標對齊 */
.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.contact-info i {
    width: 20px;
    margin-right: 10px;
    color: var(--secondary-color);
}

/* 社交媒體圖標 */
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* 頁腳底部佈局 */
.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}



/* 響應式設計 */
@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 900px;
        margin: 0 auto;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
    }
    
    .nav-menu li {
        margin: 5px 15px 5px 0;
    }
    
    .user-actions {
        margin-top: 15px;
    }
    
    .hero-banner {
        padding: 80px 0;
    }
    
    .hero-banner h2 {
        font-size: 32px;
    }
    
    .hero-banner p {
        font-size: 18px;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 220px;
        margin-bottom: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-search {
        flex-direction: column;
    }
    
    .hero-search input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .hero-search button {
        border-radius: 4px;
        padding: 12px;
    }
}