/* Zajel Gift Builder — website product page options */
.zgb-web {
  --zgb-accent: #14213d;
  --zgb-accent-soft: #eef1f7;
  --zgb-gold: #c8a45d;
  --zgb-border: #e3e6ec;
  --zgb-text: #1f2430;
  --zgb-muted: #6f7380;
  --zgb-error: #b42318;
  --zgb-radius: 12px;
  margin: 0 0 18px;
  padding: 0;
  color: var(--zgb-text);
  font-size: 15px;
  line-height: 1.4;
  text-align: start;
}
.zgb-web-head { margin: 0 0 12px; }
.zgb-web-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--zgb-accent); }
.zgb-web-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--zgb-muted); }

.zgb-group { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.zgb-group-title { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; padding: 0; font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--zgb-text); }
.zgb-group-hint { font-weight: 500; color: var(--zgb-muted); }
.zgb-req { color: var(--zgb-gold); }
.zgb-group-subtitle { margin: -4px 0 8px; font-size: 13px; color: var(--zgb-muted); }
.zgb-group.is-invalid .zgb-group-title { color: var(--zgb-error); }
.zgb-group.is-invalid .zgb-opt { border-color: rgba(180, 35, 24, 0.5); }
.zgb-group.is-invalid .zgb-text input, .zgb-group.is-invalid .zgb-text textarea { border-color: var(--zgb-error); }

/* Columns follow the width of the product summary column (Flatsome's can be narrow). */
.zgb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.zgb-group--chips .zgb-options { display: flex; flex-wrap: wrap; }
.zgb-group--list .zgb-options { grid-template-columns: 1fr; gap: 6px; }
.zgb-group--images .zgb-options { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

.zgb-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1.5px solid var(--zgb-border);
  border-radius: var(--zgb-radius);
  background: #fff;
  cursor: pointer;
  font-weight: 400;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.zgb-opt:hover { border-color: #c9cfd9; }
.zgb-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.zgb-opt:has(input:checked) { border-color: var(--zgb-accent); background: var(--zgb-accent-soft); box-shadow: inset 0 0 0 1px var(--zgb-accent); }
.zgb-opt:has(input:focus-visible) { outline: 2px solid var(--zgb-gold); outline-offset: 2px; }
.zgb-opt-body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.zgb-opt-label { font-weight: 600; font-size: 14px; line-height: 1.25; }
.zgb-opt-desc { font-size: 12px; color: var(--zgb-muted); }
.zgb-opt-price { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--zgb-accent); white-space: nowrap; }
.zgb-opt--none .zgb-opt-label { font-weight: 500; color: var(--zgb-muted); }

/* Cards: name, description and price stacked, so the price never overlaps the name. */
.zgb-group--cards .zgb-opt { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px 11px; }
.zgb-group--cards .zgb-opt-body { width: 100%; }
.zgb-group--cards .zgb-opt-price { font-size: 12.5px; }

.zgb-group--chips .zgb-opt { padding: 8px 12px; border-radius: 999px; gap: 6px; }
.zgb-group--chips .zgb-opt-desc { display: none; }
.zgb-group--list .zgb-opt { border-radius: 8px; padding: 8px 12px; }
.zgb-group--list .zgb-opt::before { content: ""; width: 18px; height: 18px; flex: 0 0 18px; border: 1.5px solid #b9c0cc; border-radius: 5px; background: #fff; }
.zgb-group--list.zgb-group--single .zgb-opt::before { border-radius: 50%; }
.zgb-group--list .zgb-opt:has(input:checked)::before { border-color: var(--zgb-accent); background: var(--zgb-accent) center / 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4.2 7.4 8 3.2' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.zgb-opt--has-image, .zgb-group--images .zgb-opt { flex-direction: column; align-items: stretch; padding: 8px; gap: 6px; text-align: center; }
.zgb-opt-media { display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; background: #f4f5f8; }
.zgb-opt-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zgb-opt--has-image .zgb-opt-body, .zgb-group--images .zgb-opt-body { align-items: center; }
.zgb-opt--has-image .zgb-opt-price, .zgb-group--images .zgb-opt-price { text-align: center; }
/* A list is one choice per line, as wide as the page: its picture is a small thumbnail beside the name. Stacked, the
   picture of one balloon filled the whole phone screen. */
.zgb-group--list .zgb-opt--has-image { flex-direction: row; align-items: center; padding: 8px 12px; gap: 10px; text-align: start; }
.zgb-group--list .zgb-opt--has-image .zgb-opt-media { flex: 0 0 56px; width: 56px; height: 56px; }
.zgb-group--list .zgb-opt--has-image .zgb-opt-body { align-items: flex-start; }
.zgb-group--list .zgb-opt--has-image .zgb-opt-price { text-align: end; }
/* Anywhere else a picture never grows past a small card, even when the group has a single choice. */
.zgb-opt--has-image .zgb-opt-media { width: 100%; max-width: 168px; margin-inline: auto; }

.zgb-text { display: flex; flex-direction: column; gap: 4px; }
.zgb-text input, .zgb-text textarea { width: 100%; margin: 0; padding: 10px 12px; border: 1.5px solid var(--zgb-border); border-radius: 10px; background: #fff; font-size: 14px; box-shadow: none; }
.zgb-text input:focus, .zgb-text textarea:focus { border-color: var(--zgb-accent); outline: none; box-shadow: 0 0 0 3px rgba(20, 33, 61, 0.08); }
.zgb-text-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--zgb-muted); }
.zgb-counter { margin-inline-start: auto; }

.zgb-web-error { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fdeceb; color: var(--zgb-error); font-size: 13.5px; }
.zgb-web-error[hidden] { display: none; }

.zgb-web-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 14px; padding: 10px 0; border-top: 1px solid var(--zgb-border); border-bottom: 1px solid var(--zgb-border); }
.zgb-web-total-label { font-size: 13px; color: var(--zgb-muted); }
.zgb-web-total-label small { margin-inline-start: 6px; color: var(--zgb-gold); font-weight: 600; }
.zgb-web-total strong { font-size: 18px; color: var(--zgb-accent); }
.zgb-web-total .amount { color: inherit; }

/* Older browsers without :has() still get a visible selected state */
.zgb-opt.is-checked { border-color: var(--zgb-accent); background: var(--zgb-accent-soft); box-shadow: inset 0 0 0 1px var(--zgb-accent); }
