/* ============================================================ */
/* ATG PRODUCT CARD - REUSABLE CSS                              */
/* Dipakai di: index, perhiasan, print3d, sewa, detail          */
/* ============================================================ */

/* ============================================================ */
/* 1. BADGE KATEGORI - GLASSMORPHISM MODERN                    */
/* ============================================================ */

.badge-kategori {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 16px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-radius: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.badge-kategori::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 70%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.badge-kategori:hover::after {
  transform: rotate(30deg) translateX(100%);
}

.badge-kategori:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.badge-kategori:active {
  transform: scale(0.95);
}

.badge-kategori .badge-icon {
  font-size: 11px;
  line-height: 1;
  opacity: 0.9;
}

/* WARNA BADGE PER KATEGORI */
.badge-produk {
  background: rgba(99, 102, 241, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.badge-produk .badge-icon {
  color: #c7d2fe;
}

.badge-print3d {
  background: rgba(6, 182, 212, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
}

.badge-print3d .badge-icon {
  color: #a5f3fc;
}

.badge-casting {
  background: rgba(232, 184, 58, 0.9);
  color: #1e293b;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 20px rgba(232, 184, 58, 0.25);
}

.badge-casting .badge-icon {
  color: #7a5a0a;
}

.badge-sewa {
  background: rgba(52, 211, 153, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.25);
}

.badge-sewa .badge-icon {
  color: #a7f3d0;
}

.badge-gadai {
  background: rgba(251, 113, 133, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(251, 113, 133, 0.25);
}

.badge-gadai .badge-icon {
  color: #fecaca;
}

.badge-bahan {
  background: rgba(148, 163, 184, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(148, 163, 184, 0.2);
}

.badge-bahan .badge-icon {
  color: #e2e8f0;
}

.badge-custom {
  background: rgba(167, 139, 250, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.25);
}

.badge-custom .badge-icon {
  color: #ddd6fe;
}

.badge-visual3d {
  background: rgba(244, 114, 182, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(244, 114, 182, 0.25);
}

.badge-visual3d .badge-icon {
  color: #fbcfe8;
}

.badge-default {
  background: rgba(203, 213, 225, 0.85);
  color: #1e293b;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(203, 213, 225, 0.15);
}

.badge-default .badge-icon {
  color: #64748b;
}

/* ============================================================ */
/* 2. CUSTOM SELECT - TANPA LIBRARY                            */
/* ============================================================ */

.custom-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 140px;
}

.custom-select-btn {
  width: 100%;
  padding: 8px 35px 8px 14px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #2c3b28;
  background-color: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  transition: all 0.3s ease;
  position: relative;
}

.custom-select-btn:hover {
  border-color: #e8b83a;
}

.custom-select-btn.active {
  border-color: #e8b83a;
  box-shadow: 0 0 0 3px rgba(232, 184, 58, 0.15);
}

.custom-select-btn .arrow {
  transition: transform 0.3s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.custom-select-btn .arrow.open {
  transform: rotate(180deg);
}

.custom-select-btn .selected-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 999;
  display: none;
  padding: 4px 0;
}

.custom-select-dropdown.open {
  display: block;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-dropdown .dropdown-item {
  padding: 8px 14px;
  font-size: 14px;
  color: #2c3b28;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
}

.custom-select-dropdown .dropdown-item:hover {
  background: #f5f5f5;
}

.custom-select-dropdown .dropdown-item.selected {
  background: rgba(232, 184, 58, 0.12);
  font-weight: 500;
  color: #e8b83a;
}

.custom-select-dropdown .dropdown-item.disabled {
  color: #b8b8b8;
  cursor: not-allowed;
}

.custom-select-dropdown .dropdown-item .check-mark {
  margin-right: 8px;
  color: #e8b83a;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-select-dropdown .dropdown-item.selected .check-mark {
  opacity: 1;
}

.custom-select-wrapper.disabled .custom-select-btn {
  background: #f5f5f5 !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
  pointer-events: none !important;
}

.custom-select-wrapper.disabled .custom-select-btn:hover {
  border-color: #e5e5e5 !important;
  box-shadow: none !important;
}

.custom-select-wrapper.disabled .custom-select-dropdown {
  pointer-events: none !important;
}

/* SORT PRODUCT */
.custom-select-wrapper[data-select="sort-products"] {
  display: inline-block !important;
  vertical-align: middle;
  min-width: 130px;
  width: auto !important;
}

.custom-select-wrapper[data-select="sort-products"] .custom-select-btn {
  border: 1px solid #e5e5e5 !important;
  background: #fff !important;
  font-weight: 500 !important;
  height: 38px !important;
  padding: 4px 30px 4px 12px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  color: #2c3b28 !important;
  transition: all 0.3s ease !important;
}

.custom-select-wrapper[data-select="sort-products"] .custom-select-btn:hover {
  border-color: #e8b83a !important;
  background: #fff !important;
}

.custom-select-wrapper[data-select="sort-products"] .custom-select-btn.active {
  border-color: #e8b83a !important;
  box-shadow: 0 0 0 3px rgba(232, 184, 58, 0.15) !important;
}

.custom-select-wrapper[data-select="sort-products"] .custom-select-btn .arrow {
  font-size: 10px !important;
  color: #999 !important;
  transition: transform 0.3s ease !important;
}

.custom-select-wrapper[data-select="sort-products"]
  .custom-select-btn
  .arrow.open {
  transform: rotate(180deg) !important;
}

.custom-select-wrapper[data-select="sort-products"] .custom-select-dropdown {
  min-width: 130px !important;
  right: 0 !important;
  left: auto !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
  background: #fff !important;
}

.custom-select-wrapper[data-select="sort-products"]
  .custom-select-dropdown
  .dropdown-item {
  font-size: 13px !important;
  padding: 6px 14px !important;
  color: #2c3b28 !important;
}

.custom-select-wrapper[data-select="sort-products"]
  .custom-select-dropdown
  .dropdown-item:hover {
  background: #f5f5f5 !important;
}

.custom-select-wrapper[data-select="sort-products"]
  .custom-select-dropdown
  .dropdown-item.selected {
  background: rgba(232, 184, 58, 0.12) !important;
  font-weight: 500 !important;
  color: #e8b83a !important;
}

/* ============================================================ */
/* 3. SEARCH INPUT                                             */
/* ============================================================ */

.custom-input-search {
  width: 100%;
  padding: 8px 14px 8px 38px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #2c3b28;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  height: 38px;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.custom-input-search:focus {
  border-color: #e8b83a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 184, 58, 0.12);
}

.custom-input-search::placeholder {
  color: #aaa;
}

/* SEARCH ERROR */
#search-error {
  display: none;
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
  padding-left: 4px;
  animation: fadeInError 0.3s ease;
}

#search-error.show {
  display: block;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-input-search.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.custom-input-search.error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}

/* FILTER WRAPPER */
.filter-select-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
}

.filter-select-wrapper .filter-item {
  flex: 1 1 140px;
  min-width: 130px;
}

.filter-select-wrapper .filter-item-search {
  flex: 1.2 1 180px;
  min-width: 150px;
}

/* ============================================================ */
/* 4. LOAD MORE BUTTON                                         */
/* ============================================================ */

.load-more-wrapper {
  text-align: center;
  padding: 16px 0 8px 0;
}

.load-more-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.load-more-container .col-btn {
  width: 25%;
  max-width: 300px;
  min-width: 180px;
}

#load-more-btn {
  width: 100%;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #e8b83a, #d4a030);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(232, 184, 58, 0.3);
}

#load-more-btn:hover {
  background: linear-gradient(135deg, #f0c850, #e8b83a);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(232, 184, 58, 0.4);
}

#load-more-btn:active {
  transform: translateY(0);
}

#load-more-btn .spinner-loading {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#load-more-btn.loading .spinner-loading {
  display: inline-block;
}

#load-more-btn.loading .btn-text {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.load-more-wrapper .end-of-products {
  display: none;
  color: #999;
  font-size: 13px;
  letter-spacing: 0.5px;
  margin-top: 10px;
}

