/* ========================================
   GLOBAL STYLE
======================================== */
/* ========================================
   GOLD COLOR VARIABLES
======================================== */
:root{
  --gold-main: #4da6ff;
  --gold-dark: #1e88e5;
  --gold-soft: #bfe3ff;
  --gold-light: #eef8ff;
}

/* ========================================
   GLOBAL
======================================== */
a:hover {
  color: var(--gold-main);
}

/* ========================================
   NAVBAR
======================================== */
.navbar-brand {
  color: var(--gold-main) !important;
}

.navbar-brand:hover {
  color: var(--gold-dark) !important;
}

.navbar form input[type="search"] {
  border: 2px solid var(--gold-main);
}

.navbar form input[type="search"]:focus {
  box-shadow: 0 0 5px rgba(212,175,55,0.5);
}

.navbar form button {
  background: var(--gold-main);
  border: 2px solid var(--gold-main);
}

.navbar form button:hover {
  background: var(--gold-dark);
}

.navbar-nav .nav-link:hover {
  color: var(--gold-main) !important;
}

/* ========================================
   FILTER CARD
======================================== */
.card.filter-card .form-label {
  color: var(--gold-dark);
}

/* ========================================
   BUTTON SUCCESS
======================================== */
.btn-success {
  background: linear-gradient(
    90deg,
    var(--gold-main),
    var(--gold-dark)
  );
  border: none;
  color: #fff;
}

.btn-success:hover {
  background: linear-gradient(
    90deg,
    var(--gold-dark),
    #9f7c27
  );
}

/* ========================================
   DETAIL PRODUCT
======================================== */
.breadcrumb a {
  color: var(--gold-main);
}

.active-thumb {
  border: 2px solid var(--gold-main) !important;
}

/* ========================================
   BUTTON OPTION
======================================== */
.btn-option {
  border: 1px solid var(--gold-main);
  color: var(--gold-dark);
  background-color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.btn-option:hover {
  background-color: var(--gold-main);
  color: #fff;
  box-shadow: 0 2px 6px rgba(212,175,55,0.35);
}

.btn-option.active {
  background-color: var(--gold-main);
  color: #fff;
  border-color: var(--gold-dark);
  box-shadow: 0 3px 8px rgba(212,175,55,0.4);
}

/* ========================================
   PAGINATION SPINNER
======================================== */
#pagination .spinner {
  border-top: 3px solid var(--gold-main);
}

/* ========================================
   DROPDOWN
======================================== */
.dropdown-menu .dropdown-item:hover {
  background-color: var(--gold-main);
  color: #fff;
}

/* ========================================
   THUMBNAIL
======================================== */
.thumb:hover {
  border: 2px solid var(--gold-main);
}

/* ========================================
   SWIPER ACTIVE
======================================== */
.thumbSwiper .swiper-slide-thumb-active img {
  border: 2px solid var(--gold-main);
}

/* ========================================
   STEP / TIMELINE
======================================== */
.step.active::before {
  background: var(--gold-main);
}

.step.active::after {
  background: var(--gold-main);
}

.step.active .step-circle {
  background: var(--gold-main);
  color: #fff;
}

.step-item.active .step-circle {
  background: var(--gold-main);
  color: #fff;
}

.step-item.active::before {
  background: var(--gold-main);
}

.step-item.current .step-circle {
  border: 3px solid var(--gold-main);
  color: var(--gold-main);
}

.timeline-item.current .timeline-icon {
  box-shadow: 0 0 0 4px rgba(212,175,55,0.2);
}

/* ========================================
   BADGE
======================================== */
.badge-soft {
  background: var(--gold-light);
  color: var(--gold-dark);
}

/* ========================================
   COPY BUTTON
======================================== */
.copy-btn {
  color: var(--gold-main);
}

/* ========================================
   PAYMENT METHOD
======================================== */
.payment-method:hover {
  border-color: var(--gold-main);
  background: #fffaf0;
}

.payment-method.active {
  border-color: var(--gold-main);
  background: #fffaf0;
  box-shadow: 0 0 0 4px rgba(212,175,55,.12);
}

.payment-method.active .custom-check {
  background: linear-gradient(
    135deg,
    var(--gold-main),
    var(--gold-dark)
  );

  border-color: var(--gold-main);

  box-shadow: 0 0 0 4px rgba(212,175,55,.15);
}

/* ========================================
   FOOTER
======================================== */
footer {
  background: linear-gradient(
    90deg,
    var(--gold-main),
    var(--gold-dark)
  );
}

