/* ==========================================================================
   0. Variables (if you later migrate to a preprocessor, these will help)
   ========================================================================== */
:root {
  --clr-bg-start: #1b2735;
  --clr-bg-end:   #090a0f;
  --clr-primary:  #80d8ff;
  --clr-accent:   #ffdd57;
  --clr-shopee:   rgb(255,230,140);
  --clr-shopee-hover:   rgb(238,77,45);
  --clr-tokopedia:   rgb(125,251,141);
  --clr-tokopedia-hover:   rgb(0,128,0);
  --clr-light:    #e0e0e0;
  --clr-dark:     #111;
  --slider-gap:   10px;
  --card-w:       200px;
  --card-h:       280px;
}

/* ==========================================================================
   1. Global reset & body
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  overflow-y: scroll;
  overflow-x: hidden;
}
body {
  font-family: 'Exo 2', sans-serif;
  color: var(--clr-light);
  background: radial-gradient(
    ellipse at bottom,
    var(--clr-bg-start) 0%,
    var(--clr-bg-end)   100%
  ) fixed;
  position: relative;
  overflow-x: hidden;
}

/* ==========================================================================
   2. Starfield + clouds
   ========================================================================== */
.stars {
  position: fixed;
  inset: 0;
  background: url('https://www.transparenttextures.com/patterns/stardust.png')
              repeat top center transparent;
  z-index: -2;
  animation: starMove 200s linear infinite;
}
@keyframes starMove {
  to { background-position: -10000px 5000px; }
}

.cloud-container {
  position: absolute;
  top: 10%;
  width: 100%;
  height: 200px;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.clouds {
  width: 200%;
  height: 100%;
  background: url('https://www.transparenttextures.com/patterns/clouds.png')
              repeat-x;
  opacity: .4;
  animation: cloudFlow 60s linear infinite;
}
@keyframes cloudFlow {
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   3. Layout container & typography
   ========================================================================== */
.container {
  min-width: 250px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 1rem;
  position: relative;
  z-index: 1;
}
header {
  text-align: center;
  margin-bottom: 2rem;
}
header h1 {
  font-size: 2.5rem;
  color: var(--clr-accent);
  text-shadow: 0 0 10px rgba(255,221,87,0.5);
}
header p {
  margin-top: .5rem;
  font-size: 1.1rem;
  color: #c0c0c0;
}

/* ==========================================================================
   4. Navigation links
   ========================================================================== */
.sections {
  margin-bottom: 1rem;
  text-align: center;
}
.sections a {
  display: inline-block;
  margin: .3rem .6rem;
  color: var(--clr-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color .3s, text-shadow .3s;
}
.sections a:hover {
  color: #fff;
  text-shadow: 0 0 5px rgba(128,216,255,0.8);
}

/* ==========================================================================
   5. Product card & slider
   ========================================================================== */
.card {
  background: rgba(20,30,47,0.8);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex; flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

/* single-image slider */
.slider {
  position: relative;
  width: 300px;
  height: 300px;
  overflow: hidden;
  border-radius: 8px;
  flex-shrink: 0;
}
.slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s;
  pointer-events: none;
}
.slider img.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.slider button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  padding: .2rem .6rem;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .3s;
  z-index: 2;
}
.slider:hover button {
  opacity: 1;
}
.slider .prev { left: 8px; }
.slider .next { right: 8px; }

/* ==========================================================================
   6. Preview carousel (multi-card, infinite)
   ========================================================================== */
.preview-slider {
  position: relative;
  max-width: 1140px;
  margin: 2rem auto;
  overflow: hidden;
}
.preview-slider .track {
  display: flex;
  transition: transform .6s ease;
}
.preview-slider .slide {
  position: relative;
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  height: var(--card-h);
  margin-right: var(--slider-gap);
  background: #222;
  border-radius: 8px;
  overflow: hidden;
}
.preview-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

/* overlay title/link */
.slide-title {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  padding: .2rem .6rem;
  border-radius: 4px;
  color: var(--clr-primary);
  font-size: .85rem;
  text-decoration: none;
  z-index: 2;
}

.slide-title:hover {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(5px);
  padding: .2rem .6rem;
  border-radius: 4px;
  color: rgb(255,255,255);
  font-size: 1rem;
  text-decoration: none;
  z-index: 2;
}

/* preview nav buttons */
.preview-slider .prev,
.preview-slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.8);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  padding: .4rem .8rem;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .3s;
  z-index: 3;
}
.preview-slider:hover .prev,
.preview-slider:hover .next {
  opacity: 1;
}
.preview-slider .prev { left: 10px; }
.preview-slider .next { right: 10px; }