.load-more-wrapper .end-of-products.show {
  display: block;
}

/* ============================================================ */
/* 5. QUICK VIEW MODAL - FULL CSS                              */
/* ============================================================ */

#quickViewModal {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  z-index: 999999 !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 20px !important;
  box-sizing: border-box !important;
}

#quickViewModal.show {
  display: flex !important;
}

#quickViewModal .qv-modal-container {
  background: #fff !important;
  border-radius: 16px !important;
  max-width: 900px !important;
  width: 95% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3) !important;
  animation: qvFadeIn 0.3s ease !important;
  position: relative !important;
}

@keyframes qvFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#quickViewModal .qv-modal-close {
  position: sticky !important;
  top: 10px !important;
  float: right !important;
  margin: 10px 16px 0 0 !important;
  background: rgba(0, 0, 0, 0.06) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 38px !important;
  height: 38px !important;
  font-size: 20px !important;
  color: #666 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  transition: all 0.25s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#quickViewModal .qv-modal-close:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #222 !important;
  transform: rotate(90deg) !important;
}

#quickViewModal .qv-modal-body {
  padding: 20px 30px 30px 30px !important;
}

#quickViewModal .qv-body {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 30px !important;
}

#quickViewModal .qv-body .text-center {
  grid-column: 1 / -1 !important;
}

