/* Insygma Collagen Cart Offer — all offer styles are locally scoped. */
#icco-cart-offer {
  --icco-ink: #0f172a;
  --icco-muted: #64748b;
  --icco-line: #dbe3ee;
  --icco-soft: #f8fafc;
  --icco-card: #ffffff;
  --icco-accent: #0f172a;
  --icco-accent-dark: #1e293b;
  --icco-accent-soft: #e8eef6;
  --icco-success: #087d5b;
  --icco-success-soft: #eaf8f2;
  --icco-focus: #205bd6;
  box-sizing: border-box;
  width: 100%;
  margin: 16px 0;
  overflow: hidden;
  color: var(--icco-ink);
  background: var(--icco-soft);
  border: 1px solid var(--icco-line);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
  font-family: inherit !important;
  line-height: 1.35;
}

#icco-cart-offer *,
#icco-cart-offer *::before,
#icco-cart-offer *::after {
  box-sizing: border-box;
}

#icco-cart-offer button,
#icco-cart-offer input {
  font: inherit;
}

#icco-cart-offer .icco-top {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #243247;
}

#icco-cart-offer .icco-identity {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
}

#icco-cart-offer .icco-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--icco-accent-dark);
  background: var(--icco-accent-soft);
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 10px;
}

#icco-cart-offer .icco-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#icco-cart-offer .icco-title-wrap {
  min-width: 0;
}

#icco-cart-offer .icco-eyebrow {
  margin: 0 0 2px;
  color: var(--icco-accent-dark);
  font-size: 10px;
  font-weight: 800 !important;
  letter-spacing: 0.085em;
  line-height: 1.2;
}

#icco-cart-offer .icco-title {
  margin: 0;
  color: var(--icco-ink);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 800 !important;
  letter-spacing: -0.018em;
  line-height: 1.2;
}

#icco-cart-offer .icco-format {
  margin: 3px 0 0;
  color: var(--icco-muted);
  font-size: 12px;
  font-weight: 500 !important;
}

#icco-cart-offer .icco-price-box {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto auto;
  gap: 0 7px;
  align-items: baseline;
  justify-items: end;
  text-align: right;
}

#icco-cart-offer .icco-special-price {
  color: var(--icco-ink);
  font-size: 22px;
  font-weight: 850 !important;
  letter-spacing: -0.035em;
  line-height: 1;
}

#icco-cart-offer .icco-regular-price {
  color: #8b8d94;
  font-size: 11px;
  font-weight: 550 !important;
  text-decoration-thickness: 1px;
}

#icco-cart-offer .icco-savings {
  grid-column: 1 / -1;
  margin-top: 5px;
  padding: 3px 7px;
  color: var(--icco-success);
  background: var(--icco-success-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800 !important;
  line-height: 1.25;
}

#icco-cart-offer .icco-body {
  padding: 13px 18px 16px;
}

#icco-cart-offer .icco-flavours {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#icco-cart-offer .icco-legend {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  color: #475569;
  font-size: 11px;
  font-weight: 750 !important;
}

#icco-cart-offer .icco-flavour-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

#icco-cart-offer .icco-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

#icco-cart-offer .icco-flavour-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 6px 9px 6px 6px;
  cursor: pointer;
  background: var(--icco-card);
  border: 1px solid #dbe3ee;
  border-radius: 11px;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.035);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

#icco-cart-offer .icco-flavour-card:hover {
  border-color: rgba(15, 23, 42, 0.55);
  transform: translateY(-1px);
}

#icco-cart-offer .icco-radio:focus-visible + .icco-flavour-card {
  outline: 3px solid rgba(32, 91, 214, 0.26);
  outline-offset: 2px;
  border-color: var(--icco-focus);
}

#icco-cart-offer .icco-radio:checked + .icco-flavour-card,
#icco-cart-offer .icco-flavour-card.icco-is-selected {
  border-color: var(--icco-accent);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.13), 0 4px 12px rgba(15, 23, 42, 0.07);
}

#icco-cart-offer .icco-radio:checked + .icco-flavour-card::after,
#icco-cart-offer .icco-flavour-card.icco-is-selected::after {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #fff;
  background: var(--icco-accent);
  border: 2px solid #fff;
  border-radius: 50%;
  content: '✓';
  font-size: 9px;
  font-weight: 900 !important;
  line-height: 1;
}

#icco-cart-offer .icco-flavour-card.icco-is-unavailable {
  cursor: not-allowed;
  filter: grayscale(0.85);
  opacity: 0.52;
  transform: none;
}

#icco-cart-offer .icco-flavour-media {
  display: grid;
  width: 64px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  background: #f1f5f9;
  border-radius: 8px;
}