/* ========================================
   RESPONSIVE IMPROVEMENTS
======================================== */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  .navbar form {
    margin-top: 10px;
  }
  .product-card img {
    height: 160px;
  }
}

/* ===== DETAIL PRODUK STYLE ===== */
.breadcrumb a:hover {
  text-decoration: underline;
}
.thumb {
  transition: all 0.2s ease-in-out;
  opacity: 0.8;
}
.thumb:hover {
  transform: scale(1.05);
  opacity: 1;
}
.active-thumb {
  border: 2px solid var(--gold-main) !important;
  opacity: 1 !important;
}
#.btn-success {
#  background: linear-gradient(90deg, #28a745, #34ce57);
#  border: none;
#}
#.btn-success:hover {
#  background: linear-gradient(90deg, #218838, #28a745);
#}
#qtyInput::-webkit-inner-spin-button,
#qtyInput::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/*------BUTTON OPTION DETAIL PRODUCT-------*/
/* .btn-option { */
  /* border: 1px solid #198754; */
  /* color: #198754; */
  /* background-color: #fff; */
  /* border-radius: 8px; */
  /* padding: 6px 14px; */
  /* font-weight: 500; */
  /* transition: all 0.25s ease; */
/* } */

/* .btn-option:hover { */
  /* background-color: #198754; */
  /* color: #fff; */
  /* box-shadow: 0 2px 6px rgba(25,135,84,0.3); */
/* } */

/* .btn-option.active { */
  /* background-color: #198754; */
  /* color: #fff; */
  /* border-color: #157347; */
  /* box-shadow: 0 3px 8px rgba(25,135,84,0.4); */
/* } */


/*------LIST PRODUK--------*/
/* ====== STYLE SIDEBAR FILTER ====== */
  #filterSidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #eee;
    height: 100vh;
    position: fixed;
    top: 0;
    left: -300px;
    z-index: 1050;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
  }

  #filterSidebar.show {
    left: 0;
  }

  #filterBackdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1049;
  }

  #filterBackdrop.show {
    display: block;
  }

  /* ====== DESKTOP MODE ====== */
  @media (min-width: 992px) {
    #filterSidebar {
      position: relative;
      height: auto;
      left: 0 !important;
      width: 100%;
      padding: 1rem 1.25rem;
      border: 1px solid #eee;
      border-radius: 1rem;
      box-shadow: 0 4px 20px rgba(0,0,0,0.05);
      background: #fff;
    }

    /* bungkus sidebar supaya punya jarak */
    .sidebar-container {
      position: sticky;
      top: 90px;
      padding-left: 0.75rem;
      padding-right: 0.75rem;
    }

    /* jangan ada scroll bar di desktop */
    #filterSidebar::-webkit-scrollbar {
      width: 0;
      height: 0;
    }

    #filterBackdrop {
      display: none !important;
    }
  }

  /* ====== RESPONSIVE TOGGLE BUTTON ====== */
  #toggleFilter {
    position: relative;
    z-index: 10;
  }

  /* ====== TAMBAHAN ELEGAN ====== */
  .product-card {
    border-radius: 1rem;
    transition: transform .2s ease, box-shadow .2s ease;
  }

  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  }

  .form-label {
    font-size: 0.9rem;
    color: #555;
  }

  .form-select {
    border-radius: 0.6rem;
  }
  
  /* Efek muncul halus saat produk baru dimuat */
.product-card.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}
.product-card.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/*-------PAGING---------*/
#pagination .spinner {
  border: 3px solid #eee;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/*-------SPINNER--------*/
/* Overlay dasar */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(3px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Saat aktif */
.loading-overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* Isi spinner dengan animasi lembut */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleIn 0.4s ease forwards;
}

/* Efek masuk halus */
@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Spinner lebih besar biar lebih elegan */
.loading-content .spinner-border {
  width: 3rem;
  height: 3rem;
}
* =========================================
   FINAL FIX - SIDEBAR FILTER MOBILE MUNCUL
========================================= */
@media (max-width: 992px) {
  /* Pastikan tombol toggle terlihat */
  #toggleFilter {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 2001 !important;
    position: relative;
  }

  /* Sidebar tetap di atas semua elemen */
  #filterSidebar {
    position: fixed !important;
    top: 0;
    left: -100% !important;
    width: 80%;
    max-width: 340px;
    height: 100vh;
    background: #fff;
    z-index: 2000 !important;
    padding: 1.5rem;
    overflow-y: auto;
    box-shadow: 2px 0 25px rgba(0, 0, 0, 0.25);
    transition: left 0.35s ease-in-out;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Saat ditampilkan */
  #filterSidebar.show {
    left: 0 !important;
  }

  /* Background belakang sidebar */
  #filterBackdrop {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999 !important;
    display: none;
  }

  #filterBackdrop.show {
    display: block !important;
  }

  /* Mencegah body ikut geser */
  body.modal-open {
    overflow: hidden !important;
  }
}