#quickViewModal .qv-thumb-wrapper {
  position: relative !important;
  width: 100% !important;
  padding-top: 100% !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #f5f5f5 !important;
}

#quickViewModal .qv-thumb-wrapper.hide {
  display: none !important;
}

#quickViewModal .qv-product-thumb {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
  cursor: zoom-in !important;
}

#quickViewModal .qv-thumb-filter-group {
  display: flex !important;
  gap: 8px !important;
  margin-top: 12px !important;
  flex-wrap: wrap !important;
}

#quickViewModal .qv-thumb-filter {
  width: 60px !important;
  height: 60px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  border: 2px solid transparent !important;
  transition: all 0.3s ease !important;
}

#quickViewModal .qv-thumb-filter:hover {
  border-color: #ddd !important;
}

#quickViewModal .qv-thumb-filter.active {
  border-color: #e8b83a !important;
}

#quickViewModal .qv-thumb-filter img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

#quickViewModal .qv-contents {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

#quickViewModal .qv-rating-stars-group {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

#quickViewModal .qv-product-title {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #2c3b28 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

#quickViewModal .qv-stock {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #22c55e !important;
  background: rgba(34, 197, 94, 0.1) !important;
  padding: 2px 12px !important;
  border-radius: 50px !important;
}

#quickViewModal .qv-stock.out-of-stock {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

#quickViewModal .qv-product-price {
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #e8b83a !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

#quickViewModal .qv-old-price {
  font-size: 16px !important;
  color: #999 !important;
  text-decoration: line-through !important;
  font-weight: 400 !important;
}

#quickViewModal .qv-product-uniques {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding-top: 8px !important;
  border-top: 1px solid #f0f0f0 !important;
}

#quickViewModal .qv-product-unipue {
  font-size: 13px !important;
  color: #666 !important;
}

#quickViewModal .qv-product-unipue span:first-child {
  font-weight: 600 !important;
  color: #333 !important;
}

#quickViewModal .qv-badge {
  display: inline-block !important;
  padding: 2px 10px !important;
  background: #f0f0f0 !important;
  color: #666 !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  margin-right: 4px !important;
  font-weight: 500 !important;
}

#quickViewModal .qv-share-social {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding-top: 8px !important;
}

#quickViewModal .qv-share-social .qv-platform {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: #f5f5f5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #666 !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  font-size: 13px !important;
}

#quickViewModal .qv-share-social .qv-platform:hover {
  background: #e8b83a !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
}

/* ============================================================ */
/* 6. ATG CART ACTION - GOLD THEME                             */
/* ============================================================ */

