/* ================= SINGLE PRODUCT PAGE (DESKTOP + MOBILE) ================= */

/* Wrapper section */
.single-product{
  padding: 70px 20px;
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, #F4FAFC 0%, #FFFFFF 100%);
  overflow-x: hidden;
}

/* Main card container */
.product-container{
  width: 100%;
  max-width: 1250px;
  background: #fff;
  border-radius: 26px;
  padding: 46px;
  box-shadow: 0 20px 55px rgba(11,63,84,0.10);
  border: 1px solid rgba(11,63,84,0.06);

  display: flex;
  gap: 42px;
  align-items: flex-start;
  position: relative;
}

/* ============ Back button ============ */
.back-btn{
  position: absolute;
  top: 22px;
  left: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: #0B3F54;
  padding: 10px 14px;
  border-radius: 14px;
  transition: .25s ease;
  z-index: 2;
}

.back-btn:hover{
  transform: translateX(-3px);
  color: #4FA3B8;
}

/* solid style */
.back-btn.solid{
  background: rgba(11,63,84,0.06);
  border: 1px solid rgba(11,63,84,0.08);
}
.back-btn.solid:hover{
  background: rgba(79,163,184,0.12);
  border-color: rgba(79,163,184,0.20);
}

/* ============ Left: Product Image ============ */
.product-image{
  flex: 0 0 32%;
  max-width: 360px;
  margin-top: 30px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, rgba(244,250,252,0.9));
  border: 1px solid rgba(11,63,84,0.06);
  box-shadow: 0 12px 35px rgba(11,63,84,0.08);
}

.product-image img{
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.12));
  transition: opacity .25s ease, transform .25s ease;
}

.product-image img.fade{
  opacity: 0;
  transform: scale(0.98);
}

/* ============ Size Chart (middle) ============ */
.size-chart{
  flex: 0 0 33%;
  max-width: 420px;
  margin-top: 30px;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.10);
  border: 1px solid rgba(11,63,84,0.06);
  background: #fff;
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}

.size-chart:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 55px rgba(0,0,0,0.14);
}

/* ============ Right: Product Info ============ */
.product-info{
  flex: 1;
  min-width: 320px;
  margin-top: 30px;
}

.product-name{
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  color: #0B3F54;
  margin-bottom: 10px;
}

.product-price{
  font-size: 22px;
  font-weight: 600;
  color: #0B3F54;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* ============ Color Options (NO tooltip, kemas & wrap) ============ */
.color-options{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;

  padding: 14px 16px;
  margin: 14px 0 26px;
  border-radius: 18px;
  background: rgba(244,250,252,0.9);
  border: 1px solid rgba(11,63,84,0.08);
}

.color-options span{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #0B3F54;
  margin: 0 0 6px 0;
}

#selected-color{ font-weight: 700; }

/* Bulatan warna */
.color-btn{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid rgba(11,63,84,0.18);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.color-btn:hover{
  transform: scale(1.08);
  border-color: rgba(79,163,184,0.65);
  box-shadow: 0 10px 18px rgba(11,63,84,0.15);
}

.color-btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(79,163,184,0.25);
}

/* Active state */
.color-btn.active{
  transform: scale(1.08);
  border-color: rgba(79,163,184,0.95);
  box-shadow:
    0 0 0 4px rgba(79,163,184,0.20),
    0 10px 18px rgba(11,63,84,0.18);
}

/* ✅ BUANG TOOLTIP TERUS */
.color-btn::after,
.color-btn::before{
  display: none !important;
  content: none !important;
}

/* ============ Buy Button ============ */
.buy-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 34px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0B3F54, #4FA3B8);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  box-shadow: 0 14px 34px rgba(11,63,84,0.22);
}

.buy-btn:hover{
  transform: translateY(-3px);
  filter: brightness(1.05);
  box-shadow: 0 20px 50px rgba(11,63,84,0.28);
}

/* ============ Modal (Zoom Size Chart) ============ */
.modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.78);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal img{
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

.modal .close{
  position: absolute;
  top: 22px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 34px;
  color: #fff;
  cursor: pointer;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
  transition: .2s ease;
}

.modal .close:hover{
  background: rgba(255,255,255,0.18);
  transform: scale(1.05);
}

/* ================= RESPONSIVE ================= */

/* Tablet */
@media (max-width: 1024px){
  .product-container{
    flex-direction: column;
    align-items: center;
    padding: 34px;
    gap: 22px;
  }

  .product-image,
  .size-chart,
  .product-info{
    width: 100%;
    max-width: 720px;
  }

  .product-info{ text-align: center; }

  .back-btn{
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 8px;
    align-self: flex-start;
  }
}

/* ✅ MOBILE: kemas + elak whitespace + ikut gaya butik */
@media (max-width: 600px){

  /* bagi ruang bawah navbar (navbar.css kekal) */
  .single-product{
    padding: 18px 12px 28px;
  }

  .product-container{
    padding: 18px;
    border-radius: 18px;
    gap: 14px;
  }

  .back-btn{
    position: relative;
    top: auto;
    left: auto;
    margin: 0 0 6px 0;
    padding: 9px 12px;
    border-radius: 12px;
  }

  .product-image{
    margin-top: 0;
    padding: 12px;
    border-radius: 18px;
    max-width: 100%;
  }

  .product-image img{
    max-height: 420px;
  }

  .size-chart{
    margin-top: 0;
    max-width: 100%;
    border-radius: 16px;
  }

  .product-info{
    margin-top: 0;
    min-width: auto;
    text-align: left; /* mobile lebih natural */
  }

  .product-name{
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .product-price{
    font-size: 18px;
    margin-bottom: 14px;
  }

  .color-options{
    padding: 12px;
    gap: 10px;
    margin-bottom: 18px;
  }

  .color-options span{
    font-size: 13px;
    margin-bottom: 4px;
  }

  .color-btn{
    width: 34px;
    height: 34px;
    border-width: 3px;
  }

  .buy-btn{
    width: 100%;
    border-radius: 14px;
    padding: 14px 16px;
  }
}