/*
 * Palette sampled from the Hollister site screenshot: brand red
 * (buttons, links, icons) on a white / light-grey neutral background,
 * with dark neutral-grey body text - no teal, no orange.
 *
 * Light-only by design: index.html declares
 * <meta name="color-scheme" content="light">, so there is no
 * corresponding @media (prefers-color-scheme: dark) block here.
 */
:root {
  --color-bg: #f4f2f2;
  --color-surface: #ffffff;
  --color-text: #262424;
  --color-text-muted: #666261;
  --color-primary: #565253;
  --color-primary-dark: #302d2e;
  --color-accent: #c61936;
  --color-border: #e2dedd;
  --color-good-bg: #e7f6ec;
  --color-good-text: #185c34;
  --color-warn-bg: #fff4e5;
  --color-warn-text: #7a4b06;
  --color-info-bg: #eaf2fb;
  --color-info-text: #1c4c86;
  --color-danger: #7a1220;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(20, 15, 15, 0.07), 0 4px 16px rgba(20, 15, 15, 0.07);
  --max-width: 720px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: var(--color-surface);
  /*border-bottom: 1px solid var(--color-border);*/
}

.app-title {
  appearance: none;
  background: none;
  border: none;
  margin: 0;
  padding: 4px 2px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.app-title span {
  font-weight: 600;
  font-size: 1.90rem;
}

.app-title:hover {
  color: var(--color-primary);
}

.app-title:active {
  transform: scale(0.98);
}

.app-title:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.stepper {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px;
  overflow-x: auto;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.brandingbars {
  padding: 0;
  background: var(--color-surface);
}
.brandingbars-red,.brandingbars-orange {
  border:0px none;
  height:10px;
  padding:5px 0;
}
.brandingbars-red {
  margin-bottom: 10px;
  background-color: #DC153B;
}
.brandingbars-orange {
  background-color: #F25F28;
}

.step {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step--answered {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.step--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.step--locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.step--results {
  font-size: 1rem;
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px calc(32px + var(--safe-bottom));
}

.app-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  padding: 14px 16px calc(14px + var(--safe-bottom));
}

.load-error {
  background: var(--color-warn-bg);
  color: var(--color-warn-text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

/* ---------- screens ---------- */

/* .screen-start sets its own `display: flex` below, which (at equal
   author-rule specificity) would otherwise beat the UA [hidden] rule and
   keep the start screen visible underneath the other screens. This rule
   has higher specificity than any single .screen-* class, so [hidden]
   always wins regardless of source order. */
.screen[hidden] {
  display: none !important;
}

/* ---------- start screen ---------- */

.screen-start {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 8px;
}

.start-hero {
  width: 140px;
  height: 140px;
  margin-bottom: 4px;
}

.screen-start h1 {
  font-size: 1.6rem;
  margin: 0;
}

.start-copy {
  color: var(--color-text-muted);
  max-width: 46ch;
}

.start-disclaimer {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-top: 12px;
}

.ios-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  max-width: 42ch;
}

.banners-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 50px 0 24px 0;
}

.banners-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.banners-img {
  width: 100%;
  /*aspect-ratio: 4 / 3;*/
  object-fit: contain;
}

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.06s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary-dark);
  border: 1.5px solid var(--color-border);
}

.btn--danger-ghost {
  background: transparent;
  color: var(--color-danger);
  border: 1.5px solid var(--color-border);
}

.btn--large {
  padding: 15px 28px;
  font-size: 1.05rem;
}

.btn--small {
  padding: 8px 14px;
  min-height: 36px;
  font-size: 0.85rem;
}

/* ---------- question screen ---------- */

.q-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
}

.q-heading {
  font-size: 1.35rem;
  margin: 0 0 16px;
}

/* Pull the optional subheading up under the heading, then keep the same
   16px gap before whatever comes next - so spacing looks the same whether
   or not a given question has a subheading. */
.q-heading:has(+ .q-subheading) {
  margin-bottom: 2px;
}

.q-subheading {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0 0 16px;
}

.q-image {
  width: 96px;
  height: 96px;
  margin: 0 0 12px;
}

.tip-toggle {
  /*background: var(--color-info-bg);*/
  /*color: var(--color-info-text);*/
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  color: #ffffff;
  background-color: #919191;
}

.tip-panel {
  /*background: var(--color-info-bg);*/
  /*color: var(--color-info-text);*/
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: #ffffff;
  background-color: #919191;  
}

.tip-panel[hidden] {
  display: none;
}

.q-instructional {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin: 0 0 12px;
}

.answers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.answer-card {
  position: relative;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.answer-card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.answer-card--selected {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
}

.answer-image {
  /*width: 72px;*/
  /*height: 72px;*/
  border-radius: var(--radius-sm);
}

.answer-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.answer-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.answer-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.answer-card--selected .answer-check {
  display: flex;
}

.q-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--color-bg) 60%, transparent);
  padding: 10px 0 2px;
}

.q-nav .btn--primary {
  margin-left: auto;
}

/* ---------- results screen ---------- */

.data-banner {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.data-banner--good {
  background: var(--color-good-bg);
  color: var(--color-good-text);
}
.data-banner--warn {
  background: var(--color-warn-bg);
  color: var(--color-warn-text);
}
.data-banner--info {
  background: var(--color-info-bg);
  color: var(--color-info-text);
}

.results-heading {
  font-size: 1.4rem;
  margin: 0 0 16px;
}

.empty-state {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  color: var(--color-text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  /*aspect-ratio: 4 / 3;*/
  object-fit: contain;
  background: var(--color-bg);
  /*padding: 14px;*/
}

.product-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-body .btn--small { 
  margin: 20px 0;
}

.product-name {
  font-size: 1.02rem;
  margin: 0;
}

.product-sku {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.product-desc {
  font-size: 0.85rem;
  margin: 6px 0 0;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin:20px 0px;
}

.product-card--branded {
  border-width: 2px;
}

.product-brand {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  margin: 0;
}

.product-image-slider {
  position: relative;
  width: 100%;
  background: var(--color-bg);
  overflow: hidden;
}

.slider-track {
  position: relative;
  width: 100%;
  aspect-ratio: 1; /*4 / 3;*/
}

.slider-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.slider-image--active {
  opacity: 1;
  visibility: visible;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-text);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  padding: 0;
}

.slider-arrow--prev {
  left: 8px;
}

.slider-arrow--next {
  right: 8px;
}

.slider-arrow:hover,
.slider-arrow:focus-visible {
  background: var(--color-surface);
}

.product-alternates {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
}

.product-alternates-label {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--color-text-muted);
}

.product-alternates-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--color-text);
}

.product-alternates-list li {
  margin: 2px 0;
}

.submit-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom:15px;
}

.submit-field input[type="text"],
.submit-field input[type="email"] {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff; /*var(--color-bg);*/
  color: var(--color-text);
}

.submit-field input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.submit-field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
}

.submit-field--checkbox input {
  margin-top: 3px;
}

.submit-error {
  margin: 20px 0;
  font-size: 0.85rem;
  color: var(--color-danger);
}

/* ---------- print ---------- */

@media print {
  .app-header,
  .stepper,
  .app-footer,
  .data-banner,
  .results-actions {
    display: none !important;
  }
}

@media (min-width: 640px) {
  .q-heading {
    font-size: 1.55rem;
  }
  .screen-start h1 {
    font-size: 1.9rem;
  }
  .banners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