.atg-cart-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}

.atg-qty-control {
  display: flex;
  align-items: center;
  background: #f8f8f8;
  border-radius: 10px;
  border: 2px solid #e8e8e8;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 44px;
  flex-shrink: 0;
}

.atg-qty-control:hover {
  border-color: #e8b83a;
  box-shadow: 0 0 0 3px rgba(232, 184, 58, 0.12);
}

.atg-qty-control:focus-within {
  border-color: #e8b83a;
  box-shadow: 0 0 0 3px rgba(232, 184, 58, 0.15);
}

.atg-qty-btn {
  width: 38px;
  height: 44px;
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  user-select: none;
}

.atg-qty-btn:hover {
  background: rgba(232, 184, 58, 0.08);
  color: #e8b83a;
}

.atg-qty-btn:active {
  transform: scale(0.92);
}

.atg-qty-btn .fa-icon {
  font-size: 12px;
  font-weight: 400;
}

.atg-qty-btn.atg-qty-plus {
  font-weight: 600;
  font-size: 16px;
  color: #e8b83a;
}

.atg-qty-btn.atg-qty-plus:hover {
  background: rgba(232, 184, 58, 0.12);
  color: #c99a2a;
}

.atg-qty-input {
  width: 44px;
  height: 44px;
  border: none;
  border-left: 2px solid #e8e8e8;
  border-right: 2px solid #e8e8e8;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #2c3b28;
  background: #fff;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}

.atg-qty-input::-webkit-inner-spin-button,
.atg-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.atg-add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(
    145deg,
    #f0d060 0%,
    #e8b83a 40%,
    #d4a030 70%,
    #c99a2a 100%
  );
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: auto;
  box-shadow: 0 4px 20px rgba(232, 184, 58, 0.35);
}

.atg-add-cart:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 8px 35px rgba(232, 184, 58, 0.5),
    0 0 60px rgba(232, 184, 58, 0.1);
  color: #fff;
  background: linear-gradient(
    145deg,
    #f5d870 0%,
    #f0c850 40%,
    #e8b83a 70%,
    #d4a030 100%
  );
}

.atg-add-cart:active {
  transform: scale(0.92);
}

.atg-add-cart::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.atg-add-cart:hover::after {
  transform: rotate(30deg) translateX(100%);
}

.atg-add-cart::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5d870, #e8b83a, #f5d870, #e8b83a);
  background-size: 300% 300%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: atgGoldGlow 3s ease-in-out infinite;
}

.atg-add-cart:hover::before {
  opacity: 1;
}

@keyframes atgGoldGlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.atg-add-cart .atg-cart-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.atg-add-cart:hover .atg-cart-icon {
  transform: scale(1.1) rotate(-5deg);
}

.atg-add-cart .atg-cart-icon-second {
  position: absolute;
  opacity: 0;
  transform: translateX(-10px) scale(0.5);
  transition: all 0.3s ease;
}

.atg-add-cart:hover .atg-cart-icon-second {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.atg-add-cart .atg-cart-icon-first {
  transition: all 0.3s ease;
}

.atg-add-cart:hover .atg-cart-icon-first {
  opacity: 0;
  transform: translateX(10px) scale(0.5);
}

.atg-add-cart .atg-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: #2c3b28;
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}

.atg-add-cart .atg-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2c3b28;
}

.atg-add-cart:hover .atg-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Stock Info */
.atg-qty-stock-info {
  display: block;
  font-size: 10px;
  color: #999;
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.3s ease;
}

.atg-qty-stock-info.atg-stock-low {
  color: #f59e0b;
}

.atg-qty-stock-info.atg-stock-out {
  color: #ef4444;
}

.atg-qty-stock-info.atg-stock-available {
  color: #22c55e;
}

/* ============================================================ */
/* 7. LIST VIEW - FORCE TEXT LEFT                              */
/* ============================================================ */