@media (max-width: 768px) {
  .cart-item {
    flex-direction: row !important;
    align-items: flex-start !important;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .cart-img {
    width: 80px !important;
    margin-right: 12px;
  }

  .cart-info {
    min-width: 180px;
    flex: 1;
  }

  .cart-price {
    text-align: right;
    min-width: 120px;
    white-space: nowrap;
  }

  /* Scrollbar tampil tipis & halus di HP */
  .cart-item::-webkit-scrollbar {
    height: 6px;
  }
  .cart-item::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 4px;
  }
}

.btn-option.disabled-option {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.qty-control button {
  width: 32px;
  font-weight: bold;
}

.qty-control input {
  border-left: 0;
  border-right: 0;
  font-weight: 600;
  background: #fff;
}

.qty-control button:hover {
  background-color: #f1f1f1;
}

.btn-delete {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
}

.qty-control {
  border-radius: 20px;
  overflow: hidden;
}

.qty-control button {
  border: none;
}

.qty-control input {
  border: none;
}

.qty-control button:active {
  transform: scale(0.9);
}

/* wrapper wajib relative */
.dropdown {
  position: relative;
}

/* default menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;   /* 🔥 kunci: buka ke kiri */
  left: auto; /* matikan default bootstrap */
  display: none;
  margin-top: 0;
  min-width: 200px;
  z-index: 1000;
}

/* tampil saat hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* optional: biar lebih halus */
.dropdown-menu {
  transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #7dcea0;
  color: #fff;
}

.thumb:hover {
  transform: scale(1.1);
  transition: 0.2s;
  border: 2px solid #0d6efd;
}

.lightbox {
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.9);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.lightbox-content {
  width:90%;
  max-width:900px;
  text-align:center;
}

.close-btn {
  position:absolute;
  top:20px;
  right:30px;
  font-size:30px;
  color:#fff;
  cursor:pointer;
}

.mainSwiper img {
  max-height:500px;
  object-fit:contain;
}

.thumbSwiper img {
  height:80px;
  cursor:pointer;
  opacity:0.6;
}

.thumbSwiper .swiper-slide-thumb-active img {
  opacity:1;
  border:2px solid #0d6efd;
}

.swiper-zoom-container {
  display:flex;
  justify-content:center;
  align-items:center;
}

.swiper-zoom-container img {
  max-height:500px;
  object-fit:contain;
  cursor: zoom-in;
}

.swiper-slide {
  overflow: hidden;
}

.lightbox {
  padding-top: env(safe-area-inset-top);
}

.close-btn {
  position: fixed; /* 🔥 jangan absolute */
  top: env(safe-area-inset-top, 10px);
  right: 15px;

  width: 45px;
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
  color: #fff;

  background: rgba(0,0,0,0.6);
  border-radius: 50%;

  cursor: pointer;
  z-index: 10000; /* 🔥 pastikan di atas semua */
  backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
  .close-btn {
    width: 50px;
    height: 50px;
    font-size: 28px;
    right: 10px;
  }
}

#statusFilterBtn {
  overflow-x: auto;
  flex-wrap: nowrap;
}
#statusFilterBtn button {
  white-space: nowrap;
}

.step-wrapper {
    position: relative;
    padding-left: 30px;
}

.step {
    position: relative;
    margin-bottom: 25px;
}

.step::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
}

.step.active::before {
    background: #28a745;
}

.step::after {
    content: '';
    position: absolute;
    left: -11px;
    top: 12px;
    width: 2px;
    height: 100%;
    background: #ddd;
}

.step:last-child::after {
    display: none;
}

.card-modern {
    border-radius: 16px;
    border: none;
}

.badge-soft {
    background: #e7f1ff;
    color: #0d6efd;
}

.item-card {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.step { position: relative; padding-left: 25px; margin-bottom: 20px; }
.step::before {
    content:'';
    position:absolute;
    left:0; top:5px;
    width:12px; height:12px;
    border-radius:50%;
    background:#ccc;
}
.step.active::before { background:#28a745; }

.step::after {
    content:'';
    position:absolute;
    left:5px; top:18px;
    width:2px; height:100%;
    background:#ddd;
}
.step:last-child::after { display:none; }

.item-hover:hover {
    background:#f8f9fa;
    transition:0.2s;
}

.copy-btn {
    cursor:pointer;
    color:#0d6efd;
}

.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {opacity:0; transform:translateY(5px);}
    to {opacity:1; transform:translateY(0);}
}

.step-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 5px;
    transition: 0.3s;
}

