/* ==========================================================
   KUSH JÓIAS — estilos exclusivos da versão com catálogo
   ========================================================== */

/* ---------- barra de filtros ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  margin-bottom: 34px; padding-bottom: 24px; border-bottom: 1px solid var(--line);
}
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; min-width: 0; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line); transition: all .2s;
}
.chip:hover { color: var(--cream); box-shadow: inset 0 0 0 1px var(--gold); }
.chip.active { background: var(--gold-grad); color: #1a1205; box-shadow: none; }
.chip small { opacity: .6; margin-left: 4px; }
.filters { display: flex; gap: 10px; flex: 1; justify-content: flex-end; min-width: 260px; }
.search {
  position: relative; flex: 1; max-width: 300px;
}
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input, .select {
  width: 100%; height: 44px; border-radius: 999px; border: 0; outline: 0;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--cream); font: inherit; font-size: 14px; padding: 0 16px 0 42px;
}
.search input:focus, .select:focus { box-shadow: inset 0 0 0 1.5px var(--gold); }
.select { width: auto; padding: 0 36px 0 16px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23d4a64a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.select option { background: var(--green-900); }
@media (max-width: 700px) {
  .toolbar { flex-direction: column; align-items: stretch; }
  .filters { min-width: 0; }
  .search { max-width: none; }
}

/* ---------- grade de produtos ---------- */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1100px) { .products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .products { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.product {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--green-800); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s, box-shadow .3s;
  cursor: pointer; animation: pop .45s ease both;
}
.product:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 1px var(--gold), 0 24px 50px -24px #000; }
.product .art { aspect-ratio: 1; position: relative; overflow: hidden; }
.product .art svg, .product .art img { transition: transform .6s ease; }
.product:hover .art svg, .product:hover .art img { transform: scale(1.06); }
.product .tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--gold-grad); color: #1a1205; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.product .off {
  position: absolute; top: 12px; right: 12px; z-index: 2; background: #b3261e; color: #fff;
  font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 999px;
}
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.product h3 { margin: 4px 0 10px; font-size: 1.02rem; font-weight: 700; line-height: 1.3; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.price b { font-size: 1.25rem; font-weight: 800; }
.price s { color: var(--muted); font-size: .85rem; }
.price-pix { font-size: 12px; color: var(--muted); margin: 2px 0 14px; }
.price-pix b { color: #4fd18b; font-weight: 700; }
.add-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 12px; border-radius: 12px; border: 0; background: rgba(212, 166, 74, .12); color: var(--gold-light);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; transition: background .2s, color .2s;
}
.add-btn svg { width: 16px; height: 16px; }
.add-btn:hover { background: var(--gold-grad); color: #1a1205; }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted); }
.empty b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2rem; color: var(--cream); margin-bottom: 6px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 520px) {
  .product-body { padding: 12px 12px 14px; }
  .product h3 { font-size: .9rem; }
  .price b { font-size: 1.05rem; }
  .add-btn { font-size: 11px; padding: 10px 6px; }
  .add-btn .lbl-long { display: none; }
}

/* ---------- contador da sacola ---------- */
.bag-count {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 999px; padding: 0 5px;
  background: var(--gold-grad); color: #1a1205; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  transform: scale(0); transition: transform .3s cubic-bezier(.5, 1.8, .5, 1);
}
.bag-count.show { transform: scale(1); }
.bag-count.bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.4); } }

