/* ========================================
   Theme9 - Clean Professional Light Theme
   Teal/Cyan Primary, Modern Card-Based
   ======================================== */

/* 1. CSS Custom Properties */
:root {
    --t9-primary: #0D9488;
    --t9-primary-light: #14B8A6;
    --t9-primary-dark: #0F766E;
    --t9-accent: #F59E0B;
    --t9-text: #1E293B;
    --t9-text-secondary: #64748B;
    --t9-text-light: #94A3B8;
    --t9-bg-body: #F8FAFC;
    --t9-bg-card: #FFFFFF;
    --t9-bg-alt: #F1F5F9;
    --t9-border: #E2E8F0;
    --t9-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --t9-shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --t9-shadow-lg: 0 12px 24px rgba(0,0,0,0.08);
    --t9-radius: 12px;
    --t9-radius-sm: 8px;
    --t9-radius-lg: 20px;
    --t9-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --t9-footer-bg: #0F172A;
    --t9-footer-text: #CBD5E1;
    --t9-header-h: 68px;
}

/* 2. 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(--t9-font);
    color: var(--t9-text);
    background: var(--t9-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(--t9-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--t9-primary-dark);
}
ul, ol {
    list-style: none;
}
table {
    border-collapse: collapse;
    width: 100%;
}

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

/* 4. Layout */
.t9-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.t9-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.t9-section {
    padding: 56px 0;
}
.t9-section-alt {
    background: var(--t9-bg-alt);
    padding: 56px 0;
}

/* 5. Header */
.t9-header {
    background: var(--t9-bg-card);
    box-shadow: var(--t9-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--t9-header-h);
    border-bottom: 1px solid var(--t9-border);
}
.t9-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.t9-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--t9-primary);
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}
.t9-logo:hover {
    color: var(--t9-primary-dark);
}

/* 6. Navigation */
.t9-nav ul {
    display: flex;
    gap: 6px;
    align-items: center;
}
.t9-nav a {
    display: block;
    padding: 10px 18px;
    border-radius: var(--t9-radius-sm);
    color: var(--t9-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}
.t9-nav a:hover {
    background: var(--t9-bg-alt);
    color: var(--t9-text);
}
.t9-nav a.active {
    background: var(--t9-primary);
    color: #fff;
}

/* 7. Mobile Menu (CSS-only checkbox hack) */
.t9-menu-toggle {
    display: none;
}
.t9-menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    position: relative;
    z-index: 101;
}
.t9-menu-btn span,
.t9-menu-btn span::before,
.t9-menu-btn span::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--t9-text);
    border-radius: 2px;
    position: absolute;
    transition: all 0.3s ease;
}
.t9-menu-btn span {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.t9-menu-btn span::before {
    content: '';
    top: -7px;
}
.t9-menu-btn span::after {
    content: '';
    top: 7px;
}

/* 8. Hero / Banner */
.t9-hero {
    padding: 40px 0;
}
.t9-hero-single {
    border-radius: var(--t9-radius-lg);
    overflow: hidden;
    position: relative;
    height: 360px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    box-shadow: var(--t9-shadow-lg);
}
.t9-hero-single a {
    display: block;
    width: 100%;
    padding: 24px 32px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 500;
    text-decoration: none;
}
.t9-hero-grid {
    display: grid;
    gap: 20px;
}
.t9-hero-grid.row-2 { grid-template-columns: repeat(2, 1fr); }
.t9-hero-grid.row-3 { grid-template-columns: repeat(3, 1fr); }
.t9-hero-grid.row-4 { grid-template-columns: repeat(4, 1fr); }
.t9-hero-item {
    border-radius: var(--t9-radius);
    overflow: hidden;
    background: var(--t9-bg-card);
    box-shadow: var(--t9-shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.t9-hero-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--t9-shadow-lg);
}
.t9-hero-item a {
    display: block;
    text-decoration: none;
}
.t9-hero-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.t9-hero-item span {
    display: block;
    padding: 14px 18px;
    color: var(--t9-text);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

/* 9. Section Titles */
.t9-section-title {
    margin-bottom: 36px;
}
.t9-section-title h2 {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--t9-text);
    position: relative;
}
.t9-section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--t9-primary);
    border-radius: 2px;
}
.t9-section-title h2 a {
    color: var(--t9-text);
    text-decoration: none;
}
.t9-section-title h2 a:hover {
    color: var(--t9-primary);
}

/* 10. Cards */
.t9-card {
    background: var(--t9-bg-card);
    border-radius: var(--t9-radius);
    box-shadow: var(--t9-shadow-md);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.t9-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--t9-shadow-lg);
}
.t9-card-body {
    padding: 24px;
}
.t9-card-flat {
    background: var(--t9-bg-card);
    border-radius: var(--t9-radius);
    box-shadow: var(--t9-shadow-md);
    padding: 36px;
}

/* 11. Info Grid / Contact */
.t9-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.t9-info-card {
    background: var(--t9-bg-card);
    border-radius: var(--t9-radius);
    box-shadow: var(--t9-shadow-md);
    padding: 36px;
}
.t9-info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--t9-primary);
    display: inline-block;
}
.t9-info-card h3 a {
    color: var(--t9-text);
    text-decoration: none;
}
.t9-info-card h3 a:hover {
    color: var(--t9-primary);
}
.t9-info-card p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--t9-text-secondary);
    word-wrap: break-word;
}
.t9-info-table {
    background: var(--t9-bg-card);
    border-radius: var(--t9-radius);
    box-shadow: var(--t9-shadow-md);
    padding: 36px;
}
.t9-info-table table {
    width: 100%;
}
.t9-info-table td {
    padding: 18px 24px;
    vertical-align: top;
    width: 50%;
}
.t9-info-table td.th {
    background: var(--t9-bg-alt);
    font-weight: 600;
    color: var(--t9-text);
    border-radius: var(--t9-radius-sm);
}
.t9-info-table td p {
    margin-bottom: 8px;
}

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

