/* EDSpaces 2025 電子型錄專用樣式 */

/* 變數定義 */
:root {
    --edspace-primary: #1e40af;
    --edspace-secondary: #3b82f6;
    --edspace-accent: #f59e0b;
    --edspace-success: #10b981;
    --edspace-warning: #f59e0b;
    --edspace-danger: #ef4444;
    
    --edspace-bg-primary: #ffffff;
    --edspace-bg-secondary: #f8fafc;
    --edspace-bg-tertiary: #f1f5f9;
    --edspace-bg-dark: #0f172a;
    --edspace-bg-card: #1e293b;
    
    --edspace-text-primary: #0f172a;
    --edspace-text-secondary: #475569;
    --edspace-text-light: #64748b;
    --edspace-text-white: #ffffff;
    --edspace-text-muted: #94a3b8;
    
    --edspace-border: #e2e8f0;
    --edspace-border-light: #f1f5f9;
    --edspace-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --edspace-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --edspace-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --edspace-radius: 12px;
    --edspace-radius-lg: 16px;
    
    --edspace-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 基礎重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--edspace-font);
    line-height: 1.6;
    color: var(--edspace-text-primary);
    background-color: var(--edspace-bg-primary);
}

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

/* Header */
.edspace-header {
    background: linear-gradient(135deg, var(--edspace-primary) 0%, var(--edspace-secondary) 100%);
    color: var(--edspace-text-white);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--edspace-shadow-lg);
    backdrop-filter: blur(10px);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.brand-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--edspace-text-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.exhibition-title {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--edspace-text-white);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--edspace-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.language-selector select option {
    background: var(--edspace-primary);
    color: var(--edspace-text-white);
    padding: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--edspace-accent) 0%, #f97316 100%);
    color: var(--edspace-text-white);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(245, 158, 11, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(245, 158, 11, 0.3);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--edspace-bg-primary) 0%, var(--edspace-bg-tertiary) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h2 {
    font-size: 48px;
    font-weight: 700;
    color: var(--edspace-text-primary);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--edspace-text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    font-weight: 400;
}

.exhibition-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--edspace-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--edspace-text-primary);
}

.hero-image {
    text-align: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--edspace-radius-lg);
    box-shadow: var(--edspace-shadow-lg);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--edspace-text-primary);
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-subtitle {
    font-size: 18px;
    color: var(--edspace-text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

/* Company Section */
.company-section {
    padding: 80px 0;
    background: var(--edspace-bg-primary);
}

.company-content {
    max-width: 800px;
    margin: 0 auto;
}

.company-text p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--edspace-text-secondary);
    margin-bottom: 40px;
    text-align: center;
}

.company-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--edspace-bg-secondary);
    border-radius: var(--edspace-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--edspace-shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--edspace-primary);
    margin-bottom: 12px;
}

.feature-item p {
    font-size: 14px;
    color: var(--edspace-text-secondary);
    line-height: 1.6;
}

/* Products Section */
.products-section {
    padding: 80px 0;
    background: var(--edspace-bg-secondary);
}

.products-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--edspace-border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--edspace-primary);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--edspace-text-secondary);
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 16px;
    border: 2px solid var(--edspace-border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-btn.active,
.view-btn:hover {
    background: var(--edspace-primary);
    color: white;
    border-color: var(--edspace-primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.product-card {
    background: white;
    border-radius: var(--edspace-radius);
    overflow: hidden;
    box-shadow: var(--edspace-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--edspace-shadow-lg);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.view-btn-overlay {
    background: var(--edspace-accent);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.view-btn-overlay:hover {
    background: #d35400;
}

.product-content {
    padding: 24px;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.feature-tag {
    background: var(--edspace-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.product-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--edspace-text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.product-code {
    font-size: 14px;
    color: var(--edspace-text-secondary);
    margin-bottom: 12px;
}

.product-description {
    font-size: 14px;
    color: var(--edspace-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* List View */
.products-grid.list-view .product-card {
    display: flex;
    height: 200px;
}

.products-grid.list-view .product-image {
    width: 200px;
    height: 100%;
    flex-shrink: 0;
}

.products-grid.list-view .product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Loading and No Products */
.loading-indicator,
.no-products {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--edspace-border);
    border-top: 4px solid var(--edspace-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.no-products-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 24px;
    color: var(--edspace-text-secondary);
    margin-bottom: 12px;
}

.no-products p {
    color: var(--edspace-text-light);
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--edspace-primary) 0%, var(--edspace-secondary) 100%);
    color: var(--edspace-text-white);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="contactGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23contactGrid)"/></svg>');
    opacity: 0.3;
}

.contact-section .section-header h2,
.contact-section .section-header .section-subtitle {
    color: var(--edspace-text-white);
    position: relative;
    z-index: 1;
}

.contact-section .section-header h2 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.contact-section .section-header .section-subtitle {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--edspace-radius-lg);
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.contact-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--edspace-text-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.contact-details p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.contact-details a {
    color: var(--edspace-text-white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-details a:hover {
    color: var(--edspace-accent);
    text-decoration: underline;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Footer */
.edspace-footer {
    background: var(--edspace-bg-dark);
    color: var(--edspace-text-white);
    padding: 40px 0 20px;
    position: relative;
    overflow: hidden;
}

.edspace-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerGrid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23footerGrid)"/></svg>');
    opacity: 0.5;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.footer-links a {
    color: var(--edspace-text-white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer-links a:hover {
    color: var(--edspace-accent);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--edspace-radius-lg);
    max-width: 1000px;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--edspace-shadow-lg);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    z-index: 1;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.modal-body {
    padding: 40px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-text h2 {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .products-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid.list-view .product-card {
        flex-direction: column;
        height: auto;
    }
    
    .products-grid.list-view .product-image {
        width: 100%;
        height: 200px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-text h2 {
        font-size: 28px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .company-features {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        padding: 20px 15px;
    }
}