.step.active .step-circle {
    background: #198754;
    color: #fff;
}

.step-label {
    font-size: 12px;
}

/* garis antar step */
.step::after {
    content: '';
    position: absolute;
    top: 17px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
    z-index: -1;
}

.step.active::after {
    background: #198754;
}

.step:last-child::after {
    display: none;
}

.step-vertical {
    position: relative;
    padding-left: 30px;
}

.step-item {
    position: relative;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
}

/* GARIS VERTIKAL */
.step-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #dee2e6;
}

/* HILANGKAN GARIS DI STEP TERAKHIR */
.step-item:last-child::before {
    height: 15px;
}

/* CIRCLE */
.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1;
}

/* ACTIVE */
.step-item.active .step-circle {
    background: #198754;
    color: #fff;
}

.step-item.active::before {
    background: #198754;
}

/* TEXT */
.step-content {
    margin-left: 12px;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
}

.step-item.current .step-circle {
    border: 3px solid #198754;
    background: #fff;
    color: #198754;
}

.step-item.cancelled .step-circle {
    background: #dc3545;
    color: #fff;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

/* garis utama */
.timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
}

/* ICON BULAT */
.timeline-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: -2px;
    z-index: 2;
    font-size: 16px;
}

/* CONTENT */
.timeline-content {
    margin-left: 45px;
    font-size: 14px;
}

/* ACTIVE */
.timeline-item.active .timeline-icon {
    color: #fff;
}

/* CURRENT STEP (highlight) */
.timeline-item.current .timeline-icon {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(25,135,84,0.2);
}

/* OPTIONAL HOVER */
.timeline-item:hover .timeline-icon {
    transform: scale(1.1);
}

.timeline-item.current .timeline-icon {
    transform: scale(1.2);
}

.payment-timeline {
    position: relative;
    padding-left: 30px;
}

.payment-timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #dee2e6;
}

.payment-item {
    position: relative;
    margin-bottom: 30px;
}

.payment-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;

    position: absolute;
    left: -1px;
    top: 0;
}

.payment-content {
    margin-left: 50px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
}

/* =========================================
PAYMENT CARD
========================================= */
.payment-method {
    border: 1px solid #e9ecef;
    border-radius: 16px;
    transition: all .2s ease;
    cursor: pointer;
    background: #fff;
    overflow: hidden;
}

.payment-method:hover {
    border-color: #0d6efd;
    background: #f8fbff;
}

.payment-method.active {
    border-color: #0d6efd;
    background: #eef5ff;
    box-shadow: 0 0 0 4px rgba(13,110,253,.08);
}

.payment-method.disabled {
    opacity: .65;
    background: #f8f9fa;
    cursor: not-allowed;
}

/* =========================================
CHECKBOX HIDE
========================================= */
.payment-method .form-check-input {
    display: none;
}

/* =========================================
CUSTOM CHECK
========================================= */
.custom-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s ease;
    flex-shrink: 0;
    background: #fff;
    margin-top: 2px;
}

.custom-check i {
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transform: scale(.5);
    transition: .2s ease;
}

/* =========================================
ACTIVE CHECK
========================================= */
.payment-method.active .custom-check {

    background: linear-gradient(
        135deg,
        #0d6efd,
        #3b82f6
    );

    border-color: #0d6efd;

    box-shadow: 0 0 0 4px rgba(13,110,253,.15);
}

.payment-method.active .custom-check i {
    opacity: 1;
    transform: scale(1);
}

/* =========================================
CARD BODY
========================================= */
.payment-method .card-body {
    padding: 20px;
}

/* =========================================
TRANSFER FIELD
========================================= */
#transferFields {
    display: none;
}

/* =========================================
ALERT
========================================= */
.alert {
    border-radius: 12px;
}

#heroCarousel .carousel-item img{
    height: 610px; /* atur tinggi */
    object-fit: cover; /* supaya penuh & proporsional */
}

.select2-container{
	width:100% !important;
}

.select2-container .select2-selection--single{
	height:48px !important;
	border-radius:12px !important;
	border:1px solid #ced4da !important;
	padding:8px 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered{
	line-height:30px !important;
	font-size:15px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow{
	height:46px !important;
	right:10px !important;
}

.select2-dropdown{
	border-radius:12px !important;
	overflow:hidden;
	border:1px solid #ddd;
}
