/* ================================
   MARKETBLOX — CART DRAWER v3 PREMIUM
   ================================ */

/* CART NAV BUTTON */
.cart-nav-btn {
  position: relative;
  background: rgba(0,200,83,0.12);
  border: 1.5px solid rgba(0,200,83,0.25);
  color: #00e676;
  width: 40px; height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cart-nav-btn:hover {
  background: rgba(0,200,83,0.22);
  border-color: #00c853;
  box-shadow: 0 0 16px rgba(0,200,83,0.25);
  transform: scale(1.06);
}
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  background: #00c853;
  color: white;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #061209;
  display: none;
  box-shadow: 0 0 10px rgba(0,200,83,0.5);
}
.cart-count.visible { display: flex; }

/* OVERLAY */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1990;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cart-overlay.open { opacity: 1; visibility: visible; }

/* DRAWER */
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 440px; max-width: 96vw;
  background: linear-gradient(160deg, #050f07 0%, #091a0c 55%, #061209 100%);
  border-left: 1px solid rgba(0,200,83,0.18);
  z-index: 2000;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: -20px 0 100px rgba(0,0,0,0.8), -1px 0 0 rgba(0,200,83,0.1);
  overflow: hidden;
}
.cart-drawer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, #00c853 40%, #00e676 60%, #00c853 80%, transparent 100%);
  z-index: 10;
}
.cart-drawer::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0,200,83,0.4), rgba(0,200,83,0.2), transparent);
  pointer-events: none;
}
.cart-drawer.open { transform: translateX(0); }

/* HEADER */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.4rem;
  background: rgba(0,200,83,0.05);
  border-bottom: 1px solid rgba(0,200,83,0.12);
  flex-shrink: 0;
  position: relative;
}
.drawer-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  color: #e8f5e9;
  display: flex; align-items: center; gap: 0.55rem;
  letter-spacing: 0.01em;
}
.drawer-title svg { filter: drop-shadow(0 0 6px rgba(0,200,83,0.5)); }
.drawer-title span {
  background: linear-gradient(135deg, #00c853, #00a040);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  min-width: 20px; text-align: center;
  box-shadow: 0 2px 10px rgba(0,200,83,0.35);
}
.drawer-close {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  color: #5a9a60;
}
.drawer-close:hover {
  background: rgba(255,82,82,0.12);
  border-color: rgba(255,82,82,0.3);
  color: #ff5252;
  transform: rotate(90deg);
}

/* BODY */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
  min-height: 0;
}
.drawer-body::-webkit-scrollbar { width: 3px; }
.drawer-body::-webkit-scrollbar-track { background: transparent; }
.drawer-body::-webkit-scrollbar-thumb { background: rgba(0,200,83,0.25); border-radius: 99px; }

/* ITEMS */
.drawer-items {
  padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.7rem;
}

.drawer-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.85rem;
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  border: 1px solid rgba(0,200,83,0.1);
  position: relative;
  animation: itemSlideIn 0.35s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  transition: all 0.25s ease;
  transform-style: preserve-3d;
}
.drawer-item:hover {
  background: rgba(0,200,83,0.05);
  border-color: rgba(0,200,83,0.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,200,83,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}
@keyframes itemSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.di-new-badge {
  position: absolute;
  top: -7px; left: 10px;
  background: linear-gradient(90deg, #00c853, #00e676);
  color: white;
  font-family: var(--font-display);
  font-size: 0.48rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.08em;
  animation: pulseBadge 2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(0,200,83,0.4);
}
@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 2px 8px rgba(0,200,83,0.4); }
  50% { box-shadow: 0 2px 16px rgba(0,200,83,0.7); }
}

