/* ===== tghao.com 风格 — 水平列表式商品布局 ===== */

/* 页面背景 */
body {
    background: #f5f6f8 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* 容器 */
.container.py-4 {
    padding-top: 16px !important;
    max-width: 1200px;
}

/* ===== 顶部导航 ===== */
.navbar-acg {
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    min-height: 56px;
    padding: 0 0;
}
.navbar-acg .navbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e !important;
}
.navbar-acg .navbar-brand img.brand-logo {
    max-height: 32px;
}
.navbar-acg .nav-link {
    color: #555 !important;
    font-size: 14px;
    padding: 18px 14px !important;
    transition: color 0.2s;
}
.navbar-acg .nav-link:hover,
.navbar-acg .nav-link.active {
    color: #1f5fbf !important;
}
.navbar-acg .nav-link .nav-icon {
    margin-right: 4px;
}

/* 搜索框 */
.search-input .input-group {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}
.search-input .input-group-text {
    background: transparent;
    border: none;
    color: #999;
    padding: 0 8px;
}
.search-input .form-control {
    border: none;
    box-shadow: none;
    font-size: 13px;
    background: transparent;
}
.search-input .form-control:focus {
    outline: none;
    box-shadow: none;
}

/* 登录按钮 */
.user-login-box .btn-outline-secondary {
    border-color: #e0e0e0;
    color: #555;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 13px;
}
.user-login-box .btn-primary {
    background: #1f5fbf;
    border-color: #1f5fbf;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 13px;
}
.user-login-box .btn-primary:hover {
    background: #0d47a1;
}

/* 用户头像 */
.user-info-box .btn-link {
    color: #333;
    font-size: 13px;
    text-decoration: none;
}
.user-info-box .dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: none;
}

/* ===== 公告面板 ===== */
.panel:first-of-type {
    background: #fff8e1;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    margin-bottom: 12px;
}
.panel:first-of-type .panel-header {
    padding: 10px 16px;
    border-bottom: 1px solid #ffeeba;
}
.panel:first-of-type .panel-body {
    padding: 8px 16px;
    font-size: 13px;
    color: #856404;
}

/* ===== 购买面板（商品区域） ===== */
.panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    margin-bottom: 16px;
    overflow: hidden;
}
.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-header .panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.panel-header .icon {
    color: #1f5fbf;
}
.panel-body {
    padding: 0;
}

/* ===== 分类标签 ===== */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
}
.chip-list .chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid transparent;
}
.chip-list .chip:hover {
    background: #e8f0fe;
    color: #1f5fbf;
}
.chip-list .chip.is-primary {
    background: #1f5fbf;
    color: #fff;
}
.chip-list .chip-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ===== 商品列表（水平行布局 - 仿 tghao） ===== */
.item-list {
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* 每一行商品 */
a.goods-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    position: relative;
}
a.goods-card:last-of-type {
    border-bottom: none;
}
a.goods-card:hover {
    background: #fafbfc;
    border-left-color: #1f5fbf;
}

/* 缩略图 */
a.goods-card .card-img {
    width: 36px;
    min-width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: #f0f4ff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #93c5fd;
}
a.goods-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
a.goods-card .card-img--empty {
    background: #f5f5f5;
    border-color: #e8e8e8;
    color: #ccc;
}

/* 卡片主体（标题 + 元数据行） */
a.goods-card .card-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 12px;
    padding: 0;
}

/* 商品标题 */
a.goods-card .card-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 400;
    color: #333;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
}

/* 右侧元数据（库存 + 价格，垂直排列） */
a.goods-card .goods-card__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    flex-shrink: 0;
    text-align: right;
}

/* 库存文字 */
a.goods-card .card-stats {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

/* 价格 */
a.goods-card .card-bottom {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
}
a.goods-card .price {
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
    white-space: nowrap;
}

/* 右箭头 */
a.goods-card .goods-card__arrow {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #cbd5e1;
    font-size: 14px;
    transition: transform 0.2s;
}
a.goods-card:hover .goods-card__arrow {
    color: #1f5fbf;
    transform: translateX(3px);
}

/* 售罄标签 */
.soldout-tag {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    background: #fee2e2;
    color: #dc2626;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* ===== 商品详情页 ===== */
.acg-cover {
    border-radius: 10px;
    overflow: hidden;
}
.item-cover {
    width: 100%;
    border-radius: 8px;
}
.item-detail {
    line-height: 1.8;
    font-size: 14px;
    color: #444;
    padding: 16px 18px !important;
}
.item-detail .panel-body {
    padding: 16px 18px;
}

/* 商品详情页的标签 */
.tags {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.badge-soft {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.badge-soft-success {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #bae7ff;
}
.badge-soft-info {
    background: #f0f5ff;
    color: #2f54eb;
    border: 1px solid #d6e4ff;
}

/* 商品详情页的价格 */
.abacus .price {
    font-size: 24px;
    font-weight: 700;
    color: #dc2626;
}

/* SKU选择 */
.sku-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sku-list .sku {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    background: #f5f5f5;
    color: #555;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.sku-list .sku.is-primary {
    background: #1f5fbf;
    color: #fff;
    border-color: #1f5fbf;
}
.sku-list .sku:hover {
    border-color: #1f5fbf;
}
.badge-money {
    font-size: 11px;
    opacity: 0.8;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .navbar-acg {
        padding: 6px 0;
        min-height: 48px;
    }
    a.goods-card {
        padding: 10px 12px;
    }
    a.goods-card .card-img {
        width: 30px;
        min-width: 30px;
        height: 30px;
    }
    a.goods-card .card-title {
        font-size: 13px;
    }
    a.goods-card .price {
        font-size: 14px;
    }
}
