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

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

.login-main__bg {
  position: absolute;
  top: 106px;
  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: 106px;
  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 20px 100px;
  min-height: calc(100vh - var(--header-height) - 106px);
}

/* ---------- Card ---------- */
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 44px 60px 52px;
  background: #fff;
  box-shadow: 0 0 19.4px rgba(0, 0, 0, 0.25);
}

.login-card__title {
  margin: 0 0 56px;
  font-family: 'Inter', var(--font-primary);
  font-size: 30px;
  font-weight: 600;
  line-height: normal;
  text-align: center;
  color: #877c55;
}

/* ---------- Form ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.login-form__label {
  font-family: 'Inter', var(--font-primary);
  font-size: 26px;
  font-weight: 400;
  line-height: normal;
  color: #877c55;
}

.login-form__input {
  width: 100%;
  height: 56px;
  padding: 14px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  font-family: 'Inter', var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: normal;
  color: #333;
  outline: none;
  transition: border-color 0.2s ease;
}

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

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

.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: 20px;
}

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

.login-form__remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-family: 'Inter', var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: #4c4c4c;
}

.login-form__checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  accent-color: #877c55;
  flex-shrink: 0;
}

.login-form__forgot {
  font-family: 'Inter', var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  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: 18px !important;
  padding: 14px;
  border: none;
  border-radius: 100px !important;
  background-color: #877c55 !important;
  background-image: url('../images/login/magnific-bg.svg') !important;
  background-size: cover;
  background-position: center;
  font-family: 'Inter', var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: normal;
  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: 24px 0 0;
  font-family: 'Inter', var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: #4c4c4c;
  text-align: center;
}

.login-card__register a {
  margin-left: 4px;
  color: #877c55;
  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: 40px 0 42px;
}

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

.login-card__divider span {
  font-family: 'Inter', var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: #4c4c4c;
  flex-shrink: 0;
}

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

.login-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 6px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), 0 0 2px rgba(0, 0, 0, 0.25);
  font-family: 'Inter', 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: 18px !important;
  background-color: #877c55 !important;
  background-image: url('../images/login/magnific-bg.svg') !important;
  background-size: cover;
  background-position: center;
}

/* ---------- 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: clamp(86px, 19vw, 116px);
  }

  .login-hero {
    height: clamp(86px, 19vw, 116px);
    background: linear-gradient(180deg, #fffefe 0%, #b7a983 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, 116px));
  }

  .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 {
    gap: 5px;
  }

  .login-form__checkbox {
    width: 15px;
    height: 15px;
    border-radius: 3px;
  }

  .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;
  }
}
