/**
 * 淘宝客插件 - 商品卡片样式
 * 适配 Bootstrap 3 + Font Awesome
 */

/* ==================== 推荐面板 ==================== */
.taoke-recommend-panel {
    margin-top: 15px;
    border: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.taoke-panel-heading {
    background: linear-gradient(135deg, #ff6b35, #ff4444);
    border-bottom: none !important;
    padding: 10px 15px;
}

.taoke-panel-heading .panel-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.taoke-panel-heading .panel-title i {
    margin-right: 6px;
}

/* ==================== 商品列表 ==================== */
.taoke-goods-list {
    padding: 10px !important;
}

.taoke-goods-row {
    margin: 0 !important;
}

.taoke-goods-col {
    padding: 5px !important;
}

/* ==================== 商品卡片 ==================== */
.taoke-goods-card {
    display: block;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.25s ease;
    text-decoration: none !important;
}

.taoke-goods-card:hover {
    border-color: #ff6b35;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

/* ==================== 商品图片 ==================== */
.taoke-goods-img {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 */
    overflow: hidden;
    background: #f8f8f8;
}

.taoke-goods-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.taoke-goods-card:hover .taoke-goods-img img {
    transform: scale(1.05);
}

.taoke-coupon-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ff4444, #ff0000);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    z-index: 1;
}

/* ==================== 商品信息 ==================== */
.taoke-goods-info {
    padding: 8px 8px 10px;
}

.taoke-goods-title {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 0 6px;
}

.taoke-goods-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.taoke-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff4444;
    font-family: Arial, sans-serif;
}

.taoke-original-price {
    font-size: 12px;
    color: #bbb;
    text-decoration: line-through;
}

.taoke-coupon-info {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #ff4444;
    background: #fff5f5;
    border: 1px dashed #ffaaaa;
    border-radius: 3px;
    padding: 1px 6px;
}

.taoke-sales {
    margin-top: 4px;
    font-size: 11px;
    color: #999;
}

/* ==================== 侧边栏单列样式 ==================== */
.taoke-goods-col .taoke-goods-card {
    display: flex;
    flex-direction: row;
}

.taoke-goods-col .taoke-goods-img {
    width: 90px;
    min-width: 90px;
    padding-top: 0;
    height: 90px;
}

.taoke-goods-col .taoke-goods-img img {
    position: static;
    width: 100%;
    height: 100%;
}

.taoke-goods-col .taoke-goods-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ==================== 文章内嵌推荐（3列） ==================== */
.taoke-recommend-panel .col-xs-6.col-sm-4 {
    /* 文章底部3列布局 */
}

/* ==================== 加载状态 ==================== */
.taoke-loading {
    color: #999;
    font-size: 14px;
    padding: 30px 0;
}

.taoke-loading .fa-spinner {
    margin-right: 6px;
    color: #ff6b35;
}

/* ==================== 分类页专用样式 ==================== */

/* 分类头部 */
.taoke-category-header {
    background: linear-gradient(135deg, #ff6b35, #ff4444);
    padding: 20px 0;
    border-radius: 0;
    margin: 0;
}

.taoke-category-header .category-title {
    color: #fff;
    margin: 0 0 5px;
    font-size: 22px;
    font-weight: 700;
}

.taoke-category-header .category-title small {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 400;
}

.taoke-category-breadcrumb {
    margin: 8px 0 0;
    background: none;
    padding: 0;
}

.taoke-category-breadcrumb > li + li::before {
    color: rgba(255,255,255,0.6);
}

.taoke-category-breadcrumb a,
.taoke-category-breadcrumb .active {
    color: #fff;
    font-size: 12px;
}

.taoke-category-breadcrumb a:hover {
    text-decoration: underline;
}

/* 子分类标签栏 */
.taoke-subcategory-bar {
    background: #fff;
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #f5f5f5;
    overflow: hidden;
}

.taoke-subcategory-scroll {
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.taoke-subcategory-scroll::-webkit-scrollbar {
    display: none;
}

.taoke-sub-tag {
    display: inline-block;
    padding: 6px 18px;
    margin-right: 8px;
    font-size: 13px;
    color: #666;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.taoke-sub-tag:hover {
    color: #ff4444;
    border-color: #ffaaaa;
    text-decoration: none;
}

.taoke-sub-tag.active {
    background: linear-gradient(135deg, #ff6b35, #ff4444);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

/* 商品网格（4列） */
.taoke-goods-grid {
    min-height: 200px;
}

.taoke-goods-grid .taoke-goods-row {
    margin: 0 -5px;
}

.taoke-goods-grid .taoke-goods-col {
    padding: 5px;
}

/* 空状态 */
.taoke-empty {
    text-align: center;
    padding: 60px 20px;
    color: #ccc;
}

.taoke-empty .fa-box-open {
    font-size: 48px;
    margin-bottom: 12px;
}

.taoke-empty p {
    font-size: 14px;
    color: #999;
}

/* 加载更多按钮 */
.taoke-loadmore-btn {
    padding: 10px 50px;
    border-radius: 25px;
    font-size: 14px;
    margin-top: 15px;
    border: none;
    background: linear-gradient(135deg, #ff6b35, #ff4444);
}

.taoke-loadmore-btn:hover {
    background: linear-gradient(135deg, #ff5522, #ee3333);
}

.taoke-loadmore-btn i {
    margin-right: 5px;
}

/* 没有更多 */
.taoke-nomore-text {
    color: #ccc;
    font-size: 13px;
    display: block;
    padding: 15px 0;
}

/* ==================== 首页专用样式 ==================== */

/* 首页商品区块 */
.taoke-home-section {
    margin-bottom: 15px;
}

/* 分类图标导航 */
.taoke-category-nav-section {
    background: #fff;
    padding: 15px 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.taoke-cat-nav-row {
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.taoke-cat-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    padding: 8px 6px;
    width: 14.28%;
    min-width: 60px;
    transition: transform 0.2s;
}

.taoke-cat-nav-item:hover {
    transform: translateY(-2px);
    text-decoration: none !important;
}

.taoke-cat-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #ff6b35, #ff4444);
    color: #fff;
    font-size: 18px;
}

.taoke-cat-nav-item span {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

/* ==================== 响应式 ==================== */
@media (max-width: 767px) {
    .taoke-goods-col {
        padding: 3px !important;
    }

    .taoke-price {
        font-size: 16px;
    }

    .taoke-goods-title {
        font-size: 12px;
        height: 2.5em;
    }

    /* 移动端侧边栏也用卡片布局 */
    .taoke-goods-col .taoke-goods-card {
        display: block;
    }

    .taoke-goods-col .taoke-goods-img {
        width: 100%;
        min-width: auto;
        height: auto;
        padding-top: 100%;
    }

    .taoke-goods-col .taoke-goods-img img {
        position: absolute;
    }

    /* 移动端分类导航：7列变5列 */
    .taoke-cat-nav-item {
        width: 20%;
        padding: 6px 2px;
    }

    .taoke-cat-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .taoke-cat-nav-item span {
        font-size: 11px;
    }
}
