/* ============================================
   迅睿CMS网店插件 - 网店样式文件
   基于实际HTML结构重构
   ============================================ */

/* ==================== 0. CSS重置 ==================== */
* {
    box-sizing: border-box;
}

.xr-body *,
.xr-body *:before,
.xr-body *:after {
    box-sizing: border-box;
}

.xr-body ul,
.xr-body ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.xr-body h1,
.xr-body h2,
.xr-body h3,
.xr-body h4,
.xr-body h5,
.xr-body h6 {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

.xr-body a {
    text-decoration: none;
}

.xr-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

.xr-body table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ==================== 1. 基础样式 ==================== */
.xr-body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 14px;
}

.xr-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.xr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

/* ==================== 2. 顶部导航栏 ==================== */
.xr-topbar {
    background-color: #e3e4e5;
    border-bottom: 1px solid #ddd;
    height: 30px;
    line-height: 30px;
    font-size: 12px;
}

.xr-topbar .xr-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xr-topbar-left {
    color: #999;
}

.xr-topbar-right {
    color: #999;
}

.xr-topbar-right a {
    color: #999;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s;
}

.xr-topbar-right a:hover {
    color: #e1251b;
}

/* ==================== 3. 主头部区域 ==================== */
.xr-header {
    background-color: #fff;
    border-bottom: 2px solid #e1251b;
    padding: 20px 0;
}

.xr-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.xr-logo {
    flex-shrink: 0;
}

.xr-logo .logo-img {
    height: 60px;
    max-width: 200px;
    display: block;
}

.xr-search {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.xr-search-form {
    display: flex;
}

.xr-search-box {
    display: flex;
    width: 100%;
    border: 2px solid #e1251b;
    border-radius: 2px;
    overflow: hidden;
}

.xr-search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
}

.xr-search-input::placeholder {
    color: #999;
}

.xr-search-btn {
    width: 80px;
    background-color: #e1251b;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xr-search-btn:hover {
    background-color: #c81623;
}

.xr-cart {
    flex-shrink: 0;
}

.xr-cart-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 2px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
}

.xr-cart-link:hover {
    color: #e1251b;
    border-color: #e1251b;
}

.xr-cart-text {
    margin: 0 5px;
}

.xr-cart-num {
    background-color: #e1251b;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
    min-width: 18px;
    text-align: center;
}

/* ==================== 4. 主导航菜单 ==================== */
.xr-navbar {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.xr-navbar-content {
    display: flex;
}

.xr-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.xr-nav-item {
    position: relative;
}

.xr-nav-link {
    display: block;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.xr-nav-item:hover .xr-nav-link,
.xr-nav-active .xr-nav-link {
    color: #e1251b;
}

.xr-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.xr-nav-item:hover .xr-dropdown {
    display: block;
}

.xr-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xr-dropdown-item {
    position: relative;
}

.xr-dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.xr-dropdown-link:hover,
.xr-dropdown-active .xr-dropdown-link {
    background-color: #f5f5f5;
    color: #e1251b;
}

.xr-dropdown-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}

.xr-dropdown-item:hover .xr-dropdown-submenu {
    display: block;
}

.xr-dropdown-sublink {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
}

.xr-dropdown-sublink:hover,
.xr-dropdown-active .xr-dropdown-sublink {
    background-color: #f5f5f5;
    color: #e1251b;
}

/* ==================== 5. 主内容区域 ==================== */
.xr-main-content {
    flex: 1;
    padding: 20px 0;
    background-color: #f5f5f5;
    min-height: 400px;
}

/* ==================== 6. 面包屑导航 ==================== */
.xr-breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #999;
}

.xr-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.xr-breadcrumb a:hover {
    color: #e1251b;
}

.xr-breadcrumb-sep {
    margin: 0 8px;
    color: #ccc;
}

/* ==================== 7. 首页轮播图区域 ==================== */
.xr-banner-section {
    background-color: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.xr-banner-section .xr-container {
    padding: 0 15px;
    max-width: 1200px;
}

/* Swiper 轮播图容器 */
.xr-banner-section .swiper-container {
    width: 100%;
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.xr-banner-section .swiper-container.card {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.xr-banner-section .swiper-wrapper {
    height: 100%;
}

.xr-banner-section .swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.xr-banner-section .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.xr-banner-section .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.xr-banner-section .swiper-slide:hover img {
    transform: scale(1.05);
}

/* Swiper 分页器样式 */
.xr-banner-section .swiper-pagination {
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%);
    width: auto !important;
}

.xr-banner-section .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5) !important;
    opacity: 1 !important;
    margin: 0 4px;
    border-radius: 50%;
    transition: all 0.3s;
    cursor: pointer;
}

.xr-banner-section .swiper-pagination-bullet-active {
    background-color: #e1251b !important;
    width: 24px;
    border-radius: 6px;
    opacity: 1 !important;
}

/* 覆盖 Swiper 默认颜色 */
.xr-banner-section .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #e1251b !important;
    opacity: 1 !important;
}

/* Swiper 导航按钮样式 */
.xr-banner-section .swiper-button-next,
.xr-banner-section .swiper-button-prev {
    width: 44px;
    height: 44px;
    background-color: rgba(255,255,255,0.95);
    border-radius: 50%;
    color: #666;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-top: -22px;
    opacity: 0;
}

.xr-banner-section:hover .swiper-button-next,
.xr-banner-section:hover .swiper-button-prev {
    opacity: 1;
}

.xr-banner-section .swiper-button-next:after,
.xr-banner-section .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    line-height: 44px;
}

.xr-banner-section .swiper-button-next:hover,
.xr-banner-section .swiper-button-prev:hover {
    background-color: #e1251b;
    color: #fff;
    box-shadow: 0 2px 12px rgba(225,37,27,0.4);
}

