/* 
 * FocusWell Metal Stamping - Modern Responsive Stylesheet
 * Optimized for SEO, Performance and Mobile Devices
 * Version: 2.1 - 2026
 */

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #808080;
    min-height: 100vh;
}

/* Main Container */
#outer {
    max-width: 1920px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #000;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header */
#hdr {
    background: #fff;
    text-align: center;
    padding: 0;
    overflow: visible;
    position: relative;
}

#hdr h1 {
    margin: 0;
    padding: 0;
    line-height: 1;
    overflow: hidden;
}

#hdr img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Banner Overlay Text */
.banner-text {
    position: absolute;
    left: 50%;
    top: 66%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    white-space: nowrap;
    letter-spacing: 1px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 30px;
    border-radius: 4px;
}

/* Navigation Bar */
#bar {
    background: linear-gradient(to bottom, #d0d0d0, #c0c0c0);
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 8px 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
}

#bar a {
    color: #333;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-weight: 500;
}

#bar a:hover, #bar a[aria-current="page"] {
    color: #0066cc;
    background: rgba(255,255,255,0.5);
}

/* Body Block - Main Layout */
#bodyblock {
    display: flex;
    flex-wrap: wrap;
    background: #dcdcdc;
    min-height: 500px;
}

/* Left Sidebar */
#l-col {
    width: 220px;
    background: #dcdcdc;
    padding: 15px 10px;
    flex-shrink: 0;
}

#l-col h1, #l-col h2, #l-col h3, #l-col h4 {
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #999;
}

#l-col ul {
    list-style: none;
    padding: 0;
}

#l-col li {
    margin-bottom: 8px;
}

#l-col a {
    display: block;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

#l-col a:hover {
    background: #fff;
    color: #0066cc;
    padding-left: 18px;
}


/* Main Content Area */
#cont {
    flex: 1;
    min-width: 0;
    background: #fff;
    padding: 25px 30px;
    border-left: 1px solid #000;
}

#cont h1, #cont h2 {
    color: #333;
    margin-bottom: 15px;
}

#cont p {
    margin-bottom: 15px;
    text-align: justify;
}

/* Product Tables */
#cont table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

#cont table td {
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #ddd;
}

#cont table img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

#cont table img:hover {
    transform: scale(1.05);
}

/* Footer */
#ftr {
    background: linear-gradient(to bottom, #d0d0d0, #c0c0c0);
    border-top: 1px solid #000;
    padding: 15px;
    text-align: center;
    color: #333;
    font-size: 0.9rem;
}

/* Links */
a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Contact Page Styles */
.contact-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet */
@media screen and (max-width: 1024px) {
    #outer {
        max-width: 100%;
        margin: 0;
        border-left: none;
        border-right: none;
    }
    
    #hdr img {
        max-height: 140px;
    }
    
    .banner-text {
        font-size: 1.4rem;
        padding: 10px 24px;
    }
    
    #l-col {
        width: 200px;
    }
    
    #cont {
        padding: 20px;
    }
}

/* Mobile - 768px */
@media screen and (max-width: 768px) {
    body {
        background: #fff;
    }
    
    #outer {
        border: none;
    }
    
    #hdr img {
        max-height: 120px;
    }
    
    .banner-text {
        font-size: 0.9rem;
        padding: 8px 16px;
        white-space: nowrap;
    }
    
    /* 导航栏 - 横向滚动 */
    #bar {
        padding: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    #bar::-webkit-scrollbar {
        display: none;
    }
    
    #bar a {
        padding: 12px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
        border-radius: 0;
        border-right: 1px solid rgba(0,0,0,0.1);
    }
    
    #bodyblock {
        flex-direction: column;
    }
    
    /* 侧边栏移到底部，折叠显示 */
    #l-col {
        width: 100%;
        order: 2;
        padding: 0;
        border-top: 1px solid #999;
        background: #f5f5f5;
    }
    
    #l-col h2 {
        margin: 0;
        padding: 15px;
        border-bottom: 1px solid #ddd;
        background: #e8e8e8;
        cursor: pointer;
        font-size: 1rem;
    }
    
    #l-col h2::after {
        content: " ▼";
        font-size: 0.7rem;
    }
    
    #l-col ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
        background: #ddd;
        max-height: 300px;
        overflow-y: auto;
    }
    
    #l-col li {
        margin: 0;
        background: #fff;
    }
    
    #l-col a {
        padding: 12px 15px;
        border-radius: 0;
        font-size: 0.85rem;
        border-bottom: none;
    }
    
    #l-col a:hover {
        padding-left: 15px;
        background: #f0f7ff;
    }
    
    /* 主内容区 */
    #cont {
        order: 1;
        border-left: none;
        padding: 20px 15px;
    }
    
    #cont h2 {
        font-size: 1.3rem;
    }
    
    #cont p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    /* 产品图片表格 - 改为网格 */
    #cont table {
        display: block;
        margin: 15px 0;
    }
    
    #cont table tbody {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    #cont table tr {
        display: contents;
    }
    
    #cont table td {
        padding: 8px;
        border: 1px solid #eee;
        border-radius: 6px;
        background: #fafafa;
    }
    
    #cont table td:empty {
        display: none;
    }
    
    /* Footer */
    #ftr {
        padding: 20px 15px;
        font-size: 0.8rem;
        line-height: 1.8;
    }
}


/* Mobile Small - 480px */
@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    #hdr img {
        max-height: 80px;
    }
    
    .banner-text {
        font-size: 0.7rem;
        padding: 6px 12px;
        letter-spacing: 0;
    }
    
    #bar a {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    #l-col ul {
        grid-template-columns: 1fr;
        max-height: 250px;
    }
    
    #l-col a {
        padding: 14px 15px;
    }
    
    #cont {
        padding: 15px 12px;
    }
    
    #cont h2 {
        font-size: 1.2rem;
    }
    
    #cont p {
        font-size: 0.9rem;
    }
    
    /* 产品图片 - 2列 */
    #cont table tbody {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #cont table td {
        padding: 6px;
    }
    
    #ftr {
        padding: 15px 10px;
        font-size: 0.75rem;
    }
}

/* Extra Small - 360px */
@media screen and (max-width: 360px) {
    #hdr img {
        max-height: 60px;
    }
    
    .banner-text {
        font-size: 0.6rem;
        padding: 5px 10px;
    }
    
    #bar a {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    #cont h2 {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: #fff;
    }
    
    #outer {
        border: none;
        box-shadow: none;
    }
    
    #bar, #l-col {
        display: none;
    }
    
    #cont {
        border: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
a:focus, button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0066cc;
    color: #fff;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}
