/* Phoenix Beauty — responsive and accessibility layer on top of the design's inline styles.
   The design is drawn at 1440 px with fluid clamp() sizes; this file only adds what the
   inline styles cannot express: focus states, the phone menu, swipe carousel and tap targets. */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
[id] { scroll-margin-top: 16px; }

/* Visible focus for keyboard users */
:focus-visible { outline: 2px solid #6E1423 !important; outline-offset: 3px !important; }
a[href="#main"]:focus { left: 16px !important; top: 16px; z-index: 100; background: #111111; color: #FFFFFF; padding: 12px 18px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- header menu (phones) ---------- */
.pb-menu { display: none; }
.pb-menu > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; list-style: none; }
.pb-menu > summary::-webkit-details-marker { display: none; }
.pb-menu-icon { position: relative; width: 20px; height: 9px; border-top: 1px solid #111111; border-bottom: 1px solid #111111; }
.pb-menu[open] .pb-menu-icon { border: none; }
.pb-menu[open] .pb-menu-icon::before,
.pb-menu[open] .pb-menu-icon::after { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 1px; background: #111111; transform: rotate(45deg); }
.pb-menu[open] .pb-menu-icon::after { transform: rotate(-45deg); }
.pb-menu-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: #FFFFFF; border-top: 1px solid #EEE8E1; border-bottom: 1px solid #EEE8E1; padding: 8px clamp(20px, 4vw, 64px) 20px; display: flex; flex-direction: column; }
.pb-menu-panel a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid #EEE8E1; text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; }
.pb-menu-panel a:last-child { border-bottom: none; }

@media (max-width: 899px) {
  .pb-header { position: relative; }
  .pb-header-row { display: grid !important; grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr); column-gap: 12px !important; align-items: center; padding-top: 14px !important; padding-bottom: 14px !important; }
  .pb-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pb-menu { display: block; grid-column: 1; }
  .pb-logo { grid-column: 2; }
  .pb-nav-left, .pb-nav-right { display: none !important; }

  /* "Our most coveted": one card at a time, swipe between them */
  .pb-car-controls { display: none !important; }
  .pb-car-view { overflow-x: auto !important; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .pb-car-view::-webkit-scrollbar { display: none; }
  .pb-car-track { transform: none !important; transition: none !important; }
  .pb-car-card { flex: 0 0 100% !important; scroll-snap-align: start; }

  /* Price row stacks: swap the vertical rules for horizontal ones */
  .pb-prices > div { border-left: none !important; }
  .pb-prices > div + div { border-top: 1px solid #D9D0C6; }

  /* Product gallery thumbnails stay on one swipeable row */
  .pb-thumbs { flex-wrap: nowrap !important; overflow-x: auto; padding: 4px; margin: -4px; scrollbar-width: none; }
  .pb-thumbs::-webkit-scrollbar { display: none; }
  .pb-thumbs > button { flex: 0 0 auto; }

  /* Tap targets of at least 44 px */
  button[aria-pressed] { min-width: 44px; min-height: 44px; }
  footer nav a, footer a { display: inline-flex; align-items: center; min-height: 44px; }
  summary { min-height: 44px; display: flex; align-items: center; }
  /* Underlined text links keep their look but get a 44 px invisible touch area */
  a[style*="border-bottom"] { position: relative; }
  a[style*="border-bottom"]::after { content: ""; position: absolute; left: -4px; right: -4px; top: -11px; bottom: -11px; }
}

/* Contact form spam trap: off-screen, never seen by visitors */
.pb-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button[type="submit"]:disabled { opacity: 0.6; cursor: progress !important; }

/* ---------- Shop on Amazon: phone header link + sticky buy bar ---------- */
.pb-shop-mobile { display: none; }
.pb-buybar { display: none; }

@media (max-width: 899px) {
  .pb-shop-mobile {
    display: inline-block; justify-self: end; align-self: center; grid-column: 3; grid-row: 1;
    font-size: 11px; font-weight: 500; letter-spacing: 0.2em; margin-right: -0.2em; text-transform: uppercase; line-height: 1.4;
    text-decoration: none; border-bottom: 1px solid #111111; padding-bottom: 3px;
  }
  .pb-shop-mobile::after { content: ""; position: absolute; inset: -14px -10px; } /* 44px+ tap area */
  .pb-shop-mobile { position: relative; }

  /* Product pages: slim bar that appears once the main "Shop on Amazon" button scrolls away */
  .pb-buybar {
    display: flex; align-items: center; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px clamp(16px, 4vw, 24px) calc(10px + env(safe-area-inset-bottom));
    background: #FFFFFF; border-top: 1px solid #E2DBD3; font-family: Jost, system-ui, sans-serif; color: #111111;
    transform: translateY(110%); transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1); visibility: hidden;
  }
  .pb-buybar.is-on { transform: none; visibility: visible; }
  .pb-buybar__meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .pb-buybar__name { font-family: 'Bodoni Moda', serif; font-size: 17px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pb-buybar__price { font-size: 12px; font-weight: 300; color: #5A524E; }
  .pb-buybar__cta {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
    background: #111111; color: #FFFFFF !important; text-decoration: none; font-size: 10px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  }
  body.has-buybar footer { padding-bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) { .pb-buybar { transition: none; } }
@media (max-width: 374px) {
  .pb-logo > span:first-child { font-size: 22px !important; letter-spacing: 0.34em !important; padding-left: 0.34em !important; }
  .pb-logo > span:last-child { letter-spacing: 0.5em !important; padding-left: 0.5em !important; }
  .pb-header-row { padding-left: 16px !important; padding-right: 16px !important; }
}
