/* Handan Gümüş — phone polish (A–Z overlays, type, safe areas) */

@media (max-width: 1023px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  body.is-search-open,
  body.is-menu-open,
  body.is-cart-open,
  body.hg-nl-popup-open {
    overflow: hidden;
  }

  body.is-search-open .hg-dock,
  body.is-menu-open .hg-dock,
  body.is-cart-open .hg-dock,
  body.is-search-open .wa-fab,
  body.is-menu-open .wa-fab,
  body.hg-nl-popup-open .hg-dock,
  body.hg-nl-popup-open .wa-fab {
    display: none !important;
  }

  .wa-fab-label { display: none !important; }
  .wa-fab {
    right: 0.85rem !important;
    bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  .wa-fab.wa-fab--pdp {
    bottom: calc(8.85rem + env(safe-area-inset-bottom, 0px)) !important;
  }
  .wa-fab-btn {
    width: 3.15rem !important;
    height: 3.15rem !important;
  }
}

/* —— Announcement ticker —— */
.hg-announcement__ticker {
  display: none;
}
@media (max-width: 980px) {
  .hg-announcement__inner {
    display: block !important;
    min-height: 2.15rem;
    overflow: hidden;
    padding: 0;
  }
  .hg-announcement__desktop { display: none !important; }
  .hg-announcement__ticker {
    display: block;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  }
  .hg-announcement__track {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    width: max-content;
    animation: hgTicker 22s linear infinite;
    font-family: Montserrat, Manrope, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #1a1a1a;
    padding: 0.6rem 0;
  }
  .hg-announcement__track span {
    display: inline-flex;
    align-items: center;
    gap: 1.75rem;
    white-space: nowrap;
  }
  .hg-announcement__track span::after {
    content: "";
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: #b89a6a;
  }
}
@keyframes hgTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* —— Mobile header tap targets —— */
@media (max-width: 980px) {
  .hg-header-main__mobile {
    min-height: 3.65rem;
    padding: 0.35rem 0;
  }
  .hg-header-main__mobile .hg-utils__btn,
  .hg-header-main__mobile [data-menu-open] {
    width: 2.75rem;
    height: 2.75rem;
  }
  .hg-logo__name { font-size: 1.28rem; letter-spacing: 0.08em; }
  .hg-logo__year { font-size: 8px; margin-top: 0.18rem; }
}

/* —— Search overlay —— */
.hg-search {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(5.5rem + env(safe-area-inset-top, 0px)) 1rem 1.5rem;
  background: rgba(253, 251, 247, 0.96);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.hg-search.pointer-events-none { pointer-events: none; }
.hg-search.opacity-0 { opacity: 0; }
.hg-search:not(.opacity-0) {
  opacity: 1;
  pointer-events: auto;
}
.hg-search__panel {
  width: min(100%, 36rem);
}
.hg-search__form {
  position: relative;
}
.hg-search__form input {
  width: 100%;
  min-height: 3.25rem;
  border: 1px solid rgba(22, 19, 17, 0.14);
  background: #fff;
  padding: 0.85rem 3.25rem 0.85rem 3.1rem;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 16px;
  color: #161311;
  outline: none;
}
.hg-search__form input:focus { border-color: #161311; }
.hg-search__icon,
.hg-search__close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: #6d665e;
  background: transparent;
  border: 0;
}
.hg-search__icon { left: 0.15rem; pointer-events: none; }
.hg-search__close { right: 0.1rem; cursor: pointer; }
.hg-search__popular {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
  font-family: Manrope, system-ui, sans-serif;
}
.hg-search__popular > span {
  width: 100%;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a8278;
}
.hg-search__popular a {
  border: 1px solid rgba(22, 19, 17, 0.12);
  background: #fff;
  color: #161311;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hg-search__suggest {
  margin-top: 0.75rem;
  max-height: min(50vh, 22rem);
  overflow-y: auto;
  border: 1px solid rgba(22, 19, 17, 0.1);
  background: #fff;
}

/* —— Cart drawer —— */
[data-cart-panel] {
  background: #fdfbf7 !important;
  border-left: 1px solid rgba(22, 19, 17, 0.1) !important;
  color: #161311 !important;
}
[data-cart-panel] .text-void-50,
[data-cart-panel] .text-void-300,
[data-cart-item] a {
  color: #161311 !important;
}
[data-cart-panel] .text-void-400,
[data-cart-panel] .text-void-500 {
  color: #6d665e !important;
}
[data-cart-panel] .border-void-600,
[data-cart-panel] .border-white\/5 {
  border-color: rgba(22, 19, 17, 0.1) !important;
}
[data-cart-footer] {
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom)) !important;
  background: #fff;
}

