/* New Cart System CSS - isolated with new- prefix */

/* Header cart link */
.new-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #333;
  text-decoration: none;
  transition: all .2s ease;
}
.new-cart-link:hover { border-color: #007bff; color: #007bff; text-decoration: none; }
.new-cart-link i { color: #007bff; }
.new-cart-count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: #dc3545; color: #fff; font-size: 12px; font-weight: 700;
  border-radius: 999px;
}

/* Mini Cart Sidebar */
.new-cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 10000; opacity: 0; visibility: hidden; transition: all .2s ease; }
.new-cart-overlay.new-open { opacity: 1; visibility: visible; }

.new-cart-sidebar { position: fixed; top: 0; right: -380px; width: 360px; max-width: 92vw; height: 100vh; background: #fff; z-index: 10001; box-shadow: -6px 0 30px rgba(0,0,0,.15); display: flex; flex-direction: column; transition: right .25s ease; border-left: 3px solid #007bff; }
.new-cart-sidebar.new-open { right: 0; }

.new-cart-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; background: linear-gradient(135deg,#007bff,#0056b3); color: #fff; }
.new-cart-header h3 { margin: 0; font-size: 18px; font-weight: 800; }
.new-cart-close { background: rgba(255,255,255,.2); border: 0; width: 36px; height: 36px; border-radius: 999px; color: #fff; font-size: 20px; cursor: pointer; }

.new-cart-body { padding: 14px; flex: 1; overflow-y: auto; }
.new-cart-empty { text-align: center; color: #6b7280; font-style: italic; padding: 30px 10px; }

.new-cart-summary-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-weight: 600; }

.new-cart-footer { padding: 12px; border-top: 1px solid #e5e7eb; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.new-btn-view, .new-btn-checkout, .new-btn-clear { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 700; cursor: pointer; border: 0; }
.new-btn-view { background: #f3f4f6; color: #374151; border: 2px solid #e5e7eb; }
.new-btn-clear { background: #fee2e2; color: #b91c1c; border: 2px solid #fecaca; }
.new-btn-checkout { background: linear-gradient(135deg,#e67e22,#f39c12); color: #fff; box-shadow: 0 6px 16px rgba(230,126,34,.35); grid-column: span 2; }

/* New Cart Page */
.new-cart-page { max-width: 1200px; margin: 0 auto; padding: 16px; }
.new-cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
@media(max-width: 992px){ .new-cart-grid { grid-template-columns: 1fr; }}


.new-cart-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.new-cart-card-header { padding: 16px 18px; font-size: 16px; font-weight: 800; color: #1f2937; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 10px; }

.new-cart-items { display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.new-cart-item { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid #eef2f7; border-radius: 10px; }
.new-cart-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; }
.new-cart-title { font-weight: 700; font-size: 14px; color: #111827; margin: 0 0 6px; }
.new-cart-meta { color: #6b7280; font-size: 12px; }

.new-qty { display: inline-flex; align-items: center; gap: 6px; background: #f3f4f6; padding: 4px; border-radius: 8px; border: 1px solid #e5e7eb; }
.new-qty button { width: 28px; height: 28px; border: 0; background: #007bff; color: #fff; border-radius: 6px; cursor: pointer; font-weight: 800; }
.new-qty input { width: 50px; text-align: center; border: 0; background: transparent; font-weight: 700; }

.new-remove { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 10px; cursor: pointer; font-weight: 700; }

.new-summary { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.new-summary-row { display: flex; align-items: center; justify-content: space-between; color: #1f2937; }
.new-summary-total { font-size: 18px; font-weight: 800; }

.new-cart-actions { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Utility */
.new-hidden { display: none !important; }

