*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* clip avoids horizontal scroll without breaking position:sticky (hidden often breaks it) */
  overflow-x: clip;
  background: #f7f6f3;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  background: #f7f6f3;
  color: #1a1a1a;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.utility-bar {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.site-header,
.utility-bar {
  /* Slightly wider than the main content container for a more premium desktop header */
  --header-max: calc(var(--layout-max, 1320px) + 140px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
  padding-top: env(safe-area-inset-top, 0);
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  transition: none;
}

.site-header.site-header--scrolled {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: rgba(232, 232, 232, 0.65);
  box-shadow: 0 6px 24px rgba(26, 26, 26, 0.07);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header.site-header--scrolled {
    background: rgba(255, 255, 255, 0.92);
  }
}

.utility-bar__inner {
  width: 100%;
  max-width: var(--header-max, var(--layout-max, 1320px));
  margin-left: auto;
  margin-right: auto;
  padding: max(0.5rem, env(safe-area-inset-top, 0))
    max(var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)), env(safe-area-inset-right, 0))
    0.5rem
    max(var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)), env(safe-area-inset-left, 0));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Keep utility links on one line only on wide desktop */
@media (min-width: 1101px) {
  .utility-bar__inner {
    flex-wrap: nowrap;
  }

  .utility-nav {
    flex-wrap: nowrap;
  }
}

.utility-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.utility-nav a {
  color: #555;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.utility-nav a:hover {
  color: #111;
}

/* Language switcher (utility bar) */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.utility-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  --utility-pill-h: 30px;
  --utility-pill-w: 88px;
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem 0.35rem 0.65rem;
  min-height: var(--utility-pill-h);
  min-width: var(--utility-pill-w);
  justify-content: space-between;
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: #fafafa;
  color: #333;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.lang-switcher__toggle:hover {
  border-color: #b8b8b8;
  background: #fff;
}

.lang-switcher__toggle[aria-expanded="true"] {
  border-color: #c41e3a;
  background: #fff;
  color: #1a1a1a;
}

.lang-switcher__toggle:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.45);
  outline-offset: 2px;
}

.lang-switcher__value {
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-switcher__chevron {
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: #666;
  transition: transform 0.2s ease;
}

.lang-switcher__toggle[aria-expanded="true"] .lang-switcher__chevron {
  transform: rotate(180deg);
  color: #c41e3a;
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 10.5rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e2dc;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.12);
  z-index: 9999;
}

.lang-switcher__option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  color: #333;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-switcher__option:hover {
  background: #f4f2ef;
  color: #1a1a1a;
}

.lang-switcher__option[aria-selected="true"] {
  color: #c41e3a;
  font-weight: 700;
}

.lang-switcher__option:focus-visible {
  outline: none;
  background: #fff5f5;
  box-shadow: inset 0 0 0 2px rgba(196, 30, 58, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }

  .site-header.site-header--scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.94);
  }

  .lang-switcher__toggle,
  .lang-switcher__chevron {
    transition: none;
  }
}

.main-header {
  width: 100%;
  background-color: #fff;
}

.main-header__inner {
  width: 100%;
  max-width: var(--header-max, var(--layout-max, 1320px));
  margin-left: auto;
  margin-right: auto;
  padding: 0.85rem var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)) 1rem;
  padding-left: max(env(safe-area-inset-left, 0px), 0px);
  padding-right: max(var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)), env(safe-area-inset-right, 0));
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(0.65rem, 1.35vw, 1.25rem);
}

.main-header__menu-btn {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid #c5c5c5;
  border-radius: 10px;
  background: #fafafa;
  color: #1a1a1a;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.main-header__menu-btn:hover {
  border-color: #b8b8b8;
  background: #fff;
}

.main-header__menu-btn:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.45);
  outline-offset: 2px;
}

.site-header--nav-open .main-header__menu-btn {
  border-color: #c41e3a;
  color: #c41e3a;
  background: #fffaf9;
}

.main-header__nav-panel {
  flex: 1 1 auto;
  min-width: 0;
}

.brand {
  flex-shrink: 0;
  display: block;
  line-height: 0;
  min-width: 0;
}

.brand__logo {
  height: auto;
  width: clamp(132px, 18vw, 200px);
  max-height: 52px;
  object-fit: contain;
  display: block;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.35rem;
}

.primary-nav a {
  color: #111;
  text-decoration: none;
  font-size: clamp(0.8125rem, 0.72rem + 0.28vw, 0.9375rem);
  font-weight: 700;
  white-space: nowrap;
}

@media (min-width: 1101px) and (max-width: 1280px) {
  /* Tighter desktop header before we collapse to hamburger */
  .primary-nav {
    gap: clamp(0.35rem, 0.8vw, 0.9rem);
  }

  .btn-cart {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.1rem;
  }

  .btn-account {
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
  }
}

