/* stylepost.css - Versi Bersih dan Terorganisir */

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: #FFFFFF;
  color: #1F2937;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

input,
select {
  color: #1F2937 !important;
}

input::placeholder {
  color: rgba(31, 41, 55, 0.6) !important;
}

/* ===== UTILITY CLASSES ===== */
.glass-effect {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  z-index: 3;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  padding: 0.6rem 0.75rem !important;
  margin-bottom: 0.5rem !important;
}

.glass-effect::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.4),
      rgba(255, 255, 255, 0.05));
  opacity: 0.35;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hidden {
  display: none !important;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ===== HEADER & NAVIGATION ===== */
.header-gradient {
  background: #223772;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.header-solid {
  background-color: #1E3A8A;
}

.header-compact {
  padding: 0.5rem 1rem;
  height: 64px;
}

.header-container {
  width: 100%;
  max-width: 100%;
}

.header-compact .flex.justify-between {
  width: 100%;
}

.header-compact .flex.items-center.space-x-3:first-child {
  flex-shrink: 0;
}

.header-compact .flex.items-center.space-x-3:last-child {
  flex-shrink: 0;
  margin-left: auto;
}

.header-compact .logo-container {
  width: 38px;
  height: 38px;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.3) !important;
  border-radius: 8px;
}

.header-compact .flex.flex-col h1 {
  line-height: 1.2;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.header-compact .flex.flex-col p {
  line-height: 1.1;
  margin-top: 0;
}

.header-compact .icon-button {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  min-height: 36px;
}

.header-compact .icon-button i {
  font-size: 14px !important;
}

.header-compact .profile-button {
  height: 36px !important;
  padding: 0.3rem 0.6rem !important;
  display: flex;
  align-items: center;
}

.header-compact .profile-button span {
  font-size: 0.8rem !important;
  white-space: nowrap;
}

.header-compact .profile-button i {
  font-size: 12px !important;
}

.logo-white {
  filter: brightness(0) invert(1);
  width: 32px;
  height: 32px;
}

/* ===== PROFILE MENU ===== */
.profile-menu-container {
  position: relative;
  display: inline-block;
}

.profile-menu-front {
  z-index: 99999;
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(30, 58, 138, 0.2);
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  border-radius: 8px;
  min-width: 180px;
  overflow: hidden;
  display: block;
}

.profile-menu-front a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.profile-menu-front a:hover {
  background-color: #F3F4F6;
}

.profile-menu-front a i {
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
}

.profile-menu-front hr {
  margin: 0;
}

.logout-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

/* ===== BADGES ===== */
.cart-badge,
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #EF4444;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: bold;
  line-height: 1;
  text-align: center;
  transform: translateY(1px);
}

/* ===== MAIN LAYOUT ===== */
.main-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  flex: 1 0 auto;
  margin-bottom: 0.25rem;
  margin-top: 0.25rem;
}

.products-container {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  position: relative;
  z-index: 1;
}

.products-section {
  overflow-y: visible;
  padding: 0;
  height: auto;
  min-height: 300px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* ===== FILTERS & SEARCH ===== */
.sticky-search-section {
  position: sticky;
  top: 4rem;
  z-index: 40;
  background: transparent;
  margin-bottom: 1rem;
}

.search-container {
  position: relative;
  margin-bottom: 0.2rem !important;
}

.search-container input[type="text"] {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.6rem !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  padding-top: 0.55rem !important;
  padding-bottom: 0.55rem !important;
  font-size: 0.83rem !important;
  width: 100%;
}

/* PERBAIKAN: Style tombol filter dengan teks dan ikon di tengah */
.search-container button,
.filter-toggle {
  background: #1e3a8a;              /* warna default: biru tua */
  border: none;
  color: #ffffff;
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.filter-toggle-container {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center; /* biar tombolnya pas di tengah vertikal */
  padding-right: 0.5rem;
}

.filter-toggle:hover {
  background: #1e40af;             /* sedikit lebih terang saat hover */
}

.filter-toggle.active {
  background: #1d4ed8;             /* lebih cerah saat aktif */
  color: #fff;
}

#filterToggleMobile {
  display: none;
}

/* Kategori Filter */
.category-filter {
  transition: all 0.3s ease;
  overflow: hidden;
  margin-top: 0.05rem !important;
  margin-bottom: 0.15rem !important;
  padding-top: 0.1rem !important;
  padding-bottom: 0.1rem !important;
  min-height: auto !important;
  height: auto !important;
  display: block !important;
}

.category-filter.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.category-filter h3 {
  margin-bottom: 0.15rem !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  transition: none !important;
}

.category-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 0.3rem !important;
  width: 100% !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
  min-height: auto !important;
  height: auto !important;
  will-change: auto !important;
}

