/* ========================================
   Theme6 - Modern Minimalist Card-Based Design
   Pure CSS (Flexbox/Grid), No Framework
   ======================================== */

/* 1. CSS Custom Properties */
:root {
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --accent: #10B981;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-body: #F9FAFB;
    --bg-card: #FFFFFF;
    --bg-section-alt: #F3F4F6;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --footer-bg: #1F2937;
    --footer-text: #D1D5DB;
    --header-height: 64px;
}

/* 2. CSS Reset / Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--primary-dark);
}
ul, ol {
    list-style: none;
}
table {
    border-collapse: collapse;
    width: 100%;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    line-height: 1.3;
    font-weight: 600;
}
h1 { font-size: 2rem; margin-bottom: 16px; }
h2 { font-size: 1.5rem; margin-bottom: 12px; }
h3 { font-size: 1.25rem; margin-bottom: 10px; }
h4 { font-size: 1.1rem; margin-bottom: 8px; }
p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.8;
}
b, strong { font-weight: 600; color: var(--text-primary); }

/* 4. Layout Utilities */
.t6-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.t6-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
.t6-section {
    padding: 48px 0;
}
.t6-section-alt {
    background: var(--bg-section-alt);
    padding: 48px 0;
}
.t6-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.t6-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.t6-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.t6-flex {
    display: flex;
    gap: 24px;
}
.t6-text-center { text-align: center; }

/* 5. Header / Navigation */
.t6-header-wrap {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}
.t6-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}
.t6-logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}
.t6-logo:hover {
    color: var(--primary-dark);
}
.t6-nav ul {
    display: flex;
    gap: 4px;
    align-items: center;
}
.t6-nav a {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}
.t6-nav a:hover {
    background: var(--bg-section-alt);
    color: var(--text-primary);
}
.t6-nav a.active {
    background: var(--primary);
    color: #fff;
}
/* Mobile nav toggle (CSS-only hamburger) */
.t6-nav-toggle-input {
    display: none;
}
.t6-nav-toggle-label {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}
.t6-nav-toggle-label span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* 6. Hero / Banner Section */
.t6-hero {
    padding: 40px 0;
}
.t6-hero-single {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    height: 320px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}
.t6-hero-single a {
    display: block;
    width: 100%;
    padding: 20px 28px;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
}
.t6-hero-grid {
    display: grid;
    gap: 16px;
}
.t6-hero-grid.row-2 { grid-template-columns: repeat(2, 1fr); }
.t6-hero-grid.row-3 { grid-template-columns: repeat(3, 1fr); }
.t6-hero-grid.row-4 { grid-template-columns: repeat(4, 1fr); }
.t6-hero-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}
.t6-hero-item a {
    display: block;
    text-decoration: none;
}
.t6-hero-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.t6-hero-item span {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
}

/* 7. Section Titles */
.t6-section-title {
    margin-bottom: 32px;
}
.t6-section-title h2 {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}
.t6-section-title h2 a {
    color: var(--text-primary);
    text-decoration: none;
}
.t6-section-title h2 a:hover {
    color: var(--primary);
}
.t6-section-title .t6-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 8. Cards */
.t6-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.t6-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.t6-card-body {
    padding: 24px;
}
.t6-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.t6-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.t6-card-title a {
    color: inherit;
    text-decoration: none;
}
.t6-card-title a:hover {
    color: var(--primary);
}
.t6-card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}
.t6-card-flat {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
}

/* 9. Company Info / Contact Modules */
.t6-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.t6-info-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
}
.t6-info-card h3 {
    font-size: 1.15rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.t6-info-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}
.t6-info-card h3 a:hover {
    color: var(--primary);
}
.t6-info-card p {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    word-wrap: break-word;
}
.t6-info-table {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 32px;
}
.t6-info-table .t6-section-title {
    margin-bottom: 24px;
}
.t6-info-table table {
    width: 100%;
}
.t6-info-table td {
    padding: 16px 20px;
    vertical-align: top;
    width: 50%;
}
.t6-info-table td.th {
    background: var(--bg-section-alt);
    font-weight: 600;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
}
.t6-info-table td p {
    margin-bottom: 8px;
}

/* 10. Product Grid */
.t6-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.t6-product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.t6-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.t6-product-card .t6-product-img {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.t6-product-card .t6-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.t6-product-card:hover .t6-product-img img {
    transform: scale(1.05);
}
.t6-product-card .t6-product-body {
    padding: 16px 20px;
}
.t6-product-card .t6-product-name {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.t6-product-card .t6-product-name a {
    color: var(--text-primary);
    text-decoration: none;
}
.t6-product-card .t6-product-name a:hover {
    color: var(--primary);
}
.t6-product-card .t6-product-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 11. Product Detail */
.t6-breadcrumb {
    padding: 16px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}
.t6-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}
.t6-breadcrumb a:hover {
    color: var(--primary);
}
.t6-breadcrumb .t6-sep {
    margin: 0 8px;
    color: var(--border-color);
}
.t6-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 40px;
    margin-bottom: 40px;
}
.t6-detail-card h1 {
    font-size: 1.6rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.t6-detail-img {
    text-align: center;
    margin-bottom: 24px;
}
.t6-detail-img img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 0 auto;
}
.t6-detail-content {
    line-height: 1.8;
    color: var(--text-secondary);
}
.t6-detail-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

