@charset "utf-8";
/* ============================================================
   导航条购物车样式修复（navcart_fix）
   global.js 的 getShoppingCart/getCartCount 会把 #i_cart_info 内部
   重写为 car-btn / car-content 结构，该结构配套样式在 colipu_layout.css
   中且都带 #cart_container 前缀（仅供购物车页顶部），导航条内不匹配，
   导致数量紧贴文字、下拉空提示常显。这里为导航条（.yx_nav）补一套样式，
   沿用导航原有红/黄配色，仅改外观，不改任何业务逻辑。
   ============================================================ */

.yx_nav .cart_bd {
    float: right;
    position: relative;
    width: 150px;
    height: 30px;
}

/* 购物车按钮 */
.yx_nav .cart_bd .car-btn {
    display: block;
    padding: 0;
}
.yx_nav .cart_bd .car-btn a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    background: #e4393c;
    color: #fff;
    text-decoration: none;
    border-radius: 0;
    white-space: nowrap;
}
.yx_nav .cart_bd .car-btn a:hover {
    background: #d83235;
}

/* 购物车图标（白色） */
.yx_nav .cart_bd .icon-buy {
    flex: 0 0 18px;
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 5px;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1.6'/%3E%3Ccircle cx='18' cy='21' r='1.6'/%3E%3Cpath d='M2 3h3l2.4 12.2a1.5 1.5 0 0 0 1.5 1.2h8.7a1.5 1.5 0 0 0 1.5-1.2L21 7H6'/%3E%3C/svg%3E") center center / contain no-repeat;
}

/* “我的购物车 >” 文字 */
.yx_nav .cart_bd .car-btn a b {
    font-weight: normal;
    font-size: 13px;
    color: #fff;
    line-height: 1;
}

/* 数量角标：黄色胶囊 + 红字 */
.yx_nav .cart_bd .icon-num1 {
    flex: 0 0 auto;
    margin-left: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    line-height: 18px;
    text-align: center;
    font-style: normal;
    font-size: 12px;
    color: #e4393c;
    background: #FFBA00;
    border-radius: 9px;
}

/* 文字里已有 “>”，隐藏多余的三角图标 */
.yx_nav .cart_bd .icon-triangle1 {
    display: none;
}

/* 下拉内容：默认隐藏，悬停展开 */
.yx_nav .cart_bd .car-content {
    display: none;
    position: absolute;
    top: 30px;
    right: 0;
    width: 251px;
    background: #fff;
    border: 2px solid #FFBA00;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 10001;
}
.yx_nav .cart_bd:hover .car-content {
    display: block;
}
.yx_nav .cart_bd .car-content-block {
    display: block;
    height: 8px;
    background: #fff;
}

/* 空购物车提示 */
.yx_nav .cart_bd #cartlist {
    padding: 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    text-align: center;
}

/* ---- 下拉有商品时的列表布局（图片源 Small 实际可达 800px，必须强制约束尺寸） ---- */

/* “最新加入的商品”小标题 */
.yx_nav .cart_bd #cartlist .car-subtitle {
    padding: 2px 0 6px;
    font-size: 12px;
    color: #999;
    text-align: left;
}

/* 商品列表 */
.yx_nav .cart_bd #cartlist ul {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 288px;
    overflow-y: auto;
}
.yx_nav .cart_bd #cartlist ul li {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    text-align: left;
}
.yx_nav .cart_bd #cartlist ul li .pic_wrap {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    overflow: hidden;
}
.yx_nav .cart_bd #cartlist ul li .pic_wrap a,
.yx_nav .cart_bd #cartlist ul li .pic_wrap img {
    display: block;
    width: 58px !important;
    height: 58px !important;
    max-width: 58px;
    max-height: 58px;
    object-fit: cover;
}
.yx_nav .cart_bd #cartlist ul li .txt_wrap {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 8px;
}
.yx_nav .cart_bd #cartlist ul li .txt_wrap .name a {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    max-height: 2.8em;
    overflow: hidden;
    text-decoration: none;
}
.yx_nav .cart_bd #cartlist ul li .txt_wrap .action {
    margin-top: 6px;
    font-size: 12px;
    color: #e4393c;
}
.yx_nav .cart_bd #cartlist ul li .txt_wrap .action .price {
    color: #e4393c;
    font-weight: bold;
}
.yx_nav .cart_bd #cartlist ul li .txt_wrap .action .ride {
    margin: 0 2px;
    color: #999;
}
.yx_nav .cart_bd #cartlist ul li .txt_wrap .action .ride a {
    color: #316ac5;
    text-decoration: none;
}

/* 结算条 */
.yx_nav .cart_bd #cartlist dl {
    margin: 0;
    padding: 10px 0 2px;
    text-align: left;
}
.yx_nav .cart_bd #cartlist dl dt {
    margin-bottom: 8px;
    font-size: 12px;
    color: #333;
}
.yx_nav .cart_bd #cartlist dl dt .price {
    color: #e4393c;
    font-weight: bold;
}
.yx_nav .cart_bd #cartlist dl dd {
    margin: 0;
}
.yx_nav .cart_bd #cartlist dl dd .balance {
    display: block;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background: #e4393c;
    color: #fff;
    font-size: 14px;
    border-radius: 2px;
    text-decoration: none;
}
.yx_nav .cart_bd #cartlist dl dd .balance:hover {
    background: #d83235;
}