#product-list .single-shopping-card-one .body-content,
#product-list .single-shopping-card-one.discount-offer .body-content {
  text-align: left !important;
  align-items: flex-start !important;
}

#product-list .single-shopping-card-one .body-content .title,
#product-list .single-shopping-card-one .body-content h4.title {
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: flex-start !important;
}

#product-list .single-shopping-card-one .body-content .availability {
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#product-list .single-shopping-card-one .body-content .price-area {
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#product-list .single-shopping-card-one .body-content .price-area .current {
  text-align: left !important;
}

#product-list .single-shopping-card-one .body-content .price-area .previous {
  text-align: left !important;
}

#product-list .single-shopping-card-one .atg-cart-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* LIST VIEW - DISCOUNT OFFER OVERRIDE */
#product-list .single-shopping-card-one.discount-offer {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 18px !important;
  background: #ffffff !important;
  margin-bottom: 15px !important;
  padding: 15px !important;
}

@media only screen and (max-width: 767px) {
  #product-list .single-shopping-card-one.discount-offer {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

#product-list .single-shopping-card-one.discount-offer .thumbnail-preview {
  width: 260px !important;
  min-width: 260px !important;
  height: 260px !important;
  flex-shrink: 0 !important;
  border: 1px solid #eaeaea !important;
  overflow: hidden !important;
  border-radius: 6px !important;
}

@media only screen and (max-width: 767px) {
  #product-list .single-shopping-card-one.discount-offer .thumbnail-preview {
    width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
  }
}

#product-list .single-shopping-card-one.discount-offer .thumbnail-preview img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

@media only screen and (max-width: 767px) {
  #product-list
    .single-shopping-card-one.discount-offer
    .thumbnail-preview
    img {
    height: auto !important;
  }
}

#product-list .single-shopping-card-one.discount-offer .body-content {
  padding-top: 0 !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 4px !important;
}

#product-list .single-shopping-card-one.discount-offer .body-content .title {
  font-size: 18px !important;
  font-weight: 600 !important;
  margin-bottom: 4px !important;
  text-align: left !important;
}

#product-list
  .single-shopping-card-one.discount-offer
  .body-content
  .availability {
  font-size: 14px !important;
  color: #888 !important;
  margin-bottom: 6px !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

#product-list
  .single-shopping-card-one.discount-offer
  .body-content
  .price-area {
  margin-top: 4px !important;
  margin-bottom: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: left !important;
  justify-content: flex-start !important;
}

#product-list
  .single-shopping-card-one.discount-offer
  .body-content
  .price-area
  .current {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--color-danger) !important;
}

#product-list
  .single-shopping-card-one.discount-offer
  .body-content
  .price-area
  .previous {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #74787c !important;
  position: relative !important;
}

#product-list
  .single-shopping-card-one.discount-offer
  .body-content
  .price-area
  .previous::after {
  position: absolute !important;
  left: -5% !important;
  top: 50% !important;
  content: "" !important;
  height: 1px !important;
  width: 110% !important;
  background: #74787c !important;
}

#product-list
  .single-shopping-card-one.discount-offer
  .body-content
  .deskripsi-singkat-list {
  font-size: 14px;
  line-height: 1.6;
  color: #6e777d;
  margin: 4px 0 8px 0;
  text-align: justify;
  text-justify: inter-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 67px;
  padding-right: 5px;
}

#product-list
  .single-shopping-card-one.discount-offer:hover
  .body-content
  .deskripsi-singkat-list {
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  max-height: none;
  overflow: visible;
}

#product-list .single-shopping-card-one.discount-offer .atg-cart-action {
  margin-top: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

#product-list .single-shopping-card-one.discount-offer .atg-qty-control {
  height: 38px !important;
}

#product-list .single-shopping-card-one.discount-offer .atg-qty-btn {
  width: 32px !important;
  height: 38px !important;
  font-size: 12px !important;
}

#product-list .single-shopping-card-one.discount-offer .atg-qty-input {
  width: 38px !important;
  height: 38px !important;
  font-size: 14px !important;
}

