/* ═══════════════════════════════════════════════════════════
   MODERN CART PANEL WITH QUANTITY BADGE
   ═══════════════════════════════════════════════════════════ */

.cart-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 320px;
  max-height: 85vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  padding: 0;
  z-index: 9999;
  overflow: hidden;
  animation: slideInRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ═══════════════════════════════════════════════════════════
   MINIMIZED STATE - SHOWS ONLY HEADER WITH QTY AND TOTAL
   ═══════════════════════════════════════════════════════════ */

.cart-panel.minimized {
  max-height: 140px;
  overflow: hidden;
}

.cart-panel.minimized #cartItems,
.cart-panel.minimized .checkout {
  display: none;
}

/* Keep total visible in minimized state */
.cart-panel.minimized .cart-footer {
  display: block;
}

.cart-panel.minimized .cart-total {
  border-top: none;
}

/* Show quantity badge only when minimized */
.cart-panel .cart-qty-badge {
  display: none;
}

.cart-panel.minimized .cart-qty-badge {
  display: flex;
}

/* ═══════════════════════════════════════════════════════════
   CART HEADER WITH CONTROL BUTTONS
   ═══════════════════════════════════════════════════════════ */

.cart-panel h3 {
  text-align: center;
  margin: 0;
  padding: 20px 60px 20px 70px;
  font-size: 18px;
  font-weight: 700;
  color: #1b5e20;
  background: linear-gradient(135deg, #c3ead3 0%, #e8f5e9 100%);
  border-bottom: 2px solid rgba(46, 125, 50, 0.1);
  letter-spacing: 0.5px;
  position: relative;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   QUANTITY BADGE (Shows when minimized)
   ═══════════════════════════════════════════════════════════ */

.cart-qty-badge {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: white;
  box-shadow: 
    0 4px 12px rgba(46, 125, 50, 0.4),
    0 0 0 3px rgba(255, 255, 255, 0.5) inset;
  animation: badgePulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 3px solid rgba(255, 255, 255, 0.8);
}

@keyframes badgePulse {
  0% {
    transform: translateY(-50%) scale(0);
  }
  50% {
    transform: translateY(-50%) scale(1.2);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

/* ═══════════════════════════════════════════════════════════
   CONTROL BUTTONS CONTAINER
   ═══════════════════════════════════════════════════════════ */

.cart-controls {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
  align-items: center;
}

.cart-controls button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Minimize Button */
.cart-controls .minimize-btn {
  background: linear-gradient(135deg, #fdd835, #fbc02d);
  color: #1b5e20;
}

.cart-controls .minimize-btn:hover {
  transform: scale(1.15);
  background: linear-gradient(135deg, #fbc02d, #f9a825);
  box-shadow: 0 4px 12px rgba(253, 216, 53, 0.4);
}

/* Close Button */
.cart-controls .close-btn {
  background: linear-gradient(135deg, #ff5252, #e53935);
  color: white;
}

.cart-controls .close-btn:hover {
  transform: scale(1.15) rotate(90deg);
  background: linear-gradient(135deg, #e53935, #c62828);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.5);
}

.cart-controls button:active {
  transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════
   CART ITEMS CONTAINER - FULL HEIGHT SCROLLABLE
   ═══════════════════════════════════════════════════════════ */

#cartItems {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 15px;
  min-height: 0;
}

/* Modern Scrollbar */
#cartItems::-webkit-scrollbar {
  width: 6px;
}

#cartItems::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 10px;
}

#cartItems::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  border-radius: 10px;
  transition: background 0.3s;
}

#cartItems::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
}

/* ═══════════════════════════════════════════════════════════
   INDIVIDUAL CART ITEM
   ═══════════════════════════════════════════════════════════ */

.cart-item {
  font-size: 13px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid rgba(46, 125, 50, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: fadeInItem 0.4s ease-out;
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.12);
  border-color: rgba(46, 125, 50, 0.2);
}

.cart-item:last-child {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   CART ITEM HEADER (NAME + REMOVE BUTTON)
   ═══════════════════════════════════════════════════════════ */

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 10px;
}

.cart-head b {
  color: #1b5e20;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.cart-head button {
  background: linear-gradient(135deg, #ff5252, #e53935);
  border: none;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

.cart-head button:hover {
  transform: rotate(90deg) scale(1.1);
  background: linear-gradient(135deg, #e53935, #c62828);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.5);
}

.cart-head button:active {
  transform: rotate(90deg) scale(0.95);
}

/* ═══════════════════════════════════════════════════════════
   CART ITEM INFO (CODE + PRICE)
   ═══════════════════════════════════════════════════════════ */

.cart-item > br {
  display: none;
}

.cart-item {
  line-height: 1.6;
}

.cart-item b:not(.cart-head b) {
  color: #2e7d32;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   QUANTITY CONTROLS
   ═══════════════════════════════════════════════════════════ */

.qty-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
  background: rgba(46, 125, 50, 0.05);
  padding: 8px 12px;
  border-radius: 30px;
  width: fit-content;
}

.qty-box button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
}

.qty-box button:hover {
  transform: scale(1.15);
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  box-shadow: 0 5px 15px rgba(46, 125, 50, 0.5);
}

.qty-box button:active {
  transform: scale(0.95);
}

.qty-box span {
  font-weight: 700;
  color: #1b5e20;
  min-width: 30px;
  text-align: center;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════
   CART FOOTER - FIXED AT BOTTOM
   ═══════════════════════════════════════════════════════════ */

.cart-footer {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 2px solid rgba(46, 125, 50, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   CART TOTAL - VISIBLE IN MINIMIZED STATE
   ═══════════════════════════════════════════════════════════ */

.cart-total {
  font-weight: 800;
  font-size: 18px;
  color: #1b5e20;
  text-align: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c3ead3 100%);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   CHECKOUT BUTTON - HIDDEN IN MINIMIZED STATE
   ═══════════════════════════════════════════════════════════ */

.cart-panel button.checkout {
  width: calc(100% - 30px);
  margin: 15px 15px 8px 15px;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 8px 20px rgba(46, 125, 50, 0.3),
    0 0 0 0 rgba(46, 125, 50, 0.5);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.cart-panel button.checkout::before {
  content: '🛒';
  position: absolute;
  left: 20px;
  font-size: 18px;
  transition: all 0.3s ease;
}

.cart-panel button.checkout:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 12px 30px rgba(46, 125, 50, 0.5),
    0 0 0 8px rgba(46, 125, 50, 0.1);
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
}

.cart-panel button.checkout:hover::before {
  transform: scale(1.2) rotate(10deg);
}

.cart-panel button.checkout:active {
  transform: translateY(-1px);
  box-shadow: 
    0 6px 15px rgba(46, 125, 50, 0.4),
    0 0 0 4px rgba(46, 125, 50, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   WHATSAPP DIRECT BUTTON - HIDDEN IN MINIMIZED STATE
   ═══════════════════════════════════════════════════════════ */

.cart-panel button.whatsapp-direct {
  width: calc(100% - 30px);
  margin: 8px 15px 15px 15px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.cart-panel button.whatsapp-direct:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 10px 25px rgba(37, 211, 102, 0.5),
    0 0 0 6px rgba(37, 211, 102, 0.1);
  background: linear-gradient(135deg, #128c7e, #0d5d52);
}

.cart-panel button.whatsapp-direct:active {
  transform: translateY(-1px);
  box-shadow: 
    0 4px 12px rgba(37, 211, 102, 0.4),
    0 0 0 3px rgba(37, 211, 102, 0.1);
}

/* Hide WhatsApp button when minimized */
.cart-panel.minimized .whatsapp-direct {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   EMPTY/HIDDEN CART STATE
   ═══════════════════════════════════════════════════════════ */

.cart-panel.hidden {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   CHECKOUT MODAL STYLES
   ═══════════════════════════════════════════════════════════ */

.checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.checkout-modal.active {
  display: flex;
  opacity: 1;
}

.checkout-modal-content {
  background: white;
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.checkout-header {
  background: linear-gradient(135deg, #c3ead3 0%, #e8f5e9 100%);
  padding: 25px 30px;
  border-bottom: 2px solid rgba(46, 125, 50, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 15px;
}

.checkout-header h2 {
  margin: 0;
  color: #1b5e20;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex: 1;
  text-align: center;
}

.modal-close-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5252, #e53935);
  color: white;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

.modal-close-btn:hover {
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 18px rgba(229, 57, 53, 0.5);
}

.modal-back-btn {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2196f3, #1976d2);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.modal-back-btn:hover {
  transform: translateX(-3px) scale(1.05);
  box-shadow: 0 6px 18px rgba(33, 150, 243, 0.5);
}

.modal-back-btn svg {
  width: 24px;
  height: 24px;
}

.checkout-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.checkout-body::-webkit-scrollbar {
  width: 8px;
}

.checkout-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.checkout-body::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  border-radius: 10px;
}

.checkout-section {
  background: linear-gradient(135deg, #f9fffe 0%, #ffffff 100%);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid rgba(46, 125, 50, 0.1);
}

.checkout-section h3 {
  margin: 0 0 20px;
  color: #1b5e20;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #2e4d3a;
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(46, 125, 50, 0.15);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2e7d32;
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* Order Summary Section */
.order-summary-section {
  display: flex;
  flex-direction: column;
}

#orderSummaryItems {
  flex: 1;
  margin-bottom: 20px;
}

.summary-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  padding: 12px;
  background: white;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(46, 125, 50, 0.08);
  font-size: 14px;
  align-items: center;
}

.summary-item .item-name {
  color: #1b5e20;
  font-weight: 600;
}

.summary-item .item-name small {
  color: #666;
  font-weight: 400;
  font-size: 12px;
}

.summary-item .item-qty {
  color: #666;
  text-align: center;
}

.summary-item .item-price {
  color: #2e7d32;
  font-weight: 700;
  text-align: right;
}

.summary-totals {
  border-top: 2px solid rgba(46, 125, 50, 0.15);
  padding-top: 15px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 15px;
}

.summary-row.total-row {
  background: linear-gradient(135deg, #e8f5e9 0%, #c3ead3 100%);
  border-radius: 10px;
  margin-top: 10px;
  padding: 12px;
  font-size: 18px;
  font-weight: 700;
  color: #1b5e20;
}

.checkout-footer {
  flex-shrink: 0;
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 2px solid rgba(46, 125, 50, 0.1);
  display: flex;
  gap: 15px;
  justify-content: space-between;
}

.btn-primary,
.btn-secondary,
.btn-whatsapp {
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  flex: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
}

.btn-secondary {
  background: white;
  color: #1b5e20;
  border: 2px solid #2e7d32;
}

.btn-secondary:hover {
  background: #f0f8f0;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Payment Modal Specific Styles */
.payment-modal-content {
  max-width: 850px;
}

.payment-header {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
  position: relative;
  overflow: hidden;
}

.payment-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

.payment-header h2 {
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.modal-back-btn {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) translateX(-3px);
}

.payment-body {
  display: block;
  padding: 40px 30px;
  background: linear-gradient(135deg, #f9fffe 0%, #f0f8f0 100%);
}

.payment-total-box {
  background: linear-gradient(135deg, #ffffff 0%, #f0f8f0 100%);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 35px;
  border: 2px solid rgba(46, 125, 50, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.payment-total-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2e7d32, #1b5e20, #2e7d32);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.total-label {
  font-size: 16px;
  color: #666;
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.payment-amount {
  font-size: 56px;
  font-weight: 900;
  color: #2e7d32;
  letter-spacing: 2px;
  margin: 10px 0;
  text-shadow: 0 2px 10px rgba(46, 125, 50, 0.2);
  font-family: 'Arial Black', sans-serif;
}

.total-breakdown {
  font-size: 14px;
  color: #888;
  font-weight: 400;
  margin-top: 8px;
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.payment-option {
  background: white;
  border: 2px solid rgba(46, 125, 50, 0.1);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.payment-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.03) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.payment-option:hover {
  border-color: #2e7d32;
  box-shadow: 0 12px 40px rgba(46, 125, 50, 0.15);
  transform: translateY(-5px);
}

.payment-option:hover::before {
  opacity: 1;
}

.payment-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 25px 15px 25px;
}

.payment-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s ease;
  padding: 10px;
}

.payment-svg-icon {
  width: 100%;
  height: 100%;
  transition: all 0.4s ease;
}

.online-payment .payment-icon-wrapper {
  background: linear-gradient(135deg, #e8f5e9 0%, #c3ead3 100%);
  box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
}

.online-payment:hover .payment-icon-wrapper {
  background: linear-gradient(135deg, #c3ead3 0%, #a5d6a7 100%);
}

.cod-payment .payment-icon-wrapper {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.15);
}

.cod-payment:hover .payment-icon-wrapper {
  background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
}

.whatsapp-payment .payment-icon-wrapper {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.15);
}

.whatsapp-payment:hover .payment-icon-wrapper {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}

.payment-option:hover .payment-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.payment-option:hover .payment-svg-icon {
  transform: scale(1.1);
}

.payment-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.payment-badge.recommended {
  background: linear-gradient(135deg, #fdd835 0%, #f9a825 100%);
  color: #1b5e20;
  box-shadow: 0 4px 15px rgba(253, 216, 53, 0.4);
  animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes badgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.payment-option-content {
  padding: 0 25px 20px 25px;
}

.payment-option-content h4 {
  margin: 0 0 8px;
  color: #1b5e20;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Georgia', serif;
}

.payment-option-content p {
  margin: 0 0 15px;
  color: #666;
  font-size: 15px;
  line-height: 1.5;
}

.payment-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.payment-features li {
  font-size: 14px;
  color: #555;
  padding-left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-btn {
  width: 100%;
  padding: 18px 28px;
  border: none;
  border-radius: 0;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.payment-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.payment-btn:hover::before {
  width: 400px;
  height: 400px;
}

.payment-btn span {
  position: relative;
  z-index: 1;
}

.payment-btn svg {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.payment-btn:hover svg {
  transform: translateX(5px);
}

.primary-payment-btn {
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
  color: white;
  box-shadow: 0 6px 25px rgba(46, 125, 50, 0.3);
}

.primary-payment-btn:hover {
  box-shadow: 0 10px 35px rgba(46, 125, 50, 0.5);
}

.secondary-payment-btn {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  box-shadow: 0 6px 25px rgba(255, 152, 0, 0.3);
}

.secondary-payment-btn:hover {
  box-shadow: 0 10px 35px rgba(255, 152, 0, 0.5);
}

.whatsapp-payment-btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.3);
}

.whatsapp-payment-btn:hover {
  box-shadow: 0 10px 35px rgba(37, 211, 102, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .cart-panel {
    width: calc(100% - 40px);
    right: 20px;
    left: 20px;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Checkout Modal Mobile Adjustments - Centered */
  .checkout-modal {
    padding: 20px;
    align-items: center !important;
    justify-content: center !important;
  }

  .checkout-modal-content {
    width: 90vw !important;
    max-width: 500px !important;
    margin: 0 !important;
    max-height: 85vh !important;
  }

  .payment-modal-content {
    width: 90vw !important;
    max-width: 500px !important;
    margin: 0 !important;
    max-height: 85vh !important;
  }

  .checkout-body {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .checkout-footer {
    flex-direction: column;
  }

  .payment-amount {
    font-size: 36px;
  }

  .payment-total-box {
    padding: 25px 20px;
  }

  .payment-option-header {
    padding: 20px 20px 12px 20px;
  }

  .payment-icon-wrapper {
    width: 60px;
    height: 60px;
  }

  .payment-icon {
    font-size: 35px;
  }

  .payment-option-content {
    padding: 0 20px 15px 20px;
  }

  .payment-option-content h4 {
    font-size: 20px;
  }

  .payment-option-content p {
    font-size: 14px;
  }

  .payment-features li {
    font-size: 13px;
  }

  .payment-btn {
    padding: 16px 24px;
    font-size: 16px;
  }

  .modal-back-btn {
    width: 38px;
    height: 38px;
    left: 15px;
  }

  .modal-back-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .cart-panel {
    width: calc(100% - 20px);
    right: 10px;
    left: 10px;
    top: 10px;
    max-height: 90vh;
  }

  /* Checkout Modal - Extra Small Screens - Centered */
  .checkout-modal {
    padding: 10px;
    align-items: center !important;
    justify-content: center !important;
  }

  .checkout-modal-content {
    width: 95vw !important;
    max-width: 100% !important;
    margin: 0 !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
  }

  .payment-modal-content {
    width: 95vw !important;
    max-width: 100% !important;
    margin: 0 !important;
    max-height: 90vh !important;
    border-radius: 16px !important;
  }

  .cart-panel.minimized {
    max-height: 130px;
  }

  .cart-panel h3 {
    font-size: 16px;
    padding: 16px 55px 16px 65px;
  }

  .cart-qty-badge {
    width: 40px;
    height: 40px;
    font-size: 16px;
    left: 12px;
  }

  .cart-controls {
    right: 10px;
  }

  .cart-controls button {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .cart-item {
    font-size: 12px;
    padding: 12px;
  }

  .cart-head b {
    font-size: 13px;
  }

  .cart-total {
    font-size: 16px;
    padding: 15px;
  }

  .cart-panel button.checkout {
    font-size: 14px;
    padding: 14px;
    margin: 10px 15px 6px 15px;
  }

  .cart-panel button.whatsapp-direct {
    font-size: 13px;
    padding: 12px;
    margin: 6px 15px 10px 15px;
  }

  .checkout-modal-content {
    max-height: 95vh;
  }

  .checkout-header {
    padding: 20px;
  }

  .checkout-header h2 {
    font-size: 22px;
  }

  .checkout-body {
    padding: 15px;
  }

  .checkout-section {
    padding: 20px;
  }

  .payment-total-box {
    padding: 20px;
  }

  .payment-total-box {
    padding: 20px;
  }

  .total-label {
    font-size: 14px;
  }

  .payment-amount {
    font-size: 40px;
  }

  .total-breakdown {
    font-size: 12px;
  }

  .payment-option-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .payment-icon-wrapper {
    width: 55px;
    height: 55px;
  }

  .payment-icon {
    font-size: 30px;
  }

  .payment-badge {
    align-self: flex-start;
  }

  .payment-option-content h4 {
    font-size: 18px;
  }

  .payment-features {
    gap: 6px;
  }

  .payment-features li {
    font-size: 12px;
  }

  .payment-btn {
    padding: 15px 20px;
    font-size: 15px;
  }

  .payment-btn svg {
    width: 18px;
    height: 18px;
  }

  .payment-body {
    padding: 25px 15px;
  }
}

/* ═══════════════════════════════════════════════════════════
   SMALL SCREEN HEIGHT ADJUSTMENTS
   ═══════════════════════════════════════════════════════════ */

@media (max-height: 600px) {
  .cart-panel {
    max-height: 95vh;
    top: 10px;
  }

  .cart-panel.minimized {
    max-height: 130px;
  }

  .cart-panel h3 {
    padding: 12px 60px 12px 70px;
  }

  .cart-qty-badge {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .cart-total {
    padding: 12px 15px;
  }

  .cart-panel button.checkout {
    margin: 8px 15px 5px 15px;
    padding: 12px;
  }

  .cart-panel button.whatsapp-direct {
    margin: 5px 15px 8px 15px;
    padding: 10px;
    font-size: 13px;
  }

  .checkout-modal-content {
    max-height: 95vh;
  }
}
.payment-footer {
  padding: 20px 30px;
  background: #f8f8f8;
  border-top: 1px solid #eee;
  text-align: center;
}

.btn-cancel {
  background: #df1414;           /* grey */
  color: white;
  border: none;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-cancel:hover {
  background: #f90404;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.btn-cancel:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Mobile */
@media (max-width: 480px) {
  .btn-cancel {
    width: 100%;
    padding: 16px;
  }
}
.nav-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, color 0.25s ease;
}
.nav-cart-link:hover {
  transform: scale(1.15);
  color: #fdd835;
}
.nav-cart-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #fdd835;
  color: #1b4020;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
/* ═══════════════════════════════════════════════════════════
   MOBILE NAV CART PILL
   Shown in navbar on mobile — links to checkout.html
   ═══════════════════════════════════════════════════════════ */

.mobile-cart-pill {
  display: none; /* hidden by default; JS shows it when cart has items */
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1b5e20;
  text-decoration: none;
  border-radius: 50px;
  padding: 6px 14px 6px 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(46,125,50,0.18);
  border: 1.5px solid rgba(46,125,50,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  margin-left: auto;
  margin-right: 10px;
}

.mobile-cart-pill:active {
  transform: scale(0.95);
}

.mobile-cart-pill-qty {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(46,125,50,0.35);
  flex-shrink: 0;
}

.mobile-cart-pill svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.mobile-cart-pill-total {
  color: #1b5e20;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* Show pill only on mobile */
@media (max-width: 768px) {
  .mobile-cart-pill.has-items {
    display: flex !important;
  }
}

/* Hide on desktop — cart panel handles it there */
@media (min-width: 769px) {
  .mobile-cart-pill {
    display: none !important;
  }
}

.nav-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  transition: transform 0.25s ease, color 0.25s ease;
}
/* ═══════════════════════════════════════════════════════════
   HIDE FLOATING CART PANEL ON ALL DEVICES
   ═══════════════════════════════════════════════════════════ */
.cart-panel {
  display: none !important;
}

@media (max-width: 768px) {
  .cart-panel {
    display: none !important;
  }
}
/* ═══════════════════════════════════════════════════════════
   CHECKOUT PAGE - QTY CONTROLS & CLEAR CART BUTTON
   ═══════════════════════════════════════════════════════════ */

.checkout-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.clear-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #e53935;
    border-radius: 12px;
    color: #e53935;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-cart-btn:hover {
    background: #e53935;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 57, 53, 0.3);
}

.checkout-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(46, 125, 50, 0.06);
    padding: 6px 12px;
    border-radius: 30px;
}

.checkout-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.3);
    line-height: 1;
}

.checkout-qty-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.5);
}

.checkout-qty-btn:active {
    transform: scale(0.95);
}

.checkout-qty-num {
    font-weight: 700;
    color: #1b5e20;
    min-width: 24px;
    text-align: center;
    font-size: 15px;
}

/* Fix order-item layout to accommodate qty controls */
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .checkout-top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .clear-cart-btn {
        width: 100%;
        justify-content: center;
    }

    .order-item {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .order-item-details {
        flex: 1;
        min-width: 0;
    }

    .checkout-qty-controls {
        order: 3;
    }

    .order-item-price {
        order: 2;
    }
}
/* ── Arrival card: inline qty + add to cart row ── */
.arrival-inline-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 15px auto 0;
  flex-wrap: nowrap;
}

/* Override the block display from .add-cart-btn-bottom */
.arrival-inline-row .add-cart-btn-bottom {
  margin: 0;
  display: inline-block;
  min-width: unset;
  padding: 11px 18px;
  font-size: 14px;
}

.aqty-btn {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(46,125,50,0.3);
  line-height: 1;
  flex-shrink: 0;
}

.aqty-btn:hover {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(46,125,50,0.5);
}

.aqty-num {
  background: #f0f8f0;
  color: #1b5e20;
  font-weight: 700;
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2e7d32;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .arrival-inline-row {
    gap: 4px;
  }
  .arrival-inline-row .add-cart-btn-bottom {
    padding: 10px 12px;
    font-size: 13px;
  }
  .aqty-btn {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .aqty-num {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}
.add-cart-btn-bottom {
  margin: 15px auto 0;
  display: block;
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
  min-width: 160px;
}

.add-cart-btn-bottom:hover {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.5);
}

/* ── SVG Cart Button ── */
.arrival-svg-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: unset !important;
  padding: 10px 20px !important;
  border-radius: 50px !important;
  background: linear-gradient(135deg, #2e7d32, #1b5e20) !important;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 18px rgba(46,125,50,0.35);
  position: relative;
  overflow: hidden;
}

.arrival-svg-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}

.arrival-svg-btn:hover::before {
  left: 100%;
}

.arrival-svg-btn:hover {
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 12px 28px rgba(46,125,50,0.55) !important;
  background: linear-gradient(135deg, #1b5e20, #388e3c) !important;
}

.arrival-svg-btn:active {
  transform: scale(0.96) !important;
  box-shadow: 0 3px 10px rgba(46,125,50,0.3) !important;
}

.cart-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.arrival-svg-btn:hover .cart-svg {
  transform: rotate(-8deg) scale(1.15);
}

.cart-btn-label {
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* Override inline row spacing for svg btn */
.arrival-inline-row .arrival-svg-btn {
  margin: 0 !important;
}

@media (max-width: 768px) {
  .add-cart-btn-bottom {
    padding: 10px 20px;
    font-size: 14px;
    min-width: 140px;
  }
  .cart-btn-label {
    display: none; /* icon only on very small screens */
  }
  .arrival-svg-btn {
    padding: 10px 14px !important;
  }
  .cart-svg {
    width: 22px;
    height: 22px;
  }
}