/* Giftify storefront widgets. Colors and sizes come from CSS variables set per widget. */

.gf-root[hidden] { display: none !important; }
.gf-root { margin: 16px 0; }

.gf-widget {
  --gf-bg: #ffffff;
  --gf-border: #e3e3e3;
  --gf-border-width: 1px;
  --gf-radius: 12px;
  --gf-text: #303030;
  --gf-price: #303030;
  --gf-accent: #1a1a1a;
  --gf-accent-text: #ffffff;
  --gf-button: #1a1a1a;
  --gf-button-text: #ffffff;
  --gf-badge: #1f8a4c;
  --gf-badge-text: #ffffff;
  --gf-label: #f1f1f1;
  --gf-font-size: 14px;
  --gf-title-size: 18px;
  --gf-title-align: left;
  --gf-font: inherit;
  --gf-muted: color-mix(in srgb, var(--gf-text) 60%, transparent);
  --gf-soft: color-mix(in srgb, var(--gf-accent) 7%, var(--gf-bg));
  --gf-inner-radius: max(0px, calc(var(--gf-radius) - 4px));

  box-sizing: border-box;
  color: var(--gf-text);
  font-family: var(--gf-font);
  font-size: var(--gf-font-size);
  line-height: 1.4;
  text-align: left;
}
.gf-widget *, .gf-widget *::before, .gf-widget *::after { box-sizing: border-box; }

.gf-header { margin-bottom: 12px; text-align: var(--gf-title-align); }
.gf-title { margin: 0; font-size: var(--gf-title-size); font-weight: 700; line-height: 1.25; color: var(--gf-text); letter-spacing: 0; }
.gf-subtitle { margin: 4px 0 0; color: var(--gf-muted); font-size: 0.93em; }

.gf-price { color: var(--gf-price); font-weight: 700; }
.gf-compare { color: var(--gf-muted); font-size: 0.86em; font-weight: 400; text-decoration: line-through; }

.gf-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--gf-border);
  border-radius: min(8px, var(--gf-radius));
  background: var(--gf-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--gf-text);
  font: inherit;
  font-size: 0.9em;
  line-height: 1.3;
  cursor: pointer;
}
.gf-select:focus-visible { outline: 2px solid var(--gf-accent); outline-offset: 1px; }

.gf-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--gf-inner-radius);
  background: var(--gf-button);
  color: var(--gf-button-text);
  font: inherit;
  font-size: 1.02em;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.gf-button:hover:not(:disabled) { opacity: .9; }
.gf-button:active:not(:disabled) { transform: translateY(1px); }
.gf-button:disabled { opacity: .5; cursor: not-allowed; }
.gf-button:focus-visible { outline: 2px solid var(--gf-accent); outline-offset: 2px; }

.gf-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gf-badge);
  color: var(--gf-badge-text);
  font-size: 0.82em;
  font-weight: 700;
  white-space: nowrap;
}
.gf-badge[hidden] { display: none; }

.gf-message { margin: 8px 0 0; min-height: 0; font-size: 0.9em; color: var(--gf-muted); }
.gf-message:empty { display: none; }
.gf-message--error { color: #d72c0d; }

/* ------------------------------------------------------------------ Bundle */

.gf-bundle {
  padding: 16px;
  border: var(--gf-border-width) solid var(--gf-border);
  border-radius: var(--gf-radius);
  background: var(--gf-bg);
}
.gf-items { display: flex; align-items: stretch; gap: 8px; }
.gf-item { position: relative; display: flex; flex: 1 1 0; min-width: 0; gap: 10px; }
.gf-item-media { position: relative; flex: none; }
.gf-item-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--gf-inner-radius);
  background: var(--gf-label);
}
.gf-item-qty {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--gf-accent);
  color: var(--gf-accent-text);
  font-size: 0.78em;
  font-weight: 700;
}
.gf-item-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gf-item-title { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gf-item-price { font-size: 0.95em; }
.gf-plus { display: flex; flex: none; align-items: center; justify-content: center; }
.gf-plus span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gf-accent);
  color: var(--gf-accent-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.gf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gf-border);
}
.gf-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.gf-total-label { font-weight: 600; }
.gf-price--total { font-size: 1.2em; }

/* Horizontal: product cards side by side */
.gf-bundle--horizontal .gf-item { flex-direction: column; }
.gf-bundle--horizontal .gf-item-media { width: 100%; }