.category-btn {
  padding: 0.25rem 0.4rem !important;
  font-size: 0.78rem !important;
  border-radius: 0.45rem !important;
  line-height: 1.1 !important;
  min-height: 1.8rem !important;
  height: 36px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #1e3a8a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: none !important;
  animation: none !important;
  transform: none !important;
  white-space: nowrap !important;
  cursor: pointer;
  position: relative;
  text-align: center;
  font-weight: 500;
}

.category-btn:hover {
  background-color: #f3f4f6 !important;
  transition: none !important;
  transform: translateY(-1px);
}

.category-btn.active {
  background-color: #1e3a8a !important;
  color: #ffffff !important;
  border-color: #1e3a8a !important;
  box-shadow: 0 1px 3px rgba(30, 58, 138, 0.25);
  transition: none !important;
}

.category-btn i {
  margin-right: 4px;
  font-size: 0.9rem;
}

.category-btn .category-text {
  display: none;
}

.category-btn.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 25%;
  width: 50%;
  height: 3px;
  background: #1E3A8A;
  border-radius: 2px;
}

.category-tooltip-mobile {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.category-tooltip-mobile.show {
  opacity: 1;
  visibility: visible;
  bottom: 30px;
}

/* Input untuk search di modal */
.search-history-input,
.search-orders-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(30, 58, 138, 0.2);
  border-radius: 6px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  margin-top: 0.5rem;
}


/* ===== PRODUCTS GRID & CARDS ===== */
.products-grid {
  display: grid;
  /* Mengurangi jumlah kolom di layar lebar dan menambah lebar grid gambar */
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.product-card {
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  /* Meningkatkan lebar maksimum kartu */
  max-width: 220px;
  margin: 0;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

.product-image-wrapper {
  width: 100%;
  /* Meningkatkan tinggi wrapper gambar */
  height: 140px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  position: relative;
}

.product-image-fixed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-content {
  padding: 0.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.4em;
  text-align: center;
}

.product-price {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 0.25rem;
  margin-top: 4px;
  text-align: center;
}

.product-stock {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: auto;
  text-align: center;
}

.product-item.clicked {
  animation: productClick 0.6s ease-out;
}

@keyframes productClick {
  0% {
    transform: scale(1) rotate(0deg);
  }

  25% {
    transform: scale(1.1) rotate(2deg);
  }

  50% {
    transform: scale(1.05) rotate(-1deg);
  }

  75% {
    transform: scale(1.02) rotate(0.5deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

.product-animation {
  position: fixed;
  width: 30px;
  height: 30px;
  background: #1e3a8a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 10000;
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  font-size: 14px;
}

/* ===== CART & PAYMENT ===== */
.cart-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  border: none;
}

.cart-modal.show {
  transform: translateX(0);
}

.cart-modal-header {
  background: #1e3a8a;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 65px;
  border-bottom: 1px solid #e5e7eb;
}

.cart-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-modal-footer {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  background: white;
}

#mobileCloseButton {
  display: none !important;
}

.cart-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.cart-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  font-size: 0.75rem;
  color: #6b7280;
}

.denomination-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.denomination-button {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-width: 0;
  white-space: nowrap;
}

.denomination-button:hover {
  background: #e5e7eb;
}

.denomination-button:active {
  transform: scale(0.95);
}

/* ===== RECEIPT & PRINT ===== */
.receipt-modal-content {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
}

.receipt-paper {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(30, 58, 138, 0.2);
  color: #1F2937;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

#receiptContent {
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 12px;
  box-sizing: content-box;
}

#receiptContent::-webkit-scrollbar {
  width: 8px;
}

#receiptContent::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 4px;
}

