/* NAVBAR */
.navbar-custom {
  background-color: #0b0b0b !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 12px 0;
  position: sticky;
  min-height: 50px;
  top: 0;
  z-index: 1000;
}

.navbar-custom img {
  max-height: 100px;
  width: auto;
}

@media (max-width: 576px) {
  .navbar-custom img {
    max-height: 80px;
    width: auto;
  }
}

/* ICON CIRCLE / BADGE */
.bg-light.rounded-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  background-color: #0b0b0b !important;
  border: 2px solid #d4af37;
}

.bg-light.rounded-circle i {
  color: #d4af37 !important;
}

.bg-light.rounded-circle:hover {
  background-color: #d4af37 !important;
  transform: scale(1.05);
}

.bg-light.rounded-circle:hover i {
  color: #0b0b0b !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

.badge.bg-success {
  background-color: transparent !important;
  color: #0b0b0b !important;
  border: 1px solid #d4af37;
  font-weight: 600;
}

/* BUTTONS */
.btn-secondary {
  background-color: #a9a9a9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  padding: 8px 14px;
  width: 100%;
  cursor: not-allowed;
}

.btn-cart {
  background-color: #0b0b0b;
  color: #d4af37;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  padding: 10px 0;
  width: 100%;
  box-shadow: none;
  transition: all 0.3s ease;
}

.btn-cart:hover {
  background-color: #d4af37;
  color: #0b0b0b;
  transform: translateY(-1px);
}

.btn-cart:focus,
.btn-cart:active,
.btn-cart:focus-visible {
  outline: none;
  box-shadow: none;
  background-color: #d4af37;
  color: #0b0b0b;
}

.btn-cart:disabled {
  background-color: #6c757d;
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:hover {
  color: white;
}

.btn-red {
  background-color: #0b0b0b;
  color: #d4af37;
  border-radius: 8px;
  font-size: 13px;
  padding: 8px 14px;
  width: 100%;
  transition: all 0.25s ease;
  box-shadow: none;
}

.btn-red i {
  color: #d4af37;
}

.btn-red:hover {
  background-color: #d4af37;
  color: #0b0b0b;
  transform: translateY(-1px);
}

.btn-red:hover i {
  color: #0b0b0b;
}

.btn-red:focus,
.btn-red:active,
.btn-red:focus-visible {
  background-color: #d4af37;
  color: #0b0b0b;
  box-shadow: none;
  outline: none;
}

.btn-red:disabled {
  background-color: #6c757d;
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-danger {
  background-color: #d4af37 !important;
  color: #0b0b0b !important;
  border: 1.5px solid #d4af37 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  width: 100%;
}

.btn-danger i {
  color: #0b0b0b !important;
}

.btn-danger:hover {
  background-color: #0b0b0b !important;
  color: #d4af37 !important;
}

.btn-danger:hover i {
  color: #d4af37 !important;
}

.btn-red:focus,
.btn-red:focus-visible,
.btn-danger:focus,
.btn-danger:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.btn-outline-secondary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline-danger {
  color: #d4af37;
  border-color: #d4af37;
}

/* LOGO BOX */
.logo-container {
  width: 40px;
  height: 40px;
  background-color: #007bff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: white;
  font-weight: bold;
}

/* CARD / PRODUCT */
.card {
  border: none;
  border-radius: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.card:hover {
  transform: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card-img-container {
  border-bottom: 1px solid #eee;
  height: 280px;
  background-color: #f8f9fa;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.card-img-top {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 15px;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 16px;
  background: white;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  color: #212121;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.text-primary,
.text-danger {
  color: #000 !important;
  font-weight: 700;
  font-size: 24px;
}

.badge {
  background: #ad1100;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
}

.d-flex.gap-2 {
  gap: 8px;
}

/* QUANTITY / INPUT GROUP */
.quantity-input {
  border: none;
  background-color: white;
  font-weight: 500;
  box-shadow: none;
}

.quantity-input:focus {
  box-shadow: none;
  outline: none;
  border-color: transparent;
}

.quantity-input[readonly],
.quantity-input:disabled {
  background-color: #f1f1f1 !important;
  color: #555 !important;
}

.input-group {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.input-group .btn-outline-secondary {
  border: none;
  background-color: #f8f9fa;
  color: #333;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  outline: none;
}

.input-group .btn-outline-secondary:hover,
.input-group .btn-outline-secondary:active {
  background-color: #ffffff;
  box-shadow: none;
  outline: none;
}

.input-group .btn-outline-secondary:focus {
  box-shadow: none;
  outline: none;
}

/* SIMPLE MODAL / TOAST */
.simple-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.simple-modal.show {
  opacity: 1;
  visibility: visible;
}

.simple-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  border: 1px solid #ddd;
}

.simple-modal-content p {
  margin: 0 0 1.5rem 0;
  color: #333;
  font-size: 1rem;
}

.simple-modal-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.simple-btn {
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.simple-btn.simple-confirm {
  background: #0b0b0b;
  color: white;
  border-color: #d4af37;
}

.simple-btn.simple-cancel:hover {
  background: #f8f9fa;
}

.simple-btn.simple-confirm:hover {
  background: #d4af37;
}

.simple-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #28a745;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.simple-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* CHECKBOX */
.form-check-input:checked {
  background-color: #ad1100;
  border-color: #ad1100;
}

.form-check-input:focus {
  border-color: #ad1100;
  box-shadow: none;
}

.form-check {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  min-height: auto;
}

.form-check-input {
  margin-top: 0;
  margin-right: 0.5rem;
}

/* CART */
.cart-empty-text {
  color: #212121;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 1rem;
}

.cart-item {
  transition: all 0.3s ease;
}

.cart-item:hover {
  background-color: #f8f9fa;
}

/* remove button cart */
.cart-item .remove-from-cart {
  background-color: #0b0b0b !important;
  border: 1.5px solid #d4af37 !important;
  color: #d4af37 !important;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item .remove-from-cart i {
  color: #d4af37 !important;
  font-size: 15px;
}

.cart-item .remove-from-cart:hover {
  background-color: #d4af37 !important;
  border-color: #d4af37 !important;
}

.cart-item .remove-from-cart:hover i {
  color: #0b0b0b !important;
}

.cart-item .remove-from-cart:focus,
.cart-item .remove-from-cart:active,
.cart-item .remove-from-cart:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* delete selected */
#delete-selected:disabled {
  background-color: #ffffff !important;
  color: #888 !important;
  border: 1px solid #444 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

#delete-selected:not(:disabled):hover {
  background-color: #0b0b0b;
  color: #d4af37;
  transform: translateY(-1px);
}

#delete-selected:hover {
  border-color: transparent !important;
}

/* empty state card */
.text-center.py-5 {
  background: white;
  border-radius: 16px;
  padding: 3rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.pagination .page-link {
  color: #0b0b0b;
  background-color: #fff;
  border: 1px solid #d4af37;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 500;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pagination .page-item.active .page-link {
  background-color: #0b0b0b;
  border-color: #0b0b0b;
  color: #d4af37;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.pagination .page-link:hover {
  background-color: #d4af37;
  color: #0b0b0b;
}

.pagination .page-item.disabled .page-link {
  color: #bbb;
  background-color: #f8f8f8;
  border-color: #eee;
  pointer-events: none;
}

/* LOADING ICON */
.hourglass-spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(180deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* THUMBNAILS */
.thumb-img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s;
  border: 2px solid transparent;
}

.thumb-img:hover {
  border-color: #b30000;
  transform: scale(1.05);
}

/* PRODUCT GRID */
.product-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 991px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* item full height */
.product-item {
  display: flex;
}

.product-item .card {
  width: 100%;
}

/* PRODUCT ACTIONS (MOBILE) */
@media (max-width: 576px) {
  .product-actions {
    display: flex;
    gap: 6px;
  }

  .product-actions button,
  .product-actions a {
    flex: 1;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  /* icon-only detail */
  .product-actions a span {
    display: none;
  }
}

/* INPUT WIDTH */
@media (min-width: 577px) {
  .input-group {
    width: auto !important;
    min-width: 130px;
    flex-shrink: 0;
  }

  .input-group input {
    min-width: 40px;
  }
}

@media (max-width: 576px) {
  .card-body .input-group {
    width: 100% !important;
    max-width: 100%;
  }

  .card-body .input-group button {
    width: 36px !important;
    height: 36px;
  }

  .card-body .quantity-input {
    flex: 1;
    min-width: 0;
    height: 36px;
    font-size: 14px;
  }

  .product-actions {
    display: flex;
    gap: 6px;
  }

  .product-actions button,
  .product-actions a {
    flex: 1;
    height: 36px;
  }
}

/* DETAIL PRODUCT DESCRIPTION */
.col-md-7 p {
  margin-bottom: 8px;
  line-height: 1.5;
}

.col-md-7 p p,
.col-md-7 p div,
.col-md-7 p span {
  margin-bottom: 6px !important;
  line-height: 1.5;
}

/* hapus jarak antar paragraf */
.col-md-7 p br {
  display: none;
}

/* BADGE STOK DETAIL */
.col-md-7 .badge {
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
}

/* KATEGORI HEADER */
/* Desktop default */
.kategori-header {
  margin-top: -0.8rem;
}

.kategori-header small {
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .kategori-header {
    margin-top: 1.5rem;
  }

  .kategori-header small {
    font-size: 1rem;
  }
}

/* SEARCH BAR */
.search-form {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7e653;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 6px 0 rgba(247, 230, 83, 0.95), 0 10px 24px rgba(247, 230, 83, 0.55);
  transition: all 0.25s ease;
}

.search-box:hover,
.search-box:focus-within {
  box-shadow: 0 6px 0 rgba(247, 230, 83, 1), 0 16px 32px rgba(247, 230, 83, 0.7);
  transform: translateY(-1px);
}

.search-icon {
  font-size: 16px;
  color: #111;
  flex-shrink: 0;
}

.search-box input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #111;
}

.search-box input::placeholder {
  color: rgba(0, 0, 0, 0.6);
}

.search-clear {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: 0.2s ease;
}

.search-clear:hover {
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
}

h5.fw-bold {
  margin-top: 30px;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 0.1px;
}

h5.fw-bold::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: #f7e653;
  margin: 8px auto 0;
  border-radius: 2px;
}

@media (min-width: 992px) {
  h5.fw-bold {
    margin-bottom: 32px;
  }

  #kategoriCarousel {
    margin-top: 14px;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .search-form {
    max-width: 100%;
    padding: 0 20px;
  }

  .search-box {
    padding: 5px;
    min-height: 40px;
    padding-left: 16px;
  }

  .search-box input {
    font-size: 14px;
    line-height: 1.4;
    padding: 6px 0;
  }

  h5.fw-bold {
    margin-top: 20px;
    margin-bottom: 14px;
    text-align: center;
    letter-spacing: 0.3px;
  }

  h5.fw-bold::after {
    width: 40px;
    height: 2px;
    background: #f7e653;
    margin: 6px auto 0;
    border-radius: 2px;
  }
}

/* SEARCH CHIPS */
.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 6px;
}

/* base chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* badge */
.chip-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* primary */
.chip-primary {
  background: #000;
  color: #d4af37;
}

.chip-primary .chip-badge {
  background: #fff;
  color: #000;
}

/* hashtag */
.chip-hashtag {
  background: #ffffff;
  color: #000000;
  border: 1px dashed #d1d5db;
  font-weight: 500;
}

.chip-hashtag .chip-badge {
  background: #d4af37;
  color: #000;
}

.chip,
.chip:visited,
.chip:hover,
.chip:active,
.chip:focus {
  text-decoration: none;
  outline: none;
}

/* hover */
.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.chip-primary:hover {
  background: #f7e653;
  color: #000;
}

.chip-primary:hover .chip-badge {
  background: #000;
  color: #f7e653;
}

.chip-hashtag:hover {
  background: #f7e653;
  color: #000;
  border-color: #f7e653;
}

.chip-hashtag:hover .chip-badge {
  background: #000;
  color: #fff;
}

/* CHECKOUT RESULT */
.checkout-result {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
}

@media (max-width: 576px) {
  .checkout-result {
    padding: 0 12px;
  }

  .checkout-result .card {
    border-radius: 16px;
  }

  .checkout-result img {
    width: 70px;
  }

  .checkout-result h4 {
    font-size: 18px;
    font-weight: 600;
  }

  .checkout-result p {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .checkout-result {
    padding: 0 14px;
  }
}

/* MOBILE VIEW product cards */
@media (max-width: 576px) {
  .col-6 {
    padding-left: 6px;
    padding-right: 6px;
  }

  .card-img-container {
    height: 150px;
    padding: 6px;
  }

  .card-img-container img {
    height: 130px;
    max-width: 100%;
  }

  .card-body {
    padding: 10px;
  }

  .card-title {
    font-size: 13px;
    height: 34px;
  }

  .text-primary {
    font-size: 14px;
  }

  .badge {
    font-size: 10px;
    padding: 3px 6px;
  }
}

/* cart-controls mobile */
@media (max-width: 576px) {
  .cart-controls > div {
    display: flex !important;
    flex-direction: column !important;
  }

  .cart-controls .input-group,
  .cart-controls button {
    width: 100% !important;
  }

  .cart-controls button {
    height: 38px;
    font-size: 12px;
  }
}

/* detail page mobile */
@media (max-width: 576px) {
  .row > .col-md-5,
  .row > .col-md-7 {
    width: 100%;
    max-width: 100%;
  }

  #mainImage {
    max-height: 260px !important;
    margin-bottom: 12px;
  }

  .thumb-img {
    width: 50px;
    height: 50px;
  }

  .col-md-7 h2 {
    font-size: 18px;
    margin-top: 10px;
  }

  .col-md-7 h4 {
    font-size: 16px;
  }

  .col-md-7 p {
    font-size: 14px;
    margin-top: 12px;
  }

  .col-md-7 .input-group {
    width: 100% !important;
    margin-bottom: 10px;
  }

  .col-md-7 .input-group button {
    width: 36px;
    height: 36px;
  }

  .col-md-7 .quantity-input {
    height: 36px;
    font-size: 14px;
  }

  .col-md-7 .btn-red,
  .col-md-7 .btn-danger,
  .col-md-7 .btn-secondary {
    height: 42px;
    font-size: 14px;
  }

  .col-md-7 .mt-4 > a.btn-outline-dark {
    width: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 42px !important;
    font-size: 14px;
  }
}

/* cart item mobile (layout column) */
@media (max-width: 576px) {
  .cart-item .card-body {
    padding: 16px;
  }

  .cart-item .row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .cart-item .col-md-1 {
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
  }

  .cart-item .col-md-2 {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    margin-top: 8px;
  }

  .cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    height: 110px !important;
    object-fit: contain;
  }

  .cart-item .col-md-3 {
    width: 100%;
    margin-bottom: 8px;
  }

  .cart-item h5 {
    font-size: 15px;
    margin-bottom: 4px;
  }

  .cart-item p {
    font-size: 14px;
    color: #888;
    margin-bottom: 6px;
  }

  .cart-item p.text-muted {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .cart-item .col-md-3 .input-group {
    margin: 0 auto;
    justify-content: center;
    width: 110px;
    margin-top: 5px;
  }

  .cart-item .subtotal {
    font-size: 15px;
    color: #c00000;
    margin-top: 6px;
    display: inline-block;
  }

  .cart-item .col-md-1:last-child {
    width: 100%;
    margin-top: 10px;
  }

  .cart-item .remove-from-cart {
    width: 100%;
    height: 40px;
    border-radius: 8px;
  }

  .input-group button {
    width: 30px;
    height: 34px;
    padding: 0;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .input-group input {
    height: 34px;
    font-size: 15px;
    border-left: none;
    border-right: none;
    text-align: center;
  }

  .cart-item .btn-danger {
    width: 35px;
    height: 35px;
    padding: 0;
    margin: auto;
    margin-top: 5px;
    border-radius: 8px;
  }

  .cart-item .btn-danger i {
    font-size: 16px;
  }

  .card.mb-3 {
    margin-bottom: 12px;
  }
}

/* CART ACTIONS REORDER */
@media (max-width: 576px) {
  .card-body .mt-auto {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .cart-controls {
    order: 1;
  }

  .cart-controls > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .cart-controls .input-group {
    width: 100%;
  }

  .cart-controls .btn-red,
  .cart-controls .btn-danger {
    order: 2;
  }

  .card-body .mt-auto > .d-flex.gap-2 {
    order: 3;
    display: flex;
    gap: 6px;
  }

  .card-body .mt-auto > .d-flex.gap-2 a,
  .card-body .mt-auto > .d-flex.gap-2 button {
    flex: 1;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .card-body .mt-auto > .d-flex.gap-2 a {
    font-size: 0;
  }

  .card-body .mt-auto > .d-flex.gap-2 a i {
    font-size: 16px;
    margin: 0;
  }
}

html, body { height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* footer */
.footer-dark {
  margin-top: auto;
}

.btn-label {
  font-size: 14px;
  font-weight: 500;
}