@import url("./fonts.css");

/* ================================================
   ROOT VARIABLES
   ================================================ */
:root {
  --main-color-light: #f9f8f2;
  --main-color-dark: #272727;
  --main-gradient: linear-gradient(180deg,
      rgba(39, 39, 39, 1) 0%,
      rgba(39, 39, 39, 0) 100%);
  --font-primary: "Nyght Serif";
  --font-secondary: "Hauora";
}

/* ================================================
   RESET & BASE
   ================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--main-color-light);
  overflow-x: hidden;
}

/* ================================================
   NAVBAR
   ================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10rem;
  background: var(--main-gradient);
  color: var(--main-color-light);
  font-family: var(--font-secondary);
  transform: translateY(0);
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
}

nav.hide {
  transform: translateY(-100%);
}

nav.show-scrolled {
  background-color: rgba(39, 39, 39, 1);
  transform: translateY(0);
}

.nav-logo {
  color: var(--main-color-light);
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: 300;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  margin-right: 6rem;
}

.nav-links ul {
  display: flex;
  list-style: none;
  gap: 6rem;
  margin: 0;
}

.nav-links li {
  display: inline-block;
}

.nav-links a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  color: var(--main-color-light);
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 200;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  border-bottom: 2px solid var(--main-color-light);
  transform: translateY(-2px);
}

.nav-auth {
  display: flex;
  gap: 1rem;
}

.nav-auth .login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--main-color-light);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ================================================
   ICON SWAP: outline -> filled/bold saat hover
   (dipakai oleh tombol login & tombol close sidebar)
   ================================================ */
.icon-swap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-swap .icon-default,
.icon-swap .icon-hover {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.icon-swap .icon-hover {
  opacity: 0;
}

.icon-swap:hover .icon-default {
  opacity: 0;
}

.icon-swap:hover .icon-hover {
  opacity: 1;
}

/* ================================================
   SIDEBAR & BACKDROP
   ================================================ */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1001;
  width: 25rem;
  height: 100%;
  padding: 3.5rem;
  background-color: var(--main-color-light);
  color: var(--main-color-dark);

  /* posisi awal: nyembunyi di luar layar (kiri) */
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar .btn-close {
  width: 2rem;
  height: 2rem;
  margin-bottom: 5px;
  background: none;
  border: none;
  color: var(--main-color-dark);
  font-size: 2rem;
  cursor: pointer;
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* ================================================
   LOGIN FORM
   ================================================ */
.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6rem;
}

.login-header h1 {
  color: var(--main-color-dark);
  font-family: var(--font-primary);
  font-size: 2.5rem;
  font-weight: 500;
}

.login-header .btn-close {
  color: var(--main-color-dark);
  text-align: center;
  transition: all 0.3s ease;
}

/* Hover "tebal" sekarang direpresentasikan lewat swap ke ikon versi filled (bi-x-lg),
   ditangani oleh class .icon-swap di atas */

.login-form {
  align-items: start;
}

.login-form form {
  display: flex;
  flex-direction: column;
}

.login-form label {
  margin-bottom: 2.5rem;
  color: var(--main-color-dark);
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 400;
}

.login-form input {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  background-color: transparent;
  border-top: none;
  border-right: none;
  border-left: none;
  border-bottom: 2px solid var(--main-color-dark);
  outline: none;
  font-size: 1.5rem;
  font-weight: 300;
}

.login-form input::placeholder {
  color: rgba(0, 0, 0, 0.4);
  transition: all 0.35s ease;
}

.login-form input:focus::placeholder {
  opacity: 0;
}

.login-form button {
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding: 10px 2rem 8px;
  background-color: var(--main-color-dark);
  color: var(--main-color-light);
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.login-form button:hover {
  opacity: 0.8;
}

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  background-image: url("../images/pressBannerWeb.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero h1 {
  color: var(--main-color-light);
  font-family: var(--font-primary);
  font-size: 4.5rem;
  font-weight: 300;
  text-align: center;
}

/* ================================================
   ABOUT US
   ================================================ */
.about-us {
  display: flex;
  align-items: center;
  justify-content: end;
  width: 100%;
  height: 80rem;
}

.about-us-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 109rem;
  height: 67.5rem;
}

.about-us-image {
  width: 60rem;
  height: 60rem;
}

.about-us-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-us-content {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: 40rem;
  height: 100%;
  padding-top: 10rem;
  text-align: left;
}

.about-us-content .title {
  color: var(--main-color-dark);
  font-family: var(--font-primary);
  font-size: 4.5rem;
  font-weight: 400;
}

.about-us-content .subtitle {
  margin-bottom: 2.5rem;
  color: var(--main-color-dark);
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  font-weight: 400;
}

.about-us-desc {
  color: var(--main-color-dark);
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 1.25px;
  line-height: 100%;
}

/* ================================================
   PRODUCT
   ================================================ */
.product {
  width: 100%;
  padding: 4rem 0;
}

.product-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 10rem;
}

.product-container .title {
  margin-bottom: 4rem;
  color: var(--main-color-dark);
  font-family: var(--font-primary);
  font-size: 4.5rem;
  font-weight: 400;
}

.product-container .subtitle {
  margin-bottom: 1rem;
  color: var(--main-color-dark);
  font-family: var(--font-secondary);
  font-size: 2.5rem;
  font-weight: 400;
}

/* ================================================
   PRODUCT CAROUSEL
   ================================================ */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1rem;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
}

