/* ── Privacy Policy Hero ── */
.privacy-hero {
  background: var(--clr-neutral-900);
  color: var(--clr-neutral-100);
  padding: var(--space-3xl) 0 var(--space-xl);
}
.privacy-hero h1 {
  font-family: var(--ff-heading);
  font-size: var(--fs-heading-xl);
  font-weight: var(--fw-extrabold);
}
.privacy-hero__updated {
  margin-top: var(--space-sm);
  opacity: 0.7;
  font-size: var(--fs-sm);
}

/* ── Privacy Policy Layout ── */
.privacy__container {
  display: grid;
  gap: var(--space-2xl);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-3xl);
}
@media (min-width: 50em) {
  .privacy__container {
    grid-template-columns: 220px 1fr;
    gap: var(--space-3xl);
  }
}

/* ── Table of Contents ── */
.privacy__toc {
  position: sticky;
  top: var(--space-xl);
  align-self: start;
}
.privacy__toc h2 {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-base);
}
.privacy__toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.privacy__toc li {
  margin-bottom: var(--space-sm);
}
.privacy__toc a {
  color: var(--clr-primary-400);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: color 0.15s;
}
.privacy__toc a:hover {
  color: var(--clr-accent-400);
}
@media (max-width: 49.99em) {
  .privacy__toc {
    position: static;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid hsl(0 0% 90%);
  }
  .privacy__toc ol {
    columns: 2;
    column-gap: var(--space-lg);
  }
}

/* ── Privacy Body ── */
.privacy__body {
  font-family: var(--ff-body);
  line-height: 1.8;
  color: var(--clr-neutral-900);
}
.privacy__section {
  margin-bottom: var(--space-2xl);
  scroll-margin-top: var(--space-xl);
}
.privacy__section h2 {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-base);
  color: var(--clr-neutral-900);
}
.privacy__section h3 {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}
.privacy__section p {
  margin-bottom: var(--space-base);
}
.privacy__section ul {
  margin-bottom: var(--space-base);
  padding-left: var(--space-lg);
}
.privacy__section li {
  margin-bottom: var(--space-xs);
}
.privacy__section a {
  color: var(--clr-accent-500);
  text-decoration: underline;
}
.privacy__contact {
  font-style: normal;
  background: var(--clr-neutral-200);
  padding: var(--space-lg);
  border-radius: 8px;
  line-height: 1.9;
}

/* ── Cookie Settings Page ── */
.cookie-settings__intro {
  font-family: var(--ff-body);
  max-width: 700px;
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}
.cookie-settings__intro a {
  color: var(--clr-accent-500);
  text-decoration: underline;
}
.cookie-settings__form {
  max-width: 700px;
}
.cookie-settings__group {
  border: 1px solid hsl(0 0% 88%);
  border-radius: 8px;
  padding: var(--space-lg);
  margin-bottom: var(--space-base);
  background: var(--clr-neutral-100);
}
.cookie-settings__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-base);
}
.cookie-settings__header h2 {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-xs);
}
.cookie-settings__header p {
  font-size: var(--fs-sm);
  color: hsl(0 0% 40%);
  line-height: 1.6;
}
.cookie-settings__badge {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  padding: 2px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cookie-settings__badge--active {
  background: hsl(145 60% 92%);
  color: hsl(145 60% 30%);
}
.cookie-settings__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}
.cookie-settings__messages {
  margin-bottom: var(--space-lg);
}
.cookie-settings__alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: 6px;
  font-size: var(--fs-sm);
}
.cookie-settings__alert--success {
  background: hsl(145 60% 92%);
  color: hsl(145 60% 25%);
  border: 1px solid hsl(145 60% 80%);
}

/* ── Toggle Switch ── */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: hsl(0 0% 78%);
  border-radius: 26px;
  transition: background 0.2s;
}
.cookie-toggle__slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--clr-accent-500);
}
.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(22px);
}

/* ── Cookie Banner (cb) ── */
.cb {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: hsl(220 10% 14%);
  color: hsl(0 0% 94%);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.45);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.cb.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cb.is-hiding {
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
}

