/* Giỏ hàng culcat.vn — xem js/cart.jsx.
   Chỉ dùng biến màu có sẵn trong colors_and_type.css để không lệch tông khi đổi mood. */

/* Nút giỏ nổi. Ngồi TRÊN nút chat (bottom 80px) để hai nút không đè nhau. */
.cc-cart-fab {
  position: fixed;
  right: 16px;
  bottom: 132px;
  z-index: 60;
  border: 1px solid var(--ink, #2B2721);
  background: var(--ink, #2B2721);
  color: var(--paper, #F6F1E7);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.cc-cart-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .35);
  display: flex;
  justify-content: flex-end;
}

.cc-cart {
  width: min(420px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper, #F6F1E7);
  border-left: 1px solid var(--ink, #2B2721);
}

.cc-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(43, 39, 33, .18);
  font-weight: 600;
}
.cc-cart__head button {
  border: 0; background: none; font-size: 24px; line-height: 1;
  cursor: pointer; color: inherit;
}

.cc-cart__body { flex: 1; overflow-y: auto; padding: 8px 16px; }
.cc-cart__empty { font-size: 14px; opacity: .65; padding: 16px 0; }

.cc-cart__line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(43, 39, 33, .12);
}
.cc-cart__line-title { font-size: 14px; font-weight: 600; }
.cc-cart__line-meta { font-size: 12px; opacity: .65; }
.cc-cart__line-price { font-size: 14px; font-weight: 600; white-space: nowrap; }
/* Món chưa nối được kho — nói ra chứ không giấu; khách vẫn mua được, chỉ là qua người. */
.cc-cart__flag { color: #A06A00; }

.cc-cart__qty { display: flex; align-items: center; gap: 8px; }
.cc-cart__qty button {
  /* 32px là mức nhỏ nhất bấm trúng bằng ngón tay mà không cần nhìn kỹ. */
  width: 32px; height: 32px;
  border: 1px solid rgba(43, 39, 33, .3);
  border-radius: 8px;
  background: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.cc-cart__qty button:disabled { opacity: .35; cursor: default; }
.cc-cart__qty span { min-width: 18px; text-align: center; font-size: 14px; }

.cc-cart__error { font-size: 13px; color: #B3261E; padding: 0 16px; }
.cc-cart__note { font-size: 13px; color: #A06A00; padding: 0 16px; }

.cc-cart__foot {
  border-top: 1px solid rgba(43, 39, 33, .18);
  padding: 14px 16px;
  /* Chừa chỗ cho thanh điều hướng của trình duyệt di động. */
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.cc-cart__total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 15px; margin-bottom: 2px;
}
.cc-cart__hint { font-size: 12px; opacity: .6; margin-bottom: 10px; }
.cc-cart__checkout {
  width: 100%;
  border: 1px solid var(--ink, #2B2721);
  background: var(--ink, #2B2721);
  color: var(--paper, #F6F1E7);
  border-radius: 10px;
  padding: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.cc-cart__checkout:disabled { opacity: .4; cursor: default; }

/* --- Nút thêm vào giỏ trên thẻ sản phẩm --- */

.p-add { padding: 8px 0 2px; }
.p-add__sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.p-add__size {
  min-width: 34px;
  padding: 5px 8px;
  border: 1px solid rgba(43, 39, 33, .3);
  border-radius: 8px;
  background: transparent;
  font-size: 12px; cursor: pointer;
}
.p-add__size.is-active {
  background: var(--ink, #2B2721);
  color: var(--paper, #F6F1E7);
  border-color: var(--ink, #2B2721);
}
.p-add__btn {
  width: 100%;
  border: 1px solid var(--ink, #2B2721);
  background: transparent;
  color: var(--ink, #2B2721);
  border-radius: 10px;
  padding: 9px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.p-add__btn:hover:not(:disabled) { background: var(--ink, #2B2721); color: var(--paper, #F6F1E7); }
.p-add__btn:disabled { opacity: .45; cursor: default; }

@media (max-width: 480px) {
  .cc-cart { width: 100vw; }
}