.primary-nav a:hover {
  color: #c41e3a;
}

.header-actions__cluster {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.search-field {
  display: block;
  flex-shrink: 0;
  position: relative;
}

.search-field::before {
  content: "\f002";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: #888;
  pointer-events: none;
  z-index: 1;
}

.search-field input {
  width: clamp(140px, 18vw, 300px);
  min-width: 0;
  max-width: 100%;
  padding: 0.55rem 1.1rem 0.55rem 2.1rem;
  border: 1px solid #c5c5c5;
  border-radius: 999px;
  background: #fafafa;
  font: inherit;
  font-size: 0.8125rem;
  color: #333;
}

.search-field input::placeholder {
  color: #888;
}

.search-field input:focus {
  outline: 2px solid rgba(196, 30, 58, 0.35);
  outline-offset: 1px;
  border-color: #c41e3a;
}

/* ── Live Search Panel ─────────────────────────────── */
.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 1100;
  min-width: 320px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: search-panel-in 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes search-panel-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.search-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f3f0ed;
  transition: background 0.13s;
}

.search-item:last-of-type {
  border-bottom: none;
}

.search-item:hover,
.search-item.is-active {
  background: #fdf5f6;
}

.search-item__cover {
  flex-shrink: 0;
  width: 42px;
  height: 54px;
  border-radius: 5px;
  overflow: hidden;
  background: #f0ece8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.search-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-item__body {
  flex: 1;
  min-width: 0;
}