/* Vertical: one row per product */
.gf-bundle--vertical .gf-items { flex-direction: column; gap: 0; }
.gf-bundle--vertical .gf-item { align-items: center; padding: 4px 0; }
.gf-bundle--vertical .gf-item-media { width: 72px; }
.gf-bundle--vertical .gf-plus { height: 18px; margin: -4px 0; justify-content: flex-start; padding-left: 23px; position: relative; z-index: 1; }
.gf-bundle--vertical .gf-plus span { width: 22px; height: 22px; font-size: 14px; }

/* Compact: thumbnail strip, then a light list */
.gf-thumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gf-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--gf-inner-radius); border: 1px solid var(--gf-border); background: var(--gf-label); }
.gf-thumbs-plus { font-weight: 700; color: var(--gf-muted); }
.gf-bundle--compact .gf-items { flex-direction: column; gap: 8px; }
.gf-bundle--compact .gf-item { align-items: center; }
.gf-bundle--compact .gf-item-media { display: none; }
.gf-bundle--compact .gf-item-info { flex: 1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.gf-bundle--compact .gf-item-title::before { content: "✓"; margin-right: 8px; color: var(--gf-accent); font-weight: 700; }
.gf-bundle--compact .gf-select { width: auto; flex-basis: 100%; }

@media (max-width: 520px) {
  .gf-bundle--horizontal .gf-items { flex-direction: column; gap: 0; }
  .gf-bundle--horizontal .gf-item { flex-direction: row; align-items: center; padding: 4px 0; }
  .gf-bundle--horizontal .gf-item-media { width: 72px; }
  .gf-bundle--horizontal .gf-plus { height: 18px; margin: -4px 0; justify-content: flex-start; padding-left: 23px; position: relative; z-index: 1; }
  .gf-bundle--horizontal .gf-plus span { width: 22px; height: 22px; font-size: 14px; }
}

/* ------------------------------------------------------------------ Volume */

.gf-tiers { display: flex; flex-direction: column; gap: 10px; }
.gf-tier {
  position: relative;
  display: block;
  padding: 14px 16px;
  border: var(--gf-border-width) solid var(--gf-border);
  border-radius: var(--gf-radius);
  background: var(--gf-bg);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.gf-tier:hover { border-color: color-mix(in srgb, var(--gf-accent) 45%, var(--gf-border)); }
.gf-tier.is-selected {
  border-color: var(--gf-accent);
  box-shadow: 0 0 0 1px var(--gf-accent);
  background: var(--gf-soft);
}
.gf-tier-input { position: absolute; opacity: 0; pointer-events: none; }
.gf-tier-input:focus-visible + .gf-radio { outline: 2px solid var(--gf-accent); outline-offset: 2px; }
.gf-tier-row { display: flex; align-items: center; gap: 12px; }
.gf-radio {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid color-mix(in srgb, var(--gf-text) 45%, transparent);
  border-radius: 50%;
  background: var(--gf-bg);
  transition: border .15s ease;
}
.gf-tier.is-selected .gf-radio { border: 5px solid var(--gf-accent); }
.gf-tier-main { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.gf-tier-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.gf-tier-label { color: var(--gf-muted); font-size: 0.9em; }
.gf-tier-prices { display: flex; flex: none; flex-direction: column; align-items: flex-end; text-align: right; }
.gf-each { color: var(--gf-muted); font-size: 0.8em; }
.gf-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gf-label);
  color: var(--gf-text);
  font-size: 0.72em;
  font-weight: 600;
  white-space: nowrap;
}

/* Tier badges */
.gf-tier-badge {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  background: var(--gf-badge);
  color: var(--gf-badge-text);
  font-size: 0.7em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}
.gf-tier-badge--sticker {
  top: -16px;
  right: -8px;
  width: 50px;
  height: 50px;
  padding: 6px;
  white-space: normal;
  font-size: 0.6em;
  transform: rotate(-12deg);
  clip-path: polygon(50% 0%, 61% 11%, 75% 6%, 79% 21%, 94% 25%, 89% 39%, 100% 50%, 89% 61%, 94% 75%, 79% 79%, 75% 94%, 61% 89%, 50% 100%, 39% 89%, 25% 94%, 21% 79%, 6% 75%, 11% 61%, 0% 50%, 11% 39%, 6% 25%, 21% 21%, 25% 6%, 39% 11%);
}
.gf-tier-badge--sticker span { display: block; overflow: hidden; max-height: 2.3em; }
.gf-tier-badge--oval { top: -12px; right: -6px; padding: 5px 12px; border-radius: 50%; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.gf-tier-badge--ribbon { top: -1px; right: 14px; padding: 3px 10px; border-radius: 0 0 4px 4px; }
.gf-tier-badge--pill { position: static; display: inline-flex; margin-left: auto; padding: 3px 9px; border-radius: 999px; }
.gf-tier-badge--tilted { top: -10px; right: -10px; padding: 5px 10px; border-radius: 4px; transform: rotate(14deg); max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.gf-tier-badge--bar { position: static; margin: -14px -16px 12px; padding: 5px 8px; border-radius: calc(var(--gf-radius) - 1px) calc(var(--gf-radius) - 1px) 0 0; font-size: 0.75em; }

/* Per-unit variant pickers inside the selected tier */
.gf-units { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 0 30px; cursor: default; }
.gf-unit { display: flex; align-items: flex-end; gap: 8px; }
.gf-unit-index {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--gf-label);
  color: var(--gf-muted);
  font-size: 0.72em;
  font-weight: 700;
}
.gf-unit-field { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.gf-unit-label { color: var(--gf-muted); font-size: 0.75em; }

/* Image template: product thumbnail instead of the radio */
.gf-tier-thumb {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: min(8px, var(--gf-radius));
  background: var(--gf-label);
  overflow: visible;
}
.gf-tier-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.gf-tier-thumb-qty {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gf-accent);
  color: var(--gf-accent-text);
  font-size: 0.7em;
  font-weight: 700;
}
.gf-volume--image .gf-units { margin-left: 56px; }

/* Ribbon template */
.gf-volume--ribbon .gf-tier.has-badge { padding-top: 20px; }

/* Compact template */
.gf-volume--compact .gf-tiers { gap: 8px; }
.gf-volume--compact .gf-tier { padding: 10px 14px; }

/* Columns template: cards side by side */
.gf-volume--columns .gf-tiers { flex-direction: row; gap: 8px; }
.gf-volume--columns .gf-tier { flex: 1 1 0; min-width: 0; padding: 18px 10px 14px; text-align: center; }
.gf-volume--columns .gf-tier-row { flex-direction: column; gap: 8px; }
.gf-volume--columns .gf-tier-main, .gf-volume--columns .gf-tier-prices { align-items: center; text-align: center; }
.gf-volume--columns .gf-tier-title { justify-content: center; }
.gf-volume--columns .gf-units { margin-left: 0; }
.gf-volume--columns .gf-unit-label { display: none; }

/* Grid template: 2x2 cards */
.gf-volume--grid .gf-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gf-volume--grid .gf-tier { padding: 18px 12px 14px; text-align: center; }
.gf-volume--grid .gf-tier-row { flex-direction: column; gap: 8px; }
.gf-volume--grid .gf-tier-main, .gf-volume--grid .gf-tier-prices { align-items: center; text-align: center; }
.gf-volume--grid .gf-tier-title { justify-content: center; }
.gf-volume--grid .gf-units { margin-left: 0; }
.gf-volume--grid .gf-unit-label { display: none; }

@media (max-width: 420px) {
  .gf-volume--columns .gf-tiers { flex-direction: column; }
  .gf-volume--columns .gf-tier-row { flex-direction: row; text-align: left; }
  .gf-volume--columns .gf-tier-main { align-items: flex-start; text-align: left; }
  .gf-volume--columns .gf-tier-prices { align-items: flex-end; }
}

/* ------------------------------------------------------------------ Add-ons */

.gf-addon-list { display: flex; flex-direction: column; gap: 8px; }
.gf-addon {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: var(--gf-border-width) solid var(--gf-border);
  border-radius: var(--gf-radius);
  background: var(--gf-bg);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.gf-addon.is-selected { border-color: var(--gf-accent); background: var(--gf-soft); }
.gf-addon-input { position: absolute; opacity: 0; pointer-events: none; }
.gf-check {
  flex: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid color-mix(in srgb, var(--gf-text) 45%, transparent);
  border-radius: 4px;
  background: var(--gf-bg) no-repeat center / 12px;
}
.gf-addon.is-selected .gf-check {
  border-color: var(--gf-accent);
  background-color: var(--gf-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
}
.gf-addon-input:focus-visible + .gf-check { outline: 2px solid var(--gf-accent); outline-offset: 2px; }
.gf-addon-input:disabled ~ * { opacity: .5; }
.gf-addon-image { flex: none; width: 52px; height: 52px; object-fit: cover; border-radius: min(8px, var(--gf-radius)); background: var(--gf-label); }
.gf-addon-info { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.gf-addon-title { font-weight: 600; line-height: 1.3; }
.gf-addon-info .gf-select { width: auto; max-width: 220px; }
.gf-addon-prices { display: flex; flex: none; flex-direction: column; align-items: flex-end; }

/* Cards template */
.gf-addons--cards .gf-addon-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.gf-addons--cards .gf-addon { flex-direction: column; align-items: stretch; padding: 10px; text-align: center; }
.gf-addons--cards .gf-check { position: absolute; top: 16px; left: 16px; z-index: 1; }
.gf-addons--cards .gf-addon-image { width: 100%; height: auto; aspect-ratio: 1; }
.gf-addons--cards .gf-addon-info { align-items: center; }
.gf-addons--cards .gf-addon-info .gf-select { width: 100%; }
.gf-addons--cards .gf-addon-prices { align-items: center; }

/* Compact template */
.gf-addons--compact .gf-addon-list { gap: 0; border: var(--gf-border-width) solid var(--gf-border); border-radius: var(--gf-radius); overflow: hidden; background: var(--gf-bg); }
.gf-addons--compact .gf-addon { border: 0; border-radius: 0; border-top: 1px solid var(--gf-border); }
.gf-addons--compact .gf-addon:first-child { border-top: 0; }
.gf-addons--compact .gf-addon-info { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.gf-addons--compact .gf-addon-prices { flex-direction: row; gap: 6px; align-items: baseline; }

/* ----------------------------------------------------- Buy X get Y (BOGO) */

.gf-bogo {
  padding: 16px;
  border: var(--gf-border-width) solid var(--gf-border);
  border-radius: var(--gf-radius);
  background: var(--gf-bg);
}
.gf-bogo-deal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gf-badge);
  color: var(--gf-badge-text);
  font-weight: 700;
}
.gf-bogo-icon { flex: none; width: 18px; height: 18px; }
.gf-bogo-rows { display: flex; flex-direction: column; gap: 8px; }
.gf-bogo-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: var(--gf-border-width) solid var(--gf-border);
  border-radius: var(--gf-inner-radius);
  background: var(--gf-bg);
}
label.gf-bogo-row { cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.gf-bogo-row--gift.is-selected { border-color: var(--gf-accent); background: var(--gf-soft); }
.gf-bogo-input { position: absolute; opacity: 0; pointer-events: none; }
.gf-bogo-input:focus-visible + .gf-radio { outline: 2px solid var(--gf-accent); outline-offset: 2px; }
.gf-bogo-row.is-selected .gf-radio { border: 5px solid var(--gf-accent); }
.gf-bogo-media { position: relative; flex: none; }
.gf-bogo-image { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: min(8px, var(--gf-radius)); background: var(--gf-label); }
.gf-bogo-media .gf-item-qty { top: -6px; left: -6px; }
.gf-bogo-info { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.gf-bogo-title { font-weight: 600; line-height: 1.3; }
.gf-bogo-info .gf-select { width: auto; max-width: 220px; }
.gf-bogo-tag { background: var(--gf-badge); color: var(--gf-badge-text); }
.gf-bogo-prices { display: flex; flex: none; flex-direction: column; align-items: flex-end; text-align: right; }
.gf-bogo-plus {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -14px 0 -14px 28px;
  border-radius: 50%;
  background: var(--gf-accent);
  color: var(--gf-accent-text);
  font-weight: 700;
  line-height: 1;
  position: relative;
  z-index: 1;
}

/* Banner template: the deal spans the top of the card */
.gf-bogo--banner { display: flex; flex-direction: column; padding-top: 0; overflow: hidden; }
.gf-bogo--banner .gf-bogo-deal {
  order: -1;
  display: flex;
  justify-content: center;
  margin: 0 -16px 14px;
  padding: 10px 16px;
  border-radius: 0;
  background: var(--gf-accent);
  color: var(--gf-accent-text);
  font-size: 1.05em;
}

/* Compact template: text rows, no images */
.gf-bogo--compact .gf-bogo-deal { margin-bottom: 10px; padding: 0; background: none; color: var(--gf-accent); }
.gf-bogo--compact .gf-bogo-rows { gap: 0; border: 1px solid var(--gf-border); border-radius: var(--gf-inner-radius); overflow: hidden; }
.gf-bogo--compact .gf-bogo-row { border: 0; border-top: 1px solid var(--gf-border); border-radius: 0; padding: 8px 12px; }
.gf-bogo--compact .gf-bogo-row:first-child { border-top: 0; }
.gf-bogo--compact .gf-bogo-info { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.gf-bogo--compact .gf-bogo-plus { display: none; }
.gf-bogo--compact .gf-bogo-prices { flex-direction: row; gap: 6px; align-items: baseline; }

/* Template fine-tuning */
.gf-volume--compact .gf-tier.has-badge { padding-top: 14px; }
.gf-volume--compact .gf-tier-badge--pill { position: absolute; top: -9px; right: 12px; margin: 0; padding: 2px 8px; font-size: 0.65em; }
.gf-volume--columns .gf-tiers { padding-top: 6px; }
.gf-volume--columns .gf-tier.has-badge { overflow: visible; }
.gf-volume--classic .gf-tier.has-badge .gf-tier-prices,
.gf-volume--image .gf-tier.has-badge .gf-tier-prices { margin-right: 22px; }

/* -------------------------------------------------------------- Cart goals */

.gf-goals {
  padding: 14px 16px;
  border: var(--gf-border-width) solid var(--gf-border);
  border-radius: var(--gf-radius);
  background: var(--gf-bg);
}
.gf-goal-text { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.gf-goal-track {
  position: relative;
  height: 8px;
  margin: 14px 10px 6px 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gf-text) 10%, var(--gf-bg));
}
.gf-goals--bar .gf-goal-track { margin: 22px 12px 14px 0; }
.gf-goal-fill { display: block; height: 100%; border-radius: inherit; background: var(--gf-accent); transition: width .4s ease; }
.gf-goal-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gf-text) 10%, var(--gf-bg));
  color: var(--gf-text);
}
.gf-goal-icon svg { width: 14px; height: 14px; }
.gf-goal-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.gf-goal-marker .gf-goal-icon { box-shadow: 0 0 0 3px var(--gf-bg); }
.gf-goal-marker.is-done .gf-goal-icon, .gf-goal-step.is-done .gf-goal-icon { background: var(--gf-accent); color: var(--gf-accent-text); }
.gf-goals--minimal .gf-goal-text .gf-goal-icon { background: var(--gf-soft); color: var(--gf-accent); }

.gf-goal-steps { display: flex; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.gf-goal-step { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
.gf-goal-step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.gf-goal-step-name { overflow: hidden; font-size: 0.86em; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.gf-goal-step-amount { color: var(--gf-muted); font-size: 0.8em; }

.gf-button--small { width: auto; min-height: 34px; margin-top: 10px; padding: 6px 14px; font-size: 0.9em; }
.gf-button--secondary { background: transparent; color: var(--gf-text); box-shadow: inset 0 0 0 1px var(--gf-border); }

/* ------------------------------------------------------ Cart upsell / pop-up */

.gf-root--cart { margin: 12px 0; }
.gf-root--cart > * + * { margin-top: 10px; }
.gf-upsell-title { margin: 0 0 8px; font-weight: 700; }
.gf-upsell-list { display: flex; flex-direction: column; gap: 8px; }
.gf-upsell-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: var(--gf-border-width) solid var(--gf-border);
  border-radius: var(--gf-inner-radius);
  background: var(--gf-bg);
}
.gf-upsell-image { flex: none; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.gf-upsell-info { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.gf-upsell-name { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.gf-upsell-info .gf-select { max-width: 180px; padding-top: 3px; padding-bottom: 3px; font-size: 0.86em; }
.gf-upsell-row .gf-button--small { flex: none; margin-top: 0; }

.gf-popup { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; padding: 16px; }
.gf-popup-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: gf-fade .2s ease; }
.gf-popup-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  border-radius: var(--gf-radius);
  background: var(--gf-bg, #fff);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: gf-rise .22s ease;
}
.gf-popup-dialog:where([style*="--gf-bg:transparent"]) { background: #fff; }
.gf-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gf-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.gf-popup-close:hover { background: color-mix(in srgb, var(--gf-text) 8%, transparent); }
.gf-popup-added { display: flex; align-items: center; gap: 12px; padding-right: 32px; }
.gf-popup-title { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; }
.gf-popup-title svg { width: 14px; height: 14px; color: var(--gf-badge); }
.gf-popup-product { margin: 2px 0 0; color: var(--gf-muted); }
.gf-popup-body > * { margin-top: 16px; }
.gf-popup-actions { display: flex; gap: 10px; margin-top: 18px; }
.gf-popup-actions .gf-button { flex: 1; margin-top: 0; text-decoration: none; }
.gf-popup-open { overflow: hidden; }

@keyframes gf-fade { from { opacity: 0; } }
@keyframes gf-rise { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  .gf-popup-backdrop, .gf-popup-dialog, .gf-goal-fill { animation: none; transition: none; }
}