#icco-cart-offer .icco-flavour-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#icco-cart-offer .icco-flavour-media .icco-icon {
  width: 28px;
  height: 28px;
  border: 0;
}

#icco-cart-offer .icco-flavour-name {
  min-width: 0;
  padding-right: 13px;
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 780 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#icco-cart-offer .icco-stock-label,
#icco-cart-offer .icco-current-label {
  position: absolute;
  right: 6px;
  bottom: 5px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800 !important;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#icco-cart-offer .icco-current-label {
  color: var(--icco-success);
  background: var(--icco-success-soft);
}

#icco-cart-offer .icco-stock-label {
  color: #475569;
  background: #e2e8f0;
}

#icco-cart-offer .icco-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

#icco-cart-offer .icco-primary-action,
#icco-cart-offer .icco-remove-action,
#icco-cart-offer .icco-retry {
  min-height: 42px;
  cursor: pointer;
  border-radius: 9px;
  font-weight: 760 !important;
  line-height: 1.2;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

#icco-cart-offer .icco-primary-action {
  flex: 1 1 auto;
  padding: 10px 15px;
  color: #fff;
  background: var(--icco-accent);
  border: 1px solid var(--icco-accent);
  box-shadow: 0 5px 13px rgba(15, 23, 42, 0.17);
  font-size: 12px;
}

#icco-cart-offer .icco-primary-action:hover:not(:disabled) {
  background: var(--icco-accent-dark);
  border-color: var(--icco-accent-dark);
  transform: translateY(-1px);
}

#icco-cart-offer .icco-remove-action,
#icco-cart-offer .icco-retry {
  flex: 0 0 auto;
  padding: 9px 13px;
  color: #555861;
  background: #fff;
  border: 1px solid #cbd5e1;
  font-size: 11px;
}

#icco-cart-offer .icco-remove-action:hover:not(:disabled),
#icco-cart-offer .icco-retry:hover:not(:disabled) {
  color: var(--icco-ink);
  border-color: #64748b;
}

#icco-cart-offer button:focus-visible {
  outline: 3px solid rgba(32, 91, 214, 0.28);
  outline-offset: 2px;
}

#icco-cart-offer button:disabled {
  cursor: default;
  color: #777a82;
  background: #ececed;
  border-color: #e0e0e1;
  box-shadow: none;
  transform: none;
}

#icco-cart-offer .icco-status {
  min-height: 1em;
  margin: 7px 0 0;
  color: var(--icco-muted);
  font-size: 10px;
  font-weight: 550 !important;
  text-align: center;
}

#icco-cart-offer .icco-loading,
#icco-cart-offer .icco-error {
  display: flex;
  min-height: 76px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: var(--icco-muted);
  font-size: 12px;
}

#icco-cart-offer .icco-error {
  flex-wrap: wrap;
}

#icco-cart-offer .icco-error p {
  margin: 0;
}

#icco-cart-offer .icco-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15, 23, 42, 0.22);
  border-top-color: var(--icco-accent);
  border-radius: 50%;
  animation: icco-spin 700ms linear infinite;
}

#icco-cart-offer.icco-is-busy {
  cursor: progress;
}

#icco-cart-offer.icco-is-busy .icco-body {
  opacity: 0.72;
}

/* Promo-line distinction in the full cart, sidecart and checkout. */
.icco-line-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  margin: 4px 0 0 7px;
  padding: 3px 7px;
  overflow: hidden;
  color: #087d5b;
  background: #eaf8f2;
  border: 1px solid rgba(8, 125, 91, 0.16);
  border-radius: 999px;
  font-family: inherit !important;
  font-size: 9px;
  font-weight: 800 !important;
  line-height: 1.2;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.icco-checkout-detail {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 500 !important;
  line-height: 1.35;
}

.ins-mini-item .icco-line-badge,
.mini_cart_item .icco-line-badge,
.specimen-card .icco-line-badge {
  display: flex;
  margin: 4px 0 0;
  font-size: 8px;
}

/* A promotional collagen is a single-unit benefit. Keep removal available,
   but do not invite a quantity request the server will reject. */
.specimen-card.icco-is-promo-line .qty-control {
  display: none !important;
}

.ins-cart-item.icco-is-promo-line .ins-cart-item-qty {
  display: none !important;
}

.specimen-card.icco-is-promo-line .del-btn {
  display: inline-flex;
}

.specimen-card.icco-is-promo-line del {
  color: #8b8d94;
  font-size: 0.88em;
  font-weight: 500 !important;
  opacity: 0.9;
}

.specimen-card.icco-is-promo-line ins {
  color: #0f172a;
  font-weight: 850 !important;
  text-decoration: none;
}

