/* ═══════════════════════════════════════════════════════════════════
   Home widgets: daily vault, bundle saver, budget store, lifestyle
   badges, recently viewed. Loaded once per page by
   widgets/_unique-assets.blade.php.

   Product tiles are the shared product card (variant="compact"); section
   headings use .home-section-head / .home-section-title. Colours come only
   from the theme tokens, so light and dark need no separate rules.
   ═══════════════════════════════════════════════════════════════════ */

.uw-scope { color: var(--theme-text); }

.uw-card-wrap {
  position: relative;
  margin-bottom: 24px;
  padding: 24px 26px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-4xl);
  box-shadow: var(--theme-shadow-sm);
}

/* Tiles inside a widget (vault hero, bundle panels, combo) */
.uw-vault-hero,
.uw-bundle-hero,
.uw-bundle-summary,
.uw-vault-combo {
  background: var(--theme-surface-muted);
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-3xl);
}

/* The widgets' call-to-action: the storefront's filled accent pill */
.uw-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--theme-radius-pill);
  background: var(--theme-accent-strong);
  color: var(--theme-on-accent);
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease;
}
.uw-cta:hover,
.uw-cta:focus-visible { background: var(--theme-accent-strong-hover); color: var(--theme-on-accent); }
.uw-cta.is-loading { pointer-events: none; opacity: .8; }

/* ────────── 1. DAILY VAULT ────────── */
.uw-vault-head {
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--theme-border);
}
.uw-vault-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--theme-radius-pill);
  background: var(--theme-accent-soft);
  border: 1px solid var(--theme-accent-border);
  color: var(--theme-text-strong);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.uw-vault-timer i { color: var(--theme-accent); }
.uw-vault-digits { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95rem; font-weight: 800; color: var(--theme-accent); }

.uw-vault-body { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }
.uw-vault-hero { position: relative; display: flex; flex-direction: column; padding: 18px; }
.uw-vault-hero-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--theme-radius-pill);
  background: var(--theme-accent-strong);
  color: var(--theme-on-accent);
  font-size: .7rem;
  font-weight: 700;
}
.uw-vault-hero-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  margin: 22px 0 14px;
  padding: 12px;
  overflow: hidden;
  background: #ffffff; /* product photos are shot on white */
  border: 1px solid var(--theme-border);
  border-radius: var(--theme-radius-xl);
}
.uw-vault-hero-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .35s; }
.uw-vault-hero:hover .uw-vault-hero-img img { transform: scale(1.05); }
.uw-vault-hero-cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--theme-text-muted); }
.uw-vault-hero-name { margin: 4px 0; font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.uw-vault-hero-name a,
.uw-vault-hero-name a:visited { color: var(--theme-text-strong); text-decoration: none; }
.uw-vault-hero-name a:hover { color: var(--theme-primary); }
.uw-vault-price-row { padding-inline-end: 0; margin-top: 4px; align-items: center; }
.uw-vault-price-row .price-display { font-size: 1.35rem; }
.uw-vault-price-row .prod-badge { box-shadow: none; }

.uw-vault-stock-wrap { margin: 12px 0 14px; }
.uw-vault-stock-head { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: .75rem; font-weight: 700; color: var(--theme-text-strong); }
.uw-vault-stock-head i { color: var(--theme-accent); }
.uw-vault-stock-track { height: 7px; overflow: hidden; border-radius: var(--theme-radius-pill); background: var(--theme-border); }
.uw-vault-stock-fill { height: 100%; border-radius: var(--theme-radius-pill); background: var(--theme-accent); }
.uw-vault-hero .uw-cta { width: 100%; margin-top: auto; }

.uw-vault-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.uw-vault-tier-nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.uw-vault-tabs,
.uw-budget-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.uw-vault-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--theme-border-strong);
  border-radius: var(--theme-radius-pill);
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.uw-vault-tab:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.uw-vault-tab.active { background: var(--theme-primary); border-color: var(--theme-primary); color: var(--theme-on-primary); }

.uw-vault-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.uw-vault-combo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 14px 18px; border-style: dashed; }
.uw-vault-combo-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.uw-vault-combo-thumbs { display: flex; align-items: center; gap: 6px; }
.uw-vault-combo-circle {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 4px; overflow: hidden;
  border-radius: 50%; background: #ffffff; border: 1px solid var(--theme-border);
}
.uw-vault-combo-circle img { max-width: 100%; max-height: 100%; object-fit: contain; }
.uw-vault-combo-plus { font-size: 1.1rem; font-weight: 800; color: var(--theme-text-muted); }
.uw-vault-combo-info { min-width: 0; }
.uw-vault-combo-info h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 2px; font-size: .95rem; font-weight: 700; color: var(--theme-text-strong); }
.uw-vault-combo-info p { margin: 0; font-size: .78rem; color: var(--theme-text-muted); }
.uw-vault-combo-pricing { display: flex; align-items: center; gap: 16px; }
.uw-vault-combo-price-block { text-align: right; }
.uw-vault-combo-save { font-size: .74rem; font-weight: 700; color: var(--theme-success-text); }

/* ────────── 2. BUNDLE SAVER ────────── */
.uw-bundle-grid { display: grid; grid-template-columns: 280px 1fr 280px; gap: 20px; align-items: stretch; }
.uw-bundle-hero { display: flex; flex-direction: column; align-items: flex-start; padding: 20px; }
.uw-bundle-hero .home-section-sub { margin-bottom: 12px; }
.uw-bundle-img {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 140px; margin-top: auto; padding: 10px; overflow: hidden;
  background: #ffffff; border: 1px solid var(--theme-border); border-radius: var(--theme-radius-xl);
}
.uw-bundle-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

