/**
 * Ozon Theme Override for ShopXO
 * 蓝色主题 + 现代简洁卡片式布局
 */

/* ========== 1. 全局样式 ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    background-color: #F5F5F5 !important;
    color: #1A1A1A;
}

a { color: #005BFF; }
a:hover { color: #0048CC; }

/* ========== 2. 头部导航 ========== */
/* 顶部通栏 */
.nav-search {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E6E6E6;
    box-shadow: none !important;
}

/* Logo */
.nav-search .logo-big img {
    max-height: 40px;
}

/* 搜索栏 */
.nav-search .search-group {
    border: 2px solid #005BFF !important;
    border-radius: 8px !important;
    overflow: hidden;
    background: #FFFFFF;
    transition: border-color 0.2s ease;
}

.nav-search .search-group:focus-within {
    border-color: #003DA6 !important;
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.12);
}

.nav-search .search-group input {
    border: none !important;
    font-size: 1.4rem;
    padding: 1rem 1.2rem;
    height: 4.2rem;
}

.nav-search .search-group .submit {
    background: #005BFF !important;
    border-color: #005BFF !important;
    border-radius: 0 6px 6px 0 !important;
    padding: 0 2.4rem !important;
    font-weight: 600;
    transition: background 0.15s ease;
}

.nav-search .search-group .submit:hover {
    background: #0048CC !important;
    border-color: #0048CC !important;
}

/* 搜索热词 */
.search-hot-keywords {
    margin-top: 0.6rem;
}

.search-hot-keywords li a {
    color: #666 !important;
    font-size: 1.2rem;
}

.search-hot-keywords li a:hover {
    color: #005BFF !important;
}

/* 头部导航条 */
.header-nav-container,
.header-top-nav {
    background: #FFFFFF !important;
}

/* ========== 3. 商品卡片 - 九宫格 ========== */
.module-goods-grid-base .item {
    background: #FFFFFF !important;
    border: 1px solid #F0F0F0 !important;
    border-radius: 10px !important;
    overflow: hidden;
    margin: 0.8rem !important;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: none;
}

.module-goods-grid-base .item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
    border-color: #E0E0E0 !important;
}

/* 商品图片 */
.module-goods-grid-base .item .goods-info {
    padding: 0 !important;
    display: block;
    position: relative;
    overflow: hidden;
}

.module-goods-grid-base .item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.module-goods-grid-base .item:hover img {
    transform: scale(1.03);
}

/* 价格区域 - 加粗突出 */
.module-goods-grid-base .item .price-content {
    padding: 0.6rem 1.2rem 0 !important;
}

.module-goods-grid-base .item .price {
    text-align: left !important;
    padding: 0 !important;
}

.module-goods-grid-base .item .price strong {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #1A1A1A !important;
}

/* 折扣价红色 */
.module-goods-grid-base .item .price .original-price {
    color: #999 !important;
    font-size: 1.2rem !important;
    text-decoration: line-through;
    padding-left: 0.5rem;
}

/* 商品标题 */
.module-goods-grid-base .item .goods-title {
    padding: 0 1.2rem 1rem !important;
    margin: 0 !important;
}

.module-goods-grid-base .item .goods-title a {
    color: #333 !important;
    font-size: 1.3rem !important;
    line-height: 1.5 !important;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-goods-grid-base .item .goods-title a:hover {
    color: #005BFF !important;
}

/* 购买按钮 */
.module-goods-grid-base .item .item-bottom .am-btn {
    background: #005BFF !important;
    border-color: #005BFF !important;
    border-radius: 8px !important;
    font-weight: 600;
    transition: background 0.15s ease;
}

.module-goods-grid-base .item .item-bottom .am-btn:hover {
    background: #0048CC !important;
    border-color: #0048CC !important;
}

/* value_type=1 模式：用 flex order 把价格移到标题上方 */
.module-goods-grid-base .item.item-type-btn .type-btn {
    display: flex;
    flex-direction: column;
}

.module-goods-grid-base .item.item-type-btn .type-btn > .goods-title {
    order: 2;
}

.module-goods-grid-base .item.item-type-btn .type-btn > .item-bottom {
    order: 1;
}

.module-goods-grid-base .item.item-type-btn .type-btn .goods-title {
    padding: 0.4rem 1.2rem 0 !important;
}

.module-goods-grid-base .item.item-type-btn .type-btn .goods-title a {
    color: #333 !important;
    font-size: 1.3rem !important;
    line-height: 1.5 !important;
}

.module-goods-grid-base .item.item-type-btn .type-btn .goods-title a:hover {
    color: #005BFF !important;
}

/* ========== 4. 商品卡片 - 列表样式 ========== */
.module-goods-list-base .item {
    background: #FFFFFF !important;
    border: 1px solid #F0F0F0 !important;
    border-radius: 10px !important;
    margin: 0.8rem !important;
    transition: box-shadow 0.2s ease;
}

.module-goods-list-base .item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    border-color: #E0E0E0 !important;
}

