/* templet6 — 原创科仪/企业橙色商城皮肤（独立命名空间） */
:root {
    --t6-orange: #f07c1e;
    --t6-orange-dark: #d86812;
    --t6-dark: #2d2d2d;
    --t6-muted: #888;
    --t6-line: #e8e8e8;
    --t6-bg: #f4f4f4;
    --t6-white: #fff;
    --t6-max: 1200px;
}

* { box-sizing: border-box; }
body.t6-body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    color: #333;
    background: var(--t6-bg);
    font-size: 14px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.t6-wrap {
    width: min(100% - 32px, var(--t6-max));
    margin-inline: auto;
}

.t6-topbar {
    background: var(--t6-dark);
    color: #ddd;
    font-size: 12px;
}
.t6-topbar-inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.t6-topbar p { margin: 0; }
.t6-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.t6-topbar a:hover { color: #fff; }
.t6-hotline {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    background: var(--t6-orange);
    color: #fff !important;
    padding: 6px 16px;
    margin: -1px 0;
    line-height: 1.2;
    text-align: center;
}
.t6-hotline em {
    font-style: normal;
    font-size: 11px;
    opacity: .9;
}
.t6-hotline strong {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
}

.t6-header {
    background: var(--t6-white);
    border-bottom: 1px solid var(--t6-line);
    position: sticky;
    top: 0;
    z-index: 100;
}
.t6-header-inner {
    position: relative;
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.t6-logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--t6-dark);
    flex-shrink: 0;
}
.t6-logo span {
    background: linear-gradient(90deg, var(--t6-dark) 40%, var(--t6-orange) 40%, var(--t6-orange) 62%, var(--t6-dark) 62%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.t6-logo img { max-height: 48px; max-width: 180px; object-fit: contain; }
.t6-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0;
}
.t6-nav a {
    padding: 10px 14px;
    border-left: 1px solid #eee;
    text-align: center;
}
.t6-nav a:first-child { border-left: 0; }
.t6-nav a strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.t6-nav a small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: .08em;
    color: #aaa;
    text-transform: uppercase;
}
.t6-nav a:hover strong,
.t6-nav a.is-active strong { color: var(--t6-orange); }
.t6-nav a:hover small,
.t6-nav a.is-active small { color: var(--t6-orange); }
.t6-header-tools { display: flex; align-items: center; gap: 10px; }
.t6-tool {
    position: relative;
    padding: 8px 12px;
    border: 1px solid var(--t6-line);
    border-radius: 4px;
    font-size: 13px;
}
.t6-tool em {
    position: absolute;
    top: -6px; right: -6px;
    min-width: 16px; height: 16px;
    border-radius: 999px;
    background: var(--t6-orange);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
}
.t6-menu-btn {
    display: none;
    width: 38px; height: 38px;
    border: 0; background: transparent;
    flex-direction: column; justify-content: center; gap: 5px;
    cursor: pointer; padding: 8px;
}
.t6-menu-btn span { display: block; height: 2px; background: #333; }

.t6-main { min-height: 40vh; }
.t6-page { padding: 24px 0 40px; }

.t6-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: var(--t6-orange);
    color: #fff !important;
    border: 0;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
}
.t6-btn:hover { background: var(--t6-orange-dark); }
.t6-btn-dark {
    background: var(--t6-dark);
    color: #fff !important;
}
.t6-btn-dark:hover { background: #1a1a1a; }
.t6-btn[disabled] { opacity: .55; cursor: not-allowed; }
.t6-btn-outline {
    background: transparent;
    color: var(--t6-orange) !important;
    border: 1px solid var(--t6-orange);
}
.t6-btn-outline:hover { background: var(--t6-orange); color: #fff !important; }

.t6-section-title {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
}
.t6-section-title h2 {
    margin: 0;
    font-size: 28px;
    color: var(--t6-orange);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.t6-section-title h2::before,
.t6-section-title h2::after {
    content: "//";
    font-size: 18px;
    font-weight: 400;
    color: var(--t6-orange);
    opacity: .85;
    letter-spacing: -.05em;
}
.t6-section-title em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    letter-spacing: .2em;
    color: #bbb;
    font-size: 12px;
}
.t6-section-title-light h2 { color: #fff; }
.t6-section-title-light h2::before,
.t6-section-title-light h2::after { color: #fff; opacity: .7; }
.t6-section-title-light em { color: rgba(255,255,255,.55); }

.t6-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.t6-product-card {
    background: #fff;
    border: 1px solid var(--t6-line);
    transition: box-shadow .2s, transform .2s;
}
.t6-product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.t6-product-media {
    aspect-ratio: 1;
    background: #f7f7f7;
    overflow: hidden;
}
.t6-product-media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .3s;
}
.t6-product-card:hover .t6-product-media img { transform: scale(1.04); }
.t6-noimg {
    height: 100%; display: flex; align-items: center; justify-content: center; color: #bbb;
}
.t6-product-body { padding: 12px 14px 16px; }
.t6-product-body h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}
.t6-product-body strong { color: var(--t6-orange); font-size: 16px; }

.t6-footer {
    background: #1a1a1a;
    color: #aaa;
    margin-top: 40px;
}
.t6-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
    padding: 36px 0;
}
.t6-footer-col h4 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 14px;
}
.t6-footer-col ul { list-style: none; margin: 0; padding: 0; }
.t6-footer-col li { margin-bottom: 8px; font-size: 13px; }
.t6-footer-col a:hover { color: #fff; }
.t6-footer-bar {
    border-top: 1px solid #333;
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
}
.t6-footer-bar a { color: #888; }
.t6-footer-bar a:hover { color: #fff; }
.t6-footer-bar p { margin: 4px 0; }
.t6-mobile-bar {
    display: none;
    position: fixed; left: 0; right: 0; bottom: 0;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border-top: 1px solid var(--t6-line);
    height: 52px; z-index: 90;
}
.t6-mobile-bar a {
    display: flex; align-items: center; justify-content: center; font-size: 12px; color: #555;
}

/* utilities reused by cart/auth pages */
.section-title {
    font-size: 22px; margin: 0 0 20px; color: var(--t6-orange);
}
.btn, .btn-block {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 18px; background: var(--t6-orange); color: #fff !important;
    border: 0; border-radius: 2px; cursor: pointer;
}
.btn-block { width: 100%; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; color: #666; font-size: 13px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 2px; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: 0; border-color: var(--t6-orange);
}
.alert { padding: 12px 14px; border-radius: 2px; margin-bottom: 14px; }
.alert-success { background: #ecfdf5; color: #047857; }
.alert-error { background: #fef2f2; color: #b91c1c; }
.cart-empty { text-align: center; padding: 48px 16px; background: #fff; }
.cart-table-wrap { overflow-x: auto; background: #fff; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
    padding: 12px; border-bottom: 1px solid var(--t6-line); text-align: left; vertical-align: middle;
}
.cart-product-link { display: flex; align-items: center; gap: 12px; }
.cart-product-link img { width: 64px; height: 64px; object-fit: cover; }
.qty-control { display: inline-flex; border: 1px solid #ddd; }
.qty-btn { width: 32px; height: 32px; border: 0; background: #f7f7f7; cursor: pointer; }
.qty-input { width: 48px; height: 32px; border: 0; text-align: center; }
.cart-summary {
    margin-top: 16px; background: #fff; padding: 16px 20px;
    display: flex; justify-content: flex-end; align-items: center; gap: 16px; flex-wrap: wrap;
}
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card { background: #fff; border: 1px solid var(--t6-line); }
.product-card .thumb { aspect-ratio: 1; background: #f7f7f7; position: relative; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 12px; }
.product-card .price { color: var(--t6-orange); font-weight: 700; }
.no-thumb-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center; color: #bbb;
}
.template-templet6 .home-product-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.template-templet6 .home-product-thumb { aspect-ratio: 1; }
.template-templet6 .title-badge { background: var(--t6-orange); }

/* auth */
.t6-auth { max-width: 520px; margin: 28px auto 40px; }
.t6-auth-panel {
    background: #fff; border: 1px solid var(--t6-line); overflow: hidden;
}
.t6-auth-brand {
    padding: 24px 28px; background: var(--t6-dark); color: #fff;
}
.t6-auth-brand p { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; opacity: .7; }
.t6-auth-brand h2 { margin: 0 0 6px; font-size: 24px; }
.t6-auth-brand span { font-size: 13px; opacity: .8; }
.t6-auth-body { padding: 24px 28px 28px; }
.t6-auth-form { display: grid; gap: 14px; }
.t6-auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t6-auth-field label { display: block; margin-bottom: 6px; color: #666; font-size: 13px; }
.t6-auth-field label em { font-style: normal; color: #aaa; font-size: 12px; }
.t6-auth-field input {
    width: 100%; height: 40px; padding: 0 12px; border: 1px solid #ddd; border-radius: 2px;
}
.t6-auth-field input:focus { outline: 0; border-color: var(--t6-orange); }
.t6-auth-agreements { display: grid; gap: 10px; }
.t6-auth-check {
    display: flex !important; align-items: center; gap: 8px; margin: 0 !important;
    font-size: 13px; color: #555; cursor: pointer; font-weight: normal;
}
.t6-auth-check input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--t6-orange); }
.t6-auth-check a { color: var(--t6-orange); }
.t6-auth-submit {
    width: 100%; height: 44px; border: 0; background: var(--t6-orange); color: #fff;
    font-weight: 700; cursor: pointer;
}
.t6-auth-foot { margin: 18px 0 0; text-align: center; color: #888; font-size: 13px; }
.t6-auth-foot a { color: var(--t6-orange); font-weight: 600; }
.t6-auth-tip { margin: 0 0 12px; color: #888; font-size: 13px; }

@media (max-width: 1024px) {
    .t6-product-grid, .product-grid, .template-templet6 .home-product-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    body.t6-body { padding-bottom: 56px; }
    .t6-hotline { display: none; }
    .t6-menu-btn { display: flex; }
    .t6-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        background: #fff; border-bottom: 1px solid var(--t6-line);
        flex-direction: column; align-items: stretch;
    }
    .t6-header.is-nav-open .t6-nav { display: flex; }
    .t6-nav a { border-left: 0; border-bottom: 1px solid #f2f2f2; text-align: left; }
    .t6-product-grid, .product-grid, .template-templet6 .home-product-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .t6-mobile-bar { display: grid; }
    .t6-auth-row { grid-template-columns: 1fr; }
}