.xr-banner-section .swiper-button-next:hover:after,
.xr-banner-section .swiper-button-prev:hover:after {
    color: #fff !important;
}

.xr-banner-section .swiper-button-next {
    right: 20px;
}

.xr-banner-section .swiper-button-prev {
    left: 20px;
}

.xr-banner-section .swiper-button-next.swiper-button-disabled,
.xr-banner-section .swiper-button-prev.swiper-button-disabled {
    opacity: 0.35;
    cursor: auto;
    pointer-events: none;
}

/* 覆盖 Swiper 默认主题色 */
.xr-banner-section .swiper-container .swiper-pagination-bullet-active {
    background: #e1251b !important;
    opacity: 1 !important;
}

.xr-banner-section .swiper-container .swiper-button-next,
.xr-banner-section .swiper-container .swiper-button-prev {
    color: #333 !important;
}

.xr-banner-section .swiper-container .swiper-button-next:hover,
.xr-banner-section .swiper-container .swiper-button-prev:hover {
    background-color: #e1251b !important;
    color: #fff !important;
}

.xr-banner-section .swiper-container .swiper-button-next:after,
.xr-banner-section .swiper-container .swiper-button-prev:after {
    color: #333 !important;
}

.xr-banner-section .swiper-container .swiper-button-next:hover:after,
.xr-banner-section .swiper-container .swiper-button-prev:hover:after {
    color: #fff !important;
}

/* 轮播图响应式 */
@media (max-width: 768px) {
    .xr-banner-section {
        padding: 10px 0;
    }
    
    .xr-banner-section .xr-container {
        padding: 0 10px;
    }
    
    .xr-banner-section .swiper-container {
        height: 250px;
        border-radius: 4px;
    }
    
    .xr-banner-section .swiper-button-next,
    .xr-banner-section .swiper-button-prev {
        width: 36px;
        height: 36px;
        margin-top: -18px;
        opacity: 0.8;
    }
    
    .xr-banner-section .swiper-button-next:after,
    .xr-banner-section .swiper-button-prev:after {
        font-size: 14px;
        line-height: 36px;
    }
    
    .xr-banner-section .swiper-button-next {
        right: 10px;
    }
    
    .xr-banner-section .swiper-button-prev {
        left: 10px;
    }
    
    .xr-banner-section .swiper-pagination {
        bottom: 10px !important;
    }
    
    .xr-banner-section .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
    
    .xr-banner-section .swiper-pagination-bullet-active {
        width: 16px;
    }
}

@media (max-width: 480px) {
    .xr-banner-section .swiper-container {
        height: 200px;
    }
    
    .xr-banner-section .swiper-button-next,
    .xr-banner-section .swiper-button-prev {
        display: none; /* 小屏幕隐藏导航按钮 */
    }
}

/* ==================== 8. 首页商品列表 ==================== */

.xr-product-section {
    background-color: #fff;
    margin-bottom: 20px;
    padding: 20px 0;
    clear: both;
    overflow: hidden;
}

.xr-product-section .xr-container {
    padding: 0 15px;
}

.xr-section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1251b;
}

.xr-section-title {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.5;
    width: 100%;
}

.xr-section-title h2 {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    font-size: 20px;
    font-weight: normal;
}

/* 如果h2直接是标题 */
h2.xr-section-title {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    font-size: 20px;
    font-weight: normal;
    line-height: 1.5;
}

.xr-section-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background-color: #e1251b;
    color: #fff;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 14px;
}

.xr-section-link {
    color: #333;
    text-decoration: none;
    margin-right: auto;
    transition: color 0.3s;
}

.xr-section-link:hover {
    color: #e1251b;
}

.xr-section-more {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.xr-section-more:hover {
    color: #e1251b;
}

.xr-product-list {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
    width: calc(100% + 20px);
}

.xr-product-item {
    width: calc(25% - 20px);
    margin: 10px;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
    float: none;
    display: block;
}

.xr-product-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border: 1px solid #e1251b;
}

.xr-product-box {
    position: relative;
}

.xr-product-img {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
    display: block;
}

.xr-product-img a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.xr-product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.xr-product-item:hover .xr-product-img img {
    transform: scale(1.05);
}

.xr-product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.xr-product-item:hover .xr-product-overlay {
    opacity: 1;
}

.xr-product-rating {
    color: #ffa500;
    font-size: 12px;
}

.xr-product-actions {
    display: none !important;
    justify-content: center;
    gap: 10px;
}

.xr-action-btn {
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    background-color: rgba(255,255,255,0.95);
    color: #333;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.xr-action-btn:hover {
    background-color: #e1251b;
    color: #fff;
    border-color: #e1251b;
    box-shadow: 0 2px 12px rgba(225,37,27,0.4);
}

.xr-product-info {
    padding: 15px;
    background-color: #fff;
}

.xr-product-title {
    margin: 0 0 10px 0;
    font-size: 13px;
    font-weight: normal;
    min-height: 40px;
    overflow: hidden;
    line-height: 1.4;
}

.xr-product-title h3 {
    margin: 0;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.4;
}

.xr-product-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
    font-size: 16px;
}

.xr-product-title a:hover {
    color: #e1251b;
}

.xr-product-price {
    margin-bottom: 10px;
    line-height: 1.5;
}

.xr-price-current {
    color: #e1251b;
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
}

.xr-product-price .xr-price-current {
    color: #e1251b;
    font-size: 18px;
    font-weight: bold;
}

.xr-product-action {
    margin-top: 10px;
}

.xr-add-cart-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background-color: #e1251b;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.xr-add-cart-btn:hover {
    background-color: #c81623;
}

/* ==================== 8. 购物车页面 ==================== */
.xr-cart-page {
    background-color: #fff;
    padding: 20px 0;
}

.xr-cart-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1251b;
}