/* —— Menu footer —— */
.hg-mnav__foot {
  margin-top: auto;
  padding: 1rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(28, 25, 22, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  background: #fdfbf7;
}
.hg-mnav__foot a {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #161311;
  text-decoration: none;
}
.hg-mnav__foot a:hover { color: #b89a6a; }

@media (max-width: 1023px) {
  .hg-mnav__search-form input { font-size: 16px !important; }
  .hg-mnav__link,
  .hg-mnav__toggle { min-height: 3.15rem; }
}

/* —— Homepage editorial —— */
@media (max-width: 980px) {
  .hg-ed-banner {
    width: min(100% - 1.75rem, 89rem);
  }
  .hg-ed-heritage {
    width: min(100% - 1.75rem, 89rem);
    grid-template-columns: 1fr 1fr;
  }
  .hg-ed-heritage__cell--copy {
    grid-column: 1 / -1;
    order: -1;
    padding: 1.35rem 1.15rem;
  }
  .hg-ed-heritage__cell--photo {
    aspect-ratio: 1 / 1;
    height: auto;
  }
  .hg-hero--overlay .hg-hero__stage {
    min-height: 26rem;
    height: 28.5rem;
  }
  .hg-hero--overlay .hg-hero__copy {
    bottom: 1.65rem;
    left: 1.1rem;
    right: 1.1rem;
  }
  .hg-hero--overlay .hg-hero__title {
    font-size: clamp(1.85rem, 9vw, 2.35rem);
  }
  .hg-hero--overlay .hg-hero__desc {
    font-size: 0.9rem;
    max-width: 38ch;
  }
  .hg-hero--overlay .hg-hero__cta {
    min-height: 2.85rem;
    padding: 0.8rem 1.15rem;
  }
  .hg-loved,
  .hg-rail { padding-left: 0; padding-right: 0; }
}
@media (max-width: 640px) {
  .hg-ed-look {
    padding: 1.75rem 0 1.35rem;
  }
  .hg-ed-look__products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.45rem;
  }
  .hg-ed-look-card__name { font-size: 11px !important; line-height: 1.3; }
  .hg-ed-look-card__price { font-size: 11px; }
  .hg-ed-look-card__wish { display: none; }
  .hg-ed-reviews__ig-cta { font-size: 10px; }
}

/* —— Shop —— */
@media (max-width: 720px) {
  .hg-shop { padding-bottom: 2.5rem; }
  .hg-shop__cats {
    flex-wrap: nowrap !important;
    margin-inline: -0.15rem;
    padding-bottom: 0.2rem;
  }
  .hg-shop .hg-pcard__name { font-size: 1.02rem !important; }
  .hg-shop-sheet__panel {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }
}

/* —— PDP —— */
@media (max-width: 1023px) {
  .hg-pdp {
    padding-bottom: calc(9.25rem + env(safe-area-inset-bottom, 0px));
  }
  .hg-pdp-sticky {
    padding: 0.55rem 0.9rem calc(0.55rem + env(safe-area-inset-bottom, 0px) * 0);
  }
  .hg-pdp-sticky button { min-width: 8.5rem; }
}

/* —— Cart / checkout / auth / account ink on cream —— */
body.is-cart-page,
body.is-checkout,
body.is-account,
.auth-shell {
  color: #161311;
}
body.is-cart-page .text-void-50,
body.is-checkout .text-void-50,
body.is-account .text-void-50,
body.is-account .text-white,
.auth-shell .text-void-50,
.account-shell .text-white {
  color: #161311 !important;
}
body.is-cart-page .text-void-300,
body.is-cart-page .text-void-400,
body.is-checkout .text-void-300,
body.is-checkout .text-void-400,
body.is-account .text-void-300,
body.is-account .text-void-400,
.auth-shell .text-void-300 {
  color: #6d665e !important;
}
body.is-cart-page .border-void-600,
body.is-checkout .border-void-600,
body.is-account .border-void-600,
.account-shell .border-white\/\[0\.06\],
.account-shell .border-white\/\[0\.08\] {
  border-color: rgba(22, 19, 17, 0.1) !important;
}
body.is-account .bg-void-950,
.account-shell .bg-void-950,
.account-nav-bar {
  background: #faf7f2 !important;
  color: #161311 !important;
}

.hg-account__hero {
  background: #faf7f2;
  border-bottom: 1px solid rgba(22, 19, 17, 0.1);
}
.hg-account__hero-inner {
  width: min(100% - 1.75rem, 72rem);
  margin: 0 auto;
  padding: 1.15rem 0 1.25rem;
}
.hg-account__hero .hg-page__eyebrow,
.hg-account__hero span {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b08950;
}
.hg-account__hero h1 {
  margin: 0.4rem 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.85rem, 6vw, 2.6rem);
  letter-spacing: -0.02em;
  color: #161311;
}
.hg-account__hero p {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: #4a453f;
}

.account-nav-bar {
  top: 5.4rem !important;
  background: #fff !important;
  border-bottom: 1px solid rgba(22, 19, 17, 0.1) !important;
}
.account-nav-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(22, 19, 17, 0.12);
  background: #fff;
  color: #6d665e;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.account-nav-chip.is-active {
  background: #161311;
  border-color: #161311;
  color: #fff;
}

@media (max-width: 1023px) {
  .auth-shell {
    padding-bottom: 2.5rem;
  }
  .account-shell {
    padding-bottom: 1.5rem;
  }
  body.is-cart-page main > div {
    padding-bottom: 1.5rem;
  }
  .field-input {
    min-height: 2.85rem;
    border: 1px solid rgba(22, 19, 17, 0.14) !important;
    background: #fff !important;
    color: #161311 !important;
  }
  .field-label {
    color: #6d665e !important;
  }
}

/* Corporate pages extra dock clearance */
@media (max-width: 639px) {
  .hg-page {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}

/* Toast sits below sticky header on phones */
@media (max-width: 1023px) {
  [data-toast] {
    top: calc(env(safe-area-inset-top, 0px) + 4.85rem) !important;
  }
}
