/* =====================================================================
   design-fixes.css — desktop layout corrections
   Loaded AFTER styles.css. Nothing in styles.css is modified; every rule
   here overrides a specific earlier declaration and is commented with the
   line it corrects, so this file can be folded back in or dropped later.
   ===================================================================== */


/* ---------------------------------------------------------------------
   FIX 1 — "Address" label collapsing to one letter per line
   ---------------------------------------------------------------------
   styles.css:163   .contact-lines strong { width:240px; white-space:nowrap }
   styles.css:1066  each row is  grid-template-columns: minmax(0,1fr) auto

   The label track can shrink to zero and the value track resolves toward
   max-content, so the long address took the whole row and squeezed "Address"
   down to one character wide.

   NOTE ON SPECIFICITY — this is why the first attempt at this fix failed.
   The rule being overridden is  .homepage:not(.arabic-page) .contact-lines a
   which scores (0,3,1). A plain  .contact-lines > a  scores (0,1,1) and loses
   even with !important, because !important only breaks ties at equal
   specificity. Every selector below therefore matches the original's
   specificity or beats it.

   Label track now has a floor and hugs its text; the value takes the rest
   and may wrap. Phone numbers still never break.
   --------------------------------------------------------------------- */
.contact-lines.contact-lines > a,
.contact-lines.contact-lines > div,
.homepage:not(.arabic-page) .contact-lines > a,
.homepage:not(.arabic-page) .contact-lines > div,
.product-guide:not(.arabic-page) .contact-lines > a,
.product-guide:not(.arabic-page) .contact-lines > div,
.arabic-page .contact-lines > a,
.arabic-page .contact-lines > div{
  display: grid !important;
  grid-template-columns: minmax(6em, auto) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px 20px !important;
}

/* Labels stay on one line and never collapse. */
.contact-lines.contact-lines > a > span,
.contact-lines.contact-lines > div > span,
.homepage:not(.arabic-page) .contact-lines > a > span,
.homepage:not(.arabic-page) .contact-lines > div > span,
.product-guide:not(.arabic-page) .contact-lines > a > span,
.product-guide:not(.arabic-page) .contact-lines > div > span{
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  line-height: 1.35;
}

/* Values wrap, right-aligned to a common edge. */
.contact-lines.contact-lines strong,
.homepage:not(.arabic-page) .contact-lines strong,
.product-guide:not(.arabic-page) .contact-lines strong{
  white-space: normal !important;
  overflow-wrap: break-word !important;
  justify-self: end !important;
  text-align: end !important;
  line-height: 1.4 !important;
  max-width: 100% !important;
}

/* Phone numbers must never break mid-number. */
.contact-lines.contact-lines a[href^="tel:"] strong,
.homepage:not(.arabic-page) .contact-lines a[href^="tel:"] strong,
.product-guide:not(.arabic-page) .contact-lines a[href^="tel:"] strong{
  white-space: nowrap !important;
}

/* Arabic: Latin values stay upright, the address reads right-to-left. */
.arabic-page .contact-lines strong{
  white-space: normal !important;
  text-align: end !important;
  direction: ltr;
  unicode-bidi: isolate;
}
.arabic-page .contact-lines .addr strong{ direction: rtl; }

/* Narrow screens: stack the label above the value rather than squeezing. */
@media (max-width: 560px){
  .contact-lines.contact-lines > a,
  .contact-lines.contact-lines > div,
  .homepage:not(.arabic-page) .contact-lines > a,
  .homepage:not(.arabic-page) .contact-lines > div,
  .product-guide:not(.arabic-page) .contact-lines > a,
  .product-guide:not(.arabic-page) .contact-lines > div{
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
  .contact-lines.contact-lines strong,
  .homepage:not(.arabic-page) .contact-lines strong,
  .product-guide:not(.arabic-page) .contact-lines strong{
    justify-self: start !important;
    text-align: start !important;
  }
}


/* ---------------------------------------------------------------------
   FIX 2 — "Contact" sitting higher than the other navigation items
   ---------------------------------------------------------------------
   The dropdown items are <button class="nav-trigger"> with padding:8px 2px.
   "Contact" is a bare <a> inheriting styles.css:38, which has no padding and
   a different line box, so the two do not share a vertical centre.

   Bare navigation links now carry the same box metrics as the triggers.
   --------------------------------------------------------------------- */
.nav nav{
  align-items: center !important;
}
#mainNav > a:not(.lang-switch):not(.nav-cta){
  display: inline-flex;
  align-items: center;
  padding: 8px 2px;
  line-height: 1.2;
  border-radius: 10px;
  white-space: nowrap;
}
#mainNav > a:not(.lang-switch):not(.nav-cta):hover,
#mainNav > a:not(.lang-switch):not(.nav-cta):focus-visible{
  color: var(--blue);
}
/* A little air between the last link and the language switch. */
#mainNav > a:not(.lang-switch):not(.nav-cta) + .lang-switch{
  margin-inline-start: 6px;
}
/* In the stacked mobile / product-guide menu these revert to full-width rows. */
@media (max-width: 900px){
  #mainNav > a:not(.lang-switch):not(.nav-cta){
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 15px;
  }
}
@media (max-width: 1024px){
  .product-guide #mainNav > a:not(.lang-switch):not(.nav-cta){
    display: flex;
    width: 100% !important;
    min-height: 44px;
    padding: 11px 12px !important;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 15px;
  }
}