.drawer-item-img {
  width: 68px; height: 68px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f2a14, #172e1c);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  border: 1px solid rgba(0,200,83,0.18);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.drawer-item-img img { width: 100%; height: 100%; object-fit: cover; }

.drawer-item-info { flex: 1; min-width: 0; }
.drawer-item-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  color: #e0f0e3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 0.12rem;
}
.drawer-item-game {
  font-size: 0.68rem;
  color: #3d7a44;
  margin-bottom: 0.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.drawer-item-price-row { display: flex; align-items: center; gap: 0.4rem; }
.drawer-item-price {
  font-weight: 900;
  color: #00e676;
  font-size: 1rem;
  font-family: var(--font-display);
  text-shadow: 0 0 12px rgba(0,200,83,0.4);
}
.drawer-item-original {
  font-size: 0.72rem;
  color: #3d7a44;
  text-decoration: line-through;
}

.drawer-item-qty {
  display: flex; align-items: center; gap: 0.2rem;
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  padding: 0.2rem 0.3rem;
  border: 1px solid rgba(0,200,83,0.12);
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 8px; border: none;
  background: transparent;
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #5a9a60;
  transition: all 0.15s; line-height: 1;
}
.qty-btn:hover { background: rgba(0,200,83,0.18); color: #00e676; transform: scale(1.1); }
.qty-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 0.88rem; min-width: 20px; text-align: center; color: #c8e6c9;
}

.drawer-item-remove {
  background: none; border: none; cursor: pointer;
  color: #2d5c33; padding: 0.3rem;
  transition: all 0.2s;
  display: flex; align-items: center; border-radius: 6px;
}
.drawer-item-remove:hover { color: #ff5252; background: rgba(255,82,82,0.1); transform: scale(1.1); }

/* EMPTY STATE */
.drawer-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1; gap: 0.75rem; text-align: center; padding: 3rem 2rem;
}
.drawer-empty-icon {
  animation: floatIcon 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.4));
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.drawer-empty h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: #5a9a60;
}
.drawer-empty p { font-size: 0.82rem; color: #3d7a44; }
.drawer-empty-btn {
  background: linear-gradient(135deg, #00c853, #009e42);
  color: white; border: none;
  padding: 0.65rem 1.5rem; border-radius: 100px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  cursor: pointer; margin-top: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,200,83,0.25);
}
.drawer-empty-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,200,83,0.4); }

/* SUGGESTIONS */
.drawer-suggestions {
  padding: 0.875rem 1.1rem 1rem;
  border-top: 1px solid rgba(0,200,83,0.07);
  margin-top: 0.25rem;
}
.drawer-suggestions-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.65rem;
}
.drawer-suggestions-title {
  font-family: var(--font-display);
  font-size: 0.62rem; font-weight: 800;
  letter-spacing: 0.18em; color: #3d7a44; text-transform: uppercase;
}
.suggestions-arrows { display: flex; gap: 0.25rem; }
.sugg-arrow {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(0,200,83,0.2);
  background: rgba(0,200,83,0.05);
  color: #5a9a60; font-size: 0.85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.sugg-arrow:hover { border-color: #00c853; color: #00c853; background: rgba(0,200,83,0.12); box-shadow: 0 0 10px rgba(0,200,83,0.2); }
.suggestions-row-wrap { position: relative; }
.suggestions-row-wrap::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 40px;
  background: linear-gradient(to right, transparent, #091a0c);
  pointer-events: none;
}
.suggestions-row {
  display: flex; gap: 0.5rem; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none; scroll-behavior: smooth;
}
.suggestions-row::-webkit-scrollbar { display: none; }
.suggestion-card {
  flex-shrink: 0; width: 88px;
  cursor: pointer; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(0,200,83,0.1);
  background: rgba(255,255,255,0.03);
  transition: all 0.22s;
}
.suggestion-card:hover {
  border-color: rgba(0,200,83,0.4);
  transform: translateY(-3px) scale(1.02);
  background: rgba(0,200,83,0.06);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,200,83,0.15);
}
.suggestion-img {
  width: 88px; height: 78px;
  background: linear-gradient(135deg, #0f2a14, #172e1c);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; overflow: hidden;
}
.suggestion-img img { width: 100%; height: 100%; object-fit: cover; }
.suggestion-info { padding: 0.35rem 0.45rem; }
.suggestion-name {
  font-family: var(--font-display); font-size: 0.58rem; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c8e6c9;
}
.suggestion-price { font-size: 0.68rem; color: #00c853; font-weight: 800; margin-top: 0.1rem; text-shadow: 0 0 8px rgba(0,200,83,0.3); }

/* FOOTER */
.drawer-footer {
  border-top: 1px solid rgba(0,200,83,0.1);
  padding: 1rem 1.2rem 1.2rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.4) 100%);
  flex-shrink: 0;
}

