.header-cart { position: relative; }
.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ffc400;
  color: #171c20;
  border: 2px solid #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.catalog-consultation-note { margin-top: 12px; color: #59616a; font-size: 13px; line-height: 1.5; text-wrap: balance; }
.cart-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  padding: 9px 7px;
  border: 1px solid #171c20;
  border-radius: 4px;
  background: #171c20;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.cart-add .icon { width: 18px; height: 18px; }
.cart-add:hover { background: #30373d; border-color: #30373d; }
.cart-add.is-added { background: #fff8dc; border-color: #d8bd63; color: #564500; }
.cart-add.is-added:hover { background: #fff0b5; }
.cart-add:disabled { opacity: .6; }
.detail-copy .cart-add { min-height: 44px; margin-top: 9px; font-size: 14px; }
.detail-cart-notice { color: #59616a; font-size: 12px; line-height: 1.5; margin-top: 12px; }
.detail-cart-open { background: transparent; padding: 3px 0; color: #171c20; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.detail-cart-status { font-size: 12px; line-height: 1.5; color: #157347; margin-top: 5px; }
.detail-cart-status:empty { display: none; }

.whatsapp-floating {
  position: fixed;
  z-index: 40;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: #157347;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 4px 18px #171c2030;
}
.whatsapp-floating .icon { width: 29px; height: 29px; }
.whatsapp-floating:hover { background: #0e5b36; }
.cart-toast {
  position: fixed;
  z-index: 45;
  bottom: calc(90px + env(safe-area-inset-bottom));
  right: 20px;
  width: min(420px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 16px;
  background: #171c20;
  color: #fff;
  border-radius: 7px;
  padding: 14px 16px;
  box-shadow: 0 4px 20px #171c2030;
}
.cart-toast p { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; }
.cart-toast button { flex-shrink: 0; color: #ffc400; background: transparent; padding: 8px 0; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.consultation-cart {
  inset: 0 0 0 auto;
  margin: 0;
  padding: 0;
  width: min(480px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #171c20;
  overflow: hidden;
  box-shadow: -12px 0 40px #171c2033;
}
.consultation-cart[open] { display: flex; flex-direction: column; }
.consultation-cart::backdrop { background: #111a2366; backdrop-filter: blur(2px); }
.cart-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-bottom: 1px solid #e3e6e8; }
.cart-heading .overline { color: #737c84; font-size: 10px; }
.cart-heading h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.02em; margin-top: 4px; }
.cart-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.cart-intro { font-size: 13px; line-height: 1.6; color: #59616a; margin-bottom: 18px; }
.cart-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #e3e6e8; }
.cart-list-heading p { font-size: 12px; color: #59616a; }
.cart-clear { background: transparent; color: #59616a; font-size: 12px; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.cart-items { margin: 0; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid #e3e6e8; }
.cart-item-image { display: grid; place-items: center; width: 72px; height: 82px; padding: 5px; background: #fff; }
.cart-item-image img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-image > .icon { width: 30px; height: 30px; color: #7c8389; }
.cart-item-copy { min-width: 0; }
.cart-item-model { font-size: 10px; line-height: 1.5; font-weight: 700; color: #646b73; text-transform: uppercase; overflow-wrap: anywhere; }
.cart-item h3 { font-size: 14px; line-height: 1.4; margin: 4px 0 7px; overflow-wrap: anywhere; }
.cart-item-presentation { font-size: 12px; line-height: 1.5; color: #646b73; margin-bottom: 6px; }
.cart-item-price { font-size: 14px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.cart-item-price span { font-size: 11px; color: #646b73; font-weight: 400; }
.cart-item-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cart-quantity { display: flex; align-items: center; border: 1px solid #d8dde1; border-radius: 4px; }
.cart-quantity button { display: grid; place-items: center; width: 36px; height: 38px; padding: 7px; background: #f5f6f7; color: #171c20; }
.cart-quantity button:first-child { border-radius: 3px 0 0 3px; }
.cart-quantity button:last-child { border-radius: 0 3px 3px 0; }
.cart-quantity button .icon { width: 15px; height: 15px; }
.cart-quantity button:hover:not(:disabled) { background: #e8ecef; }
.cart-quantity button:disabled { color: #abb1b7; }
.cart-quantity input { width: 48px; height: 38px; min-width: 0; padding: 4px 0; border: 0; border-radius: 0; background: #fff; text-align: center; font-size: 16px; font-variant-numeric: tabular-nums; appearance: textfield; -moz-appearance: textfield; }
.cart-quantity input::-webkit-inner-spin-button, .cart-quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cart-remove { min-height: 38px; padding: 7px 0; background: transparent; color: #646b73; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.cart-empty { text-align: center; padding: 48px 5px; }
.cart-empty > .icon { width: 42px; height: 42px; color: #9aa2a9; margin-bottom: 16px; }
.cart-empty h3 { font-size: 19px; line-height: 1.3; }
.cart-empty p { font-size: 13px; line-height: 1.6; color: #646b73; max-width: 270px; margin: 10px auto 20px; }
.cart-empty .button { font-size: 13px; }
.cart-footer { flex: 0 0 auto; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid #e3e6e8; box-shadow: 0 -5px 15px #171c2005; background: #fff; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.cart-total strong { font-size: 22px; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-footer .button { width: 100%; margin-top: 14px; font-size: 14px; white-space: normal; }
.cart-footer-note { margin-top: 10px; font-size: 11px; line-height: 1.5; text-align: center; color: #646b73; }

@media (max-width: 650px) {
  .catalog-consultation-note { font-size: 12px; margin-top: 10px; }
  .cart-add { font-size: 11px; min-height: 40px; gap: 5px; padding-inline: 5px; }
  .cart-add .icon { width: 16px; height: 16px; }
  .whatsapp-floating { right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .cart-toast { right: 16px; width: calc(100% - 32px); bottom: calc(84px + env(safe-area-inset-bottom)); gap: 12px; }
  .cart-heading, .cart-body { padding: 18px; }
  .cart-item { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
  .cart-item-image { width: 62px; }
  .cart-footer { padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
  .cart-total { font-size: 13px; }
  .cart-total strong { font-size: 20px; }
}
@media (max-width: 360px) {
  .cart-add { font-size: 10px; gap: 4px; }
  .cart-heading h2 { font-size: 19px; }
  .cart-item { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
  .cart-item-image { width: 52px; }
  .cart-item h3 { font-size: 13px; }
  .cart-total { align-items: flex-start; }
  .cart-total strong { font-size: 18px; }
}
