/* ===== 左侧浮动推荐商品 ===== */
.gk-rp-float {
    position: fixed;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    max-height: 70vh;
    z-index: 9999;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.gk-rp-float-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(135deg, #12314d 0%, #1a4d7a 100%);
    color: #fff;
    flex-shrink: 0;
}

.gk-rp-float-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.gk-rp-float-toggle {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.gk-rp-float-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.gk-rp-float-toggle svg {
    transition: transform 0.3s;
}

.gk-rp-collapsed .gk-rp-float-toggle svg {
    transform: rotate(180deg);
}

.gk-rp-float-body {
    overflow-y: auto;
    padding: 10px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.gk-rp-float-body::-webkit-scrollbar {
    width: 4px;
}

.gk-rp-float-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* 收起状态 */
.gk-rp-collapsed .gk-rp-float-body {
    display: none;
}

.gk-rp-collapsed {
    max-height: 48px;
}

/* ===== 商品卡片 ===== */
.gk-rp-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.25s ease;
}

.gk-rp-card:last-child {
    margin-bottom: 0;
}

.gk-rp-card:hover {
    background: #fff;
    border-color: #0d6aa8;
    box-shadow: 0 2px 12px rgba(13, 106, 168, 0.12);
    text-decoration: none;
    transform: translateY(-2px);
}

.gk-rp-card-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #e9ecef;
}

.gk-rp-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gk-rp-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.gk-rp-card-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #12314d;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gk-rp-card-desc {
    font-size: 11px;
    color: #6c7d8d;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gk-rp-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #e6162d;
    margin-top: 2px;
}

.gk-rp-card-price del {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

.gk-rp-card-price ins {
    text-decoration: none;
}

/* ===== 移动端适配（底部弹出） ===== */
.gk-rp-mobile {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: 45vh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.gk-rp-mobile .gk-rp-float-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px;
}

.gk-rp-mobile .gk-rp-card {
    flex-direction: column;
    text-align: center;
    margin-bottom: 0;
    padding: 8px;
}

.gk-rp-mobile .gk-rp-card-img {
    width: 100%;
    height: 80px;
    margin: 0 auto;
}

.gk-rp-mobile .gk-rp-card-name {
    font-size: 12px;
    -webkit-line-clamp: 1;
}

.gk-rp-mobile .gk-rp-card-desc {
    display: none;
}

/* 收起状态（移动端） */
.gk-rp-mobile.gk-rp-collapsed {
    max-height: 48px;
}

.gk-rp-mobile.gk-rp-collapsed .gk-rp-float-body {
    display: none;
}