.thermal-receipt {
  width: 80mm;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  background: white;
  color: black;
  margin: 0 auto;
  line-height: 1.2;
}

.receipt-buttons-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.receipt-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
  font-size: 1.1rem;
}

.receipt-button.print {
  background: #1e3a8a;
}

.receipt-button.download {
  background: #059669;
}

.receipt-button.whatsapp {
  background: #25d366;
}

.receipt-button.close {
  background: #6b7280;
}

.receipt-button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.receipt-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.print-button {
  background: linear-gradient(to right, #1E3A8A, #3B82F6);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.print-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.print-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== ONLINE ORDERS ===== */
.online-orders-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: white;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  margin: 0;
  padding: 0;
}

.online-orders-menu.show {
  transform: translateX(0);
}

.online-orders-header {
  background-color: #1E3A8A;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin: 0;
}

.online-orders-header h3 {
  margin: 0;
  font-size: 1.125rem;
  color: white;
}

.close-notification {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-close-button {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  left: 1rem;
}

.tab-menu {
  display: flex;
  border-bottom: 1px solid #E5E7EB;
  background-color: #F9FAFB;
  position: relative;
  z-index: 5;
  margin: 0;
}

.tab-button {
  flex: 1;
  padding: 0.75rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  text-align: center;
}

.tab-button.active {
  color: #1E3A8A;
  border-bottom-color: #1E3A8A;
  background-color: white;
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

.online-orders-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.online-orders-content::-webkit-scrollbar {
  width: 6px;
}

.online-orders-content::-webkit-scrollbar-track {
  background: rgba(30, 58, 138, 0.1);
  border-radius: 3px;
}

.online-orders-content::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 138, 0.3);
  border-radius: 3px;
}

.online-orders-content::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 58, 138, 0.5);
}

.no-orders-message {
  text-align: center;
  padding: 2rem 1rem;
  color: #6B7280;
  font-size: 0.9rem;
}

.order-item,
.transaction-history-item {
  background-color: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: block;
}

.order-item:hover,
.transaction-history-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-color: #D1D5DB;
}

.order-item:last-child {
  border-bottom: 1px solid #E5E7EB;
}

.order-number {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1F2937;
  margin-bottom: 0.25rem;
}

.order-date {
  font-size: 0.75rem;
  color: #6B7280;
  margin-bottom: 0.5rem;
}

.order-items {
  font-size: 0.75rem;
  color: #4B5563;
  margin-bottom: 0.5rem;
}

.order-status {
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  margin-left: 0.5rem;
  display: inline-block;
}

.status-pending {
  background-color: #FEF3C7;
  color: #92400E;
}

.status-processed {
  background-color: #D1FAE5;
  color: #065F46;
}

.process-order-btn {
  width: auto;
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #1E3A8A;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.75rem;
}

.process-order-btn:hover {
  background-color: #1E40AF;
}

/* Modal Konfirmasi Pesanan Online */
#onlineOrderConfirmModal {
  z-index: 10010;
}

#onlineOrderConfirmModal>div {
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

#qrisProofSection img {
  max-height: 200px;
  object-fit: contain;
}

/* ===== QRIS STYLES ===== */
.qris-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  max-height: 70vh;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  margin: 10px 0;
}

.qris-full-height {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

/* QRIS Fullscreen */
#qrisPreviewModal {
  z-index: 10020;
}

.qris-preview-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
}

.qris-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

#closeQrisPreview {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
}

/* FULLSCREEN QRIS VIEW */
#qrisFullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
}

#qrisFullscreen img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#qrisMobilePreviewModal {
  background: rgba(0, 0, 0, 0.95);
  z-index: 99999 !important;
  position: fixed !important;
}

#qrisMobilePreviewModal img {
  border-radius: 8px;
}

#closeQrisMobilePreview {
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  z-index: 100000;
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===== NOTIFICATIONS ===== */
#notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  width: auto;
  max-width: 90vw;
  display: none;
}

