/* OctShop mobile experience refinements - 2026-08-10 */
@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Mobile home: preserve the backoffice-controlled mall name without
       allowing a long title to push the search box off-screen. */
    body.mobile-home-page .design-topbar,
    body.mobile-home-page .design-main-nav,
    body.mobile-home-page .pc-cart,
    body.mobile-home-page .pc-category-trigger,
    body.mobile-home-page .pc-user-card,
    body.mobile-home-page .pc-site-footer,
    body.mobile-home-page .design-trust,
    body.mobile-home-page .design-brand-shops,
    body.mobile-home-page .design-category-floor,
    body.mobile-home-page .design-recommend,
    body.mobile-home-page .design-help-articles,
    body.mobile-home-page .design-float-tools {
        display: none !important;
    }

    body.mobile-home-page .oct-header {
        display: grid !important;
        grid-template-columns: minmax(92px, 43%) minmax(0, 57%);
        gap: 8px;
        box-sizing: border-box;
        width: 100%;
        height: 58px !important;
        padding: 8px !important;
        align-items: center;
        background: rgba(255, 255, 255, .98) !important;
        box-shadow: 0 3px 14px rgba(31, 35, 41, .07) !important;
    }

    body.mobile-home-page .pc-logo {
        position: static !important;
        display: flex !important;
        min-width: 0;
        max-width: 100% !important;
        height: 42px;
        gap: 7px !important;
        align-items: center;
        overflow: hidden;
        line-height: normal !important;
        text-decoration: none;
    }

    body.mobile-home-page .pc-logo-mark {
        display: inline-flex !important;
        width: 32px !important;
        height: 32px !important;
        flex: 0 0 32px;
        align-items: center;
        justify-content: center;
        border: 0 !important;
        border-radius: 10px !important;
        color: #fff !important;
        background: linear-gradient(135deg, #ff654d, #ec332b) !important;
        box-shadow: 0 5px 12px rgba(236, 51, 43, .2) !important;
        font-family: Georgia, serif;
        font-size: 19px !important;
    }

    body.mobile-home-page .pc-brand-word {
        display: block !important;
        min-width: 0;
        max-width: calc(100% - 39px);
        overflow: hidden;
    }

    body.mobile-home-page .pc-brand-word b {
        display: block;
        max-width: 100%;
        overflow: hidden;
        color: #202124 !important;
        font-size: 16px !important;
        font-weight: 700;
        line-height: 32px;
        letter-spacing: 0 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.mobile-home-page .pc-brand-word small {
        display: none !important;
    }

    body.mobile-home-page .oct-header .goods-search {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        height: 40px;
        padding: 0 12px !important;
        justify-content: flex-start;
        overflow: hidden;
        border: 0 !important;
        border-radius: 20px !important;
        color: #8d9096;
        background: #f4f5f7 !important;
        box-shadow: none !important;
        font-size: 13px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.mobile-home-page .oct-header .goods-search::after {
        display: none !important;
    }

    body.mobile-home-page .goods-search img {
        display: block !important;
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px;
        margin: 0 6px 0 0 !important;
    }

    body.mobile-home-page .oct-header-sub {
        top: 58px !important;
    }

    body.mobile-home-page .oct-slider {
        margin-top: 48px;
    }

    /* Homepage discount cards: old 25% sizing made each image ~27px wide
       after the section was converted to a three-column grid. */
    body.mobile-home-page #SectionContent .second-kill {
        box-sizing: border-box;
        margin: 8px !important;
        width: calc(100% - 16px) !important;
        padding: 10px !important;
        border-radius: 14px;
        box-shadow: 0 5px 18px rgba(31, 35, 41, .06);
    }

    body.mobile-home-page #SectionContent .second-kill-title {
        padding: 2px 2px 10px !important;
        align-items: center;
        font-size: 16px;
    }

    body.mobile-home-page #SectionContent .second-kill-arrow {
        max-width: 58%;
        overflow: hidden;
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.mobile-home-page #SectionContent .second-kill-list {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 0 !important;
    }

    body.mobile-home-page #SectionContent .second-kill-list a {
        display: block !important;
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        overflow: hidden;
        border: 1px solid #f0f0f0;
        border-radius: 10px;
        background: #fff;
    }

    body.mobile-home-page #SectionContent .second-kill-list img {
        display: block !important;
        box-sizing: border-box;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
        padding: 4px;
        object-fit: contain !important;
        background: #fff;
    }

    body.mobile-home-page .oct-footer a {
        font-size: 11px !important;
        white-space: nowrap;
    }

    /* Discount list: stable two-column cards and non-distorted images. */
    body.mobile-discount-page {
        background: #f6f7f9;
    }

    body.mobile-discount-page .goods-list {
        box-sizing: border-box;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        padding: 10px !important;
        background: #f6f7f9;
    }

    body.mobile-discount-page .goods-item {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        margin: 0 !important;
        overflow: hidden !important;
        border: 1px solid #f0f0f0;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(31, 35, 41, .06);
        text-align: left;
    }

    body.mobile-discount-page .goods-img {
        width: 100%;
        height: auto !important;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        border-radius: 0;
        background: #fff;
    }

    body.mobile-discount-page .goods-img img {
        display: block;
        box-sizing: border-box;
        width: 100% !important;
        height: 100% !important;
        padding: 7px;
        object-fit: contain !important;
        background: #fff;
    }

    body.mobile-discount-page .goods-name {
        display: -webkit-box;
        box-sizing: border-box;
        height: 45px;
        padding: 7px 9px 3px;
        overflow: hidden;
        color: #303136;
        font-size: 13px;
        line-height: 18px;
        text-align: left;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body.mobile-discount-page .goods-price {
        box-sizing: border-box;
        min-height: 38px;
        padding: 4px 9px 10px !important;
        align-items: baseline;
    }

    body.mobile-discount-page .goods-price b {
        color: #ef3b32;
        font-size: 17px;
    }

    body.mobile-discount-page .goods-price div {
        font-size: 10px;
        white-space: nowrap;
    }

    body.mobile-discount-page .goods-item .goods-item-badge {
        top: 8px;
        left: 8px;
        padding: 3px 8px;
        border-radius: 12px;
        background: linear-gradient(135deg, #ff6a4e, #ef332c);
        box-shadow: 0 3px 8px rgba(239, 51, 44, .2);
    }

    /* Mobile login: hide the desktop hero and make every control tappable. */
    body.mobile-login-page {
        min-height: 100vh;
        min-height: 100svh;
        background: linear-gradient(180deg, #fff6f3 0, #fff 42%, #f7f8fa 100%);
    }

    body.mobile-login-page .login-site-header {
        display: flex;
        box-sizing: border-box;
        width: 100%;
        height: 58px;
        padding: 0 16px;
        align-items: center;
        border-bottom: 1px solid rgba(235, 235, 235, .9);
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 3px 14px rgba(31, 35, 41, .05);
    }

    body.mobile-login-page .login-site-header > a {
        display: flex;
        min-width: 0;
        align-items: center;
        color: #222;
        text-decoration: none;
    }

    body.mobile-login-page .login-site-header > a span {
        display: inline-flex;
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        align-items: center;
        justify-content: center;
        margin-right: 8px;
        border-radius: 9px;
        color: #fff;
        background: linear-gradient(135deg, #ff654d, #ec332b);
        font-family: Georgia, serif;
        font-size: 18px;
    }

    body.mobile-login-page .login-site-header > a b {
        display: block;
        max-width: 230px;
        overflow: hidden;
        font-size: 17px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.mobile-login-page .login-site-header > a small,
    body.mobile-login-page .login-site-header nav,
    body.mobile-login-page .login-visual {
        display: none !important;
    }

    body.mobile-login-page .oct-content {
        position: static;
        box-sizing: border-box;
        display: flex;
        width: 100%;
        min-height: calc(100svh - 58px);
        margin: 0;
        padding: 28px 20px 32px;
        align-items: center;
        justify-content: center;
        overflow: visible;
        background: transparent;
    }

    body.mobile-login-page .login-icon {
        display: none;
    }

    body.mobile-login-page .login-form {
        box-sizing: border-box;
        width: 100%;
        max-width: 360px;
        padding: 27px 20px 22px;
        border: 1px solid rgba(238, 238, 238, .95);
        border-radius: 18px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 15px 42px rgba(87, 52, 42, .11);
        text-align: left;
    }

    body.mobile-login-page .login-form h2 {
        margin: 0;
        color: #222;
        font-size: 25px;
    }

    body.mobile-login-page .login-subtitle {
        margin: 7px 0 22px;
        color: #999;
        font-size: 13px;
    }

    body.mobile-login-page .login-form div {
        padding: 0;
    }

    body.mobile-login-page .login-form-mobile,
    body.mobile-login-page .login-form-checkcode {
        box-sizing: border-box;
        width: 100%;
        height: 50px;
        margin: 13px 0;
        padding: 0 13px;
        border: 1px solid #dedfe2;
        border-radius: 12px;
        background: #fff;
    }

    body.mobile-login-page .login-form-mobile:focus-within,
    body.mobile-login-page .login-form-checkcode:focus-within {
        border-color: #ef3b32;
        box-shadow: 0 0 0 3px rgba(239, 59, 50, .08);
    }

    body.mobile-login-page .login-form-mobile span {
        padding: 0 11px 0 2px;
        color: #555;
        font-size: 14px;
    }

    body.mobile-login-page .login-form-mobile input,
    body.mobile-login-page .login-form-checkcode input {
        min-width: 0;
        height: 46px;
        padding: 0;
        text-align: left;
        font-size: 15px;
        background: transparent;
    }

    body.mobile-login-page .login-form-checkcode input {
        flex: 1;
        width: auto;
    }

    body.mobile-login-page #BtnSpanGetVerifyCode,
    body.mobile-login-page .login-form-checkcode .reset-check-code {
        width: auto;
        min-width: 88px;
        height: 36px;
        padding: 0 0 0 10px;
        flex: 0 0 auto;
        color: #ef3b32;
        text-align: right;
        font-size: 13px;
        white-space: nowrap;
    }

    body.mobile-login-page .login-status {
        min-height: 24px;
        margin: -2px 0 3px;
        line-height: 24px;
    }

    body.mobile-login-page .btn-login-once {
        box-sizing: border-box;
        width: 100%;
        height: 50px;
        margin: 5px 0 0;
        border: 0;
        border-radius: 12px;
        color: #fff;
        background: linear-gradient(135deg, #ff5e49, #ec332b);
        box-shadow: 0 8px 18px rgba(236, 51, 43, .2);
        font-size: 17px;
    }

    body.mobile-login-page .btn-login-once img {
        width: 23px;
        height: 23px;
        margin: 0 8px 0 0;
    }

    body.mobile-login-page .login-form .extra-link {
        box-sizing: border-box;
        width: 100%;
        margin: 20px 0 0;
        gap: 10px;
    }

    body.mobile-login-page .login-form .extra-link a {
        box-sizing: border-box;
        width: 50%;
        padding: 9px 10px;
        border-radius: 9px;
        color: #555;
        background: #f4f5f7;
        text-align: center;
        font-size: 13px;
    }
}