/* ========== 5. 首页楼层 ========== */
.home-floor {
    padding-top: 0.5rem;
}

/* 楼层标题 */
.items-nav-title {
    padding: 1.5rem 0 1rem;
    border-bottom: none !important;
}

.floor-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #1A1A1A !important;
    border-left: none !important;
    padding-left: 0 !important;
}

.floor-title.am-title-left-border {
    border-left: none !important;
}

.floor-desc {
    color: #999 !important;
    font-size: 1.3rem;
}

/* 去掉楼层三角装饰 */
.aggregation .triangle-topright {
    display: none !important;
}

/* 楼层聚合区域 */
.aggregation {
    border-radius: 10px !important;
    overflow: hidden;
    background: #FFFFFF !important;
    border: 1px solid #F0F0F0;
}

.aggregation .word .outer {
    background: #F5F5F5 !important;
    color: #333 !important;
    border-radius: 6px !important;
    padding: 0.4rem 1rem;
    font-size: 1.2rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.aggregation .word .outer:hover {
    background: #E8F0FF !important;
    color: #005BFF !important;
}

/* 楼层"更多"链接 */
.items-nav-title .more a {
    color: #005BFF !important;
    font-weight: 500;
}

.items-nav-title .more a:hover {
    color: #0048CC !important;
}

/* 楼层关键词 */
.today-brands a {
    color: #666 !important;
    font-size: 1.2rem;
}

.today-brands a:hover {
    color: #005BFF !important;
}

/* ========== 6. 轮播区域 ========== */
.slideall {
    margin-top: 1rem;
}

.banner-mixed {
    background: #FFFFFF !important;
    border-radius: 10px !important;
    border: 1px solid #F0F0F0;
    overflow: hidden;
}

/* VIP/用户面板 */
.mod-vip {
    background: #FFFFFF;
}

.mod-vip .member-login .btn {
    border-radius: 8px !important;
    font-weight: 600;
}

.mod-vip .member-login .am-btn-primary {
    background: #005BFF !important;
    border-color: #005BFF !important;
}

.mod-vip .member-login .am-btn-primary:hover {
    background: #0048CC !important;
}

.mod-vip .member-login .am-btn-warning {
    background: #FFFFFF !important;
    border: 2px solid #005BFF !important;
    color: #005BFF !important;
}

.mod-vip .member-login .am-btn-warning:hover {
    background: #E8F0FF !important;
}

/* ========== 7. 搜索/分类页 ========== */
/* 排序导航 */
.sort-nav {
    background: #FFFFFF !important;
    border-radius: 10px;
    margin-bottom: 1rem;
    height: 4.4rem;
    border: 1px solid #F0F0F0;
}

.sort-nav li a {
    color: #666 !important;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.sort-nav li.active a {
    color: #005BFF !important;
    background: #E8F0FF;
    font-weight: 600;
}

.sort-nav li a:hover {
    color: #005BFF !important;
    background: #F5F8FF;
}

/* 筛选面板 */
.map-item > li {
    background: #FFFFFF !important;
    border-radius: 8px;
}

/* ========== 8. 商品详情页 ========== */
/* 基础信息区域 */
.system-goods-detail {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #F0F0F0;
}

/* 放大镜/商品图片 */
.tb-booth {
    border: 1px solid #F0F0F0 !important;
    border-radius: 10px !important;
    background: #FFFFFF;
}

/* 价格展示 */
.introduce {
    background: #FFFFFF !important;
    border-radius: 10px !important;
    border: 1px solid #F0F0F0;
    margin-top: 1rem;
}

/* 购买按钮区域 */
.buy-submit-top > button {
    background: #005BFF !important;
    border-color: #005BFF !important;
    border-radius: 8px !important;
    font-weight: 600;
    transition: background 0.15s ease;
}

.buy-submit-top > button:hover {
    background: #0048CC !important;
}

/* 规格选择 */
.sku-line {
    border-radius: 8px !important;
    border: 1px solid #E0E0E0 !important;
    transition: all 0.15s ease;
}

.sku-line:hover {
    border-color: #005BFF !important;
}

.sku-line.selected {
    background: #E8F0FF !important;
    color: #005BFF !important;
    border: 1px solid #005BFF !important;
}

/* ========== 9. 购物车 ========== */
.cart-form button[type="submit"],
.cart-submit-btn {
    background: #005BFF !important;
    border-color: #005BFF !important;
    border-radius: 8px !important;
}

/* ========== 10. 公共按钮覆盖 ========== */
.am-btn-primary {
    background-color: #005BFF !important;
    border-color: #005BFF !important;
}

.am-btn-primary:hover,
.am-btn-primary:focus {
    background-color: #0048CC !important;
    border-color: #0048CC !important;
}

.am-btn-secondary {
    background-color: #E8F0FF !important;
    border-color: #C5DBFF !important;
    color: #005BFF !important;
}

.am-btn-secondary:hover {
    background-color: #D6E5FF !important;
    border-color: #A8CCFF !important;
    color: #0048CC !important;
}

/* ========== 11. 公共链接和交互 ========== */
.am-text-primary,
.text-primary {
    color: #005BFF !important;
}

/* 分页 */
.pagination-margin-top li a {
    border-radius: 6px !important;
    border: 1px solid #E0E0E0 !important;
    transition: all 0.15s ease;
}

.pagination-margin-top li a:hover {
    border-color: #005BFF !important;
    color: #005BFF !important;
}

.pagination-margin-top li.am-active a {
    background: #005BFF !important;
    border-color: #005BFF !important;
    color: #FFFFFF !important;
}

/* ========== 12. 面包屑导航 ========== */
.breadcrumb-container {
    padding: 1rem 0;
}

.breadcrumb-container a {
    color: #666 !important;
}

.breadcrumb-container a:hover {
    color: #005BFF !important;
}

/* ========== 13. 响应式优化 ========== */
/* PC端 (≥1025px) */
@media only screen and (min-width: 1025px) {
    .module-goods-grid-base {
        width: calc(100% + 1.6rem) !important;
        margin-left: -0.8rem !important;
    }

    .module-goods-grid-base .item {
        margin: 0.8rem !important;
    }

    /* 5列商品网格 */
    .am-avg-lg-5 > li {
        width: 20% !important;
    }

    .am-avg-lg-4 > li {
        width: 25% !important;
    }
}

/* 平板 (641px - 1024px) */
@media only screen and (min-width: 641px) and (max-width: 1024px) {
    .am-avg-md-3 > li {
        width: 33.333% !important;
    }

    .am-avg-md-4 > li {
        width: 25% !important;
    }
}

/* 手机端 (≤640px) */
@media only screen and (max-width: 640px) {
    .am-avg-sm-2 > li {
        width: 50% !important;
    }

    .module-goods-grid-base .item {
        margin: 0.4rem !important;
        border-radius: 8px !important;
    }

    .module-goods-grid-base .item .price strong {
        font-size: 1.6rem !important;
    }

    .module-goods-grid-base .item .price-content {
        padding: 0.4rem 0.8rem 0 !important;
    }

    .module-goods-grid-base .item .goods-title {
        padding: 0 0.8rem 0.8rem !important;
    }

    .module-goods-grid-base .item .goods-title a {
        font-size: 1.2rem !important;
    }

    /* 搜索栏移动端优化 */
    .nav-search .search-group {
        border-width: 1.5px !important;
        border-radius: 6px !important;
    }

    .nav-search .search-group input {
        height: 3.6rem;
        font-size: 1.3rem;
    }

    /* 楼层标题移动端 */
    .floor-title {
        font-size: 1.6rem !important;
    }
}

/* ========== 14. Footer ========== */
.body-content-footer-container {
    background: #FFFFFF !important;
    border-top: 1px solid #E6E6E6;
    margin-top: 2rem;
}

/* ========== 15. 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #F5F5F5;
}

::-webkit-scrollbar-thumb {
    background: #CCC;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}
