/* =========================================================
   iFody — Carrinho (página dedicada) · Mobile-First
   ========================================================= */

body.has-cart-sticky {
  padding-bottom: calc(var(--bottombar-h) + 72px + var(--safe-bottom));
}
@media (min-width: 980px) {
  body.has-cart-sticky { padding-bottom: 0; }
}

/* ============================================
   BREADCRUMB (reaproveita estilos do PLP — replico aqui)
   ============================================ */
.crumb {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-3);
}
.crumb__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.crumb__row::-webkit-scrollbar { display: none; }
.crumb a { color: var(--text-2); }
.crumb a:hover { color: var(--pink-light); }
.crumb__sep { color: var(--text-3); opacity: .4; }
.crumb__current { color: var(--text); font-weight: 600; }
.crumb__home { display: inline-flex; align-items: center; gap: 4px; }

/* ============================================
   STEPPER de progresso
   ============================================ */
.checkout-steps {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .checkout-steps { padding: 28px 0; } }
.checkout-steps__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  max-width: 700px;
  margin: 0 auto;
}
.cstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cstep__dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all .25s var(--ease);
}
.cstep__label {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .cstep__dot { width: 36px; height: 36px; font-size: 14px; }
  .cstep__label { font-size: 13px; }
}
.cstep--current .cstep__dot {
  background: var(--grad-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 0 4px rgba(255, 61, 138, .15);
}
.cstep--current .cstep__label { color: var(--text); font-weight: 700; }
.cstep--done .cstep__dot {
  background: rgba(0, 196, 140, .15);
  border-color: rgba(0, 196, 140, .5);
  color: #00C48C;
}
.cstep__line {
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  align-self: flex-start;
  margin-top: 13px;
  min-width: 18px;
}
@media (min-width: 720px) {
  .cstep__line { margin-top: 17px; min-width: 40px; }
}

/* ============================================
   MAIN CART GRID
   ============================================ */
.cart-page {
  padding: 24px 0 40px;
}
@media (min-width: 980px) { .cart-page { padding: 40px 0 80px; } }
.cart-page__grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 980px) {
  .cart-page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 40px;
    align-items: start;
  }
}

/* ============================================
   LEFT: items + cupom
   ============================================ */
.cart-page__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cart-page__title {
  font-weight: 800;
  font-size: clamp(22px, 4vw, 32px);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.cart-page__title span {
  color: var(--text-3);
  font-weight: 500;
  font-size: 16px;
}
.cart-page__title strong { color: var(--text); font-weight: 700; }
.cart-page__continue {
  font-size: 13px;
  font-weight: 600;
  color: var(--pink-light);
}
.cart-page__continue:hover { color: var(--pink); }

/* Free shipping progress */
.freeship {
  background:
    linear-gradient(135deg, rgba(255, 212, 133, .1) 0%, rgba(255, 61, 138, .08) 100%);
  border: 1px solid rgba(255, 212, 133, .25);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.freeship__bar {
  height: 6px;
  background: rgba(0, 0, 0, .25);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.freeship__fill {
  height: 100%;
  background: var(--grad-gold);
  border-radius: 999px;
  transition: width .6s var(--ease);
}
.freeship__text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
  margin: 0;
}
.freeship__text strong { color: var(--gold); font-weight: 700; }
.freeship__text .i3d { width: 28px; height: 28px; flex-shrink: 0; }

/* Items list */
.cart-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.citem {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 14px;
  row-gap: 6px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
@media (min-width: 720px) {
  .citem {
    grid-template-columns: 100px 1fr auto;
    grid-template-rows: auto auto;
    padding: 18px;
  }
}
.citem__img {
  grid-row: 1 / span 3;
  width: 80px; height: 80px;
  border-radius: var(--r);
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
}
@media (min-width: 720px) {
  .citem__img {
    width: 100px; height: 100px;
    grid-row: 1 / span 2;
  }
}
.citem__body {
  min-width: 0;
}
.citem__cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pink-light);
  margin-bottom: 2px;
}
.citem__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.citem__variant {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.citem__stock-low {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 138, 76, .14);
  color: #FF8A4C;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  width: fit-content;
}
.citem__stock-low svg { flex-shrink: 0; }

/* Selo "Embalagem discreta" no resumo da sacola */
.cart-discreet {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(139, 60, 255, .10), rgba(255, 61, 138, .08));
  border: 1px solid rgba(139, 60, 255, .25);
}
.cart-discreet .i3d { width: 44px; height: 44px; flex-shrink: 0; }
.cart-discreet > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-discreet strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}
.cart-discreet span {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}
.citem__variant em {
  font-style: normal;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 500;
}
.citem__price {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
@media (min-width: 720px) {
  .citem__price {
    grid-column: 3;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
  }
}
.citem__price-now {
  font-weight: 800;
  font-size: 17px;
  background: linear-gradient(135deg, #00C48C, #00A876);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.citem__price-pix {
  font-size: 10px;
  font-weight: 700;
  color: #00C48C;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-left: 4px;
}
.citem__price-was {
  font-size: 11px;
  color: var(--text-3);
  text-decoration: line-through;
  display: block;
  font-weight: 500;
}
.citem__actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (min-width: 720px) {
  .citem__actions {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
  }
}
.citem__qty {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.citem__qty button {
  width: 30px; height: 32px;
  font-size: 16px;
  color: var(--text-2);
  font-weight: 600;
}
.citem__qty button:active { color: var(--pink); }
.citem__qty span {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 0 4px;
}
.citem__remove {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-3);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 500;
  transition: color .2s var(--ease);
}
.citem__remove:hover { color: var(--pink); }

/* ============================================
   CUPOM
   ============================================ */
.cart-coupon {
  margin-bottom: 24px;
}
.cart-coupon details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.cart-coupon summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}
.cart-coupon summary::-webkit-details-marker { display: none; }
.cart-coupon summary .i3d { width: 22px; height: 22px; flex-shrink: 0; }
.cart-coupon summary > span { flex: 1; }
.cart-coupon summary em { color: var(--pink-light); font-style: normal; font-weight: 700; margin-left: 4px; }
.coupon-form {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}
.coupon-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.coupon-form input:focus { border-color: var(--pink); }
.coupon-form .btn { padding: 10px 18px; min-height: auto; }
.coupon-form.done { opacity: .5; pointer-events: none; }
.coupon-form__hint {
  font-size: 11px;
  color: var(--text-3);
  padding: 0 16px 14px;
  line-height: 1.5;
}
.coupon-form__hint strong { color: var(--gold); font-weight: 700; letter-spacing: .04em; }

/* ============================================
   UPSELL (rail horizontal)
   ============================================ */
.cart-upsell {
  margin-top: 8px;
}
.cart-upsell__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
}
.cart-upsell__title .i3d { width: 24px; height: 24px; }
.cart-upsell__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 200px;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  scroll-snap-type: x proximity;
}
.cart-upsell__rail::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
  .cart-upsell__rail {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    grid-auto-columns: 220px;
  }
}
.uitem {
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.uitem:hover { border-color: var(--pink); transform: translateY(-2px); }
.uitem__img {
  aspect-ratio: 1/1;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
}
.uitem__body { padding: 10px 12px 12px; }
.uitem__cat {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pink-light);
  margin-bottom: 4px;
}
.uitem__name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  min-height: 2.6em;
}
.uitem__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.uitem__price {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
}
.uitem__add {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 61, 138, .35);
}