#notification.show {
  transform: translateX(0);
  display: block;
}

/* ===== FOOTER ===== */
.footer {
  background: #1e3a8a;
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 2rem;
  flex-shrink: 0;
  display: flex !important;
  justify-content: center;
  align-items: center;
}

/* ===== SPLASH SCREEN & ORIENTATION ===== */
#orientation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1e3a8a;
  color: white;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  text-align: center;
  padding: 2rem;
}

.orientation-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: rotate 3s infinite ease-in-out;
}

@keyframes rotate {
  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(90deg);
  }
}

.orientation-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.orientation-message {
  font-size: 1rem;
  max-width: 300px;
  line-height: 1.5;
}

#pwa-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#pwa-splash.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-logo {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  margin-bottom: 1rem;
  object-fit: contain;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

.splash-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1e3a8a;
  margin-bottom: 0.5rem;
  text-align: center;
}

.splash-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 2rem;
  text-align: center;
  max-width: 80%;
}

.splash-loading {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #1e3a8a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ===== LOGIN MODAL ===== */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-container {
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-header h2 {
  color: #1E3A8A;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #6B7280;
  font-size: 0.875rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.form-input {
  padding: 0.75rem;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-button {
  background-color: #1E3A8A;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-button:hover {
  background-color: #1E40AF;
}

.login-button:disabled {
  background-color: #9CA3AF;
  cursor: not-allowed;
}

.login-error {
  color: #EF4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #6B7280;
}

/* ===== PRINT STYLES ===== */
@media print {
  body * {
    visibility: hidden;
  }

  #receiptContent,
  #receiptContent * {
    visibility: visible;
  }

  #receiptContent {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm !important;
    max-width: 80mm !important;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: black;
    background: white;
  }

  .no-print {
    display: none !important;
  }
}

/* ===== RESPONSIVE STYLES ===== */

/* Desktop Styles */
@media (min-width: 1280px) {
  .main-container {
    max-width: 1600px;
  }
}

@media (min-width: 1536px) {
  .main-container {
    max-width: 1800px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) {
  .category-btn {
    flex-direction: column;
    padding: 8px 5px;
  }

  .category-btn .category-text {
    display: none;
  }

  .category-btn i {
    margin-right: 0;
    margin-bottom: 4px;
    font-size: 1.1rem;
  }

  .category-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #4B5563;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
  }

  .category-btn:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
  }

  .category-btn.active::before {
    background: #1E3A8A;
  }
}

/* Tablet & Larger Mobile Landscape */
@media (max-width: 1024px) {
  .products-grid {
    /* Menyesuaikan min-width untuk layar 1024px */
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1366px) and (orientation: portrait) {

  /* Sembunyikan konten utama saat portrait di tablet */
  body>*:not(#orientation-overlay):not(#pwa-splash) {
    display: none !important;
  }

  /* Tampilkan overlay orientasi */
  #orientation-overlay {
    display: flex !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  /* Tablet Portrait Fix */
  .products-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr)) !important;
  }

  /* Reset aturan mobile untuk tablet */
  .search-container {
    padding-right: 0 !important;
  }

  .filter-toggle-container {
    position: static !important;
  }

  .filter-toggle {
    width: auto !important;
    padding: 10px 15px !important;
  }

  .filter-toggle span {
    display: inline !important;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  .main-container {
    padding: 0 0.75rem;
  }

  #filterToggleMobile {
    display: flex !important;
  }

  #filterToggle {
    display: none !important;
  }

  .search-container>.filter-toggle {
    align-self: center !important;
    margin-right: 1rem !important;
  }

  .filter-toggle-container {
    padding-right: 0.5rem;
  }

  /* PERBAIKAN: Style tombol filter mobile dengan ikon di tengah */
  .filter-toggle {
    padding: 8px !important;
    width: 40px;
    height: 40px;
    justify-content: center !important;
    min-width: 40px !important;
  }

  .filter-toggle span {
    display: none;
  }

  .search-container {
    position: relative;
    padding-right: 50px;
  }

  .products-grid {
    /* Menyesuaikan min-width untuk layar 768px */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
  }

  .product-image-wrapper {
    /* Menyesuaikan tinggi gambar untuk layar 768px */
    height: 120px;
  }

  .category-grid {
    gap: 0.25rem;
  }

  .denomination-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .denomination-button {
    font-size: 0.65rem;
    padding: 6px 2px;
  }

  .category-btn {
    width: 100%;
    aspect-ratio: 1/1;
    padding: 0;
  }

  .category-btn i {
    font-size: 1.2rem;
    margin: 0;
  }

  .online-orders-menu {
    top: 0;
    left: 0;
    transform: translateY(100%);
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }

  .online-orders-menu.show {
    transform: translateY(0);
  }

  .online-orders-content {
    height: calc(100vh - 180px);
  }

  .tab-content {
    height: calc(100vh - 180px);
  }

  .cart-modal {
    max-width: 100%;
  }

  .qris-preview-container {
    height: 400px;
    max-height: 60vh;
  }

  #closeQrisMobilePreview {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5) !important;
  }

  #closeQrisMobilePreview i {
    font-size: 18px;
  }

  .splash-logo {
    width: 70px;
    height: 70px;
  }

  .splash-title {
    font-size: 16px;
  }

  .splash-subtitle {
    font-size: 12px;
  }

  .header-container {
    padding: 0 8px;
  }

  .logo-container {
    padding: 6px !important;
  }

  .logo-container img {
    max-width: 32px;
  }
}