/* ==========================================================================
   7. Lightbox
   ========================================================================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.lightbox.active {
  display: flex;
}
.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border: 4px solid #fff;
  border-radius: 4px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: .2rem .6rem;
  cursor: pointer;
  border-radius: 4px;
}
.lightbox-close { top: 20px; right: 30px; }
.lightbox-prev  { left: 30px; }
.lightbox-next  { right: 30px; }

/* ==========================================================================
   8. Product info area
   ========================================================================== */
.info {
  flex: 1;
  min-width: 500px;
}
.info b {
  display: block;
  font-size: 1.4rem;
  margin-bottom: .5rem;
}
.price {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.price .old-price {
  text-decoration: line-through;
  color: #888;
  font-size: 1.4rem;
}
.price .new-price {
  color: var(--clr-primary);
  font-weight: 700;
}

/* ==========================================================================
   9. Buy buttons & lists
   ========================================================================== */
.buy-button-shopee {
  display: inline-block;
  background: var(--clr-shopee);
  color: var(--clr-dark);
  font-weight: bold;
  padding: .6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .3s;
  margin-right: .5rem;
}
.buy-button-shopee:hover {
  background: var(--clr-shopee-hover);
  color: #fff;
}
.buy-button-tokopedia {
  display: inline-block;
  background: var(--clr-tokopedia);
  color: var(--clr-dark);
  font-weight: bold;
  padding: .6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background .3s;
  margin-right: .5rem;
}
.buy-button-tokopedia:hover {
  background: var(--clr-tokopedia-hover);
  color: #fff;
}
.card ul {
  list-style: none;
  margin-top: 1rem;
  padding-left: .5rem;
}
.card ul li {
  position: relative;
  margin: .5rem 0;
  padding-left: 1rem;
}
.card ul li:before {
  content: '•';
  position: absolute;
  left: 0; top: 0;
}

/* ==========================================================================
   10. Daftar isi columns
   ========================================================================== */
.daftar-isi {
  column-count: 3;
  column-gap: 1rem;
  text-align: left;
  padding-right: 1rem;
  margin: 1rem 0;
}
.daftar-isi ul {
  list-style: none;
  margin-top: 0rem;
  padding-left: 1.5rem;
}
.daftar-isi ul li {
  position: relative;
  margin: .5rem 0;
  padding-left: 1rem;
}
.daftar-isi ul li:before {
  content: '•';
  position: absolute;
  left: 0; top: 0;
}
.daftar-isi a {
  display: block;
  margin-bottom: .5rem;
  color: var(--clr-primary);
  text-decoration: none;
}
.daftar-isi a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   11. Footer wave
   ========================================================================== */
.footer-wave {
  max-width: 1140px;
  margin: 0 auto;
  background: rgba(17,17,17,0.4);
  backdrop-filter: blur(5px);
  padding: 0 1rem 1rem;
  color: #aaa;
  position: relative;
}
.footer-wave .wave-top {
  position: absolute;
  inset: 0 auto auto 0;
  height: 60px;
  background: url('https://www.transparenttextures.com/patterns/stardust.png') repeat;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}
.footer-wave .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(150px,1fr));
  gap: 2rem;
  padding-top: 3rem;
}
.footer-wave h4 {
  margin-bottom: .5rem;
  color: #fff;
}
.footer-wave a {
  display: block;
  margin: .3rem 0;
  font-size: .9rem;
  color: #aaa;
  text-decoration: none;
  transition: color .3s;
}
.footer-wave a:hover {
  color: #fff;
}
.footer-wave .footer-bottom {
  text-align: center;
  font-size: .8rem;
  margin-top: 1.5rem;
}

/* —— Responsive tweaks —— */
@media (max-width: 768px) {
  /* Container padding & width */
  .container {
	overflow-x: auto;
	font-size: 0.9rem;
    padding: 1rem 1rem;
    max-width: 100%;
  }

  /* Stack product card vertically */
  .card {
	font-size: 0.9rem;
    padding: 1rem;
  }
  .info {
    font-size: 0.9rem;
  }
  .info b {
    font-size: 1.1rem;
  }
  .price { font-size: 1.1rem; }
  .price .old-price { font-size: 1rem; }

  /* Make preview carousel scrollable */
  .preview-slider {
    overflow-x: auto;
    padding-bottom: 1rem;
  }
  .preview-slider .track {
    display: flex;
    transform: none !important;
    transition: none !important;
  }
  .preview-slider .slide {
    flex: 0 0 auto;
    margin-right: var(--slider-gap);
  }
  /* Hide carousel nav arrows on touch devices */
  .preview-slider .prev,
  .preview-slider .next {
    display: none;
  }

  /* One-column table of contents */
  .daftar-isi {
    column-count: 1;
    padding-right: 0;
  }

  /* Scale down headings & text */
  header h1 { font-size: 1.6rem; }
  header p  { font-size: 0.9rem; }
  .sections a { margin: .1rem .2rem; font-size: .9rem; }
}