/* 12. Forms / Message */
.t6-form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 40px;
}
.t6-form-card h2 {
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.t6-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.t6-form-group {
    margin-bottom: 20px;
}
.t6-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.t6-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.t6-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-card);
}
.t6-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-body);
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.t6-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-card);
}
.t6-btn {
    display: inline-block;
    padding: 10px 32px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.t6-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.t6-btn:active {
    transform: translateY(0);
}

/* 13. Pagination */
.t6-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 32px 0 8px;
    flex-wrap: wrap;
}
.t6-pagination li {
    display: inline-block;
}
.t6-pagination a,
.t6-pagination span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.t6-pagination a {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.t6-pagination a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.t6-pagination span {
    background: var(--primary);
    color: #fff;
}
.t6-pagination .t6-page-nav a {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 14. Friend Links */
.t6-links {
    padding: 24px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}
.t6-links span {
    font-weight: 600;
    color: var(--text-secondary);
}
.t6-links a {
    color: var(--text-light);
    margin: 0 4px;
    text-decoration: none;
}
.t6-links a:hover {
    color: var(--primary);
}

/* 15. Footer */
.t6-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 32px;
    margin-top: auto;
}
.t6-footer p {
    color: var(--footer-text);
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.8;
}
.t6-footer a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s;
}
.t6-footer a:hover {
    color: #fff;
}
.t6-footer-copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.t6-footer-copyright a {
    color: rgba(255,255,255,0.6);
}
.t6-footer-copyright a:hover {
    color: #fff;
}

/* 16. Error Page */
.t6-error {
    text-align: center;
    padding: 80px 20px;
}
.t6-error h1 {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 16px;
}
.t6-error p {
    font-size: 1.1rem;
    margin-bottom: 24px;
}
.t6-error a {
    color: var(--primary);
    font-weight: 600;
}

/* 17. Page Info */
.t6-page-info {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* 18. Content Module */
.t6-module {
    margin-bottom: 40px;
}

/* 19. Anti-scraping div (hidden) */
.t6-wrapper > div[class^="app-"] {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
}

/* 20. Responsive */

/* Tablet */
@media (max-width: 1024px) {
    .t6-product-grid,
    .t6-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .t6-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .t6-hero-grid.row-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    .t6-section,
    .t6-section-alt {
        padding: 32px 0;
    }

    /* Mobile nav */
    .t6-nav-toggle-label {
        display: flex;
    }
    .t6-nav {
        position: fixed;
        top: var(--header-height);
        right: -280px;
        width: 280px;
        height: calc(100vh - var(--header-height));
        background: var(--bg-card);
        box-shadow: -4px 0 12px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 200;
    }
    .t6-nav-toggle-input:checked ~ .t6-nav {
        right: 0;
    }
    .t6-nav-toggle-input:checked ~ .t6-nav-toggle-label span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .t6-nav-toggle-input:checked ~ .t6-nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }
    .t6-nav-toggle-input:checked ~ .t6-nav-toggle-label span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    .t6-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 12px;
    }
    .t6-nav a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }
    /* Mobile overlay */
    .t6-nav-toggle-input:checked ~ .t6-nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.3);
        z-index: -1;
    }

    /* Grid responsive */
    .t6-product-grid,
    .t6-grid-2,
    .t6-grid-3,
    .t6-grid-4,
    .t6-info-grid {
        grid-template-columns: 1fr;
    }
    .t6-hero-grid.row-2,
    .t6-hero-grid.row-3,
    .t6-hero-grid.row-4 {
        grid-template-columns: 1fr;
    }
    .t6-hero-single {
        height: 200px;
    }
    .t6-hero-item img {
        height: 160px;
    }
    .t6-form-row {
        grid-template-columns: 1fr;
    }
    .t6-card-flat,
    .t6-info-card,
    .t6-detail-card,
    .t6-form-card {
        padding: 20px;
    }
    .t6-info-table td {
        display: block;
        width: 100%;
    }

    /* Logo smaller */
    .t6-logo {
        font-size: 1.1rem;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .t6-container {
        padding: 0 16px;
    }
    .t6-product-card .t6-product-img,
    .t6-card-img {
        height: 160px;
    }
}
