/* templet3 首页 — 原创布局，不依赖其他模板样式 */

.t3-home { background: var(--t3-canvas, #f2f2f2); }

.t3-stage {
    padding: 16px 0 8px;
}

.t3-stage-grid {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 220px;
    gap: 12px;
    align-items: stretch;
}

/* 分类侧栏 */
.t3-cat-panel {
    background: #fff;
    border: 1px solid var(--t3-line, #e8e8e8);
    display: flex;
    flex-direction: column;
    min-height: 360px;
}
.t3-cat-head {
    background: var(--t3-accent, #d91f26);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.t3-cat-icon {
    width: 16px;
    height: 12px;
    border-top: 2px solid #fff;
    border-bottom: 2px solid #fff;
    box-shadow: 0 -5px 0 #fff, 0 5px 0 #fff;
    box-sizing: border-box;
}
.t3-cat-list {
    list-style: none;
    flex: 1;
    overflow: auto;
}
.t3-cat-item { position: relative; }
.t3-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    color: #333;
    font-size: 13px;
    border-bottom: 1px solid #f3f3f3;
}
.t3-cat-link i { color: #ccc; font-style: normal; }
.t3-cat-item:hover > .t3-cat-link,
.t3-cat-link:hover {
    background: #fff5f5;
    color: var(--t3-accent, #d91f26);
}
.t3-cat-flyout {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    z-index: 20;
    width: 220px;
    background: #fff;
    border: 1px solid var(--t3-line, #e8e8e8);
    box-shadow: 4px 4px 16px rgba(0,0,0,.08);
    padding: 10px;
}
.t3-cat-item:hover .t3-cat-flyout { display: grid; gap: 6px; }
.t3-cat-flyout a {
    display: block;
    padding: 6px 8px;
    color: #555;
    font-size: 13px;
}
.t3-cat-flyout a:hover { background: #f7f7f7; color: var(--t3-accent, #d91f26); }
.t3-cat-empty { padding: 20px; color: #999; font-size: 13px; }

/* Swiper 轮播 */
.t3-banner {
    min-width: 0;
    background: #ddd;
    overflow: hidden;
}
.t3-swiper,
.t3-swiper .swiper-slide {
    height: 100%;
    min-height: 360px;
}
.t3-slide {
    height: 100%;
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 40px 48px;
    color: #fff;
    position: relative;
}
.t3-slide-a {
    background:
        radial-gradient(circle at 78% 40%, rgba(255,255,255,.18), transparent 40%),
        linear-gradient(125deg, #5b2c6f 0%, #8e44ad 45%, #c0392b 100%);
}
.t3-slide-b {
    background:
        radial-gradient(circle at 70% 60%, rgba(255,255,255,.15), transparent 42%),
        linear-gradient(135deg, #0e6655 0%, #148f77 50%, #1abc9c 100%);
}
.t3-slide-c {
    background:
        radial-gradient(circle at 75% 35%, rgba(255,255,255,.2), transparent 38%),
        linear-gradient(120deg, #1a5276 0%, #2874a6 55%, #d35400 100%);
}
.t3-slide-copy { max-width: 360px; position: relative; z-index: 1; }
.t3-slide-tag {
    font-size: 13px;
    letter-spacing: 2px;
    opacity: .9;
    margin-bottom: 10px;
}
.t3-slide-copy h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 20px;
}
.t3-slide-cta {
    display: inline-block;
    padding: 10px 22px;
    background: #fff;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    border-radius: 2px;
}
.t3-slide-cta:hover { opacity: .92; color: #222; }
.t3-swiper .swiper-pagination-bullet { background: #fff; opacity: .55; }
.t3-swiper .swiper-pagination-bullet-active { opacity: 1; background: #fff; }
.t3-swiper .swiper-button-prev,
.t3-swiper .swiper-button-next {
    color: #fff;
    --swiper-navigation-size: 22px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,.25);
    border-radius: 50%;
}
.t3-swiper .swiper-button-prev:after,
.t3-swiper .swiper-button-next:after { font-size: 14px; font-weight: 700; }

/* 右侧登录 / 资讯 */
.t3-side-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 360px;
}
.t3-user-box {
    background: #f7f7f7;
    border: 1px solid var(--t3-line, #e8e8e8);
    padding: 16px 14px;
    flex: 1;
}
.t3-user-hello { font-size: 13px; color: #888; }
.t3-user-name {
    font-size: 16px;
    font-weight: 700;
    margin: 6px 0 14px;
    color: #222;
}
.t3-mini-login { display: flex; flex-direction: column; gap: 10px; }
.t3-mini-field {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2px;
    overflow: hidden;
}
.t3-mini-ico {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    position: relative;
}
.t3-ico-user::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    margin: -10px 0 0 -5px;
    border: 1.5px solid #999;
    border-radius: 50%;
}
.t3-ico-user::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 7px;
    margin: 2px 0 0 -7px;
    border: 1.5px solid #999;
    border-top: 0;
    border-radius: 0 0 8px 8px;
}
.t3-ico-key::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    width: 8px;
    height: 8px;
    border: 1.5px solid #999;
    border-radius: 50%;
}
.t3-ico-key::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 13px;
    width: 8px;
    height: 1.5px;
    background: #999;
    box-shadow: 4px 3px 0 0 #999, 4px -3px 0 0 #999;
}
.t3-mini-field input {
    flex: 1;
    border: 0;
    outline: 0;
    height: 34px;
    font-size: 13px;
    padding-right: 8px;
    min-width: 0;
}
.t3-side-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--t3-accent, #d91f26);
    color: #fff !important;
    border: 0;
    height: 38px;
    line-height: 38px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 2px;
    margin-top: 4px;
}
.t3-side-btn:hover { background: var(--t3-accent-dark, #b4151c); }
.t3-side-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}
.t3-side-link:hover { color: var(--t3-accent, #d91f26); }

.t3-promo-box {
    background: #fff;
    border: 1px solid var(--t3-line, #e8e8e8);
    padding: 12px 14px 10px;
}
.t3-promo-box h3 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
    border-left: 3px solid var(--t3-accent, #d91f26);
    padding-left: 8px;
}
.t3-promo-box ul { list-style: none; }
.t3-promo-box li {
    border-bottom: 1px dashed #eee;
    padding: 7px 0;
}
.t3-promo-box li:last-child { border-bottom: 0; }
.t3-promo-box a {
    display: block;
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.t3-promo-box a:hover { color: var(--t3-accent, #d91f26); }

/* 秒杀条 */
.t3-flash { padding: 18px 0 8px; }
.t3-flash-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--t3-accent, #d91f26);
    color: #fff;
    padding: 12px 18px;
    flex-wrap: wrap;
}
.t3-flash-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
}
.t3-flash-bolt {
    width: 14px;
    height: 22px;
    display: inline-block;
    background: #fff;
    clip-path: polygon(40% 0, 100% 0, 55% 45%, 85% 45%, 0 100%, 40% 52%, 15% 52%);
}
.t3-flash-slogan { font-size: 13px; opacity: .9; margin-left: auto; }
.t3-flash-timer {
    font-size: 13px;
    background: rgba(0,0,0,.18);
    padding: 4px 10px;
    border-radius: 2px;
}
.t3-flash-more { color: #fff; font-size: 13px; }
.t3-flash-more:hover { color: #fff; text-decoration: underline; }

.t3-flash-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background: #ebebeb;
    padding: 12px;
}
.t3-flash-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.t3-flash-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
    color: inherit;
}
.t3-flash-thumb {
    aspect-ratio: 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.t3-flash-thumb img { width: 100%; height: 100%; object-fit: cover; }
.t3-flash-info { padding: 10px; }
.t3-tag {
    display: inline-block;
    background: var(--t3-accent, #d91f26);
    color: #fff;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 2px;
    margin-bottom: 4px;
}
.t3-flash-info h3 {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    height: 38px;
    overflow: hidden;
    line-height: 1.45;
    margin-bottom: 6px;
}
.t3-price-line { display: flex; align-items: baseline; gap: 8px; }
.t3-price-line strong { color: var(--t3-accent, #d91f26); font-size: 16px; }
.t3-price-line del { color: #999; font-size: 12px; }
.t3-no-img { color: #bbb; font-size: 12px; }

/* 主题楼层三列 */
.t3-theme-floors { padding: 24px 0 32px; }
.t3-theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.t3-theme-block {
    background: #fff;
    border: 1px solid var(--t3-line, #e8e8e8);
    overflow: hidden;
}
.t3-theme-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: #fff;
}
.t3-theme-head h2 { font-size: 16px; font-weight: 700; }
.t3-theme-head a { color: rgba(255,255,255,.92); font-size: 12px; }
.t3-theme-head a:hover { color: #fff; text-decoration: underline; }
.t3-tone-cyan .t3-theme-head { background: #1aabb8; }
.t3-tone-forest .t3-theme-head { background: #3ca05a; }
.t3-tone-rose .t3-theme-head { background: #e36a8a; }
.t3-tone-amber .t3-theme-head { background: #d4891a; }
.t3-theme-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #eee;
}
.t3-theme-item {
    background: #fff;
    padding: 12px;
    text-align: center;
    color: #444;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.t3-theme-item:hover { color: var(--t3-accent, #d91f26); }
.t3-theme-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
}
.t3-theme-item span {
    font-size: 12px;
    line-height: 1.4;
    height: 34px;
    overflow: hidden;
}
.t3-theme-empty {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    color: #999;
    background: #fff;
    font-size: 13px;
}

/* 覆盖共用版块样式，仅作用于 templet3 */
.template-templet3 .home-section {
    padding: 22px 0;
    background: transparent;
}
.template-templet3 .home-flash-section,
.template-templet3 .home-group-section {
    background: transparent;
}
.template-templet3 .home-section-title {
    font-size: 20px;
}
.template-templet3 .title-badge {
    background: var(--t3-accent, #d91f26);
    border-radius: 2px;
}
.template-templet3 .home-product-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.template-templet3 .home-product-card {
    border: 1px solid #e5e5e5;
    border-radius: 0;
    box-shadow: none;
}
.template-templet3 .home-more-link:hover {
    color: var(--t3-accent, #d91f26);
}

@media (max-width: 1100px) {
    .t3-stage-grid {
        grid-template-columns: 180px minmax(0, 1fr);
    }
    .t3-side-panel { display: none; }
    .t3-flash-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    .t3-stage-grid { grid-template-columns: 1fr; }
    .t3-cat-panel { min-height: 0; max-height: 260px; }
    .t3-cat-flyout { display: none !important; }
    .t3-swiper,
    .t3-swiper .swiper-slide,
    .t3-slide { min-height: 220px; }
    .t3-slide { padding: 28px 24px; }
    .t3-slide-copy h2 { font-size: 26px; }
    .t3-flash-row { grid-template-columns: repeat(2, 1fr); }
    .t3-theme-grid { grid-template-columns: 1fr; }
    .template-templet3 .home-product-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .t3-flash-slogan { display: none; }
    .t3-flash-row { grid-template-columns: 1fr 1fr; }
}
