:root {
  --primary: #ff8a00;
  --secondary: #5b7cff;
  --bg: #fafafa;
  --text: #1f1f1f;
  --muted: #777;
  --radius: 16px;
  --soft-shadow: 0 10px 30px rgba(0,0,0,.08);
  --hover-shadow: 0 18px 45px rgba(0,0,0,.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: .2px;
}

/* ===== LAYOUT ===== */
.container {
  width: 92%;
  max-width: 1200px;
  margin: auto;
}

/* ===== HEADER ===== */
header {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.menu a {
  margin-left: 22px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  position: relative;
  font-size: 14px;
}

.menu a::after {
  content: "";
  width: 0;
  height: 2px;
  background: var(--primary);
  position: absolute;
  left: 0;
  bottom: -6px;
  transition: .3s;
}

.menu a:hover::after {
  width: 100%;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #ff9a1f, #ffc066);
  color: white;
  padding: 90px 0 70px;
  border-radius: 0 0 40px 40px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -.5px;
  max-width: 600px;
}

.hero p {
  margin-top: 12px;
  font-size: 17px;
  opacity: .95;
}

/* ===== PRODUCTS ===== */
.products {
  margin: 70px 0;
}

.products h2 {
  font-size: 28px;
  margin-bottom: 30px;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

/* CARD */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--soft-shadow);
  transition: all .35s ease;
  border: 1px solid #f0f0f0;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card small {
  color: var(--muted);
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}
.card .product-img {
  width: 100%;
  aspect-ratio: 1/1; /* membuat kotak */
  border-radius: var(--radius);
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 13px;
  overflow: hidden; /* agar gambar tidak keluar kotak */
}

.card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* gambar menyesuaikan kotak */
}

/* PRICE */
.price {
  margin: 12px 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all .25s ease;
}

.btn:hover {
  background: #3f5efb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

/* ===== CART, FORM, BOX ===== */
.box {
  background: white;
  padding: 35px;
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  max-width: 720px;
  margin: 80px auto;
}

.box h2 {
  margin-bottom: 20px;
  font-size: 22px;
}

/* ===== HR ===== */
hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 20px 0;
}

/* ===== FOOTER ===== */
footer {
  margin-top: 80px;
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 15px 0;
    gap: 10px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 15px;
  }

  .grid {
    gap: 24px;
  }
}
/* ===== LOGIN & REGISTER FORM STYLE ===== */
.form-card {
  max-width: 380px;
  margin: 120px auto;
  padding: 35px 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  background: white;
}

.form-card h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #1f1f1f;
  font-size: 22px;
  font-weight: 600;
}

.form-card input {
  width: 100%;
  padding: 12px 14px;
  margin-top: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}

.form-card input:focus {
  border-color: #ff8a00;
  box-shadow: 0 0 0 2px rgba(255,138,0,.15);
}

.form-card button {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  background: #ff8a00;
  border: none;
  color: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .25s;
}

.form-card button:hover {
  background: #ff7600;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}

.form-card a {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: #5b7cff;
  font-weight: 600;
  text-decoration: none;
}

.form-card a:hover {
  color: #ff8a00;
  text-decoration: underline;
}
/* ===== USER AREA ===== */
.user-area{
  display:flex;
  align-items:center;
  gap:10px;
}

.profile{
  display:flex;
  align-items:center;
  gap:6px;
  cursor:pointer;
  position:relative;
  color:var(--text);
  font-size:14px;
}

.avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  border:2px solid var(--primary);
  object-fit:cover;
}

.dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  min-width: 160px;
  overflow: hidden;
  z-index: 99;
  
  /* Animation */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(0,0,0,.04);
}

/* Bridge to prevent closing */
.profile::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 20px;
}

.profile:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a{
  display:block;
  padding:10px;
  font-size:13px;
  color:#333;
  text-decoration:none;
}

.dropdown a:hover{
  background:#f1f1f1;
}

/* BUTTON LOGIN REGISTER */
.btn-login,.btn-register{
  padding:6px 12px;
  border-radius:6px;
  font-weight:600;
  font-size:13px;
  text-decoration:none;
}

.btn-login{
  background:white;
  color:#5b7cff;
  border:1px solid #5b7cff;
}

.btn-register{
  background:#ff8a00;
  color:white;
}
/* ===== BUTTON KERANJANG & BELI SEKARANG ===== */
.btn-keranjang{
  background: var(--secondary);
  color: white;
  width: 48%;
  text-align: center;
}

.btn-beli{
  background: var(--primary);
  color: white;
  width: 48%;
  text-align: center;
}

.btn-keranjang:hover{
  background:#3f5efb;
}

.btn-beli:hover{
  background:#ff7600;
}

/* kalau stok habis */
.btn[style*="pointer-events:none"]{
  opacity: .6;
  cursor: not-allowed;
}
.hero-slider {
  width: 100%;
  height: 350px;
  position: relative;
  overflow: hidden;
}

.slider {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide .text {
  position: absolute;
  bottom: 40px;
  left: 40px;
  color: white;
  background: rgba(0,0,0,.4);
  padding: 15px;
  border-radius: 10px;
}