.uw-bundle-list { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 0; }
.uw-bundle-row {
  display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 14px; cursor: pointer;
  background: var(--theme-surface); border: 1px solid var(--theme-border); border-radius: var(--theme-radius-xl);
  transition: border-color .2s;
}
.uw-bundle-row:hover { border-color: var(--theme-border-strong); }
.uw-bundle-check { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--theme-primary); cursor: pointer; }
.uw-bundle-thumb {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 48px; height: 48px; padding: 4px; overflow: hidden;
  background: #ffffff; border: 1px solid var(--theme-border); border-radius: var(--theme-radius-md);
}
.uw-bundle-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.uw-bundle-info { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.uw-bundle-pname { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .86rem; font-weight: 600; color: var(--theme-text-strong); }
.uw-bundle-pqty { font-size: .72rem; color: var(--theme-text-muted); }
.uw-bundle-pprice { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.uw-bundle-pprice .price-display { font-size: .95rem; }
.uw-bundle-pprice .original-price { font-size: .72rem; }

.uw-bundle-summary { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.uw-bundle-save-pill { align-self: flex-start; }
.uw-bundle-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .84rem; color: var(--theme-text-muted); }
.uw-bundle-line del { color: var(--theme-text-muted); }
.uw-bundle-discount { font-weight: 700; color: var(--theme-success-text); }
.uw-bundle-line.total { padding-top: 8px; border-top: 1px solid var(--theme-border); font-weight: 700; color: var(--theme-text-strong); }
.uw-bundle-line.total .price-display { font-size: 1.3rem; }
.uw-bundle-summary .uw-cta { width: 100%; margin-top: auto; }

/* ────────── 3. BUDGET STORE ────────── */
.uw-budget-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.uw-budget-tab {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--theme-surface-muted); border: 1px solid var(--theme-border); border-radius: var(--theme-radius-2xl); color: var(--theme-text);
  transition: border-color .2s, background .2s;
}
.uw-budget-tab:hover { border-color: var(--theme-border-strong); }
.uw-budget-tab.active { background: var(--theme-surface); border-color: var(--theme-primary); box-shadow: var(--theme-shadow-sm); }
.uw-budget-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%; font-size: 1.05rem;
  background: color-mix(in srgb, var(--theme-primary) 12%, transparent); color: var(--theme-primary);
}
.uw-budget-tab.active .uw-budget-icon { background: var(--theme-primary); color: var(--theme-on-primary); }
.uw-budget-tab-title { display: block; font-size: .88rem; font-weight: 700; color: var(--theme-text-strong); }
.uw-budget-tab-sub { display: block; font-size: .72rem; color: var(--theme-text-muted); }
.uw-budget-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

/* ────────── 4. LIFESTYLE BADGES ────────── */
/* Each badge carries its hue in --life-tone; it is mixed with the theme
   surface and text so every badge (including new ones) reads in both themes. */
.uw-life-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.uw-life-card,
.uw-life-card:visited {
  --life-tone: var(--theme-accent);
  display: flex; flex-direction: column; align-items: center; padding: 18px 12px; text-align: center; text-decoration: none;
  background: var(--theme-surface-muted); border: 1px solid var(--theme-border); border-radius: var(--theme-radius-3xl); color: var(--theme-text);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.uw-life-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--life-tone) 45%, var(--theme-border)); box-shadow: var(--theme-shadow-md); text-decoration: none; }
.uw-life-icon {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; margin-bottom: 12px; border-radius: 50%; font-size: 1.5rem;
  background: color-mix(in srgb, var(--life-tone) 14%, var(--theme-surface));
  color: color-mix(in srgb, var(--life-tone) 78%, var(--theme-text-strong));
  border: 1px solid color-mix(in srgb, var(--life-tone) 35%, transparent);
  transition: transform .3s;
}
.uw-life-card:hover .uw-life-icon { transform: scale(1.08); }
.uw-life-name { margin-bottom: 6px; font-size: .92rem; font-weight: 700; line-height: 1.2; color: var(--theme-text-strong); }
.uw-life-count {
  padding: 3px 12px; border-radius: var(--theme-radius-pill); font-size: .74rem; font-weight: 600;
  background: var(--theme-surface); border: 1px solid var(--theme-border); color: var(--theme-text-muted);
}

/* ────────── 5. RECENTLY VIEWED ────────── */
.uw-resume-row {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: center;
  padding: 20px 24px; margin-bottom: 24px;
  background: var(--theme-surface); border: 1px solid var(--theme-border); border-radius: var(--theme-radius-4xl); box-shadow: var(--theme-shadow-sm);
}
.uw-resume-badge { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--theme-text-muted); }
.uw-resume-clear {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 0; border: 0; background: none;
  font-size: .78rem; font-weight: 600; color: var(--theme-text-muted); cursor: pointer;
}
.uw-resume-clear:hover { color: var(--theme-danger-text); text-decoration: underline; }
.uw-resume-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; scrollbar-width: thin; }
.uw-resume-item { flex: 0 0 170px; scroll-snap-align: start; }

/* Responsive */
@media (max-width: 1199px) {
  .uw-budget-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .uw-life-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .uw-vault-body,
  .uw-bundle-grid,
  .uw-resume-row { grid-template-columns: 1fr; }
  .uw-budget-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uw-budget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uw-life-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .uw-card-wrap { padding: 18px 14px; border-radius: var(--theme-radius-3xl); }
  .uw-vault-grid,
  .uw-budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uw-vault-combo { flex-direction: column; align-items: flex-start; }
  .uw-vault-combo-pricing { width: 100%; justify-content: space-between; }
  .uw-budget-tabs { grid-template-columns: 1fr; }
  .uw-life-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uw-resume-row { padding: 16px 14px; }
  .uw-resume-item { flex-basis: 156px; }
}