.search-item__title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item__meta {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item__format { color: #bbb; }

.search-item__price {
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #c41e3a;
  margin: 0;
  white-space: nowrap;
}

.search-item__currency {
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: 0.1em;
  margin-right: 0.1em;
  opacity: 0.75;
}

.search-hl {
  background: none;
  color: #c41e3a;
  font-style: normal;
}

.search-panel__empty {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1.1rem;
  color: #aaa;
  font-size: 0.875rem;
}

.search-panel__empty i { font-size: 1.2rem; flex-shrink: 0; }
.search-panel__empty strong { color: #555; }

.search-panel__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: #faf8f6;
  border-top: 1px solid #f3f0ed;
  text-decoration: none;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c41e3a;
  transition: background 0.13s;
}

.search-panel__footer:hover { background: #fdeef0; }

[data-theme="dark"] .search-panel {
  background: #1e2024;
  border-color: #2e3035;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2), 0 12px 40px rgba(0,0,0,0.4);
}
[data-theme="dark"] .search-item { border-bottom-color: #2a2d33; color: #d0cdc8; }
[data-theme="dark"] .search-item:hover,
[data-theme="dark"] .search-item.is-active { background: #2a1820; }
[data-theme="dark"] .search-item__title  { color: #f0ece2; }
[data-theme="dark"] .search-item__meta   { color: #666; }
[data-theme="dark"] .search-item__format { color: #555; }
[data-theme="dark"] .search-panel__footer { background: #17191d; border-top-color: #2a2d33; color: #e87a8a; }
[data-theme="dark"] .search-panel__footer:hover { background: #2a1820; }

.btn-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: transparent;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1.25rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-cart:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #c41e3a;
}

.btn-cart__count {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #c41e3a;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
  box-sizing: border-box;
}
.btn-cart__count[hidden] {
  display: none;
}

.account-menu {
  position: relative;
  flex-shrink: 0;
}

button.btn-account {
  margin: 0;
  font: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btn-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #c5c5c5;
  background: #fff;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.account-menu__chevron {
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-left: 0.1rem;
  color: #666;
  transition: transform 0.2s ease;
}

.btn-account[aria-expanded="true"] .account-menu__chevron {
  transform: rotate(180deg);
  color: #c41e3a;
}

.btn-account[aria-expanded="true"] {
  border-color: #c41e3a;
  color: #c41e3a;
  background: #fffaf9;
}

.account-menu__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 11.5rem;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e2dc;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.12);
  z-index: 120;
}

.account-menu__dropdown a,
.account-menu__dropdown button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.9rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.account-menu__dropdown a:hover,
.account-menu__dropdown button:hover {
  background: #f4f2ef;
  color: #1a1a1a;
}

.account-menu__dropdown a:focus-visible,
.account-menu__dropdown button:focus-visible {
  outline: none;
  background: #fff5f5;
  box-shadow: inset 0 0 0 2px rgba(196, 30, 58, 0.35);
}

.account-menu__dropdown .account-menu__divider {
  height: 1px;
  background: #eee;
  margin: 0.35rem 0;
}

.btn-account:hover {
  border-color: #c41e3a;
  color: #c41e3a;
  background: #fffaf9;
}

.btn-account:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.45);
  outline-offset: 2px;
}

.btn-account__icon {
  display: block;
  flex-shrink: 0;
}

.btn-account__label {
  font-size: 0.78rem;
  line-height: 1;
  min-width: 0;
  max-width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Phone / small tablet: hamburger + full-width search + collapsible nav */
/* Collapse earlier on smaller desktop/tablet to prevent header breaking */
@media (max-width: 1100px) {
  .main-header__menu-btn {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
  }

  .main-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.75rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .brand__logo {
    width: min(180px, 52vw);
    max-height: 46px;
  }

  .header-actions__cluster {
    grid-column: 2;
    grid-row: 1;
    gap: 0.45rem;
    justify-self: end;
  }

  .search-field {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .search-field input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .main-header__nav-panel {
    grid-column: 1 / -1;
    grid-row: 3;
    display: none;
    margin: 0 calc(-1 * var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)));
    padding: 0 var(--layout-gutter, clamp(0.9375rem, 2.85vw, 1.875rem)) 0.35rem;
    border-top: 1px solid #ececec;
    background: #fff;
  }

  .site-header--nav-open .main-header__nav-panel {
    display: block;
  }

  .primary-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0 0.5rem;
  }

  .primary-nav a {
    white-space: normal;
    padding: 0.7rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f2f0ec;
    font-size: 0.9375rem;
  }

  .primary-nav a:last-child {
    border-bottom: none;
  }

  .btn-cart {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.2rem;
  }

  .btn-account {
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 380px) {
  .btn-account__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .btn-account {
    padding: 0.5rem;
  }
}

/* Wide desktop: single professional row, no wrapping, no scrolling */
@media (min-width: 1101px) {
  .main-header__nav-panel {
    display: contents;
  }

  .primary-nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    min-width: 0;
    gap: clamp(0.45rem, 0.95vw, 1.1rem);
  }

  .primary-nav a {
    flex-shrink: 0;
  }

  .search-field {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 300px;
  }

  .search-field input {
    width: clamp(180px, 16vw, 300px);
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .utility-nav {
    gap: 0.5rem 1rem;
  }
}

/* ── Country switcher dropdown (utility bar) ─────────── */
.country-switcher {
  position: relative;
  flex-shrink: 0;
}

.country-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem 0.3rem 0.45rem;
  min-height: var(--utility-pill-h, 30px);
  border: 1px solid #d5d5d5;
  border-radius: 999px;
  background: #fafafa;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.country-switcher__toggle:hover {
  border-color: #b8b8b8;
  background: #fff;
}

.country-switcher__toggle[aria-expanded="true"] {
  border-color: #c41e3a;
  background: #fff;
  color: #1a1a1a;
}

.country-switcher__toggle:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.45);
  outline-offset: 2px;
}

.country-switcher__flag {
  display: inline-block;
  width: 1.25em;
  height: 0.95em;
  border-radius: 2px;
  flex-shrink: 0;
}

.country-switcher__name {
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-switcher__chevron {
  display: block;
  flex-shrink: 0;
  color: #999;
  transition: transform 0.2s ease;
}

.country-switcher__toggle[aria-expanded="true"] .country-switcher__chevron {
  transform: rotate(180deg);
  color: #c41e3a;
}

.country-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 13rem;
  background: #fff;
  border: 1px solid #e5e2dc;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  overflow: hidden;
}

.country-switcher__list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}

.country-switcher__option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.42rem 0.85rem;
  background: none;
  border: none;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.82rem;
  color: #333;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.country-switcher__option:hover { background: #f4f2ef; }

.country-switcher__option[aria-selected="true"] {
  color: #c41e3a;
  font-weight: 700;
}

.country-switcher__opt-flag {
  display: inline-block;
  width: 1.3em;
  height: 1em;
  border-radius: 2px;
  flex-shrink: 0;
}

.country-switcher__opt-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-switcher__opt-dial {
  font-size: 0.72rem;
  color: #bbb;
  flex-shrink: 0;
}

/* ── Phone prefix selector ───────────────────────────── */
.phone-field {
  display: flex;
  align-items: stretch;
  border: 1px solid #c5c5c5;
  border-radius: 8px;
  background: #fff;
  position: relative;
  transition: border-color 0.2s ease;
}

.phone-field:focus-within {
  border-color: #c41e3a;
  outline: 2px solid rgba(196, 30, 58, 0.35);
  outline-offset: 1px;
}

.phone-prefix {
  position: relative;
  flex-shrink: 0;
}

.phone-prefix__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.65rem 0.55rem 0.75rem;
  height: 100%;
  min-height: 44px;
  border: none;
  border-right: 1px solid #d5d5d5;
  border-radius: 7px 0 0 7px;
  background: #fafafa;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.phone-prefix__btn:hover {
  background: #f0eeeb;
}

.phone-prefix__btn:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.45);
  outline-offset: -2px;
}