/* ============================================
   RIGHT: resumo
   ============================================ */
.cart-page__right {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}
@media (min-width: 980px) {
  .cart-page__right {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 26px;
  }
}

.summary__title {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 16px;
}

.summary__ship {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
}
.summary__ship-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}
.summary__ship-label .i3d { width: 22px; height: 22px; }
.summary__ship-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.summary__ship-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.summary__ship-form input:focus { border-color: var(--pink); }
.summary__ship-form .btn { padding: 10px 16px; min-height: auto; font-size: 12px; }

.summary__ship-result { display: flex; flex-direction: column; gap: 6px; }
.ship-opt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
}
.ship-opt input { accent-color: var(--pink); width: 14px; height: 14px; }
.ship-opt label {
  display: block;
  cursor: pointer;
  min-width: 0;
}
.ship-opt label strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.ship-opt label span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
}
.ship-opt__price {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}
.ship-opt--best {
  border-color: var(--pink);
  background: rgba(255, 61, 138, .05);
}

.summary__lines {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.summary__lines li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-2);
}
.summary__lines li strong { color: var(--text); font-weight: 700; }
.summary__discount { color: var(--gold) !important; }
.summary__discount strong { color: var(--gold) !important; }
.summary__discount em { font-style: normal; font-weight: 700; letter-spacing: .04em; }

.summary__total { margin-bottom: 18px; }
.summary__total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.summary__total-row > span { font-size: 14px; color: var(--text-2); }
.summary__total-row > span .pix { color: #00C48C; font-weight: 700; }
.summary__total-pix {
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.025em;
  background: linear-gradient(135deg, #00C48C, #00A876);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.summary__total-alt {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}
.summary__total-alt strong { color: var(--text-2); font-weight: 700; }

.summary__cta { width: 100%; margin-bottom: 10px; }
.summary__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #25D366;
  border-radius: 999px;
}
.summary__wa:hover { background: rgba(37, 211, 102, .08); }

.summary__trust {
  list-style: none;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.summary__trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.summary__trust .i3d { width: 22px; height: 22px; flex-shrink: 0; }

/* ============================================
   REASSURE row
   ============================================ */
.reassure {
  padding: 32px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .reassure { padding: 48px 0; } }
.reassure__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 600px) {
  .reassure__row { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.reassure__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
  align-items: center;
  min-width: 0;
}
.reassure__item .i3d { width: 44px; height: 44px; }
.reassure__item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.reassure__item span {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  overflow-wrap: break-word;
}

/* ============================================
   STICKY BOTTOM (mobile)
   ============================================ */
.cart-sticky {
  position: fixed;
  bottom: calc(var(--bottombar-h) + var(--safe-bottom));
  left: 0; right: 0;
  background: rgba(15, 10, 26, .98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 80;
}
@media (min-width: 980px) { .cart-sticky { display: none; } }
.cart-sticky__info {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.cart-sticky__info span {
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: .04em;
}
.cart-sticky__info strong {
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, #00C48C, #00A876);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.cart-sticky .btn { flex: 1; }

/* ============================================
   CART EMPTY — estado vazio
   ============================================ */
.cart-empty {
  margin: 32px auto;
  max-width: 560px;
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-xl);
}
.cart-empty__icon {
  width: 96px;
  height: 96px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-empty__icon .i3d { width: 56px; height: 56px; opacity: .85; }
.cart-empty__title {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0;
}
.cart-empty__sub {
  font-size: 14px;
  color: var(--text-2);
  max-width: 420px;
  margin: 0 0 8px;
}
@media (min-width: 720px) {
  .cart-empty { padding: 72px 32px; }
  .cart-empty__title { font-size: 26px; }
  .cart-empty__sub { font-size: 15px; }
}
