/* ============================================================
   GTCARD – Shopping Cart Page
   File: css/cart.css
   Purpose: Cart layout, item rows, and order summary only
   ============================================================ */

.cart-page {
  padding: 28px 0 20px;
}

.cart-page__title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 22px;
  letter-spacing: -0.02em;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

/* Item list */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.cart-item__thumb {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  object-fit: contain;
  padding: 6px;
  background: #fff;
  display: block;
}

.cart-item__meta {
  min-width: 0;
}

.cart-item__cat {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 3px;
}

.cart-item__name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #222;
  line-height: 1.35;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 4px 6px;
  gap: 2px;
}

.qty__btn {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}

.qty__btn:hover {
  background: #e5e7eb;
}

.qty__value {
  min-width: 18px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #222;
}

.cart-item__remove {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-item__remove:hover {
  color: #dc2626;
  background: #fef2f2;
}

.cart-item__price {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  min-width: 64px;
  text-align: right;
}

/* Empty state */
.cart-empty {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 42px 24px;
  text-align: center;
}

.cart-empty p {
  color: #6b7280;
  margin-bottom: 16px;
}

.cart-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-800);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  padding: 10px 22px;
  text-decoration: none;
}

/* Order summary */
.cart-summary {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 18px;
  padding: 22px 20px;
}

.cart-summary__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 18px;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: #4b5563;
  margin-bottom: 10px;
}

.cart-summary__row--total {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  margin-top: 8px;
  margin-bottom: 22px;
}

.cart-summary__checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 50px;
  background: var(--green-800);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.cart-summary__checkout:hover {
  background: var(--green-700);
}

.cart-summary__checkout:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cart-page + .best-sellers {
  padding: 28px 0 20px;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 56px 1fr auto;
    grid-template-areas:
      "thumb info price"
      "thumb controls price";
  }

  .cart-item__thumb { grid-area: thumb; }
  .cart-item__meta { grid-area: info; }
  .cart-item__controls { grid-area: controls; }
  .cart-item__price { grid-area: price; align-self: start; }
}