.phone-prefix__flag {
  display: inline-block;
  width: 1.4em;
  height: 1em;
  vertical-align: middle;
  border-radius: 2px;
  flex-shrink: 0;
}

.phone-prefix__option .fi {
  display: inline-block;
  width: 1.4em;
  height: 1em;
  vertical-align: middle;
  border-radius: 2px;
  flex-shrink: 0;
}

.phone-prefix__code {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.phone-prefix__chevron {
  display: block;
  width: 12px;
  height: 12px;
  color: #777;
  transition: transform 0.2s ease;
}

.phone-prefix__btn[aria-expanded="true"] .phone-prefix__chevron {
  transform: rotate(180deg);
}

.phone-prefix__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 15rem;
  background: #fff;
  border: 1px solid #e5e2dc;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.12);
  z-index: 130;
  overflow: hidden;
}

.phone-prefix__search-wrap {
  position: relative;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #ece9e4;
}

.phone-prefix__search {
  width: 100%;
  padding: 0.38rem 0.6rem;
  border: 1px solid #e0ddd6;
  border-radius: 5px;
  background: #fafaf8;
  font: inherit;
  font-size: 0.8rem;
  color: #333;
  outline: none;
  box-sizing: border-box;
}

.phone-prefix__search:focus {
  border-color: #c41e3a;
  background: #fff;
}

.phone-prefix__list {
  max-height: 14rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #d5d2cc transparent;
}

.phone-prefix__list::-webkit-scrollbar {
  width: 5px;
}

.phone-prefix__list::-webkit-scrollbar-thumb {
  background: #d5d2cc;
  border-radius: 3px;
}

.phone-prefix__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.45rem 0.9rem;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}

.phone-prefix__option-name {
  flex: 1;
  min-width: 0;
}

.phone-prefix__option-dial {
  font-size: 0.75rem;
  color: #888;
  font-weight: 400;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.phone-prefix__option:hover {
  background: #f4f2ef;
  color: #1a1a1a;
}

.phone-prefix__option:hover .phone-prefix__option-dial {
  color: #555;
}

.phone-prefix__option[aria-selected="true"] {
  color: #c41e3a;
  font-weight: 700;
}

.phone-prefix__option[aria-selected="true"] .phone-prefix__option-dial {
  color: #c41e3a;
}

.phone-prefix__option:focus-visible {
  outline: none;
  background: #fff5f5;
}

/* Dark mode */
[data-theme="dark"] .phone-prefix__menu {
  background: #1e1e1e;
  border-color: #3a3a3a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .phone-prefix__search-wrap {
  border-bottom-color: #3a3a3a;
}

[data-theme="dark"] .phone-prefix__search {
  background: #2a2a2a;
  border-color: #444;
  color: #e0e0e0;
}

[data-theme="dark"] .phone-prefix__search:focus {
  border-color: #c41e3a;
  background: #333;
}

[data-theme="dark"] .phone-prefix__search-icon {
  color: #666;
}

[data-theme="dark"] .phone-prefix__list {
  scrollbar-color: #444 transparent;
}

[data-theme="dark"] .phone-prefix__option {
  color: #c8c8c8;
}

[data-theme="dark"] .phone-prefix__option-dial {
  color: #666;
}

[data-theme="dark"] .phone-prefix__option:hover {
  background: #2a2a2a;
  color: #fff;
}

[data-theme="dark"] .phone-prefix__option:hover .phone-prefix__option-dial {
  color: #999;
}

.phone-field input[type="tel"] {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.55rem 0.85rem;
  border: none;
  border-radius: 0 7px 7px 0;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  color: #333;
  min-height: 44px;
}

.phone-field input[type="tel"]:focus {
  outline: none;
}

/* Context overrides: auth forms */
.auth-field .phone-field {
  width: 100%;
  min-height: 48px;
}

.auth-field .phone-field .phone-prefix__btn {
  min-height: 46px;
}

.auth-field .phone-field input[type="tel"] {
  min-height: 46px;
  padding: 0.65rem 0.85rem;
}

/* Context overrides: profile form */
.pf-input-wrap .phone-field {
  flex: 1;
  border: none;
  border-radius: 0;
  outline: none !important;
}

.pf-input-wrap .phone-field:focus-within {
  border: none;
  outline: none;
}

/* Context overrides: cart delivery form */
.cart-field-line__control .phone-field {
  max-width: 28rem;
}

.cart-field-line__control .phone-field input[type="tel"] {
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
}

.cart-field-line__control .phone-field .phone-prefix__btn {
  min-height: 36px;
  padding: 0.4rem 0.6rem 0.4rem 0.7rem;
}

@media (prefers-reduced-motion: reduce) {
  .country-switcher__toggle,
  .country-switcher__chevron,
  .phone-prefix__btn,
  .phone-prefix__chevron {
    transition: none;
  }
}
