/* =========================================================
   Sign In / Register 登录注册页
   主题色：橙色 --accent: #E64A19
   ========================================================= */

/* ---------- 顶部 Hero（为透明导航提供深色底） ---------- */
.login-hero {
    height: 300px;
    background:
        linear-gradient(rgba(18, 18, 20, 0.62), rgba(18, 18, 20, 0.55)),
        url("../images/my-banner.jpg") center/cover no-repeat;
    display: flex;
    align-items: center;
    padding-top: 40px;
}

.login-hero-title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

.login-hero-sub {
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    margin: 10px 0 0;
    max-width: 640px;
}

/* ---------- 内容区 ---------- */
.login-section {
    background: #f6f7f9;
    padding: 64px 0 90px;
}

.login-wrap {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 32px;
    align-items: start;
}

/* ---------- 左侧：表单卡片 ---------- */
.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    padding: 40px 44px 44px;
}

.login-card-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.login-card-lead {
    color: var(--text-gray);
    font-size: 14px;
    margin: 0 0 24px;
}

/* ---------- TAB 切换 ---------- */
.login-tabs {
    border-bottom: 2px solid #eceef1;
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
}

.login-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 0;
    position: relative;
    transition: color 0.2s ease;
}

.login-tabs .nav-link:hover {
    color: var(--accent);
}

.login-tabs .nav-link.active {
    color: var(--accent) !important;
    background: transparent;
}

.login-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

/* ---------- 表单控件（橙色聚焦） ---------- */
.login-form .form-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.login-form .form-label .req {
    color: var(--accent);
}

.login-form .form-control {
    border: 1px solid #d9dde3;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 15px;
    background: #fbfbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-form .form-control:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230, 74, 25, 0.14);
}

/* 错误/成功提示 */
.login-msg {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}

.login-msg.error {
    background: #fdecea;
    color: #b3261e;
    border: 1px solid #f5c6c2;
}

.login-msg.success {
    background: #e8f7ee;
    color: #1e7e44;
    border: 1px solid #bfe6cf;
}

/* 主按钮：橙色 */
.btn-accent {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 12px 22px;
    transition: all 0.2s ease;
}

.btn-accent:hover {
    background: #d13d12;
    color: #fff;
}

.btn-accent:disabled {
    opacity: 0.65;
}

.login-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.login-form-row .form-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    font-size: 14px;
}

.login-form-row .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.forgot-link {
    color: var(--accent);
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* 注册 tab 提示 */
.login-switch-tip {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
}

.login-switch-tip a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.login-switch-tip a:hover {
    text-decoration: underline;
}

/* ---------- 右侧：注册权益推广 ---------- */
.benefit-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    overflow: hidden;
}

.benefit-banner {
    position: relative;
    height: 220px;
    background: url("../images/0813.jpg") center/cover no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 26px;
}

.benefit-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 18, 20, 0.05) 0%, rgba(18, 18, 20, 0.62) 100%);
}

.benefit-banner-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.benefit-banner-content h3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
}

.benefit-body {
    padding: 30px 32px 34px;
}

.benefit-body-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 18px;
    line-height: 1.4;
}

.benefit-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.benefit-list li {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f1f4;
    line-height: 1.5;
}

.benefit-list li:last-child {
    border-bottom: none;
}

.benefit-list .b-icon {
    flex: 0 0 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(230, 74, 25, 0.10);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.benefit-list .b-text b {
    display: block;
    font-size: 15px;
    color: #222;
    margin-bottom: 2px;
}

.benefit-list .b-text span {
    font-size: 13.5px;
    color: var(--text-gray);
}

/* ---------- 已登录状态 ---------- */
.loggedin-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    padding: 48px;
    text-align: center;
}

.loggedin-card .lgi {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(230, 74, 25, 0.12);
    color: var(--accent);
    font-size: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    overflow: hidden;
}

.loggedin-card .lgi img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.loggedin-card h3 {
    font-size: 22px;
    font-weight: 700;
}

.loggedin-card p {
    color: var(--text-gray);
    margin: 8px 0 24px;
}

/* ---------- 已登录：单列居中布局 ---------- */
.login-wrap.is-loggedin {
    grid-template-columns: 1fr;
    /* max-width: 560px; */
    max-width: 100%;
    margin: 0 auto;
    gap: 24px;
}

.login-wrap.is-loggedin .loggedin-card,
.login-wrap.is-loggedin .cart-info-card {
    width: 100%;
}

/* ---------- 购物车信息卡片 ---------- */
.cart-info-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    padding: 28px 32px;
    text-align: left;
}

.cart-info-head {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f1f4;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.cart-info-head i {
    color: var(--accent);
    font-size: 20px;
}

.cart-info-head h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.cart-info-badge {
    margin-left: auto;
    background: rgba(230, 74, 25, 0.10);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.cart-info-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--text-gray);
}

.cart-info-price {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 18px;
}

.cart-info-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cart-info-empty {
    text-align: center;
    padding: 10px 0 6px;
}

.cart-info-empty p {
    color: var(--text-gray);
    margin: 0 0 16px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
    .login-wrap {
        grid-template-columns: 1fr;
    }
    .benefit-banner {
        height: 200px;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 28px 22px 32px;
    }
    .benefit-body {
        padding: 24px 22px 28px;
    }
    .cart-info-card {
        padding: 22px 20px;
    }
    .cart-info-actions {
        flex-direction: column;
    }
    .cart-info-actions .btn {
        width: 100%;
    }
}