/* ---------------------------------------------------------------------
   FIX 3 — hero eyebrow wrapping around the logo card
   ---------------------------------------------------------------------
   styles.css:1623 sets  .homepage .hero-logos { display:inline-flex }
   so the logo card is an inline box. The eyebrow that follows it is an
   inline <span>, so "SPECIALIZED" flowed onto the same line to the right of
   the card and the rest of the phrase wrapped underneath.

   The card keeps hugging its contents but becomes block-level, and the
   eyebrow is given its own line.
   --------------------------------------------------------------------- */
.homepage .hero-logos{
  display: flex !important;
  width: fit-content !important;
  max-width: 100% !important;
}
.hero-copy > .eyebrow,
.pdp-hero .eyebrow{
  display: block;
  margin-bottom: 6px;
}


/* ---------------------------------------------------------------------
   ADDITION — "View product" button on every homepage product card
   ---------------------------------------------------------------------
   Each card in #accessories and #brands now links to its own product page.
   The card becomes a flex column so the button sits on the baseline of the
   card regardless of how long the description above it runs.
   --------------------------------------------------------------------- */
.accessories-grid article,
.premium-brand-grid article,
.product-grid article{
  display: flex;
  flex-direction: column;
}
.accessories-grid article > .size-pills,
.premium-brand-grid article > .size-pills,
.product-grid article > .size-pills{
  margin-bottom: 4px;
}
.product-link{
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid #cfdde8;
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.product-link + .product-link{ display: none; }   /* guard against double insertion */
.product-link:hover,
.product-link:focus-visible{
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.product-link span{ font-size: 12px; opacity: .85; }
/* Cards sitting on the soft grey band get a slightly stronger edge. */
.section.soft .product-link{ border-color: #c6d6e3; }
/* Arabic: the arrow already points the right way; keep the button LTR-safe. */
.arabic-page .product-link{ align-self: flex-start; }
@media (max-width: 640px){
  .product-link{ width: 100%; justify-content: center; }
}


/* ---------------------------------------------------------------------
   FIX 4 — dropdown vanishes before the pointer can reach it
   ---------------------------------------------------------------------
   styles.css:1895 positions the panel at  top: calc(100% + 16px).
   That 16px is dead space: it belongs to neither the trigger nor the panel,
   so moving the pointer down crosses ground that is outside .nav-group,
   mouseleave fires, and the menu closes before you arrive.

   The panel now sits flush and carries an invisible bridge across the gap.
   Because the bridge is part of the panel, the pointer never leaves
   .nav-group on the way down. script.js also adds a short close delay.
   --------------------------------------------------------------------- */
.nav-dropdown{
  top: 100% !important;
  margin-top: 16px;
}
.nav-dropdown::before{
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -18px;
  height: 18px;
}
/* Widen the catch area either side so a diagonal path down still lands. */
.nav-dropdown.mega::before{ inset-inline: -20px; }
.nav-stack .nav-dropdown{ margin-top: 0; }
.nav-stack .nav-dropdown::before{ display: none; }


/* ---------------------------------------------------------------------
   FIX 5 — product pages showed a hamburger on full-size desktops
   ---------------------------------------------------------------------
   styles.css has three cascading blocks — max-width:1350px, 1450px and
   1900px — that collapse .product-guide navigation into a hamburger. All
   77 product and category pages carry body class="product-guide", so on
   any screen narrower than 1900px (which is nearly every desktop) the
   horizontal menu never appeared at all.

   Those blocks were written for the old product-guide navigation, which had
   more top-level items than the new menu does. The horizontal menu is
   restored from 1025px up; below that the hamburger is correct and stays.
   --------------------------------------------------------------------- */
@media (min-width: 1025px){
  .product-guide .menu-btn{ display: none !important; }

  .product-guide #mainNav{
    display: flex !important;
    position: static !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    inset: auto !important;
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 14px !important;
    z-index: auto !important;
  }

  .product-guide #mainNav > a{
    width: auto !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
    text-align: start !important;
    border-bottom: 0 !important;
    border-radius: 10px !important;
  }
  .product-guide #mainNav > a.nav-cta{
    justify-content: center !important;
    padding: 11px 16px !important;
  }

  /* Dropdowns float above the page again rather than pushing it open. */
  .product-guide .nav-group{ display: flex !important; width: auto !important; }
  .product-guide #mainNav .nav-trigger{
    width: auto !important;
    justify-content: flex-start !important;
    padding: 8px 2px !important;
    border-bottom: 0 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
  }
  .product-guide .nav-dropdown{
    position: absolute !important;
    inset-inline-start: -14px;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    box-shadow: var(--shadow) !important;
    padding: 24px !important;
    min-width: 262px;
    z-index: 70 !important;
  }
  .product-guide .nav-dropdown.mega{ width: min(860px, 90vw) !important; }
  .product-guide .nav-dropdown.align-end{
    inset-inline-start: auto;
    inset-inline-end: -14px;
  }
  .product-guide .nav-col + .nav-col{ margin-top: 0 !important; }
}

/* Between 1025 and 1240px the row is tight — tighten spacing, not layout. */
@media (min-width: 1025px) and (max-width: 1240px){
  .nav nav{ gap: 12px !important; }
  #mainNav .nav-trigger{ font-size: 13px !important; }
  #mainNav > a:not(.lang-switch):not(.nav-cta){ font-size: 13px; }
  #mainNav .lang-switch{ padding: 6px 9px !important; font-size: 11px !important; }
}


/* ---------------------------------------------------------------------
   ADDITION — small credit line at the very end of the footer
   --------------------------------------------------------------------- */
.site-credit{
  display: block;
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: rgba(185, 203, 217, .62);
}
.site-credit a{
  color: rgba(185, 203, 217, .82);
  text-decoration: none;
  border-bottom: 1px solid rgba(185, 203, 217, .28);
}
.site-credit a:hover,
.site-credit a:focus-visible{
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, .5);
}
