/* 基础样式重置与统一 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: #F2F3F5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.5;
    max-width: 640px;
    margin: 0 auto;
    padding-bottom: 76px;
}
.layui-container {
    padding: 0;
    margin: 0 auto;
    max-width: 640px;
}
a {
    text-decoration: none;
}

.yc-header {
    position: relative;
    z-index: 1001;
}

.yc-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top) + 10px) 12px 0;
    background: linear-gradient(180deg, rgba(242, 243, 245, 0.98) 0%, rgba(242, 243, 245, 0.9) 78%, rgba(242, 243, 245, 0) 100%);
    backdrop-filter: blur(10px);
}

.yc-header-shell {
    position: relative;
    overflow: hidden;
    padding: 11px 12px 12px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(22, 93, 255, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.yc-header-shell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #165DFF 0%, #73a9ff 100%);
}

.yc-header-shell::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -26px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(22, 93, 255, 0.05);
}

.yc-header-brand-row,
.yc-header-content {
    position: relative;
    z-index: 1;
}

.yc-header-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.yc-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.yc-header-logo {
    display: block;
    max-width: 140px;
    max-height: 32px;
}

.yc-header-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #165DFF;
    box-shadow: 0 0 0 6px rgba(22, 93, 255, 0.12);
    flex-shrink: 0;
}

.yc-header-brand-name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yc-header-badge {
    flex-shrink: 0;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(22, 93, 255, 0.08);
    color: #165DFF;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid rgba(22, 93, 255, 0.12);
}

.yc-header-content {
    padding-top: 0;
    padding-left: 20px;
}

.yc-header-subtitle {
    font-size: 12px;
    line-height: 1.55;
    color: #6b7280;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yc-footer {
    padding: 12px 12px 0px;
}

.yc-footer.is-goods-page {
    padding-bottom: 80px;
}

.yc-footer-inner {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 16px 16px 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
    border: 1px solid rgba(22, 93, 255, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.yc-footer-inner::after {
    content: '';
    position: absolute;
    right: -18px;
    bottom: -18px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(22, 93, 255, 0.05);
}

.yc-footer-brand,
.yc-footer-meta {
    position: relative;
    z-index: 1;
}

.yc-footer-brand {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.yc-footer-meta {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.8;
}

.yc-footer-meta a {
    color: #165DFF;
}

.yc-footer-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom) + 8px);
    max-width: 616px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(22, 93, 255, 0.1);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.yc-footer-item {
    flex: 1;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 14px;
    color: #6b7280;
    font-size: 10px;
    transition: all 0.2s ease;
}

.yc-footer-item i {
    font-size: 16px;
}

.yc-footer-item.active {
    background: linear-gradient(135deg, rgba(22, 93, 255, 0.14), rgba(90, 166, 255, 0.18));
    color: #165DFF;
    font-weight: 600;
}

@media (max-width: 360px) {
    .yc-header-fixed {
        padding-left: 10px;
        padding-right: 10px;
    }

    .yc-header-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .yc-header-brand-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .yc-header-badge {
        align-self: flex-start;
    }

    .yc-header-title {
        font-size: 20px;
    }

    .yc-footer-nav {
        left: 10px;
        right: 10px;
    }
}

/* 分类导航样式优化 */
.category {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px 0 0;
    border-radius: 18px;
    margin-left: 0;
    margin-right: 0;
    border: 1px solid rgba(22, 93, 255, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.category-scroll-wrap {
    position: relative;
}
.category-scroll {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 14px 2px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.category-scrollbar {
    display: none;
    width: 30px;
    height: 6px;
    margin: 4px auto 8px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.14);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(22, 93, 255, 0.08);
}
.category-scrollbar.is-visible {
    display: block;
}
.category-scrollbar-thumb {
    display: block;
    width: 18px;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #165DFF 0%, #73a9ff 100%);
    box-shadow: 0 2px 6px rgba(22, 93, 255, 0.22);
    transform: translateX(0);
}
.category-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 72px;
    width: 72px;
    padding: 0;
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.category-item:hover {
    transform: translateY(-2px);
}
.category-item:hover .category-name {
    color: #165DFF;
}
.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 22px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    border: 1px solid rgba(22, 93, 255, 0.08);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}
.category-name {
    width: 100%;
    font-size: 12px;
    color: #4b5563;
    text-align: center;
    line-height: 1.35;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



@media (max-width: 360px) {
    .grid-cols-xs-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .category-scroll {
        gap: 6px;
        padding-left: 12px;
        padding-right: 12px;
    }
    .category-scrollbar {
        margin-bottom: 8px;
    }
    .category-item {
        flex-basis: 64px;
        width: 64px;
    }
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .category-name {
        font-size: 10px;
    }
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.text-gray {
    color: #999;
}

.layui-btn-group .layui-btn {
    margin: 0;
    border-radius: 0;
}
.layui-btn-group .layui-btn:first-child {
    border-radius: 4px 0 0 4px;
}
.layui-btn-group .layui-btn:last-child {
    border-radius: 0 4px 4px 0;
}

/* 搜索框优化 */
#searchBox {
    padding: 0 15px 12px;
}
.layui-input-group {
    position: relative;
    width: 100%;
}
.layui-input {
    border-radius: 5px;
    padding-left: 18px;
    height: 36px;
    border-color: #ccc;
}
.layui-input:focus {
    border-color: #165DFF;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}
.layui-input-group-addon {
    left: 0;
    border-radius: 20px 0 0 20px;
    background: transparent;
    border: none;
    width: 40px;
    padding: 0;
    color: #999;
}

/* 轮播图样式优化 */
.carousel {
    height: 190px;
    overflow: hidden;
    border-radius: 18px;
    padding: 0;
    margin: 0 0 10px;
    border: 1px solid rgba(22, 93, 255, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}
.layui-carousel-ind {
    bottom: 12px !important;
}
.layui-carousel-ind li {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background-color: rgba(255,255,255,0.55);
}
.layui-carousel-ind li.layui-this {
    width: 22px;
    background-color: #fff;
    border-radius: 999px;
}

/* 分类导航样式优化 */
.category {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px 0 12px;
    border-radius: 18px;
    margin-left: 0;
    margin-right: 0;
    border: 1px solid rgba(22, 93, 255, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 6px;
    margin-bottom: 4px;
}
.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 22px;

}
.category-name {
    font-size: 12px;
    color: #4b5563;
}

/* 商品列表区域优化 */
.goods-section {
    padding: 15px 15px;
}
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}
.section-title h3 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}
.more-link {
    color: #165DFF;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.more-link i {
    margin-left: 3px;
    font-size: 16px;
}

/* 网格商品样式优化 */
.goods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.goods-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.goods-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.goods-img {
    height: 130px;
    position: relative;
}
.goods-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.goods-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    font-size: 12px;
    color: #fff;
    border-radius: 4px;
    z-index: 1;
}
.goods-info {
    padding: 14px 10px;
}
.goods-name {
    font-size: 14px;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1f2937;
    line-height: 1.55;
    font-weight: 600;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 44px;
}
.goods-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price {
    color: #F53F3F;
    font-weight: 600;
    font-size: 15px;
}
.original-price {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 5px;
}
.buy-btn {
    background-color: rgba(22, 93, 255, 0.1);
    color: #165DFF;
    border: none;
    font-size: 12px;
    transition: all 0.2s ease;

    padding: 0 10px;
    height: 26px;
    line-height: 26px;
    border-radius: 14px;

}
.buy-btn:hover {
    background-color: rgba(22, 93, 255, 0.2);
}

/* 列表商品样式优化 */
.goods-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.goods-row {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(22, 93, 255, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.goods-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}
.goods-row .goods-img {
    width: 96px;
    min-width: 96px;
    height: 96px;
    margin: 10px;
    border-radius: 16px;
    overflow: hidden;
    background: #eef4ff;
}
.goods-row .goods-img img {
    border-radius: 16px;
}
.goods-row .goods-info {
    width: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 12px 12px 0;
}
.goods-meta {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.goods-meta .star {
    color: #FF7D00;
    margin-right: 2px;
}
.goods-meta .sales {
    margin-left: 0;
}
.row-buy-btn {
    min-width: 86px;
    height: 34px;
    line-height: 34px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(22, 93, 255, 0.14);
    color: #165DFF;
    font-weight: 700;
}
.row-buy-btn:hover {
    background: linear-gradient(180deg, #e4efff 0%, #d3e3ff 100%);
    color: #0E55E6;
}

/* 加载更多按钮优化 */
.load-more {
    margin: 20px 0 30px;
    text-align: center;
}
.load-more-btn {
    background-color: #fff;
    color: #165DFF;
    border: 1px solid #165DFF;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.2s ease;
}
.load-more-btn:hover {
    background-color: rgba(22, 93, 255, 0.05);
}


/* 弹窗样式优化 */
.buy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}
.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.modal-header {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}
.close-modal {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.close-modal:hover {
    background-color: #f5f5f5;
    color: #666;
}
.modal-body {
    padding: 18px;
}
.modal-footer {
    padding: 16px 18px;
    border-top: 1px solid #f1f1f1;
    background-color: #fafafa;
    border-radius: 0 0 16px 16px;
}
.goods-detail {
    display: flex;
    margin-bottom: 18px;
}
.detail-img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}
.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.detail-name {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 16px;
    color: #333;
}
.detail-desc {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    line-height: 1.4;
}
.detail-price {
    color: #F53F3F;
    font-weight: 600;
    font-size: 17px;
}
.quantity-title, .payment-title {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: #333;
}
.quantity-control {
    display: flex;
    align-items: center;
    width: 130px;
}
.quantity-btn {
    width: 34px;
    height: 34px;
    background-color: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.quantity-btn:first-child {
    border-radius: 6px 0 0 6px;
}
.quantity-btn:last-child {
    border-radius: 0 6px 6px 0;
}
.quantity-btn:hover {
    background-color: #eee;
}
.quantity-input {
    width: 62px;
    height: 34px;
    text-align: center;
    border-top: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
    border-left: none;
    border-right: none;
    font-size: 15px;
}
.quantity-input:focus {
    outline: none;
}
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.payment-method {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.payment-method.active {
    border-color: #165DFF;
    background-color: rgba(22, 93, 255, 0.03);
}
.method-icon {
    font-size: 22px;
    margin-right: 12px;
}
.method-info {
    display: flex;
    align-items: center;
}
.method-name {
    font-size: 15px;
    color: #333;
}
.method-selected {
    color: #165DFF;
    display: none;
    font-size: 18px;
}
.payment-method.active .method-selected {
    display: block;
}
.total-amount {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-top: 8px;
}
.total-label {
    color: #666;
    font-size: 15px;
}
.total-price {
    color: #F53F3F;
    font-weight: 600;
    font-size: 20px;
}
.pay-btn {
    width: 100%;
    background-color: #165DFF;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease;
}
.pay-btn:hover {
    background-color: #0E4CD1;
}

/* 购物车徽章优化 */
.layui-badge-dot {
    top: 5px !important;
    right: 55px !important;
}

/* Coupon input */
.coupon-input-wrap {
    position: relative;
}
.coupon-input-wrap .coupon-input {
    padding-right: 86px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.coupon-input-wrap .coupon-input:focus {
    background: #fff;
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.15);
}
.coupon-input-wrap .coupon-input:disabled {
    background: #f1f3f5;
    color: #9aa3af;
    border-color: #e5e7eb;
}
.coupon-input-wrap .coupon-apply-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    line-height: 30px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(22, 93, 255, 0.12);
    color: #165DFF;
    border: 1px solid rgba(22, 93, 255, 0.35);
    box-shadow: 0 2px 6px rgba(22, 93, 255, 0.15);
}
.coupon-input-wrap .coupon-apply-btn:hover {
    background: #165DFF;
    color: #fff;
    box-shadow: 0 6px 14px rgba(22, 93, 255, 0.25);
}
.coupon-input-wrap .coupon-apply-btn.layui-btn-disabled,
.coupon-input-wrap .coupon-apply-btn:disabled {
    background: #f1f3f5;
    color: #9aa3af;
    border-color: #e5e7eb;
    box-shadow: none;
}
.coupon-change-link {
    margin-left: 6px;
    font-size: 12px;
    color: #165DFF;
    text-decoration: none;
    display: none;
}
.coupon-change-link:hover {
    text-decoration: underline;
}
.coupon-tip {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #F53F3F;
}
