/* ========================================
   Login Page – Figma 登入頁 (node 155:931)
   ======================================== */

.login-main {
  margin-top: var(--header-height);
  position: relative;
  overflow: hidden;
  background: #fff;
}

.login-main__bg {
  position: absolute;
  top: 116px;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

.login-main__bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---------- Hero gradient band ---------- */
.login-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 117px;
  overflow: hidden;
  flex-shrink: 0;
}

.login-hero__gradient {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ---------- Body ---------- */
.login-body {
  position: relative;
  z-index: 1;
  padding: 80px 12px 100px;
  min-height: calc(100vh - var(--header-height) - 117px);
}

/* ---------- Card ---------- */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 649px;
  margin: 0 auto;
  padding: 100px 70px 88px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.11);
}

.login-card__title {
  margin: 0 0 72px;
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #ccad88;
}

/* ---------- Form ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-family: var(--font-primary);
}

body.woocommerce-account.login-page .login-form.woocommerce-form,
body.woocommerce-account.login-page .login-form.woocommerce-form-login,
body.woocommerce-account.login-page .login-form.login {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  max-width: none !important;
}

.login-form__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form__label {
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  color: #152042;
}

.login-form__input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid #d9d9d9;
  border-radius: 14px;
  background: #fff;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: #4a4a4a;
  outline: none;
  transition: border-color 0.2s ease;
}

.login-form__input::placeholder {
  color: #c8c8c8;
}

.login-form__input:focus {
  border-color: #152042;
}

.login-form .show-password-input,
.login-form button.show-password-input {
  display: none !important;
}

.login-form__field--password {
  position: relative;
}

.login-form__field--password .login-form__options {
  margin-top: 18px;
}

.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-form__remember {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: #ccad88;
  white-space: nowrap;
}

.login-form__checkbox {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  accent-color: #152042;
  flex-shrink: 0;
  vertical-align: middle;
}

.login-form__remember span {
  display: inline-block;
  line-height: 1;
}

.login-form__forgot {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #4c4c4c;
  white-space: nowrap;
}

.login-form__forgot:hover {
  opacity: 0.75;
}

.login-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  margin-top: 24px !important;
  padding: 0 14px;
  border: none;
  border-radius: 100px !important;
  background-color: #152042 !important;
  background-image: none !important;
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: #fff !important;
  cursor: pointer;
  transition: opacity 0.2s ease;
  overflow: hidden;
}

.login-form__submit:hover {
  opacity: 0.9;
}

/* ---------- Register link ---------- */
.login-card__register {
  margin: 14px 0 0;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #4c4c4c;
  text-align: left;
}

.login-card__register a {
  margin-left: 0;
  color: #ccad88;
  text-decoration: underline;
  text-underline-position: from-font;
}

.login-card__register a:hover {
  opacity: 0.85;
}

/* ---------- Divider ---------- */
.login-card__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 36px 0 40px;
}

.login-card__divider img {
  display: block;
  width: min(150px, 24vw);
  height: 1px;
  object-fit: cover;
}

.login-card__divider span {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: #4c4c4c;
  flex-shrink: 0;
}

/* ---------- Social buttons ---------- */
.login-card__social {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 18px;
}

.login-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 150px;
  min-width: 0;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: #333;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-social-btn:hover {
  transform: translateY(-1px);
}

.login-social-btn span {
  white-space: nowrap;
}