@media (max-width: 767px) {
  #orientation-overlay {
    display: none !important;
  }

  .products-grid {
    /* Menyesuaikan min-width untuk layar 767px */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 12px;
  }
}

/* Small Mobile Styles */
@media (max-width: 640px) {
  .main-container {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .footer {
    padding: 0.5rem;
  }

  .category-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 0.3rem !important;
  }

  .category-grid .category-btn {
    height: 38px !important;
    font-size: 0.75rem !important;
  }

  .category-btn i {
    font-size: 1rem;
  }

  .profile-menu-front {
    min-width: 140px;
  }

  .profile-menu-front a {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  #profileBtn {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #profileBtn .hidden-sm {
    display: none;
  }

  .online-orders-menu {
    max-width: 100%;
  }

  .mobile-close-button {
    display: block;
  }

  .order-item,
  .transaction-history-item {
    padding: 0.75rem;
  }

  .qris-image-container {
    height: 300px;
    max-height: 60vh;
  }

  #onlineOrderConfirmModal>div {
    max-width: 95vw;
    margin: 10px;
  }

  .header-container .flex .flex-col.leading-tight p,
  header .flex-col p {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .products-grid {
    /* Menyesuaikan min-width untuk layar 480px */
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .product-image-wrapper {
    /* Menyesuaikan tinggi gambar untuk layar 480px */
    height: 110px;
  }

  .product-content {
    padding: 0.5rem;
  }

  .qris-preview-container {
    height: 300px;
    max-height: 50vh;
  }
}

@media (max-width: 400px) {
  .category-btn i {
    font-size: 0.9rem;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  #notification {
    top: 0.5rem;
    right: 0.5rem;
    max-width: 70vw;
  }

  .footer {
    display: flex !important;
  }
}

/* Mobile Landscape dengan Height Kecil */
@media (max-height: 480px) and (orientation: landscape) {
  .header-gradient {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .main-container {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
  }

  .products-grid {
    /* Menyesuaikan min-width untuk landscape mobile kecil */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
  }

  .product-card {
    max-width: none;
    margin: 0;
  }

  .product-image-wrapper {
    /* Menyesuaikan tinggi gambar untuk landscape mobile kecil */
    height: 110px;
  }

  .product-content {
    padding: 6px;
  }

  .product-name {
    font-size: 0.75rem;
    min-height: 2.2em;
  }

  .product-price {
    font-size: 0.8rem;
  }

  .product-stock {
    font-size: 0.7rem;
  }

  .denomination-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .denomination-button {
    padding: 4px;
    font-size: 0.6rem;
  }
}