@media (min-width: 50em) {
  .cb {
    border-radius: 0;
    box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(20px);
  }
  .cb.is-visible {
    transform: translateY(0);
  }
  .cb.is-hiding {
    transform: translateY(20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cb,
  .cb.is-visible,
  .cb.is-hiding {
    transition: none;
  }
}

.cb__inner {
  position: relative;
  padding: 0.875rem 1rem;
}

@media (min-width: 50em) {
  .cb__inner {
    width: min(1410px, 100% - 2rem);
    margin-inline: auto;
    padding: 1rem 0;
  }
}

.cb__main {
}

@media (min-width: 50em) {
  .cb__main {
    display: flex;
    align-items: center;
    gap: 2.5rem;
  }
  .cb__text {
    flex: 1 1 0;
    min-width: 0;
  }
  .cb__actions {
    flex-shrink: 0;
  }
}

/* Close X button */
.cb__close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: hsl(0 0% 60%);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.cb__close:hover {
  color: hsl(0 0% 94%);
  background: hsl(0 0% 100% / 0.08);
}
.cb__close:focus-visible {
  outline: 2px solid var(--clr-accent-400);
  outline-offset: -2px;
  color: hsl(0 0% 94%);
}
@media (min-width: 50em) {
  .cb__close {
    top: 0.5rem;
    right: -0.5rem;
  }
}

.cb__title {
  font-family: var(--ff-heading);
  font-size: 0.9375rem;
  font-weight: var(--fw-bold);
  margin-bottom: 0.25rem;
  padding-right: 2.5rem;
}
.cb__body {
  font-size: 0.75rem;
  line-height: 1.55;
  opacity: 0.78;
  margin-bottom: 0.375rem;
  max-width: none;
}
.cb__links {
  margin-bottom: 0.625rem;
}
@media (min-width: 50em) {
  .cb__title {
    font-size: 1rem;
    padding-right: 0;
  }
  .cb__body {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
  }
  .cb__links {
    margin-bottom: 0;
  }
}
.cb__links a {
  color: var(--clr-accent-400);
  text-decoration: underline;
  font-size: 0.75rem;
}
.cb__links a:hover {
  color: var(--clr-accent-300);
}
.cb__links a:focus-visible {
  outline: 2px solid var(--clr-accent-400);
  outline-offset: 2px;
  border-radius: 2px;
}
.cb__sep {
  margin-inline: 0.375rem;
  opacity: 0.4;
}

/* ── CB Buttons ── */
.cb__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: var(--ff-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
@media (min-width: 50em) {
  .cb__btn {
    padding: 0.55rem 1.15rem;
    font-size: 0.8125rem;
  }
}
.cb__btn:focus-visible {
  outline: 2px solid var(--clr-accent-400);
  outline-offset: 2px;
}

.cb__btn--accept {
  background: var(--clr-accent-500, #e5a200);
  color: hsl(220 10% 14%);
}
.cb__btn--accept:hover {
  background: var(--clr-accent-400, #f5b800);
}
.cb__btn--accept:active {
  background: hsl(41 100% 38%);
}

.cb__btn--reject {
  background: transparent;
  color: hsl(0 0% 94%);
  border: 1px solid hsl(0 0% 94% / 0.35);
}
.cb__btn--reject:hover {
  background: hsl(0 0% 100% / 0.08);
  border-color: hsl(0 0% 94% / 0.55);
}
.cb__btn--reject:active {
  background: hsl(0 0% 100% / 0.12);
}

.cb__btn--manage,
.cb__btn--save {
  background: transparent;
  color: hsl(0 0% 94%);
  border: 1px solid hsl(0 0% 94% / 0.35);
}
.cb__btn--manage:hover,
.cb__btn--save:hover {
  background: hsl(0 0% 100% / 0.08);
  border-color: hsl(0 0% 94% / 0.55);
}
.cb__btn--manage:active,
.cb__btn--save:active {
  background: hsl(0 0% 100% / 0.12);
}

/* Mobile: 2-col grid, Accept All spans full row */
.cb__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
}
.cb__actions .cb__btn--accept {
  grid-column: 1 / -1;
}

@media (min-width: 50em) {
  .cb__actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
  }
}

/* ── Preferences Modal (cb-prefs) ── */
.cb-prefs {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.cb-prefs__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cb-prefs.is-visible .cb-prefs__backdrop {
  opacity: 1;
}

.cb-prefs__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  background: hsl(220 10% 14%);
  color: hsl(0 0% 94%);
  border-radius: 16px 16px 0 0;
  padding: 1.5rem 1.25rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cb-prefs.is-visible .cb-prefs__dialog {
  opacity: 1;
  transform: translateY(0);
}
.cb-prefs.is-hiding .cb-prefs__dialog {
  opacity: 0;
  transform: translateY(100%);
}

@media (min-width: 50em) {
  .cb-prefs {
    align-items: center;
  }
  .cb-prefs__dialog {
    border-radius: 14px;
    transform: translateY(20px);
  }
  .cb-prefs.is-visible .cb-prefs__dialog {
    transform: translateY(0);
  }
  .cb-prefs.is-hiding .cb-prefs__dialog {
    transform: translateY(20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cb-prefs__backdrop,
  .cb-prefs__dialog {
    transition: none;
  }
}

.cb-prefs__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: hsl(0 0% 60%);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.cb-prefs__close:hover {
  color: hsl(0 0% 94%);
  background: hsl(0 0% 100% / 0.08);
}
.cb-prefs__close:focus-visible {
  outline: 2px solid var(--clr-accent-400);
  outline-offset: -2px;
  color: hsl(0 0% 94%);
}

.cb-prefs__title {
  font-family: var(--ff-heading);
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  margin-bottom: 1rem;
  padding-right: 2.5rem;
}

.cb-prefs__options {
  margin-bottom: 1.25rem;
}

.cb-prefs__option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid hsl(0 0% 100% / 0.1);
  gap: 0.75rem;
}
.cb-prefs__option:last-child {
  border-bottom: none;
}
.cb-prefs__option-info strong {
  display: block;
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
}
.cb-prefs__option-info span {
  font-size: 0.75rem;
  opacity: 0.6;
}
.cb-prefs__badge {
  font-size: 0.7rem;
  font-weight: var(--fw-medium);
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  background: hsl(145 50% 22%);
  color: hsl(145 60% 75%);
}

/* ── Toggle Switch ── */
.cb-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cb-toggle__track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: hsl(0 0% 32%);
  border-radius: 26px;
  transition: background 0.2s;
}
.cb-toggle__track::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cb-toggle input:checked + .cb-toggle__track {
  background: var(--clr-accent-500);
}
.cb-toggle input:checked + .cb-toggle__track::before {
  transform: translateX(20px);
}
.cb-toggle input:focus-visible + .cb-toggle__track {
  outline: 2px solid var(--clr-accent-400);
  outline-offset: 2px;
}

.cb-prefs__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cb-prefs__actions .cb__btn {
  width: 100%;
}

@media (min-width: 50em) {
  .cb-prefs__actions {
    flex-direction: row;
  }
  .cb-prefs__actions .cb__btn {
    width: auto;
    flex: 1 1 0;
  }
}

/* ── Recently Viewed ── */
.recently-viewed {
  padding: var(--space-2xl) 0;
  background: var(--clr-neutral-200);
}
.recently-viewed__title {
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-lg);
}
.recently-viewed__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-base);
}
.recently-viewed__card {
  background: var(--clr-neutral-100);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--clr-neutral-900);
  transition: box-shadow 0.15s, transform 0.15s;
}
.recently-viewed__card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.recently-viewed__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--clr-neutral-200);
  padding: var(--space-sm);
}
.recently-viewed__info {
  padding: var(--space-md);
}
.recently-viewed__name {
  font-family: var(--ff-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1.4;
}
.recently-viewed__model {
  font-size: var(--fs-xs);
  color: hsl(0 0% 50%);
  margin-top: 2px;
}

/* ── Buttons used in privacy pages ── */
.btn--primary {
  background: var(--clr-accent-500);
  color: var(--clr-neutral-900);
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.btn--primary:hover {
  background: var(--clr-accent-400);
}
.btn--outline {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  padding: 10px 24px;
  border-radius: 6px;
  font-family: var(--ff-heading);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ── Section spacing ── */
.section {
  padding: var(--space-2xl) 0 var(--space-3xl);
}