.login-social-btn img {
  display: block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ---------- WooCommerce overrides on login page ---------- */
body.woocommerce-account.login-page .site-main--default,
body.woocommerce-account.login-page .entry-content > .woocommerce > h2,
body.woocommerce-account.login-page .woocommerce-notices-wrapper:empty {
  display: none;
}

body.woocommerce-account.login-page .entry-content,
body.woocommerce-account.login-page .entry-content > .woocommerce {
  margin: 0;
  padding: 0;
  max-width: none;
}

body.woocommerce-account.login-page .login-form__submit.button,
body.woocommerce-account.login-page .woocommerce-form-login__submit {
  border-radius: 100px !important;
  min-height: 56px;
  margin-top: 24px !important;
  border: none !important;
  background-color: #152042 !important;
  background-image: none !important;
  font-family: var(--font-primary) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #fff !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .login-card {
    padding: 40px 32px 48px;
  }

  .login-card__title {
    margin-bottom: 48px;
    font-size: 30px;
  }

  .login-form__label {
    font-size: 22px;
  }

  .login-form__input {
    height: 56px;
    font-size: 18px;
  }

  .login-form__submit {
    height: 56px;
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .login-main__bg {
    top: calc(clamp(86px, 19vw, 117px) - 1px);
  }

  .login-hero {
    height: clamp(86px, 19vw, 117px);
    background: linear-gradient(102deg, #071949 0%, #6794e6 100%);
  }

  .login-hero__gradient {
    height: 100% !important;
  }

  .login-body {
    padding: clamp(44px, 9.8vw, 56px) clamp(31px, 6.9vw, 40px) 72px;
    min-height: calc(100vh - var(--header-height) - clamp(86px, 19vw, 117px));
  }

  .login-card {
    max-width: 390px;
    padding: clamp(30px, 6.9vw, 36px) clamp(32px, 10.2vw, 46px) clamp(25px, 6.2vw, 28px);
    border-radius: 20px;
    box-shadow: 0 0 19.4px rgba(0, 0, 0, 0.25);
  }

  .login-card__title {
    margin-bottom: clamp(28px, 6.2vw, 34px);
    font-size: clamp(22px, 5.3vw, 24px);
    font-weight: 600;
    line-height: 1.25;
  }

  .login-form {
    gap: clamp(10px, 2.8vw, 13px);
    margin: clamp(36px, 8.8vw, 40px) 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .login-form__field {
    gap: 6px;
  }

  .login-form__label {
    font-size: clamp(20px, 4.7vw, 22px);
    line-height: 1.25;
  }

  .login-form__input {
    height: clamp(36px, 8.4vw, 38px);
    padding: 0 8px;
    border-radius: 5px;
    font-size: clamp(13px, 3.3vw, 15px);
  }

  .login-form__options {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
  }

  .login-form__field--password .login-form__options {
    margin-top: 13px;
  }

  .login-form__remember,
  .login-form__forgot {
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.35;
  }

  .login-form__remember {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }

  .login-form__checkbox {
    display: inline-block !important;
    width: 15px;
    height: 15px;
    border-radius: 3px;
  }

  .login-form__remember span {
    display: inline-block !important;
    margin-left: 0;
  }

  .login-form__submit {
    height: clamp(36px, 8.4vw, 38px);
    margin-top: clamp(22px, 5.3vw, 24px) !important;
    padding: 0 14px;
    font-size: clamp(20px, 4.9vw, 22px);
  }

  body.woocommerce-account.login-page .login-form__submit.button,
  body.woocommerce-account.login-page .woocommerce-form-login__submit {
    min-height: clamp(36px, 8.4vw, 38px);
    margin-top: clamp(22px, 5.3vw, 24px) !important;
    font-size: clamp(20px, 4.9vw, 22px) !important;
    line-height: 1 !important;
  }

  .login-card__register {
    margin-top: 19px;
    font-size: clamp(13px, 3.2vw, 14px);
    line-height: 1.35;
    text-align: left;
  }

  .login-card__divider {
    gap: 9px;
    margin: clamp(28px, 7.1vw, 32px) 0 20px;
  }

  .login-card__divider img {
    width: clamp(90px, 30vw, 136px);
  }

  .login-card__divider span {
    font-size: clamp(13px, 3.2vw, 14px);
  }

  .login-card__social {
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
  }

  .login-social-btn {
    width: 100%;
    max-width: 300px;
    height: 29px;
    flex: 0 0 auto;
    gap: 4px;
    padding: 0 12px;
    font-size: clamp(14px, 3.5vw, 16px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), 0 0 2px rgba(0, 0, 0, 0.25);
  }

  .login-social-btn img {
    width: 16px;
    height: 16px;
  }
}
