/* =========================
   RESET
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================
   THEME
========================= */
:root {
  --bg: #0b1220;
  --card: #111a2e;
  --input: #0b1220;

  --primary: #4f46e5;
  --primary-hover: #4338ca;

  --green: #22c55e;
  --red: #ef4444;

  --text: #ffffff;
  --muted: rgba(255,255,255,0.7);
  --border: rgba(255,255,255,0.08);

  --radius: 14px;
}

/* =========================
   BASE
========================= */
body {
  font-family: Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* =========================
   LAYOUT
========================= */
.app {
  max-width: 900px;
  margin: auto;
  padding: 16px;
}

.top h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
}

/* =========================
   TOOLBAR
========================= */
.toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;

  background: var(--card);
  padding: 12px;
  border-radius: var(--radius);
}

.toolbar input,
.toolbar select {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  outline: none;
}

/* desktop */
@media (min-width: 768px) {
  .toolbar {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* =========================
   LIST
========================= */
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================
   CARD
========================= */
.item {
  position: relative;
  padding: 16px;
  border-radius: 18px;
  overflow: hidden;

  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);

  transition: 0.2s;
  cursor: pointer;
}

.item:hover {
  transform: translateY(-2px);
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}

.content {
  position: relative;
  z-index: 2;
}

/* =========================
   INFO ROW
========================= */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.title {
  font-size: 15px;
  font-weight: 700;
}

.brand {
  font-size: 13px;
  color: var(--muted);
}

.stock {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
}

/* =========================
   CONTROL
========================= */
.control {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.control input {
  width: 50px;
  padding: 8px;
  text-align: center;
  border-radius: 10px;
  border: none;
  background: var(--input);
  color: var(--text);
}

/* =========================
   BUTTONS
========================= */
button {
  cursor: pointer;
  border: none;
}

.plus,
.minus {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-weight: bold;
  color: white;
}

.plus {
  background: var(--green);
}

.minus {
  background: var(--red);
}

/* =========================
   MODAL
========================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9999;
}

/* mobile */
@media (max-width: 768px) {
  .modal {
    align-items: flex-end;
  }
}

/* =========================
   SHEET
========================= */
.sheet {
  width: 100%;
  max-width: 500px;
  padding: 16px;

  background: linear-gradient(180deg, #111a2e, #0b1220);
  border-radius: 20px;

  box-shadow: 0 20px 60px rgba(0,0,0,0.6);

  animation: slideUp 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .sheet {
    border-radius: 20px 20px 0 0;
  }
}

/* =========================
   MODAL CONTENT
========================= */
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-body input,
.sheet-body select {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  outline: none;
}

.sheet-body input:focus,
.sheet-body select:focus {
  border-color: var(--primary);
}

/* footer */
.sheet-footer {
  margin-top: 12px;
}

.primary {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.primary:hover {
  background: var(--primary-hover);
}

/* =========================
   CLOSE BUTTON
========================= */
.close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: white;

  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* =========================
   COLOR LABEL
========================= */
.color-label {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px 14px;
  border-radius: var(--radius);

  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}

.color-label input {
  width: 42px;
  height: 32px;
  border: none;
  cursor: pointer;
}

/* =========================
   FAB
========================= */
.fab {
  position: fixed;
  top: 16px;
  right: 16px;

  width: 54px;
  height: 54px;

  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 28px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.fab:hover {
  background: var(--primary-hover);
}

/* =========================
   UTIL
========================= */
.hidden {
  display: none;
}

/* =========================
   ANIMATION
========================= */
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}