/* 13. Product Detail */
.t9-breadcrumb {
    padding: 18px 0;
    font-size: 0.85rem;
    color: var(--t9-text-light);
}
.t9-breadcrumb a {
    color: var(--t9-text-secondary);
    text-decoration: none;
}
.t9-breadcrumb a:hover {
    color: var(--t9-primary);
}
.t9-breadcrumb .t9-sep {
    margin: 0 10px;
    color: var(--t9-border);
}
.t9-detail-card {
    background: var(--t9-bg-card);
    border-radius: var(--t9-radius);
    box-shadow: var(--t9-shadow-md);
    padding: 44px;
    margin-bottom: 44px;
}
.t9-detail-card h1 {
    font-size: 1.65rem;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--t9-border);
}
.t9-detail-img {
    text-align: center;
    margin-bottom: 28px;
}
.t9-detail-img img {
    max-width: 100%;
    border-radius: var(--t9-radius-sm);
    margin: 0 auto;
}
.t9-detail-content {
    line-height: 1.9;
    color: var(--t9-text-secondary);
}
.t9-detail-content img {
    max-width: 100%;
    border-radius: var(--t9-radius-sm);
    margin: 14px 0;
}

/* 14. Forms / Message */
.t9-form-card {
    background: var(--t9-bg-card);
    border-radius: var(--t9-radius);
    box-shadow: var(--t9-shadow-md);
    padding: 44px;
}
.t9-form-card h2 {
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--t9-primary);
    display: inline-block;
}
.t9-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}
.t9-form-group {
    margin-bottom: 24px;
}
.t9-form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--t9-text);
    margin-bottom: 8px;
}
.t9-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--t9-border);
    border-radius: var(--t9-radius-sm);
    font-size: 0.9rem;
    font-family: var(--t9-font);
    color: var(--t9-text);
    background: var(--t9-bg-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.t9-input:focus {
    border-color: var(--t9-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    background: var(--t9-bg-card);
}
.t9-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--t9-border);
    border-radius: var(--t9-radius-sm);
    font-size: 0.9rem;
    font-family: var(--t9-font);
    color: var(--t9-text);
    background: var(--t9-bg-body);
    resize: vertical;
    min-height: 140px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.t9-textarea:focus {
    border-color: var(--t9-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    background: var(--t9-bg-card);
}
.t9-btn {
    display: inline-block;
    padding: 12px 36px;
    background: var(--t9-primary);
    color: #fff;
    border: none;
    border-radius: var(--t9-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--t9-font);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.t9-btn:hover {
    background: var(--t9-primary-dark);
    transform: translateY(-2px);
}
.t9-btn:active {
    transform: translateY(0);
}

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

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

/* 17. Footer */
.t9-footer {
    background: var(--t9-footer-bg);
    color: var(--t9-footer-text);
    padding: 48px 0 36px;
    margin-top: auto;
}
.t9-footer p {
    color: var(--t9-footer-text);
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.8;
}
.t9-footer a {
    color: var(--t9-footer-text);
    text-decoration: none;
    transition: color 0.2s;
}
.t9-footer a:hover {
    color: #fff;
}
.t9-footer-copyright {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.t9-footer-copyright a {
    color: rgba(255,255,255,0.6);
}
.t9-footer-copyright a:hover {
    color: #fff;
}

/* 18. Error Page */
.t9-error {
    text-align: center;
    padding: 100px 20px;
}
.t9-error h1 {
    font-size: 5rem;
    color: var(--t9-primary);
    margin-bottom: 20px;
}
.t9-error p {
    font-size: 1.15rem;
    margin-bottom: 28px;
}
.t9-error a {
    color: var(--t9-primary);
    font-weight: 600;
}

/* 19. Page Info */
.t9-page-info {
    font-size: 0.8rem;
    color: var(--t9-text-light);
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--t9-border);
}

/* 20. Module Wrapper */
.t9-module {
    margin-bottom: 48px;
}

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

/* ============================================
   Responsive
   ============================================ */

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

/* Mobile */
@media (max-width: 768px) {
    :root {
        --t9-header-h: 60px;
    }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }

    .t9-section,
    .t9-section-alt {
        padding: 36px 0;
    }

    /* Mobile menu button */
    .t9-menu-btn {
        display: block;
    }

    /* Side-slide mobile nav */
    .t9-nav {
        position: fixed;
        top: var(--t9-header-h);
        right: -300px;
        width: 300px;
        height: calc(100vh - var(--t9-header-h));
        background: var(--t9-bg-card);
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 200;
    }
    .t9-menu-toggle:checked ~ .t9-nav {
        right: 0;
    }
    .t9-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 16px;
    }
    .t9-nav a {
        padding: 14px 18px;
        border-radius: var(--t9-radius-sm);
    }

    /* Hamburger → X animation */
    .t9-menu-toggle:checked ~ .t9-menu-btn span {
        background: transparent;
    }
    .t9-menu-toggle:checked ~ .t9-menu-btn span::before {
        top: 0;
        transform: rotate(45deg);
    }
    .t9-menu-toggle:checked ~ .t9-menu-btn span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Overlay */
    .t9-menu-toggle:checked ~ .t9-nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.35);
        z-index: -1;
    }

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

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

/* Small mobile */
@media (max-width: 480px) {
    .t9-container {
        padding: 0 16px;
    }
    .t9-product-img {
        height: 180px;
    }
    .t9-hero-item img {
        height: 160px;
    }
}