.xr-cart-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: normal;
}

.xr-cart-form {
    margin-top: 20px;
}

.xr-cart-table {
    margin-bottom: 20px;
    overflow-x: auto;
}

.xr-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.xr-table thead {
    background-color: #f5f5f5;
}

.xr-table th {
    padding: 15px;
    text-align: left;
    font-weight: normal;
    color: #666;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    vertical-align: top;
}

.xr-table-checkbox {
    vertical-align: top;
    padding-top: 12px;
}

.xr-table-checkbox .xr-checkbox {
    vertical-align: top;
    margin-top: 0;
}

.xr-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.xr-table-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.xr-product-name {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: normal;
}

.xr-product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.xr-product-name a:hover {
    color: #e1251b;
}

.xr-product-sku {
    margin: 5px 0;
    font-size: 12px;
    color: #999;
}

.xr-price-original {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
    margin-top: 5px;
}

.xr-price-info {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.xr-table-qty {
    position: relative;
}

.xr-table-qty input {
    width: 80px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* 购物车页面 Bootstrap TouchSpin 样式优化 - 确保按钮和输入框在同一行 */
.xr-table-qty .bootstrap-touchspin,
.xr-table-qty .bootstrap-touchspin-wrapper {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    width: auto;
    flex-direction: row;
}

.xr-table-qty .bootstrap-touchspin .input-group {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    width: auto;
    flex-direction: row;
}

.xr-table-qty .bootstrap-touchspin .input-group-btn {
    display: inline-block !important;
    width: auto;
    float: none;
    vertical-align: middle;
    position: relative;
}

.xr-table-qty .bootstrap-touchspin .input-group-btn-vertical {
    display: none !important; /* 隐藏垂直按钮布局 */
}

.xr-table-qty .bootstrap-touchspin .bootstrap-touchspin-down,
.xr-table-qty .bootstrap-touchspin .bootstrap-touchspin-up {
    display: inline-block !important;
    width: 28px;
    height: 30px;
    min-width: 28px;
    line-height: 28px;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
    text-align: center;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.3s;
    font-size: 12px;
    font-weight: bold;
}

.xr-table-qty .bootstrap-touchspin .bootstrap-touchspin-down {
    border-right: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    margin-right: -1px;
}

.xr-table-qty .bootstrap-touchspin .bootstrap-touchspin-up {
    border-left: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-left: -1px;
}

.xr-table-qty .bootstrap-touchspin .bootstrap-touchspin-down:hover,
.xr-table-qty .bootstrap-touchspin .bootstrap-touchspin-up:hover {
    background-color: #e1251b;
    color: #fff;
    border-color: #e1251b;
    z-index: 1;
}

.xr-table-qty .bootstrap-touchspin input.form-control,
.xr-table-qty .bootstrap-touchspin input[type="text"] {
    display: inline-block !important;
    width: 60px !important;
    min-width: 60px;
    margin: 0;
    border-radius: 0 !important;
    text-align: center;
    vertical-align: middle;
    position: relative;
    z-index: 0;
    padding: 5px !important;
}

/* 确保输入框在按钮中间 */
.xr-table-qty .bootstrap-touchspin .input-group-btn:first-child {
    order: 1;
}

.xr-table-qty .bootstrap-touchspin input {
    order: 2;
}

.xr-table-qty .bootstrap-touchspin .input-group-btn:last-child {
    order: 3;
}

.xr-total-price {
    color: #e1251b;
    font-size: 16px;
    font-weight: bold;
}

.xr-delete-btn {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.xr-delete-btn:hover {
    color: #e1251b;
}

.xr-cart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
    flex-wrap: wrap;
    gap: 15px;
}

.xr-cart-footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.xr-select-all {
    margin-left: 5px;
    font-size: 14px;
    padding-top: 5px;
}

.xr-cart-footer-left .xr-checkbox {
    padding-top: 0;
    margin-top: -10px;
}

.xr-cart-footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.xr-cart-summary {
    text-align: right;
}

.xr-summary-text {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.xr-summary-num {
    color: #e1251b;
    font-weight: bold;
}

.xr-summary-total {
    margin: 0;
    font-size: 18px;
}

.xr-total-amount {
    color: #e1251b;
    font-size: 24px;
    font-weight: bold;
}

/* ==================== 9. 按钮样式 ==================== */
.xr-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.xr-btn-delete {
    background-color: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.xr-btn-delete:hover {
    border-color: #e1251b;
    color: #e1251b;
}

.xr-btn-refresh {
    background-color: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.xr-btn-refresh:hover {
    border-color: #e1251b;
    color: #e1251b;
}

.xr-btn-checkout {
    background-color: #e1251b;
    color: #fff;
    padding: 12px 40px;
    font-size: 16px;
}

.xr-btn-checkout:hover {
    background-color: #c81623;
}

.xr-btn-buy {
    padding: 10px 30px;
    background-color: #e1251b;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.3s;
}

.xr-btn-buy:hover {
    background-color: #c81623;
}

/* ==================== 10. 复选框样式 ==================== */
.xr-checkbox {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.xr-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
    z-index: 1;
}

.xr-checkbox span {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border: 1px solid #ddd;
    border-radius: 2px;
    pointer-events: none;
    background-color: #fff;
}

.xr-checkbox input[type="checkbox"]:checked + span {
    background-color: #e1251b;
    border-color: #e1251b;
}

.xr-checkbox input[type="checkbox"]:checked + span:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* ==================== 11. 搜索页面 ==================== */
.xr-search-page {
    background-color: #fff;
    padding: 20px 0;
}

.xr-filter-section {
    background-color: #f5f5f5;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.xr-filter-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xr-filter-item {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.xr-filter-label {
    width: 100px;
    flex-shrink: 0;
    color: #666;
    font-size: 14px;
    padding-top: 5px;
}

.xr-filter-options {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.xr-filter-tag {
    padding: 5px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}

.xr-filter-tag:hover,
.xr-filter-active {
    background-color: #e1251b;
    color: #fff;
    border-color: #e1251b;
}

.xr-filter-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.xr-price-input {
    width: 100px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.xr-price-sep {
    color: #999;
}

.xr-price-btn {
    padding: 5px 15px;
    background-color: #e1251b;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.xr-price-btn:hover {
    background-color: #c81623;
}

.xr-search-input-box {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.xr-search-input-field {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 14px;
}

.xr-search-submit {
    padding: 8px 20px;
    background-color: #e1251b;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.xr-search-submit:hover {
    background-color: #c81623;
}

.xr-sort-bar {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.xr-sort-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.xr-sort-item {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.xr-sort-item:hover,
.xr-sort-active {
    background-color: #e1251b;
    color: #fff;
}

.xr-product-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

/* ==================== 12. 商品详情页 ==================== */
.xr-product-detail {
    background-color: #fff;
    padding: 20px 0;
}

.xr-product-main {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.xr-product-left {
    width: 400px;
    flex-shrink: 0;
    max-width: 400px;
}

.xr-product-images {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 20px;
}

.xr-product-main-img {
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.xr-product-main-img a {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    position: relative;
}

.xr-product-main-img img,
.xr-product-main-img #optima_zoom {
    width: 100%;
    max-width: 360px;
    max-height: 360px;
    height: auto;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    background-color: #fff;
    display: block;
    margin: 0 auto;
}

/* 确保图片放大插件也受尺寸限制 */
.xr-product-main-img .zoomContainer,
.xr-product-main-img .zoomWrapper {
    max-width: 360px !important;
    max-height: 360px !important;
}

.xr-product-main-img .zoomWindow {
    max-width: 500px !important;
    max-height: 500px !important;
}

.xr-product-thumbs {
    overflow: hidden;
}

.xr-thumb-list {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.xr-thumb-item {
    width: 80px;
    height: 80px;
    border: 2px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s;
}

.xr-thumb-item:hover,
.xr-thumb-item.active {
    border-color: #e1251b;
}

.xr-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xr-product-right {
    flex: 1;
    min-width: 300px;
}

.xr-product-info {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.xr-product-title {
    font-size: 24px;
    font-weight: normal;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.4;
}

.xr-product-rating-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

.xr-rating-box {
    color: #ffa500;
    font-size: 14px;
}

.xr-product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #999;
    flex-wrap: wrap;
}

.xr-meta-link {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.xr-meta-link:hover {
    color: #e1251b;
}

.xr-meta-sep {
    color: #ddd;
}

.xr-product-stats {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.xr-stat-item {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.xr-stat-value {
    color: #e1251b;
    font-weight: bold;
}

.xr-product-desc-short {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.xr-product-price-box {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #fff3f3;
    border-radius: 4px;
}

.xr-price-main {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.xr-price-label {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

.xr-price-current {
    color: #e1251b;
    font-size: 28px;
    font-weight: bold;
    margin-right: 10px;
}

.xr-tag-free {
    display: inline-block;
    padding: 4px 12px;
    background-color: #e1251b;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
    vertical-align: middle;
    line-height: 1.5;
}

.xr-price-promotion {
    margin-top: 10px;
    width: 100%;
}

.xr-promotion-text {
    color: #e1251b;
    font-size: 14px;
}

/* 兼容旧的包邮标签位置（如果存在） */
.xr-shipping-tag {
    display: inline-block;
    margin-left: 10px;
}

.xr-product-sku {
    margin-bottom: 25px;
}

.xr-sku-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    min-height: 40px;
}

.xr-sku-label {
    width: 100px;
    flex-shrink: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    padding-top: 0;
}

.xr-sku-options {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.xr-sku-btn {
    padding: 8px 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
    line-height: 1.5;
}

.xr-sku-btn:hover,
.xr-sku-active {
    border-color: #e1251b;
    color: #e1251b;
}

.xr-sku-value {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    padding-top: 0;
    display: inline-block;
}

.xr-sku-stock {
    color: #e1251b;
    font-weight: bold;
    line-height: 1.5;
    padding-top: 0;
    display: inline-block;
}

.xr-quantity-box {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.xr-quantity-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

/* Bootstrap TouchSpin 样式优化 - 确保按钮和输入框在同一行 */
.xr-quantity-box .bootstrap-touchspin,
.xr-quantity-box .bootstrap-touchspin-wrapper {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    width: auto;
    flex-direction: row;
}

.xr-quantity-box .bootstrap-touchspin .input-group {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    width: auto;
    flex-direction: row;
}

.xr-quantity-box .bootstrap-touchspin .input-group-btn {
    display: inline-block !important;
    width: auto;
    float: none;
    vertical-align: middle;
    position: relative;
}

.xr-quantity-box .bootstrap-touchspin .input-group-btn-vertical {
    display: none !important; /* 隐藏垂直按钮布局 */
}

.xr-quantity-box .bootstrap-touchspin .bootstrap-touchspin-down,
.xr-quantity-box .bootstrap-touchspin .bootstrap-touchspin-up {
    display: inline-block !important;
    width: 32px;
    height: 34px;
    min-width: 32px;
    line-height: 32px;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #666;
    text-align: center;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: bold;
}

.xr-quantity-box .bootstrap-touchspin .bootstrap-touchspin-down {
    border-right: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    margin-right: -1px;
}

.xr-quantity-box .bootstrap-touchspin .bootstrap-touchspin-up {
    border-left: none;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-left: -1px;
}

.xr-quantity-box .bootstrap-touchspin .bootstrap-touchspin-down:hover,
.xr-quantity-box .bootstrap-touchspin .bootstrap-touchspin-up:hover {
    background-color: #e1251b;
    color: #fff;
    border-color: #e1251b;
    z-index: 1;
}

.xr-quantity-box .bootstrap-touchspin input.form-control,
.xr-quantity-box .bootstrap-touchspin input[type="text"] {
    display: inline-block !important;
    width: 80px !important;
    min-width: 80px;
    margin: 0;
    border-radius: 0 !important;
    text-align: center;
    vertical-align: middle;
    position: relative;
    z-index: 0;
}

/* 确保输入框在按钮中间 */
.xr-quantity-box .bootstrap-touchspin .input-group-btn:first-child {
    order: 1;
}

.xr-quantity-box .bootstrap-touchspin input {
    order: 2;
}

.xr-quantity-box .bootstrap-touchspin .input-group-btn:last-child {
    order: 3;
}

.xr-product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.xr-btn-cart {
    flex: 1;
    padding: 15px;
    background-color: #ff9500;
    color: #fff;
    text-align: center;
    font-size: 16px;
    min-width: 150px;
}

.xr-btn-cart:hover {
    background-color: #ff8800;
}

.xr-btn-buy {
    flex: 1;
    padding: 15px;
    background-color: #e1251b;
    color: #fff;
    text-align: center;
    font-size: 16px;
    min-width: 150px;
}

.xr-btn-buy:hover {
    background-color: #c81623;
}

.xr-btn-favorite {
    padding: 15px 25px;
    background-color: #fff;
    color: #666;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
}

.xr-btn-favorite:hover {
    border-color: #e1251b;
    color: #e1251b;
}

.xr-product-tabs {
    margin-top: 30px;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.xr-tab-header {
    border-bottom: 1px solid #f0f0f0;
}

.xr-tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.xr-tab-item {
    margin-right: 30px;
    margin-left: 10px;
}

.xr-tab-item a {
    display: block;
    padding: 15px 0;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.xr-tab-item.active a,
.xr-tab-item a:hover {
    color: #e1251b;
    border-bottom-color: #e1251b;
}

.xr-tab-content {
    padding: 20px;
}

.xr-tab-pane {
    display: none;
}

.xr-tab-pane.active {
    display: block;
}

.xr-attr-table {
    width: 100%;
    border-collapse: collapse;
}

.xr-attr-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.xr-attr-name {
    width: 200px;
    padding: 15px;
    background-color: #f5f5f5;
    color: #666;
    font-weight: normal;
}

.xr-attr-value {
    padding: 15px;
    color: #333;
}

/* ==================== 13. 促销页面 ==================== */
.xr-promotion-page {
    background-color: #fff;
    padding: 20px 0;
}

.xr-promotion-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1251b;
}

.xr-promotion-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: normal;
    color: #e1251b;
}

.xr-promotion-desc {
    margin: 0;
    color: #999;
    font-size: 14px;
}

.xr-promotion-list {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.xr-promotion-item {
    width: calc(50% - 20px);
    margin: 10px;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
}

.xr-promotion-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.xr-promotion-box {
    position: relative;
    display: flex;
    padding: 20px;
    flex-wrap: wrap;
}

.xr-promotion-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 15px;
    background-color: #e1251b;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
}

.xr-promotion-img {
    width: 200px;
    flex-shrink: 0;
    margin-right: 20px;
}

.xr-promotion-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.xr-promotion-info {
    flex: 1;
    min-width: 200px;
}

.xr-promotion-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: normal;
}

.xr-promotion-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.xr-promotion-title a:hover {
    color: #e1251b;
}

.xr-promotion-rating {
    margin-bottom: 10px;
    color: #ffa500;
}

.xr-promotion-price {
    margin-bottom: 15px;
}

.xr-price-tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: #fff3f3;
    color: #e1251b;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

.xr-promotion-timer {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff3f3;
    border-radius: 4px;
}

.xr-timer-label {
    color: #666;
    font-size: 14px;
    margin-right: 10px;
}

.xr-timer-box {
    display: inline-block;
    color: #e1251b;
    font-weight: bold;
}

.xr-promotion-action {
    margin-top: 15px;
}

/* ==================== 14. 订单页面 ==================== */
.xr-order-page {
    background-color: #fff;
    padding: 20px 0;
}

.xr-order-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1251b;
}

.xr-order-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: normal;
}

.xr-order-section {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.xr-section-title {
    padding: 15px 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #f0f0f0;
}

.xr-section-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
    color: #333;
}

.xr-section-content {
    padding: 20px;
}

.xr-address-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xr-form-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.xr-form-label {
    width: 120px;
    flex-shrink: 0;
    color: #666;
    font-size: 14px;
}

.xr-form-input,
.xr-form-textarea {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    min-width: 200px;
}

.xr-form-textarea {
    min-height: 80px;
    resize: vertical;
}

.xr-payment-methods {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.xr-payment-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.xr-payment-item:hover,
.xr-payment-item input:checked + .xr-payment-name {
    border-color: #e1251b;
    color: #e1251b;
}

.xr-payment-item input {
    margin-right: 8px;
}

.xr-order-summary {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.xr-summary-box {
    margin-bottom: 20px;
}

.xr-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.xr-summary-total {
    font-size: 18px;
    color: #333;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.xr-summary-value {
    color: #e1251b;
    font-weight: bold;
}

.xr-order-submit {
    text-align: right;
}

.xr-btn-submit {
    padding: 15px 50px;
    background-color: #e1251b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.xr-btn-submit:hover {
    background-color: #c81623;
}

.xr-order-row {
    transition: background-color 0.3s;
}

.xr-order-row:hover {
    background-color: #f9f9f9;
}

.xr-qty-display {
    font-size: 14px;
    color: #666;
}

/* ==================== 15. 分页 ==================== */
.xr-pagination {
    margin-top: 30px;
    text-align: center;
}

.xr-pagination .pagination {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.xr-pagination .pagination li {
    display: inline-block;
}

.xr-pagination .pagination a,
.xr-pagination .pagination span {
    display: block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.xr-pagination .pagination a:hover,
.xr-pagination .pagination .active span {
    background-color: #e1251b;
    color: #fff;
    border-color: #e1251b;
}

/* ==================== 16. 底部区域 ==================== */
.xr-footer {
    background-color: #fff;
    border-top: 1px solid #ddd;
    margin-top: 50px;
    padding: 40px 0 20px;
}

.xr-footer-content {
    display: flex;
    flex-direction: column;
}

.xr-footer-links {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 30px;
}

.xr-footer-section {
    min-width: 150px;
}

.xr-footer-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: normal;
    color: #333;
}

.xr-footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.xr-footer-section li {
    margin-bottom: 8px;
}

.xr-footer-section a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.xr-footer-section a:hover {
    color: #e1251b;
}

.xr-footer-copyright {
    text-align: center;
    color: #999;
    font-size: 12px;
    line-height: 1.8;
}

.xr-footer-copyright a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.xr-footer-copyright a:hover {
    color: #e1251b;
}

/* ==================== 17. 返回顶部 ==================== */
.xr-scroll-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background-color: #e1251b;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.xr-scroll-top:hover {
    background-color: #c81623;
    transform: translateY(-2px);
}

.xr-scroll-top i {
    font-size: 20px;
}

/* ==================== 18. 响应式设计 ==================== */
@media (max-width: 1200px) {
    .xr-container {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .xr-header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .xr-search {
        max-width: 100%;
        margin: 0;
    }
    
    .xr-product-item {
        width: calc(50% - 20px);
    }
    
    .xr-product-list {
        width: calc(100% + 20px);
    }
    
    .xr-product-main {
        flex-direction: column;
    }
    
    .xr-product-left {
        width: 100%;
        max-width: 100%;
    }
    
    .xr-product-main-img a {
        max-width: 100%;
    }
    
    .xr-product-main-img img,
    .xr-product-main-img #optima_zoom {
        max-width: 100%;
        max-height: 300px;
        width: auto;
        height: auto;
    }
    
    .xr-promotion-item {
        width: 100%;
    }
    
    .xr-promotion-box {
        flex-direction: column;
    }
    
    .xr-promotion-img {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .xr-cart-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .xr-cart-footer-left,
    .xr-cart-footer-right {
        width: 100%;
        justify-content: center;
    }
    
    .xr-nav-list {
        flex-wrap: wrap;
    }
    
    .xr-nav-link {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .xr-footer-links {
        flex-direction: column;
        gap: 20px;
    }
    
    .xr-scroll-top {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }
    
    .xr-scroll-top i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .xr-product-item {
        width: 100%;
        margin: 10px 0;
    }
    
    .xr-product-list {
        margin: 0;
    }
    
    .xr-cart-table {
        font-size: 12px;
    }
    
    .xr-table th,
    .xr-table td {
        padding: 10px 5px;
    }
    
    .xr-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* ==================== 19. 工具类 ==================== */
.xr-text-center {
    text-align: center;
}

.xr-text-right {
    text-align: right;
}

.xr-text-left {
    text-align: left;
}

.xr-mt-10 {
    margin-top: 10px;
}

.xr-mt-20 {
    margin-top: 20px;
}

.xr-mb-10 {
    margin-bottom: 10px;
}

.xr-mb-20 {
    margin-bottom: 20px;
}

.xr-clearfix:after {
    content: "";
    display: table;
    clear: both;
}

/* ==================== 20. 兼容性修复 ==================== */
.xr-product-section:after {
    content: "";
    display: table;
    clear: both;
}

.xr-product-list:after {
    content: "";
    display: table;
    clear: both;
}

/* 确保商品项正确显示 */
.xr-product-item {
    box-sizing: border-box;
    vertical-align: top;
    position: relative;
}

/* 确保商品列表容器正确 */
.xr-product-list {
    box-sizing: border-box;
}

/* 修复标题显示 */
.xr-section-header h2 {
    display: flex;
    align-items: center;
    width: 100%;
}

/* 确保图片容器正确 */
.xr-product-img a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* 修复价格显示 */
.xr-product-price span {
    display: inline-block;
}

/* 修复按钮显示 */
.xr-add-cart-btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 确保容器正确清除浮动 */
.xr-container:after {
    content: "";
    display: table;
    clear: both;
}

/* ==================== 21. Swiper 全局颜色覆盖 ==================== */
/* 覆盖 Swiper 默认颜色，统一使用红色主题 #e1251b */

/* 分页器颜色覆盖 */
.xr-banner-section .swiper-container .swiper-pagination-bullet {
    background: rgba(255,255,255,0.5) !important;
    opacity: 1 !important;
}

.xr-banner-section .swiper-container .swiper-pagination-bullet-active {
    background: #e1251b !important;
    opacity: 1 !important;
}

/* 导航按钮颜色覆盖 - 覆盖 SVG 背景图片 */
.xr-banner-section .swiper-container .swiper-button-next,
.xr-banner-section .swiper-container .swiper-button-prev,
.swiper-container .swiper-button-next,
.swiper-container .swiper-button-prev {
    background-color: rgba(255,255,255,0.95) !important;
    color: #333 !important;
    background-image: none !important;
}

.xr-banner-section .swiper-container .swiper-button-next:after,
.xr-banner-section .swiper-container .swiper-button-prev:after,
.swiper-container .swiper-button-next:after,
.swiper-container .swiper-button-prev:after {
    color: #333 !important;
    font-family: 'swiper-icons';
    font-size: 18px;
    font-weight: bold;
}

.xr-banner-section .swiper-container .swiper-button-next:hover,
.xr-banner-section .swiper-container .swiper-button-prev:hover,
.swiper-container .swiper-button-next:hover,
.swiper-container .swiper-button-prev:hover {
    background-color: #e1251b !important;
    color: #fff !important;
    background-image: none !important;
}

.xr-banner-section .swiper-container .swiper-button-next:hover:after,
.xr-banner-section .swiper-container .swiper-button-prev:hover:after,
.swiper-container .swiper-button-next:hover:after,
.swiper-container .swiper-button-prev:hover:after {
    color: #fff !important;
}

/* 覆盖 Swiper 按钮 SVG 背景图片 - 使用红色主题 */
.swiper-button-prev,
.swiper-container-rtl .swiper-button-next {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23333'%2F%3E%3C%2Fsvg%3E") !important;
    left: 10px;
    right: auto;
}

.swiper-button-next,
.swiper-container-rtl .swiper-button-prev {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23333'%2F%3E%3C%2Fsvg%3E") !important;
    right: 10px;
    left: auto;
}

.swiper-button-prev:hover,
.swiper-container-rtl .swiper-button-next:hover {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23fff'%2F%3E%3C%2Fsvg%3E") !important;
}

.swiper-button-next:hover,
.swiper-container-rtl .swiper-button-prev:hover {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23fff'%2F%3E%3C%2Fsvg%3E") !important;
}

.swiper-button-prev.swiper-button-white,
.swiper-container-rtl .swiper-button-next.swiper-button-white {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23fff'%2F%3E%3C%2Fsvg%3E") !important;
}

.swiper-button-next.swiper-button-white,
.swiper-container-rtl .swiper-button-prev.swiper-button-white {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23fff'%2F%3E%3C%2Fsvg%3E") !important;
}

.swiper-button-prev.swiper-button-black,
.swiper-container-rtl .swiper-button-next.swiper-button-black {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23333'%2F%3E%3C%2Fsvg%3E") !important;
}

.swiper-button-next.swiper-button-black,
.swiper-container-rtl .swiper-button-prev.swiper-button-black {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23333'%2F%3E%3C%2Fsvg%3E") !important;
}

/* 进度条颜色覆盖 */
.xr-banner-section .swiper-container .swiper-pagination-progressbar {
    background: rgba(255,255,255,0.3) !important;
}

.xr-banner-section .swiper-container .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
    background: #e1251b !important;
}

/* 滚动条颜色覆盖 */
.xr-banner-section .swiper-container .swiper-scrollbar {
    background: rgba(255,255,255,0.3) !important;
}

.xr-banner-section .swiper-container .swiper-scrollbar-drag {
    background: #e1251b !important;
}

/* CSS 变量覆盖（Swiper 4.x 支持） */
.xr-banner-section .swiper-container,
.swiper-container {
    --swiper-theme-color: #e1251b;
    --swiper-navigation-color: #333;
}

.xr-banner-section .swiper-container:hover,
.swiper-container:hover {
    --swiper-navigation-color: #fff;
}

/* 全局 Swiper 颜色覆盖（适用于页面中所有 Swiper） */
.swiper-container .swiper-pagination-bullet-active {
    background: #e1251b !important;
    opacity: 1 !important;
}

.swiper-container .swiper-pagination-progressbar-fill {
    background: #e1251b !important;
}

.swiper-container .swiper-scrollbar-drag {
    background: #e1251b !important;
}

/* ==================== 购物车属性选择页面 ==================== */
/* cart_select.html 独立样式 */

/* 表单容器 */
.cart-select-page .form-option {
    padding: 20px;
    background-color: #fff;
    border-radius: 4px;
}

/* 表单组 */
.cart-select-page .form-group.row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-select-page .form-group.row:last-child {
    border-bottom: none;
}

/* 标签样式 */
.cart-select-page .control-label {
    width: 100px;
    flex-shrink: 0;
    color: #666;
    font-size: 14px;
    font-weight: normal;
    text-align: left;
    padding: 0;
    margin: 0;
    line-height: 1.5;
}

/* SKU选择区域 */
.cart-select-page .fc-sku-select-price {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* SKU选择按钮 */
.cart-select-page .fc-sku-value {
    padding: 8px 20px !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #666 !important;
    transition: all 0.3s !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    min-width: auto !important;
    height: auto !important;
    display: inline-block !important;
}

.cart-select-page .fc-sku-value:hover {
    border-color: #e1251b !important;
    color: #e1251b !important;
    background-color: #fff !important;
}

/* 选中状态的SKU按钮 */
.cart-select-page .fc-sku-value.red,
.cart-select-page .fc-sku-value.btn.red {
    border-color: #e1251b !important;
    color: #e1251b !important;
    background-color: #fff3f3 !important;
    font-weight: 500 !important;
}

/* 价格显示 */
.cart-select-page .price.regular-price {
    color: #e1251b;
    font-size: 18px;
    font-weight: bold;
}

.cart-select-page .price.regular-price span {
    font-size: 20px;
}

/* 库存显示 */
.cart-select-page #dr_sku_quantity {
    color: #e1251b;
    font-weight: bold;
    font-size: 14px;
}

/* 隐藏输入框 */
.cart-select-page input[type="hidden"] {
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .cart-select-page .form-group.row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-select-page .control-label {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .cart-select-page .fc-sku-select-price {
        width: 100%;
    }
}

/* ==================== 订单结算页面 ==================== */
/* order_checkout.html 样式 */

/* 页面容器 */
.main-content-area {
    background-color: #fff;
    padding: 20px 0;
    min-height: 500px;
}

.main-content-area .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 面包屑导航 */
.greentect_bradcame {
    margin-bottom: 20px;
    padding: 15px 0;
}

.greentect_bradcame ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.greentect_bradcame li {
    margin-right: 10px;
    color: #666;
    font-size: 14px;
}

.greentect_bradcame li:not(:last-child)::after {
    content: '>';
    margin-left: 10px;
    color: #999;
}

.greentect_bradcame li a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.greentect_bradcame li a:hover {
    color: #e1251b;
}

.greentect_bradcame li:last-child {
    color: #e1251b;
}

/* Portlet 样式（地址、付款方式、商品详情区域） */
.portlet {
    margin-bottom: 20px;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.portlet.light.bordered {
    border: 1px solid #e8e8e8;
}

.portlet-title {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #fafafa;
    border-radius: 4px 4px 0 0;
}

.portlet-title .caption {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.portlet-title .caption-subject {
    color: #333;
}

.portlet-body {
    padding: 20px;
}

/* 地址选择区域 */
.box-border {
    padding: 15px;
}

.box-border ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.box-border li {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    background-color: #fafafa;
    transition: all 0.3s;
}

.box-border li:hover {
    border-color: #e1251b;
    background-color: #fff3f3;
}

.box-border li label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.box-border li input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.box-border li a {
    flex: 1;
    color: #333;
    text-decoration: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.box-border li a:hover {
    color: #e1251b;
}

.box-border li a span {
    color: #666;
}

.box-border label a.btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #e1251b;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.box-border label a.btn:hover {
    background-color: #c81623;
}

/* 商品详情表格 */
.portlet-body .table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.portlet-body .table thead {
    background-color: #f5f5f5;
}

.portlet-body .table th {
    padding: 12px;
    text-align: left;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid #e8e8e8;
    font-size: 14px;
}

.portlet-body .table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.portlet-body .table tbody tr:hover {
    background-color: #fafafa;
}

.portlet-body .table tfoot tr {
    background-color: #fafafa;
    font-weight: 500;
}

.portlet-body .table tfoot tr:last-child {
    background-color: #fff3f3;
    font-size: 16px;
    font-weight: bold;
    color: #e1251b;
}

.portlet-body .table tfoot td {
    padding: 15px 12px;
    border-top: 2px solid #e8e8e8;
}

/* 商品图片 */
.cart_product img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

/* 商品信息 */
.cart_description {
    text-align: left;
}

.cart_description .product-name {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.cart_description .product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.cart_description .product-name a:hover {
    color: #e1251b;
}

.cart_ref {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* 价格样式 */
.price {
    color: #e1251b;
    font-size: 14px;
    font-weight: 500;
}

.price .regular-price {
    color: #e1251b;
    font-weight: bold;
    font-size: 16px;
}

.pyuan {
    color: #999;
    font-size: 12px;
    text-decoration: line-through;
    margin-top: 5px;
}

.promotion {
    color: #e1251b;
    font-size: 12px;
}

/* 买家留言 */
.order-gbook {
    margin: 20px 0;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 4px;
}

.order-gbook textarea.form-control {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.order-gbook textarea.form-control:focus {
    outline: none;
    border-color: #e1251b;
}

/* 提交按钮 */
.text-right {
    text-align: right;
    margin-top: 20px;
}

.text-right .button.btn {
    padding: 12px 40px;
    background-color: #e1251b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.text-right .button.btn:hover {
    background-color: #c81623;
}

.text-right .button.btn.green {
    background-color: #e1251b;
}

.text-right .button.btn.green:hover {
    background-color: #c81623;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .portlet-body .table {
        font-size: 12px;
    }
    
    .portlet-body .table th,
    .portlet-body .table td {
        padding: 8px;
    }
    
    .cart_product img {
        width: 50px;
        height: 50px;
    }
    
    .text-right {
        text-align: center;
    }
    
    .text-right .button.btn {
        width: 100%;
        padding: 15px;
    }
}

/* ==================== 订单地址页面 ==================== */
/* order_address.html 样式 */

/* 页面容器 */
.page-content-white {
    background-color: #f5f5f5;
    padding: 20px;
    min-height: 100vh;
}

/* Portlet 容器 */
.page-content-white .portlet {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin: 0;
}

.page-content-white .portlet.light {
    background-color: #fff;
}

.page-content-white .portlet-body {
    padding: 30px;
}

/* 表单容器 */
.page-content-white .form-body {
    max-width: 800px;
    margin: 0 auto;
}

/* 表单组 */
.page-content-white .form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* 标签样式 */
.page-content-white .control-label {
    padding-top: 8px;
    margin-bottom: 0;
    text-align: right;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.page-content-white .control-label .required {
    color: #e1251b;
    margin-right: 3px;
}

/* 输入框容器 */
.page-content-white .col-xs-8,
.page-content-white .col-md-8 {
    padding-left: 15px;
    padding-right: 15px;
}

/* 输入框样式 */
.page-content-white .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s;
}

.page-content-white .form-control:focus {
    outline: none;
    border-color: #e1251b;
    box-shadow: 0 0 0 2px rgba(225, 37, 27, 0.1);
}

.page-content-white .form-control::placeholder {
    color: #999;
}

/* 复选框样式 */
.page-content-white input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 8px;
    vertical-align: middle;
}

.page-content-white label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.page-content-white label input[type="checkbox"] {
    margin-right: 8px;
}

/* 城市选择区域 */
.page-content-white #dr_row_city .col-xs-8,
.page-content-white #dr_row_city .col-md-8 {
    padding-top: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .page-content-white {
        padding: 10px;
    }
    
    .page-content-white .portlet-body {
        padding: 20px 15px;
    }
    
    .page-content-white .form-group {
        flex-direction: column;
    }
    
    .page-content-white .control-label {
        text-align: left;
        margin-bottom: 8px;
        padding-top: 0;
        width: 100%;
    }
    
    .page-content-white .col-xs-8,
    .page-content-white .col-md-8 {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    .page-content-white .form-control {
        width: 100%;
    }
}
