/* Smart Cart Controls (scoped) - Clean Minimal Design */
.shop-main-content .cart-controls,
.products-list .product-card .cart-controls,
.products-grid .product-card .cart-controls,
.hero-info .cart-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shop-main-content .quantity-stepper,
.hero-info .quantity-stepper {
  display: none;
  align-items: center;
  gap: 6px;
}

.shop-main-content .qty-btn,
.shop-main-content .cart-minus,
.shop-main-content .cart-plus,
.shop-main-content .cart-trash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #f2f2f2;
  color: #0d0d0d;
  border: none;
  cursor: pointer;
  transition: background 80ms ease, opacity 80ms ease;
}

.shop-main-content .qty-btn:hover,
.shop-main-content .cart-minus:hover,
.shop-main-content .cart-plus:hover,
.shop-main-content .cart-trash:hover {
  background: #ffffff;
  opacity: 0.95;
}

/* Button active flash feedback */
.shop-main-content .qty-btn.btn-active-flash,
.shop-main-content .btn-add-to-cart.btn-active-flash {
  background: #ffffff;
  transition: background 50ms ease;
}

.shop-main-content .qty-display,
.shop-main-content .cart-qty,
.hero-info .qty-display {
  min-width: 28px;
  text-align: center;
  color: #f2f2f2;
  font-weight: 500;
  font-size: 15px;
  will-change: transform;
}

/* Quantity pulse animation (optimistic update feedback) */
.shop-main-content .qty-display.qty-pulse,
.hero-info .qty-display.qty-pulse {
  animation: qtyPulse 200ms ease;
}

@keyframes qtyPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Ensure no light hover bleed on dark theme */
.shop-main-content .qty-btn svg,
.shop-main-content .cart-minus svg,
.shop-main-content .cart-plus svg,
.shop-main-content .cart-trash svg,
.hero-info .qty-btn svg,
.hero-info .cart-trash svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Make add-to-cart button swap smooth */
.shop-main-content .btn-add-to-cart,
.hero-info .btn-add-to-cart {
  transition: opacity 100ms ease, transform 100ms ease;
}
.shop-main-content .btn-add-to-cart[style*="display: none"],
.hero-info .btn-add-to-cart[style*="display: none"] {
  opacity: 0;
  transform: scale(0.98);
}

/* Sidebar/cart page specific tweaks */
/* New cart page layout */
.cart-container{display:flex;align-items:flex-start;justify-content:space-between;gap:2rem;max-width:1200px;margin:2rem auto;color:#f2f2f2;padding:0 1rem;}
.cart-items{flex:3;}
.cart-title{margin-top:0;font-size:1.8rem;}
.cart-summary{flex:1;background:rgba(26,26,26,0.6);border:1px solid rgba(255,255,255,0.1);border-radius:12px;padding:1.5rem;position:sticky;top:120px;}
.cart-summary h2{margin-top:0;font-size:1.4rem;}
.cart-subtotal{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;font-size:1.1rem;}
.cart-actions{display:flex;flex-direction:column;gap:.75rem;}
.btn-continue,.btn-clear,.btn-checkout{padding:.75rem 1rem;border-radius:8px;text-align:center;font-weight:600;cursor:pointer;text-decoration:none;transition:background .2s ease,color .2s ease;display:block;}
.btn-checkout{background:var(--cyan,#9BE2F2);color:#0d0d0d;}
.btn-continue{background:rgba(255,255,255,0.08);color:#f2f2f2;}
.btn-clear{background:rgba(231,76,60,0.15);color:#e74c3c;border:none;}
.btn-clear:hover{background:rgba(231,76,60,0.25);}
.cart-table{width:100%;border-collapse:collapse;margin-top:1rem;}
.cart-table th,.cart-table td{padding:.5rem .75rem;border-bottom:1px solid rgba(255,255,255,0.08);}
.qty-stepper{display:inline-flex;align-items:center;gap:.5rem;background:rgba(255,255,255,0.06);padding:.35rem .6rem;border-radius:8px;}
.qty-stepper button{background:rgba(255,255,255,0.15);color:#f2f2f2;border:none;padding:.35rem .6rem;border-radius:6px;cursor:pointer;}
.qty-stepper button:hover{background:rgba(255,255,255,0.25);}
.empty-cart-msg{margin:1.25rem 0;font-size:1rem;}
@media (max-width:900px){.cart-container{flex-direction:column;}.cart-summary{position:static;top:auto;width:100%;}}

#checkout-btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 10px;
}

.btn-outline.w-full {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
}

#clear-cart-btn.btn-ghost {
  background: transparent;
  color: #bdbdbd;
  border: 1px solid #444;
  padding-top: 6px;
  padding-bottom: 6px;
  border-radius: 8px;
  font-size: 14px;
}

/* Ensure sidebar width behaves on small screens */
@media (max-width: 900px) {
  aside[aria-label="Cart summary"] { width:100%; }
}