@keyframes icco-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  #icco-cart-offer {
    margin: 12px 0;
    border-radius: 14px;
  }

  #icco-cart-offer .icco-top {
    gap: 9px;
    align-items: flex-start;
    padding: 13px 12px 11px;
  }

  #icco-cart-offer .icco-identity {
    gap: 8px;
    align-items: flex-start;
  }

  #icco-cart-offer .icco-icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }

  #icco-cart-offer .icco-icon svg {
    width: 18px;
    height: 18px;
  }

  #icco-cart-offer .icco-title {
    font-size: 15px;
  }

  #icco-cart-offer .icco-format {
    max-width: 230px;
    font-size: 10px;
    line-height: 1.3;
  }

  #icco-cart-offer .icco-price-box {
    grid-template-columns: 1fr;
    gap: 2px;
    justify-items: end;
  }

  #icco-cart-offer .icco-special-price {
    font-size: 19px;
  }

  #icco-cart-offer .icco-regular-price {
    max-width: 88px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #icco-cart-offer .icco-savings {
    grid-column: auto;
    margin-top: 1px;
    padding: 2px 5px;
    font-size: 8px;
  }

  #icco-cart-offer .icco-body {
    padding: 11px 12px 13px;
  }

  #icco-cart-offer .icco-flavour-grid {
    gap: 6px;
  }

  #icco-cart-offer .icco-flavour-card {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
    padding: 5px 5px 7px;
    border-radius: 9px;
  }

  #icco-cart-offer .icco-flavour-media {
    width: 100%;
    height: auto;
    aspect-ratio: 1.55 / 1;
    border-radius: 7px;
  }

  #icco-cart-offer .icco-flavour-name {
    width: 100%;
    padding: 0 2px;
    font-size: 10px;
    text-align: center;
  }

  #icco-cart-offer .icco-stock-label,
  #icco-cart-offer .icco-current-label {
    right: 4px;
    bottom: 25px;
    max-width: calc(100% - 8px);
    font-size: 7px;
  }

  #icco-cart-offer .icco-actions {
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
  }

  #icco-cart-offer .icco-primary-action,
  #icco-cart-offer .icco-remove-action {
    width: 100%;
    min-height: 40px;
  }

  #icco-cart-offer .icco-remove-action {
    min-height: 34px;
    padding: 7px 12px;
  }
}

@media (max-width: 390px) {
  #icco-cart-offer .icco-icon--gift {
    display: none;
  }

  #icco-cart-offer .icco-special-price {
    font-size: 18px;
  }

  #icco-cart-offer .icco-format {
    max-width: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #icco-cart-offer *,
  #icco-cart-offer *::before,
  #icco-cart-offer *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  #icco-cart-offer,
  #icco-cart-offer .icco-flavour-card,
  #icco-cart-offer .icco-primary-action,
  #icco-cart-offer .icco-remove-action,
  .icco-line-badge {
    border: 1px solid CanvasText;
  }

  #icco-cart-offer .icco-radio:checked + .icco-flavour-card {
    outline: 3px solid Highlight;
  }
}

/* Tipografia da oferta e das suas linhas, isolada do resto da loja. */
#icco-cart-offer,
#icco-cart-offer * {
  font-family: var(--font-sans, Inter, sans-serif) !important;
}
.icco-cart-line[hidden] {
  display: none !important;
}
.ins-cart-item.icco-is-promo-line .ins-item-name,
#insygma-sidecart .specimen-card.icco-is-promo-line .specimen-data > a,
#insygma-checkout-items .cart-row.icco-is-promo-line > div:nth-child(2) > div:first-child {
  font-family: var(--font-sans, Inter, sans-serif) !important;
  font-weight: 700 !important;
}
.ins-cart-item.icco-is-promo-line .ins-item-options,
.ins-cart-item.icco-is-promo-line .ins-item-options *,
#insygma-sidecart .specimen-card.icco-is-promo-line .specimen-data > span,
#insygma-sidecart .specimen-card.icco-is-promo-line .specimen-data > span *,
#insygma-checkout-items .icco-checkout-detail {
  font-family: var(--font-sans, Inter, sans-serif) !important;
  font-weight: 500 !important;
}

/* Cabeçalho navy e contraste consistente com os controlos da loja. */
#icco-cart-offer .icco-top {
  background: #0f172a;
}
#icco-cart-offer .icco-top .icco-title,
#icco-cart-offer .icco-top .icco-special-price {
  color: #fff;
}
#icco-cart-offer .icco-top .icco-eyebrow,
#icco-cart-offer .icco-top .icco-format,
#icco-cart-offer .icco-top .icco-regular-price {
  color: #cbd5e1;
}
#icco-cart-offer .icco-top .icco-icon {
  color: #e2e8f0;
  background: #1e293b;
  border-color: #334155;
}