.product-track {
  display: flex;
  gap: 1.75rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-card {
  position: relative;
  flex: 0 0 calc((100% - 3.5rem) / 3);
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
}

.landing-card img {
  display: block;
  width: 100%;
  height: 38rem;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.landing-card:hover img {
  transform: scale(1.05);
}

/* Hover overlay — dark gradient from bottom */
.landing-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.5rem;
  background: linear-gradient(0deg,
      rgba(0, 0, 0, 0.75) 0%,
      rgba(0, 0, 0, 0.3) 40%,
      rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.landing-card:hover .landing-card-overlay {
  opacity: 1;
}

.landing-card-category {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
}

.landing-card-title {
  margin-bottom: 0.25rem;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.2;
}

.landing-card-price {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 300;
}

.landing-card-btn {
  display: inline-block;
  width: fit-content;
  padding: 0.5rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.08rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.landing-card-btn:hover {
  background: #fff;
  border-color: #fff;
  color: var(--main-color-dark);
}

/* Carousel nav arrows */
.carousel-nav {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: 1px solid var(--main-color-dark);
  border-radius: 50%;
  color: var(--main-color-dark);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-nav:hover {
  background: var(--main-color-dark);
  color: var(--main-color-light);
}

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.carousel-dots .dot {
  width: 0.5rem;
  height: 0.5rem;
  background: rgba(39, 39, 39, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dots .dot.active {
  background: var(--main-color-dark);
  transform: scale(1.3);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100vh;
}

.footer .side-image {
  width: 50%;
  height: 100%;
  object-fit: cover;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10rem;
}

.footer-content h2 {
  margin-bottom: 1rem;
  color: var(--main-color-dark);
  font-family: var(--font-primary);
  font-size: 4.5rem;
  font-weight: 400;
  text-align: center;
}

.footer-content p {
  margin-bottom: 2rem;
  color: var(--main-color-dark);
  font-family: var(--font-secondary);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 1.25px;
  line-height: 100%;
}

.footer hr {
  width: 100%;
  height: 2px;
  margin-bottom: 2rem;
  background-color: var(--main-color-dark);
}

.footer-links {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0 1rem;
}

.footer-links a {
  margin-bottom: 1rem;
  color: var(--main-color-dark);
  font-family: var(--font-secondary);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  line-height: 100%;
  text-decoration: none;
}

.link-footer {
  display: flex;
  flex-direction: column;
}

.link-footer a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-footer span {
  margin-top: 2px;
  font-family: var(--font-secondary);
  font-size: 1.25rem;
  font-weight: 400;
  text-decoration: none;
}

.link-footer .social-icon {
  width: 24px;
  height: 24px;
}

.footer-bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  padding: 0 1rem;
}

.footer-bottom p {
  color: var(--main-color-dark);
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 1.25px;
  line-height: 100%;
}

.text-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  text-align: center;
}

/* ==========================================================
   LOGIN PAGE - STANDALONE
   ========================================================== */

.login-page {
    width: 100vw;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    align-items: center;     /* Mengetengahkan secara horisontal */
    justify-content: center; /* Mengetengahkan secara vertikal */

    background-color: var(--main-color-light);
    box-sizing: border-box;
}


/* ==========================================================
   LOGO
   ========================================================== */

.login-logo {
  margin-top: 0;
  margin-bottom: 1.7rem;

  color: var(--main-color-dark);
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}


/* ==========================================================
   LOGIN CARD
   ========================================================== */

.login-page .login-card {
  width: 34.25rem;
  min-height: 34.25rem;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 4.5rem 2.5rem 3.75rem;

  background-color: #ffffff;
}


/* ==========================================================
   LOGIN TITLE
   ========================================================== */

.login-page .login-title {
  margin: 0 0 2rem;

  color: var(--main-color-dark);
  font-family: var(--font-primary);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}


/* ==========================================================
   LOGIN FORM
   ========================================================== */

.login-page .login-form {
  width: 20.6rem;

  display: block;
}

.login-page .login-form form {
  width: 100%;

  display: flex;
  flex-direction: column;
}


/* ==========================================================
   LOGIN FIELD
   ========================================================== */

.login-page .login-field {
  width: 100%;
  margin-bottom: 1.8rem;
}


/* Label */

.login-page .login-field label {
  display: block;

  margin: 0 0 0.75rem;

  color: var(--main-color-dark);
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
}


/* Input */

.login-page .login-field input {
  width: 100%;
  height: 2.45rem;

  margin: 0;
  padding: 0 1.6rem 0.55rem;

  border: none;
  border-bottom: 2px solid #666666;

  outline: none;

  background-color: transparent;

  color: var(--main-color-dark);

  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 300;
}


/* Placeholder */

.login-page .login-field input::placeholder {
  color: rgba(39, 39, 39, 0.35);
  opacity: 1;
}


/* Focus */

.login-page .login-field input:focus {
  border-bottom-color: var(--main-color-dark);
}

.login-page .login-field input:focus::placeholder {
  opacity: 0;
}


/* ==========================================================
   LOGIN BUTTON
   ========================================================== */

.login-page .login-submit {
  width: 100%;
  height: 2.4rem;

  margin: 0.05rem 0 0;
  padding: 0;

  border: none;

  background-color: var(--main-color-dark);
  color: var(--main-color-light);

  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 400;

  cursor: pointer;

  transition: opacity 0.2s ease;
}

.login-page .login-submit:hover {
  opacity: 0.8;
}


/* ==========================================================
   ERROR
   ========================================================== */

.login-page .login-error {
  width: 100%;

  margin-bottom: 1rem;

  color: #b42318;

  font-family: var(--font-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 650px) {

  .login-logo {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;

    font-size: 1.8rem;
  }

  .login-page .login-card {
    width: calc(100% - 2rem);
    min-height: auto;

    padding: 3.5rem 1.8rem 3rem;
  }

  .login-page .login-form {
    width: 100%;
    max-width: 20.6rem;
  }

  .login-page .login-title {
    font-size: 1.7rem;
  }
}