/* 全局设置 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Header 样式 */
.header {
    position: fixed;
    background-color: #f86c45;
    top: 0px;
    right: 0px;
    left: 0px;
    z-index: 2;
    display: flex;
    justify-content: center;
} 

.header-container {
    display: flex;
    flex-direction: row;
    height: 70px;
    padding: 0 32px;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
}

.header-left {
    width: 145px;
    margin-right: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.header-right {
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: end;
    flex-shrink: 0;
}

.search {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: end;
    align-items: center;
    max-width: 500px;
}

.search-button {
    width: 64px;
    height: 41px;
    background-color: rgb(240, 240, 240);
    border-radius: 0 5px 5px 0;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(192, 192, 192, 0.5);
    cursor: pointer;
}

.search-button:hover {
    background-color: rgb(230, 230, 230);
}

.search-input {
    flex: 1;
    height: 41px;
    border-radius: 5px 0 0 5px;
    border-style: solid;
    border-width: 1px;
    border-color: rgba(192, 192, 192, 0.5);
    padding-left: 12px;
    font-size: 16px;
    width: 100%; /* 修改这里 */
}

.search-icon {
    height: 24px;
}

.logo-icon {
    height: 50px;
    cursor: pointer;
}

.cart-icon {
    height: 30px;
    cursor: pointer;
}

@media (max-width:600px){
    .search{
        display: none;
    }
}

.cart {
    position: relative;
    margin-top: 5px;
    margin-right: 10px;
    margin-left: 50px;
}

.cart-num {
    position: absolute;
    color: #f86c45;
    font-weight: 900;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    top: -5px;
    right: -8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.login {
    position: relative;
    margin-top: 5px;
    margin-right: 10px;
    margin-left: 30px;
    cursor: pointer;
}

.login-icon {
    height: 30px;
}

.login-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: none;
    z-index: 1;
}

.login-dropdown a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.login-dropdown a:hover {
    background-color: #f5f5f5;
}

/* 弹窗的通用样式 */
.login-popup,
.forgot-password-popup {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000; /* 置于顶层 */
    left: 0;
    top: 0;
    width: 100%; /* 全宽 */
    height: 100%; /* 全高 */
    overflow: auto; /* 如有必要，启用滚动 */
    background-color: rgba(0,0,0,0.5); /* 半透明背景 */
    align-items: center;
    justify-content: center;
}

/* 弹窗内容样式 */
.login-popup-content,
.forgot-password-popup-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    width: 80%; /* 根据需要调整宽度 */
    max-width: 400px;
    margin: 15% auto; /* 上下外边距15%，左右居中 */
    border: 1px solid #888;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.login-popup-content h2,
.forgot-password-popup-content h2 {
    text-align: center;
    margin-bottom: 20px; /* 添加下边距 */
}

.login-popup-content form,
.forgot-password-popup-content form {
    display: flex;
    flex-direction: column;
    width: 100%; /* 确保表单占满父容器宽度 */
}

.login-popup-content form div,
.forgot-password-popup-content form div {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%; /* 确保父容器占满宽度 */
}

.login-popup-content label,
.forgot-password-popup-content label {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.login-popup-content input,
.forgot-password-popup-content input {
    display: block; /* 将输入框设置为块级元素 */
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc; /* 添加边框 */
    border-radius: 4px; /* 添加圆角 */
    font-size: 1rem;
}

.login-popup-content button,
.forgot-password-popup-content button {
    width: 100%;
    padding: 10px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px; /* 添加圆角 */
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-popup-content button:hover,
.forgot-password-popup-content button:hover {
    background-color: #2ecc71;
}

.login-popup-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.login-popup-footer a {
    color: #3498db;
    text-decoration: none;
}

.login-popup-footer a:hover {
    text-decoration: underline;
}

#login-message,
#forgot-password-message {
    margin-top: 10px;
    text-align: center;
    font-size: 1.1rem;
    color: red;
}

.welcome-message {
    display: block;
    padding: 10px;
    font-size: 12px;
    color: #333;
    margin-bottom: 15px; /* 添加下边距 */
}