/* Shared accessibility utilities live in ui-system, not global styles.css. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Shared generic button primitive lives in ui-system, not global styles.css. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.button--dark {
  min-height: 46px;
  background: var(--pink);
  color: var(--paper);
}

/* Shared icon button and header cart counter primitives live in ui-system, not global styles.css. */
.icon-button {
  position: relative;
  display: inline-grid;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.icon-button svg {
  width: 29px;
  height: 29px;
  stroke-width: 2.25;
}

.counter {
  position: absolute;
  top: -2px;
  right: -2px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--pink);
  font-size: 11px;
  font-weight: 950;
}

/* Shared sparkle sweep animation primitive lives in ui-system, not global styles.css. */
@keyframes sparkleSweep {
  0% {
    opacity: 0;
    transform: translateX(-45%) rotate(8deg);
  }

  22%,
  68% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(45%) rotate(8deg);
  }
}

/* Shared eyebrow typography primitive lives in ui-system, not global styles.css. */
.eyebrow {
  margin: 0 0 18px;
  color: #818181;
  font-family: var(--display-font);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

:where(input:not([type="checkbox"]):not([type="radio"]), textarea, select, .form-control, .brands-search input, .price-inputs input) {
  border-radius: var(--radius-md);
}

:where(
  .card,
  .profile-card,
  .quick-action-card
) {
  border-radius: var(--radius-lg);
}

:where(
  .btn-primary,
  .button--dark,
  .about-button--dark,
  .contacts-primary
) {
  height: 48px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.45);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-primary);
  box-shadow: none;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transform: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

:where(
  .btn-primary,
  .button--dark,
  .about-button--dark,
  .contacts-primary
):hover,
:where(
  .btn-primary,
  .button--dark,
  .about-button--dark,
  .contacts-primary
):focus-visible {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
  color: var(--color-white);
  box-shadow: var(--shadow-primary-hover);
  outline: 0;
}

:where(
  .btn-primary,
  .button--dark,
  .about-button--dark,
  .contacts-primary
):active {
  border-color: var(--color-primary-active);
  background: var(--color-primary-active);
  box-shadow: none;
}

:where(
  .btn-primary,
  .button--dark,
  .about-button--dark,
  .contacts-primary
):disabled {
  border-color: #e5e7eb;
  background: #e5e7eb;
  color: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
}

:where(
  .btn-secondary,
  .btn-outline,
  .btn-ghost,
  .about-button:not(.about-button--dark),
  .contacts-secondary,
  .mega-promo button
) {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.35);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: none;
  text-decoration: none;
  transform: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

:where(
  .btn-secondary,
  .btn-outline,
  .btn-ghost,
  .about-button:not(.about-button--dark),
  .contacts-secondary,
  .mega-promo button
):hover,
:where(
  .btn-secondary,
  .btn-outline,
  .btn-ghost,
  .about-button:not(.about-button--dark),
  .contacts-secondary,
  .mega-promo button
):focus-visible {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  outline: 0;
}

:where(
  .btn-secondary,
  .btn-outline,
  .btn-ghost,
  .about-button:not(.about-button--dark),
  .contacts-secondary,
  .mega-promo button
):active {
  border-color: var(--color-primary-active);
  background: rgba(var(--theme-accent-rgb), 0.12);
  color: var(--color-primary-active);
}

:where(
  .btn-secondary,
  .btn-outline,
  .btn-ghost
):disabled {
  border-color: #e5e7eb;
  background: #f2f4f7;
  color: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
}

:where(
  .btn-danger
) {
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: #ef4444;
  box-shadow: none;
}

:where(
  .btn-danger
):hover,
:where(
  .btn-danger
):focus-visible {
  border-color: #ef4444;
  background: #fff1f1;
  color: #dc2626;
  outline: 0;
}

:where(
  .badge,
  .status,
  .tag,
  .chip,
  .filter-chip,
  .tab-pill,
  .counter,
  .status-progress,
  .status-modal__progress,
  .hero-detail
) {
  border-radius: var(--radius-pill);
}

:where(
  .chip,
  .filter-chip,
  .tab-pill
) {
  background: var(--color-white);
  color: var(--color-text-main);
  border-color: var(--color-border);
}

:where(
  .chip,
  .filter-chip,
  .tab-pill
):hover,
:where(
  .chip.active,
  .filter-chip.active,
  .filter-chip.is-active,
  .tab-pill.active,
  .tab-pill.is-active
) {
  border-color: rgba(var(--theme-accent-rgb), 0.45);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

:where(
  .icon-button,
  .avatar,
  .user-avatar,
  .counter-badge
) {
  border-radius: 50%;
}

@media (max-width: 640px) {
  :where(
    .btn-primary,
    .button--dark,
    .about-button--dark,
    .contacts-primary
  ) {
    width: 100%;
    height: 46px;
    min-height: 46px;
  }
}

@media (max-width: 699px) {
  .icon-button {
    width: 42px;
    height: 42px;
  }

  .icon-button svg {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 420px) {
  .icon-button {
    width: 38px;
    height: 38px;
  }

  .icon-button svg {
    width: 23px;
    height: 23px;
  }

  .counter {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .icon-button {
    width: 36px;
    height: 36px;
  }
}

/* Unified modal language: quieter surface, consistent focus, restrained pink. */
:root {
  --bc-modal-radius: 8px;
  --bc-modal-overlay: rgba(16, 14, 18, 0.48);
  --bc-modal-border: rgba(17, 17, 17, 0.11);
  --bc-modal-soft-border: rgba(var(--theme-accent-rgb), 0.16);
  --bc-modal-surface: #ffffff;
  --bc-modal-muted-surface: color-mix(in srgb, var(--pink-soft) 68%, #ffffff);
  --bc-modal-shadow: 0 28px 80px rgba(31, 23, 30, 0.2), 0 10px 30px rgba(31, 23, 30, 0.08);
  --bc-modal-focus: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.12);
  --bc-modal-control: #dfe3ea;
  --bc-modal-text: #17131a;
  --bc-modal-muted: #687386;
}
