
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: #0b1220; color: #e6edf3; }
a { color: #61dafb; text-decoration: none; }
header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: #111827; border-bottom: 1px solid #1f2937; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; letter-spacing: 0.5px; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card { background: #111827; border: 1px solid #1f2937; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.card img { width: 100%; height: 160px; object-fit: cover; border-bottom: 1px solid #1f2937; background: #0b1220; }
.card-content { padding: 14px; display: grid; gap: 8px; }
.title { font-size: 16px; font-weight: 700; line-height: 1.2; }
.desc { font-size: 14px; color: #9ca3af; min-height: 40px; }
.price { font-weight: 700; }
.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #374151; background: #1f2937; color: #e6edf3; border-radius: 12px; padding: 8px 12px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #374151; }

.login { display: flex; gap: 8px; align-items: center; }
.login input { background:#0b1220; color:#e6edf3; border:1px solid #374151; border-radius: 10px; padding: 8px 10px; }
.login .status { margin-left: 8px; font-weight: 700; }

.badge { font-size: 12px; color:#9ca3af; }
footer { color:#9ca3af; text-align:center; padding:16px 24px; border-top: 1px solid #1f2937; }
.product-hero { display:grid; gap:16px; grid-template-columns: 1fr 1.2fr; align-items: start; }
@media (max-width: 900px) { .product-hero { grid-template-columns: 1fr; } }
.product-hero img { width: 100%; border-radius: 16px; border:1px solid #1f2937; }
.breadcrumbs { font-size: 14px; margin-bottom: 12px; color:#9ca3af; }
.back { margin-top: 16px; display:inline-block; }

/* --- Toast --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.toast {
  background: #1f2937;
  color: #e6edf3;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  font-weight: 600;
  opacity: 0.95;
  animation: fadeIn 0.3s ease;
}
.toast-success { border-left: 4px solid #22c55e; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-info { border-left: 4px solid #3b82f6; }

.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 0.95; transform: translateY(0); }
}

/* --- Cart dropdown panel --- */
.cart-btn { position: relative; margin-left: 12px; }
.cart-panel {
  position: absolute;
  right: 24px;
  top: 64px;
  width: 320px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  padding: 12px;
}
.cart-header { font-weight: 800; margin-bottom: 8px; }
.cart-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.cart-item { border-bottom: 1px solid #1f2937; padding: 8px 2px; }
.cart-empty { color: #9ca3af; padding: 10px 2px; }
.cart-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* --- Cart remove button --- */
.cart-remove {
  float: right;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #f87171;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.1s ease;
}
.cart-remove:hover {
  transform: scale(1.2);
}