#product-list .single-shopping-card-one.discount-offer .atg-add-cart {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
}

#product-list
  .single-shopping-card-one.discount-offer
  .atg-add-cart
  .atg-cart-icon {
  font-size: 15px !important;
}

#product-list .single-shopping-card-one .action-share-option {
  display: none !important;
}

#product-list .single-shopping-card-one .badge {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  z-index: 2 !important;
}

@media only screen and (max-width: 768px) {
  #product-list
    .single-shopping-card-one.discount-offer
    .body-content
    .deskripsi-singkat-list {
    font-size: 13px;
    line-height: 1.5;
    max-height: 58px;
  }
}

@media only screen and (max-width: 576px) {
  #product-list
    .single-shopping-card-one.discount-offer
    .body-content
    .deskripsi-singkat-list {
    font-size: 12px;
    line-height: 1.5;
    max-height: 54px;
    margin: 4px 0 6px 0;
  }
}

/* ============================================================ */
/* 8. RESPONSIF - SEMUA DALAM SATU TEMPAT                      */
/* ============================================================ */

@media (max-width: 991px) {
  .badge-kategori {
    padding: 4px 12px;
    font-size: 9px;
    letter-spacing: 0.4px;
  }

  .badge-kategori .badge-icon {
    font-size: 9px;
  }

  .load-more-container .col-btn {
    width: 33.33%;
    max-width: 280px;
    min-width: 160px;
  }

  #load-more-btn {
    padding: 9px 18px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .filter-select-wrapper .filter-item,
  .filter-select-wrapper .filter-item-search {
    flex: 1 1 100%;
    min-width: 100%;
  }

  #quickViewModal .qv-modal-container {
    width: 98% !important;
    border-radius: 12px !important;
  }

  #quickViewModal .qv-modal-body {
    padding: 15px !important;
  }

  #quickViewModal .qv-body {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .atg-qty-control {
    height: 40px;
  }

  .atg-qty-btn {
    width: 34px;
    height: 40px;
    font-size: 13px;
  }

  .atg-qty-input {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .atg-add-cart {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }

  .atg-add-cart .atg-cart-icon {
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  .badge-kategori {
    padding: 3px 10px;
    font-size: 8px;
    letter-spacing: 0.3px;
    gap: 3px;
  }

  .badge-kategori .badge-icon {
    font-size: 8px;
  }

  .custom-select-wrapper[data-select="sort-products"] {
    min-width: 90px !important;
  }

  .custom-select-wrapper[data-select="sort-products"] .custom-select-btn {
    font-size: 13px !important;
    padding: 4px 24px 4px 6px !important;
  }

  .custom-select-wrapper[data-select="sort-products"] .custom-select-dropdown {
    min-width: 120px !important;
  }

  .load-more-container .col-btn {
    width: 100%;
    max-width: 100%;
    min-width: unset;
  }

  #load-more-btn {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 8px;
  }

  .load-more-wrapper {
    padding: 20px 0 10px 0;
  }

  #quickViewModal .qv-modal-body {
    padding: 12px !important;
  }

  #quickViewModal .qv-body {
    gap: 15px !important;
  }

  .atg-cart-action {
    gap: 6px;
  }

  .atg-qty-control {
    height: 36px;
    border-radius: 8px;
  }

  .atg-qty-btn {
    width: 30px;
    height: 36px;
    font-size: 12px;
  }

  .atg-qty-btn .fa-icon {
    font-size: 10px;
  }

  .atg-qty-input {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .atg-add-cart {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .atg-add-cart .atg-cart-icon {
    font-size: 14px;
  }

  #quickViewModal .atg-qty-control {
    height: 36px !important;
    border-radius: 8px !important;
  }

  #quickViewModal .atg-qty-btn {
    width: 30px !important;
    height: 36px !important;
    font-size: 12px !important;
  }

  #quickViewModal .atg-qty-btn .fa-icon {
    font-size: 10px !important;
  }

  #quickViewModal .atg-qty-input {
    width: 36px !important;
    height: 36px !important;
    font-size: 13px !important;
  }

  #quickViewModal .atg-add-cart {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
  }

  #quickViewModal .atg-add-cart .atg-cart-icon {
    font-size: 14px !important;
  }
}

