/* =========================================================
   ORDER PAGE - MODERN DESIGN
========================================================= */



.cart-wrapper {
  padding: calc(var(--header-height) + 16px) 12px 16px;
}

.cart-body {
  position: relative;
  padding-bottom: 220px;
}

/* =========================================================
   HEADER
========================================================= */


.cart-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.5px;
}

/* =========================================================
   SELECT ALL CARD
========================================================= */

.cart-select-all {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  border-radius: 0;
  padding: 12px 0;
  margin-bottom: 0;
  box-shadow: none;
}

.cart-select-all label {
  color: var(--text);
  font-weight: 500;
}

.cart-select-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(144, 199, 212, 0.35);
}

.cart-total {
  margin-top: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
  padding: 0;
  background: none;
  border: none;
}


.cart-select-all input[type="checkbox"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: var(--primary);
  filter: brightness(1.1);
}

/* =========================================================
   ORDER CARD
========================================================= */

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  background: #fff;
  border-radius: 0;
  margin-bottom: 0;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: none;
  transition: none;
}

.cart-item:hover {
  transform: none;
  box-shadow: none;
}


/* Checkbox Styling */
.cart-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  cursor: pointer;
  accent-color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

/* =========================================================
   ORDER INFO
========================================================= */

.cart-info {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

.cart-info b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.cart-info small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  margin-bottom: 4px;
  font-size: 13px;
}

.cart-info small::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  font-size: 16px;
}

.cart-info > br {
  display: none;
}

/* Total Price Styling */
.cart-info > :last-child {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(144, 199, 212, 0.15) 0%, rgba(144, 199, 212, 0.1) 100%);
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  border: 1px solid rgba(144, 199, 212, 0.3);
}

/* =========================================================
   QUANTITY CONTROL
========================================================= */

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 4px;
  border-radius: 8px;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-control button:hover {
  background: #7db5c1;
  transform: scale(1.05);
}

.qty-control button:active {
  transform: scale(0.95);
}

.qty-control span {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
}

/* =========================================================
   ACTION BAR (STICKY BOTTOM)
========================================================= */

.cart-actions {
  position: fixed;
  bottom: 60px; /* di atas bottom nav */
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 10px;
  z-index: 100;
  border-top: 1px solid #e2e8f0;
}

@media (min-width: 800px) {
  .cart-actions {
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px 12px 0 0;
  }
}

/* =========================================================
   SELECT DROPDOWN
========================================================= */

.select-action {
  flex: 1;
  padding: 14px 40px 14px 16px;
  font-size: 15px;
  border-radius: 10px;
  border: 2px solid var(--primary);
  background-color: #fff;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;

  /* Remove default styling */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Custom arrow */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--primary) 50%),
    linear-gradient(135deg, var(--primary) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.select-action:hover {
  background-color: #f0f9fb;
  border-color: #7db5c1;
}

.select-action:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(144, 199, 212, 0.2);
  border-color: #7db5c1;
}

/* =========================================================
   PROCESS BUTTON
========================================================= */

.btn-primary {
  flex: 0 0 auto;
  min-width: 120px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(144, 199, 212, 0.3);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(144, 199, 212, 0.4);
  background: #7db5c1;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(144, 199, 212, 0.3);
}

/* =========================================================
   EMPTY STATE
========================================================= */

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.cart-empty::before {
  content: "📦";
  display: block;
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.cart-empty::after {
  content: "Belum ada pesanan yang dibuat";
  display: block;
  font-size: 14px;
  color: #94a3b8;
  margin-top: 8px;
}

/* =========================================================
   LOADING STATES
========================================================= */

.cart-loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.spinner,
.spinner-ring {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   PAGE LOADER
========================================================= */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loader-text {
  margin-top: 16px;
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

/* =========================================================
   BODY LOADER
========================================================= */

.body-loader {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   TOASTR CENTER
========================================================= */

.toast-center {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
}

/* =========================================================
   REMOVE BUTTON
========================================================= */

.cart-remove {
  color: #ef4444;
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  transition: all 0.2s ease;
  border-radius: 6px;
}

.cart-remove:hover {
  background: #fef2f2;
  transform: scale(1.1);
}

.cart-remove:active {
  transform: scale(0.95);
}

/* =========================================================
   SHIPMENT ROW
========================================================= */

.cart-item.shipment-row {
  align-items: flex-start;
}

.cart-item.shipment-row > div:last-child {
  align-self: flex-start;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 480px) {
  .cart-header h2 {
    font-size: 24px;
  }

  .cart-actions {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
  }
}