/* ---------- overlay / gaveta / modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(440px, 100%);
  background: var(--green-950); box-shadow: -1px 0 0 var(--line), -30px 0 60px -20px #000;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; text-transform: uppercase; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.bag-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); align-items: center; }
.bag-item .art { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; }
.bag-item h4 { margin: 0; font-size: .95rem; }
.bag-item small { color: var(--muted); display: block; margin: 2px 0 8px; }
.qty { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 30px; height: 30px; border: 0; background: none; display: grid; place-items: center; }
.qty button svg { width: 14px; height: 14px; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.bag-item .right { text-align: right; display: grid; gap: 8px; justify-items: end; }
.bag-item .right b { font-size: .95rem; }
.remove { border: 0; background: none; color: var(--muted); padding: 4px; }
.remove svg { width: 16px; height: 16px; }
.remove:hover { color: #ff8a80; }
.bag-empty { text-align: center; padding: 60px 10px; color: var(--muted); }
.bag-empty svg { width: 56px; height: 56px; color: var(--gold); margin: 0 auto 16px; opacity: .6; }
.coupon { display: flex; gap: 8px; }
.coupon input {
  flex: 1; height: 44px; border-radius: 12px; border: 0; outline: 0; padding: 0 14px;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); color: var(--cream); font: inherit;
  text-transform: uppercase; letter-spacing: .08em; font-size: 14px;
}
.coupon input:focus { box-shadow: inset 0 0 0 1.5px var(--gold); }
.coupon button { height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--green-700); font-weight: 700; font-size: 13px; }
.coupon-msg { font-size: 12px; margin-top: -6px; }
.coupon-msg.ok { color: #4fd18b; }
.coupon-msg.err { color: #ff8a80; }
.totals { display: grid; gap: 6px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals .grand { color: var(--cream); font-size: 1.15rem; font-weight: 800; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 4px; }
.totals .grand span:last-child { color: var(--gold-light); }
.foot-note { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }

.modal {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative; width: min(920px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--green-900); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  display: grid; grid-template-columns: 1fr 1fr; transform: translateY(20px) scale(.98); transition: transform .35s ease;
}
.modal.open .modal-card { transform: none; }
.modal-card > .art { aspect-ratio: 1; min-height: 100%; }
.modal-info { padding: 40px 36px; display: flex; flex-direction: column; }
.modal-info h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 2.3rem; line-height: 1; margin: 8px 0 14px; }
.modal-info .price b { font-size: 1.7rem; }
.modal-info p.desc { color: var(--muted); margin: 18px 0 24px; }
.opt-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.size {
  min-width: 52px; padding: 10px 14px; border-radius: 10px; border: 0; background: transparent;
  box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; transition: all .2s;
}
.size:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.size.active { background: var(--gold-grad); color: #1a1205; box-shadow: none; }
.modal-actions { display: grid; gap: 10px; margin-top: auto; }
.modal-actions .row { display: flex; gap: 10px; }
.modal-actions .qty { height: 52px; }
.modal-actions .qty button { width: 42px; height: 52px; }
.modal-actions .row .btn { flex: 1; }
.perks { display: grid; gap: 8px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.perks span { display: flex; gap: 10px; align-items: center; }
.perks svg { width: 18px; height: 18px; color: var(--gold); }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .5); display: grid; place-items: center;
}
.modal-close svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .modal { padding: 0; align-items: end; }
  .modal-card { grid-template-columns: 1fr; border-radius: 22px 22px 0 0; max-height: 92vh; }
  .modal-card > .art { aspect-ratio: 4 / 3; min-height: 0; }
  .modal-info { padding: 26px 20px 24px; }
  .modal-info h2 { font-size: 1.9rem; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 85; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--cream); padding: 14px 20px; border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--gold), var(--shadow); display: flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 600; transition: transform .4s cubic-bezier(.2, .8, .2, 1);
  width: max-content; max-width: calc(100vw - 32px);
}
.toast span { flex: 1; }
.toast.show { transform: translate(-50%, 0); }
.toast svg { width: 20px; height: 20px; color: #4fd18b; flex: none; }
.toast button { border: 0; background: none; color: var(--gold-light); font-weight: 800; text-decoration: underline; padding: 0 0 0 6px; white-space: nowrap; }
@media (max-width: 900px) { .toast { bottom: 90px; } }

/* botão flutuante da sacola no mobile */
.bag-float {
  position: fixed; left: 20px; bottom: 20px; z-index: 60; display: none;
  height: 56px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--gold-grad); color: #1a1205; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  align-items: center; gap: 10px; box-shadow: 0 12px 30px -10px rgba(212, 166, 74, .8);
}
.bag-float svg { width: 20px; height: 20px; }
.bag-float.show { display: inline-flex; }
@media (min-width: 901px) { .bag-float.show { display: none; } }