@media (max-width: 400px) {
  #load-more-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .atg-qty-control {
    height: 32px;
  }

  .atg-qty-btn {
    width: 26px;
    height: 32px;
    font-size: 10px;
  }

  .atg-qty-input {
    width: 30px;
    height: 32px;
    font-size: 12px;
  }

  .atg-add-cart {
    width: 32px;
    height: 32px;
    border-radius: 6px;
  }

  .atg-add-cart .atg-cart-icon {
    font-size: 12px;
  }

  #quickViewModal .atg-qty-control {
    height: 32px !important;
  }

  #quickViewModal .atg-qty-btn {
    width: 26px !important;
    height: 32px !important;
    font-size: 10px !important;
  }

  #quickViewModal .atg-qty-input {
    width: 30px !important;
    height: 32px !important;
    font-size: 12px !important;
  }

  #quickViewModal .atg-add-cart {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
  }

  #quickViewModal .atg-add-cart .atg-cart-icon {
    font-size: 12px !important;
  }
}

/* ============================================================ */
/* 9. KARTU PRODUK SERAGAM - BERLAKU DI SEMUA HALAMAN          */
/* (beranda, katalog produk, promo, best seller)              */
/* Kartu memakai 1 markup: frontend/produk/_product_card.php  */
/* ============================================================ */

/* Samakan tinggi semua kartu dalam satu baris */
.single-shopping-card-one {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.single-shopping-card-one .body-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Judul maksimal 2 baris + reservasi tinggi 2 baris */
.single-shopping-card-one .body-content a .title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  min-height: 3em;
}

/* Tombol keranjang selalu menempel di dasar kartu.
   Spesifisitas dilebihkan karena .atg-cart-action juga
   diatur di <style> bawaan partial _product_card.php */
.single-shopping-card-one .body-content .atg-cart-action {
  margin-top: auto;
  padding-top: 12px;
}

/* Harga: angka tidak boleh putus di tengah, boleh turun baris utuh */
.single-shopping-card-one .body-content .price-area {
  flex-wrap: wrap;
  row-gap: 2px;
}

.single-shopping-card-one .body-content .price-area .current,
.single-shopping-card-one .body-content .price-area .previous {
  white-space: nowrap;
}

/* Layar mengecil: harga coret pindah ke bawah harga merah */
@media only screen and (max-width: 767px) {
  .single-shopping-card-one .body-content .price-area {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .single-shopping-card-one .body-content .price-area .current {
    font-size: 17px;
  }

  /* Tampilan list katalog tetap horizontal (kartunya lebar) */
  #product-list
    .single-shopping-card-one.discount-offer
    .body-content
    .price-area {
    flex-direction: row;
    align-items: center;
  }
}

/* ============================================================ */
/* 10. PENGECUALIAN: KARTU TRENDING PAKAI DESAIN BAWAAN THEME  */
/* .tranding-product adalah kartu horizontal (gambar kiri +   */
/* teks kanan) sesuai html/mart2/index.html, jadi aturan       */
/* seragam section 9 di atas dibatalkan khusus untuknya.      */
/* ============================================================ */

.single-shopping-card-one.tranding-product {
  height: auto;
  flex-direction: row;
  align-items: center;
  text-align: left;
}

.single-shopping-card-one.tranding-product .thumbnail-preview {
  height: 130px;
  min-width: 130px;
  flex: 0 0 auto;
}

.single-shopping-card-one.tranding-product .thumbnail-preview img {
  height: 130px;
  width: 130px;
  object-fit: cover;
}

.single-shopping-card-one.tranding-product .body-content {
  display: block;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.single-shopping-card-one.tranding-product .body-content a .title {
  display: block;
  min-height: 0;
  line-height: inherit;
}

@media only screen and (max-width: 767px) {
  .single-shopping-card-one.tranding-product .body-content .price-area {
    flex-direction: row;
    align-items: center;
  }

  .single-shopping-card-one.tranding-product .body-content .price-area .current {
    font-size: 20px;
  }
}

/* Layar sangat kecil: kecilkan thumbnail agar teks tetap muat */
@media only screen and (max-width: 479px) {
  .single-shopping-card-one.tranding-product .thumbnail-preview {
    height: 100px;
    min-width: 100px;
  }

  .single-shopping-card-one.tranding-product .thumbnail-preview img {
    height: 100px;
    width: 100px;
  }
}

/* ============================================================ */
/* 11. SWEETALERT2 GLOBAL - MODERN ATG THEME                   */
/* Berlaku untuk semua Swal.fire()/ATGS.* di frontend.         */
/* Tombol aksi selalu menyamping (flex row + gap).            */
/* ============================================================ */

.swal2-popup.atg-swal-popup {
  border-radius: 18px;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 24px 70px rgba(28, 35, 28, 0.22);
}

.swal2-title.atg-swal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1c231c;
  padding-top: 0.4rem;
}

.swal2-html-container.atg-swal-text {
  font-size: 0.95rem;
  color: #5b6470;
  margin-top: 0.4rem;
}

.swal2-actions.atg-swal-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: center;
  margin-top: 1.5rem;
  width: 100%;
}

