/* 移动端响应式样式 - 商品详情页 */

/* 平板和小屏幕设备 */
@media screen and (max-width: 1200px) {
    .wrapper {
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .goods-info {
        flex-direction: column;
    }
    
    .goods-info .left-box,
    .goods-info .right-box {
        width: 100%;
    }
    
    .goods-detail {
        flex-direction: column;
    }
    
    .goods-detail .left-box,
    .goods-detail .right-box {
        width: 100%;
        margin-top: 15px;
    }
}

/* 平板设备 */
@media screen and (max-width: 992px) {
    .wrapper {
        width: 100%;
        padding: 0 15px;
    }
    
    .goods-info .left-box .swiper-gallery {
        height: 350px;
    }
    
    .goods-info .right-box {
        padding: 20px;
    }
}

/* 手机端样式 */
@media screen and (max-width: 768px) {
    /* 全局容器 */
    .wrapper {
        width: 100%;
        padding: 0 10px;
    }
    
    /* 面包屑导航 */
    .location {
        margin-top: 15px;
        font-size: 12px;
    }
    
    /* 商品信息区域 */
    .goods-info {
        flex-direction: column;
        margin-top: 15px;
    }
    
    .goods-info .left-box {
        width: 100%;
        border-radius: 3px;
    }
    
    .goods-info .left-box .swiper-gallery {
        height: 300px;
    }
    
    .goods-info .left-box .swiper-thumbs {
        margin: 10px;
    }
    
    .goods-info .left-box .swiper-thumbs .swiper-slide {
        width: 50px;
        height: 50px;
        margin: 0 5px;
    }
    
    .goods-info .right-box {
        width: 100%;
        padding: 15px;
        margin-top: 10px;
        border-radius: 3px;
    }
    
    .goods-info .right-box .gtitle {
        font-size: 16px;
        line-height: 1.4em;
    }
    
    .goods-info .right-box .stitle {
        font-size: 12px;
        margin-top: 8px;
    }
    
    /* 微信二维码图片 */
    .pro_img_weixin {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 15px 0;
    }
    
    .pro_img_weixin img {
        max-width: 45%;
        height: auto;
    }
    
    /* 价格信息 */
    .goods-info .right-box .info-box {
        flex-direction: column;
        padding: 15px;
        margin-top: 15px;
    }
    
    .goods-info .right-box .info-box .price-box,
    .goods-info .right-box .info-box .point-box,
    .goods-info .right-box .info-box .timer-box,
    .goods-info .right-box .info-box .sale-box {
        margin: 10px 0;
        padding: 0;
    }
    
    .goods-info .right-box .info-box .sale-box::before {
        display: none;
    }
    
    .goods-info .right-box .info-box .price-box .price {
        font-size: 20px;
    }
    
    /* 促销信息 */
    .goods-info .right-box .promote-box {
        padding: 15px;
    }
    
    .goods-info .right-box .promote-box .list-box {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .goods-info .right-box .promote-box .list-box .title {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .goods-info .right-box .promote-box .list-box .coupon .item-warp {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .goods-info .right-box .promote-box .list-box .coupon .item-warp .item-box {
        width: 100%;
        margin-bottom: 5px;
    }
    
    /* 规格选择 */
    .goods-info .right-box .spec-list .list-box {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .goods-info .right-box .spec-list .list-box .title {
        width: 100%;
        margin: 10px 0;
    }
    
    .goods-info .right-box .spec-list .list-box .item-box {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .goods-info .right-box .spec-list .list-box .item-box .text {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .goods-info .right-box .spec-list .list-box .item-box .pic {
        width: 55px;
        height: 55px;
    }
    
    /* 按钮区域 */
    .goods-info .right-box .btn-box {
        margin: 15px 0 0 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .goods-info .right-box .btn-box .el-button {
        width: 100%;
    }
    
    /* 商品详情区域 */
    .goods-detail {
        flex-direction: column;
        margin-top: 15px;
    }
    
    .goods-detail .left-box {
        width: 100%;
        display: none; /* 移动端隐藏侧边栏推荐 */
    }
    
    .goods-detail .right-box {
        width: 100%;
    }
    
    .goods-detail .right-box .head-box {
        flex-wrap: wrap;
        overflow-x: auto;
    }
    
    .goods-detail .right-box .head-box .item-box {
        padding: 0 20px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .goods-detail .right-box .content {
        padding: 15px;
    }
    
    .goods-detail .right-box .content .param {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .goods-detail .right-box .content .param .text {
        width: 100%;
        padding-right: 0;
        margin: 8px 0;
        font-size: 13px;
    }
    
    .goods-detail .right-box .content .detail img {
        width: 100%;
        height: auto;
    }
    
    /* 留言表单区域 */
    .content-box {
        padding: 10px;
    }
    
    .content-box .el-tabs {
        width: 100%;
    }
    
    .content-box .el-form {
        width: 100% !important;
    }
    
    .content-box .el-form-item {
        width: 100% !important;
    }
    
    .content-box .el-form-item .el-input,
    .content-box .el-form-item .el-textarea {
        width: 100%;
    }
    
    /* 底部按钮 */
    .footer-box {
        padding: 15px 10px;
    }
    
    .footer-btn {
        flex-direction: column !important;
        gap: 10px;
    }
    
    .footer-btn .el-button {
        width: 100%;
    }
    
    /* 隐藏不必要的元素 */
    .goods-info .left-box .btn-box {
        display: none;
    }
}

/* 小屏手机 */
@media screen and (max-width: 480px) {
    .goods-info .left-box .swiper-gallery {
        height: 250px;
    }
    
    .goods-info .left-box .swiper-thumbs .swiper-slide {
        width: 45px;
        height: 45px;
        margin: 0 3px;
    }
    
    .goods-info .right-box {
        padding: 10px;
    }
    
    .goods-info .right-box .gtitle {
        font-size: 15px;
    }
    
    .goods-info .right-box .stitle {
        font-size: 11px;
    }
    
    .pro_img_weixin img {
        max-width: 48%;
    }
    
    .goods-detail .right-box .head-box .item-box {
        padding: 0 15px;
        font-size: 12px;
    }
    
    .goods-detail .right-box .content {
        padding: 10px;
    }
    
    .goods-detail .right-box .content .param .text {
        font-size: 12px;
    }
}

/* 通用移动端优化 */
@media screen and (max-width: 768px) {
    /* 确保所有图片自适应 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 表格横向滚动 */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Element UI 组件移动端优化 */
    .el-form-item__label {
        text-align: left !important;
        float: none !important;
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 5px;
    }
    
    .el-form-item__content {
        margin-left: 0 !important;
    }
    
    .el-input__inner,
    .el-textarea__inner {
        font-size: 16px !important; /* 防止iOS自动缩放 */
    }
    
    /* 面包屑导航优化 */
    .el-breadcrumb {
        font-size: 12px;
    }
    
    .el-breadcrumb__item {
        float: none;
    }
    
    /* 按钮组优化 */
    .el-button-group {
        display: flex;
        flex-direction: column;
    }
    
    .el-button-group .el-button {
        margin: 5px 0;
    }
    
    /* Swiper 轮播优化 */
    .swiper-button-prev,
    .swiper-button-next {
        width: 30px !important;
        height: 30px !important;
    }
    
    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 16px !important;
    }
    
    /* 隐藏桌面端元素 */
    .hide-on-mobile {
        display: none !important;
    }
}

/* 横屏模式优化 */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .goods-info .left-box .swiper-gallery {
        height: 200px;
    }
    
    .goods-info .right-box {
        padding: 10px;
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 375px) {
    .wrapper {
        padding: 0 8px;
    }
    
    .goods-info .left-box .swiper-gallery {
        height: 220px;
    }
    
    .goods-info .right-box {
        padding: 8px;
    }
    
    .goods-info .right-box .gtitle {
        font-size: 14px;
    }
    
    .goods-detail .right-box .content {
        padding: 8px;
    }
}