/* ORDER SUMMARY BOX */
.drawer-order-summary {
  background: rgba(0,200,83,0.04);
  border: 1px solid rgba(0,200,83,0.1);
  border-radius: 14px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.875rem;
  position: relative;
  overflow: hidden;
}
.drawer-order-summary::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,200,83,0.3), transparent);
}
.drawer-subtotal {
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: #5a9a60; margin-bottom: 0.45rem;
}
.drawer-delivery {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: #5a9a60;
  margin-bottom: 0.65rem; padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(0,200,83,0.07);
}
.drawer-free-badge {
  background: rgba(0,200,83,0.15);
  color: #00c853;
  font-size: 0.65rem; font-weight: 800;
  padding: 0.15rem 0.55rem; border-radius: 100px;
  font-family: var(--font-display);
  border: 1px solid rgba(0,200,83,0.2);
  box-shadow: 0 0 10px rgba(0,200,83,0.1);
}
.drawer-total {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 900; color: #e0f0e3;
}
.drawer-total span:last-child {
  color: #00e676;
  text-shadow: 0 0 16px rgba(0,200,83,0.45);
  font-size: 1.2rem;
}

/* SECURE BADGE */
.drawer-secure {
  display: flex; align-items: center; justify-content: center;
  gap: 0.4rem; font-size: 0.7rem; color: #3d7a44;
  margin-bottom: 0.75rem; font-weight: 600;
}

/* TERMS */
.drawer-terms {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-bottom: 0.875rem; font-size: 0.73rem; color: #3d7a44;
  cursor: pointer; line-height: 1.4;
}
.drawer-terms input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--green);
  flex-shrink: 0; margin-top: 1px; cursor: pointer;
}

/* CHECKOUT BUTTON — ANIMATED SHIMMER */
.drawer-checkout-btn {
  width: 100%;
  background: linear-gradient(90deg,
    #009e42 0%, #00c853 25%, #00e676 50%, #00c853 75%, #009e42 100%
  );
  background-size: 250% 100%;
  animation: btnShimmer 2.5s linear infinite;
  color: white; border: none;
  padding: 1rem 1rem;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 900;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 0.55rem;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 24px rgba(0,200,83,0.35), 0 1px 0 rgba(255,255,255,0.15) inset;
  position: relative; overflow: hidden;
}
.drawer-checkout-btn::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: btnGloss 2.5s ease-in-out infinite;
}
@keyframes btnShimmer {
  0%   { background-position: 100% center; }
  100% { background-position: -100% center; }
}
@keyframes btnGloss {
  0%   { left: -100%; }
  50%, 100% { left: 150%; }
}
.drawer-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(0,200,83,0.5), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.drawer-checkout-btn:disabled {
  background: rgba(255,255,255,0.05);
  color: #3d5c40; cursor: not-allowed;
  transform: none; box-shadow: none; animation: none;
}
.drawer-checkout-btn:disabled::after { display: none; }
.checkout-label { flex: 1; text-align: center; }
.checkout-arrow {
  background: rgba(0,0,0,0.2);
  border-radius: 9px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1px solid rgba(255,255,255,0.15);
}

/* CONTINUE SHOPPING */
.drawer-view-cart {
  width: 100%;
  background: transparent;
  color: #5a9a60;
  border: 1px solid rgba(0,200,83,0.18);
  padding: 0.65rem;
  border-radius: 10px;
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; margin-bottom: 0.875rem;
}
.drawer-view-cart:hover {
  border-color: rgba(0,200,83,0.4); color: #00c853;
  background: rgba(0,200,83,0.05);
}

/* PAY ICONS */
.drawer-pay-icons {
  display: flex; align-items: center; justify-content: center;
  gap: 0.3rem; flex-wrap: wrap;
}
.dpi {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 5px; padding: 0.18rem 0.5rem;
  font-size: 0.58rem; font-weight: 800; color: #3d7a44;
  letter-spacing: 0.04em;
}

/* TOAST */
.cart-toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: linear-gradient(135deg, #061209, #0d2410);
  border: 1px solid rgba(0,200,83,0.3);
  color: #c8e6c9;
  padding: 0.65rem 1.25rem;
  border-radius: 100px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.83rem;
  z-index: 3000; display: flex; align-items: center; gap: 0.5rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,200,83,0.1), 0 0 20px rgba(0,200,83,0.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none; white-space: nowrap;
}
.cart-toast.show { transform: translateX(-50%) translateY(0); }
