/* ================= PRODUCTS PAGE ================= */
.product-page{
  padding: 70px 80px;
  background: linear-gradient(180deg, #F4FAFC 0%, #FFFFFF 100%);
  position: relative;
  overflow-x: hidden;
}

/* ================= PAGE HEADER (optional kalau guna) ================= */
.page-head{
  max-width: 1100px;
  margin: 0 auto 45px;
  text-align: center;
}

.page-title{
  font-family: 'Playfair Display', serif;
  font-size: 46px;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.page-subtitle{
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 760px;
  margin: 0 auto;
}

/* ================= CONTENT WRAPPER ================= */
.product-content{
  max-width: 1100px;
  margin: 0 auto;
}

/* ================= EACH COLLECTION ================= */
.collection-block{
  margin-bottom: 70px;
}

.collection-title{
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  color: var(--primary);
  margin-bottom: 26px;
  text-align: left;
}

/* ================= GRID ================= */
.product-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

/* ================= PRODUCT CARD ================= */
.product-card{
  background: linear-gradient(135deg, #ffffff, var(--soft-bg));
  border-radius: 22px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 14px 35px var(--shadow-light);
  transition: transform .35s ease, box-shadow .35s ease;
  position: relative;
  overflow: hidden;
}

/* subtle highlight */
.product-card::after{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(79,163,184,0.12), transparent 45%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

.product-card:hover{
  transform: translateY(-10px);
  box-shadow: 0 24px 55px var(--shadow-medium);
}

.product-card:hover::after{
  opacity: 1;
}

.product-card img{
  width: 100%;
  height: 260px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(11,63,84,0.08);
  padding: 10px;
  transition: transform .35s ease;
}

.product-card:hover img{
  transform: scale(1.03);
}

.product-card h3{
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.35;
  min-height: 44px;
}

/* ================= VIEW BUTTON ================= */
.product-card .btn{
  margin-top: 14px;
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.product-card .btn:hover{
  transform: translateY(-3px);
  box-shadow: 0 14px 30px var(--shadow-heavy);
}

/* =========================================================
   SIDEBAR (DESKTOP FIXED)
   ========================================================= */
.category-sidebar{
  position: fixed;
  top: 140px;
  right: 22px;
  width: 210px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(11,63,84,0.08);
  border-radius: 18px;
  padding: 16px 14px 14px;
  box-shadow: 0 18px 45px rgba(11,63,84,0.12);
  z-index: 999;
  transform: translateX(0);
  opacity: 1;
  transition: transform .35s ease, opacity .35s ease;
}

/* bila collapsed -> sorok sidebar */
.category-sidebar.collapsed{
  transform: translateX(260px);
  opacity: 0;
  pointer-events: none;
}

.category-sidebar::before{
  content: "CATEGORIES";
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 2px 6px 10px;
}

.category-sidebar ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.category-sidebar ul li{
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .25s ease, transform .25s ease, color .25s ease;
}

.category-sidebar ul li::after{
  content: "›";
  font-size: 18px;
  opacity: 0.35;
  transform: translateX(-2px);
  transition: .25s ease;
}

.category-sidebar ul li:hover{
  background: rgba(79,163,184,0.12);
  color: var(--secondary);
  transform: translateX(-3px);
}

.category-sidebar ul li:hover::after{
  opacity: 0.8;
  transform: translateX(2px);
}

.category-sidebar ul li.active{
  background: linear-gradient(135deg, rgba(11,63,84,0.14), rgba(79,163,184,0.18));
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(11,63,84,0.10);
}

.category-sidebar ul li.active::after{
  opacity: 0.9;
}

/* =========================================================
   TOGGLE BUTTON (DESKTOP)
   ========================================================= */
#sidebar-toggle.sidebar-toggle{
  position: fixed;
  top: 128px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 16px 35px rgba(11,63,84,0.20);
  transition: transform .25s ease, filter .25s ease;
  z-index: 1000;
}

#sidebar-toggle.sidebar-toggle:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* bila sidebar terbuka, tolak toggle ke kiri */
.category-sidebar:not(.collapsed) ~ #sidebar-toggle{
  right: 244px;
}

/* =========================================================
   WHATSAPP FLOAT
   ========================================================= */
.whatsapp-float{
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  z-index: 10002;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float img{
  width: 28px;
  height: 28px;
}

.whatsapp-float:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* =========================================================
   RESPONSIVE - MOBILE/TABLET
   ========================================================= */
@media (max-width: 768px){

  .product-page{
    padding: 22px 16px 35px;
  }

  .page-head{
    margin-bottom: 22px;
  }

  .page-title{
    font-size: 30px;
    line-height: 1.1;
  }

  .page-subtitle{
    font-size: 14px;
    line-height: 1.7;
    padding: 0 6px;
  }

  .collection-block{
    margin-bottom: 42px;
  }

  .collection-title{
    font-size: 22px;
    margin-bottom: 14px;
  }

  /* grid jadi 2 kolum */
  .product-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .product-card{
    border-radius: 18px;
    padding: 12px;
  }

  .product-card img{
    height: 190px;
    border-radius: 14px;
    padding: 8px;
  }

  .product-card h3{
    margin-top: 10px;
    font-size: 12.5px;
    min-height: 36px;
  }

  .product-card .btn{
    margin-top: 10px;
    padding: 9px 14px;
    font-size: 12px;
  }

  /* ===== MOBILE: SIDEBAR FLOATING (slide in) ===== */
  .category-sidebar{
    position: fixed;
    top: 86px;                 /* bawah navbar */
    right: 14px;
    width: 250px;
    max-height: calc(100vh - 120px);
    overflow: auto;

    border-radius: 18px;
    padding: 14px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 18px 45px rgba(11,63,84,0.12);
    z-index: 10001;

    transform: translateX(0);
    opacity: 1;
    transition: transform .25s ease, opacity .25s ease;
  }

  .category-sidebar.collapsed{
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
  }

  /* toggle button jadi bawah kanan */
  #sidebar-toggle.sidebar-toggle{
    top: auto;
    right: 16px;
    bottom: 88px;    /* atas whatsapp */
    width: 52px;
    height: 52px;
    border-radius: 16px;
    z-index: 10002;
  }

  /* tak perlu tolak button bila sidebar buka (mobile) */
  .category-sidebar:not(.collapsed) ~ #sidebar-toggle{
    right: 16px;
  }

  .whatsapp-float{
    right: 16px;
    bottom: 20px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 10002;
  }

  .whatsapp-float img{
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px){
  .product-grid{
    grid-template-columns: 1fr;
  }

  .product-card img{
    height: 220px;
  }

  .page-title{
    font-size: 28px;
  }
}

@media (max-width: 768px){
  .animate-on-scroll{
    opacity: 1 !important;
    transform: none !important;
  }
}