.swal2-actions.atg-swal-actions .swal2-styled {
  margin: 0;
}

.atg-swal-btn {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}

.atg-swal-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.atg-swal-btn:active {
  transform: translateY(0) scale(0.98);
}

.atg-swal-btn:focus {
  box-shadow: 0 0 0 3px rgba(232, 184, 58, 0.35);
  outline: none;
}

.atg-swal-confirm {
  background: linear-gradient(145deg, #F0D060 0%, #E8B83A 45%, #D4A030 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(232, 184, 58, 0.4);
}

.atg-swal-danger {
  background: linear-gradient(145deg, #ef6b6b 0%, #dc3545 55%, #b02a37 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
}

.atg-swal-cancel {
  background: #eef1f4;
  color: #495057;
  box-shadow: none;
}

.atg-swal-cancel:hover {
  background: #e2e7ec;
  transform: none;
}

.atg-swal-deny {
  background: #2C3B28;
  color: #fff;
}

/* Ikon lingkaran lebih lembut */
.swal2-popup.atg-swal-popup .swal2-icon {
  border-width: 2px;
  margin: 0.5rem auto 0.75rem;
  transform: scale(0.92);
}

/* Toast ATG */
.swal2-popup.atg-swal-toast {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(28, 35, 28, 0.18);
  padding: 0.8rem 1.1rem;
}

/* Layar sangat kecil: tombol tetap menyamping, teks mengecil */
@media only screen and (max-width: 420px) {
  .swal2-popup.atg-swal-popup {
    padding: 1.5rem 1.1rem 1.25rem;
  }

  .atg-swal-btn {
    padding: 11px 10px;
    font-size: 0.88rem;
  }
}

/* ============================================================ */
/* 12. BENDERA BAHASA - jangan diputihkan saat hover           */
/* Theme memutihkan semua img submenu (untuk ikon monokrom),   */
/* kecualikan bendera lewat class flag-icon.                   */
/* ============================================================ */

.category-hover-header .category-sub-menu li a:hover img.flag-icon {
  filter: none;
}

/* ============================================================ */
/* 13. STATE TOMBOL KERANJANG KARTU - MENUNGGU RESPONS SERVER   */
/* Dipakai assets/frontend/js/product-card.js (class is-pending) */
/* Mencegah klik dobel sambil memberi tanda visual "diproses".   */
/* ============================================================ */

.single-shopping-card-one .atg-add-cart.is-pending,
#quickViewModal .atg-add-cart.is-pending {
  opacity: 0.5;
  pointer-events: none;
  animation: atgCartPending 1s ease-in-out infinite;
}

@keyframes atgCartPending {
  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 0.35;
  }
}
