/* ===========================================================================
   desktop-nav-v8.css -- Eye-Shop desktop navigation v8 (Πακέτο Β)
   Desktop-only (min-width:768px). Mobile uses mobile-nav drawer, untouched.
   Restyles the existing navbar shell + the NEW meganav (mgn-*) megamenu
   content served by meganav{1,2,3}-v8.inc. No JS dependencies: the legacy
   script2016 hover just toggles the container; panes use native CSS scroll.
   =========================================================================== */

/* USPs in the top blue strip: hidden by default (all viewports) so they never
   crowd the phone number / login icons on mobile & tablet. Shown only >=1200px
   where the bar has room. Does NOT rely on Bootstrap .visible-lg (unreliable here). */
/* High-specificity selector: mobile-nav.css has
   `.navbar-top .userMenu > li { display:inline-block !important }` (<=767px)
   which would otherwise beat a bare .mgn-usp and re-show the USPs on phones. */
.mgn-usp,
.navbar-top .userMenu > li.mgn-usp { display: none !important; }
@media (min-width: 1200px) {
  .mgn-usp,
  .navbar-top .userMenu > li.mgn-usp { display: inline-block !important; float: left; white-space: nowrap; }
}
/* 2026-07-17: the 3rd USP was removed from the markup (it made the strip wrap
   to a 2nd line at 1200-1479px). The two remaining USPs fit from 1200px up;
   white-space:nowrap above guards against mid-item breaks. */

/* The blue strip's own responsive markup also relies on Bootstrap visible-lg /
   hidden-lg, which the per-page (uncss'd) stylesheets implement unreliably.
   Enforce them here, SCOPED to the top bar only: on small screens hide the
   desktop-only bits (phone number text, large flags); on large screens hide
   the mobile-only icons. */
@media (max-width: 1199px) {
  .navbar-top .visible-lg { display: none !important; }
}
@media (min-width: 1200px) {
  .navbar-top .hidden-lg { display: none !important; }
}

@media (min-width: 768px) {

  /* ---------- utility top bar: keep the site's blue strip, just add USPs ----------
     USPs styled here but kept HIDDEN until >=1200px (see rule below the media block)
     so they never crowd the phone number / icons on mobile & tablet. */
  .mgn-usp {
    list-style: none;
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 30px;
    color: #364f6b;
    padding-right: 8px;
    letter-spacing: .2px;
    text-transform: none;
  }
  .mgn-usp i { color: #1f7d44; margin-right: 5px; }

  /* ---------- main bar typography ---------- */
  .mgn-home { display: none !important; }   /* the logo is the home link */
  .navbar-tshop .navbar-nav > li > a {
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1px;
    padding-left: 12px;
    padding-right: 12px;
    color: #1A1A1A;
    transition: color .15s;
  }
  .navbar-tshop .navbar-nav > li > a:hover,
  .navbar-tshop .navbar-nav > li.hover > a,
  .navbar-tshop .navbar-nav > li.open > a {
    color: #5089b0;
    background: transparent;
  }
  /* 2026-07-17: on ~1200-1449px laptops the menu + right icons (wishlist/cart)
     did not fit and the icons WRAPPED to a second row (user report, brand pages).
     Compress menu typography/padding in that zone so everything stays on one line. */
  @media (min-width: 992px) and (max-width: 1449px) {
    .navbar-tshop .navbar-nav > li > a {
      font-size: 11.5px;
      letter-spacing: .3px;
      padding-left: 7px;
      padding-right: 7px;
    }
  }
  .navbar-tshop .navbar-nav > li > a .caret { opacity: .35; }

  /* offers item: subtle red accent */
  .mgn-offers-item > a { color: #B00020 !important; }
  .mgn-offers-item > a:hover { color: #8d0019 !important; }

  /* wishlist icon next to cart: flex-centered in a fixed 50px row so it lines
     up with the cart icon on every page (per-page navbars pad the cart toggle
     differently - absolute paddings here would misalign on some pages) */
  .mgn-wish {
    float: left;
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 14px 0 6px;
    color: #364f6b;
    font-size: 14px;
  }
  .mgn-wish:hover { color: #B00020; }

  /* ---------- megamenu panel (the dropdown shell) ---------- */
  .megamenu .dropdown-menu.navbuttcontainer {
    border: 0;
    border-top: 1px solid #E8ECEF;
    border-radius: 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
    padding: 0;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }
  /* lenses menu opens via our own JS - force full width like the others
     (the old theme has a competing .megamenu-fullwidth{width:auto}) */
  #meganavLenses .dropdown-menu.navbuttcontainer {
    width: 100% !important;
    left: 0;
    right: 0;
  }

  /* ---------- meganav v8 content ---------- */
  .mgn-v8 { display: block; background: #fff; }
  .megamenu .dropdown-menu li.megamenu-content.mgn-v8 { padding: 0; }
  .mgn-v8 .mgn-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr) 360px;
    gap: 36px;
    padding: 10px 36px 12px;
    align-items: start;
  }
  .mgn-v8 .mgn-grid.mgn-grid-3 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr);
  }
  .mgn-v8 .mgn-grid.mgn-grid-2v {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) 360px;
  }
  .mgn-v8 .mgn-grid.mgn-grid-4t {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /* explicit placement so the 3 items never wrap onto a 2nd row,
     regardless of the old theme's width:auto dropdown quirks */
  .mgn-v8 .mgn-grid-2v > .mgn-col:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .mgn-v8 .mgn-grid-2v > .mgn-col:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .mgn-v8 .mgn-grid-2v > .mgn-visual { grid-column: 3; grid-row: 1; }

  .mgn-v8 .mgn-head {
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #5089b0;
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-bottom: 1px solid #E8ECEF;
  }
  .mgn-v8 .mgn-head.mgn-gap { margin-top: 10px; }

  .mgn-v8 .mgn-col a {
    display: block;
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #1A1A1A;
    padding: 2.5px 0;
    transition: color .12s, padding-left .12s;
  }
  .mgn-v8 .mgn-col a:hover { color: #5089b0; padding-left: 4px; }
  .mgn-v8 .mgn-col a.mgn-hot { color: #B00020; font-weight: 600; }
  .mgn-v8 .mgn-col a.mgn-hot:hover { color: #8d0019; }
  .mgn-v8 .mgn-col a.mgn-all {
    margin-top: 12px;
    font-weight: 600;
    font-size: 12.5px;
    color: #5089b0;
  }
  .mgn-v8 .mgn-col a.mgn-all:hover { text-decoration: underline; }

  /* A-Z brand pane: native thin scrollbar, no plugins */
  .mgn-v8 .mgn-az {
    max-height: 270px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #C9D0D6 transparent;
    padding-right: 10px;
  }
  .mgn-v8 .mgn-az::-webkit-scrollbar { width: 6px; }
  .mgn-v8 .mgn-az::-webkit-scrollbar-track { background: transparent; }
  .mgn-v8 .mgn-az::-webkit-scrollbar-thumb { background: #C9D0D6; border-radius: 3px; }
  .mgn-v8 .mgn-az a {
    display: block;
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    font-size: 12.5px;
    color: #1A1A1A;
    padding: 3.5px 0;
    border: 0;
  }
  .mgn-v8 .mgn-az a:hover { color: #5089b0; padding-left: 4px; }

  /* visual merchandising panel */
  .mgn-v8 .mgn-visual {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 300px;
    max-height: 420px;
  }
  .mgn-v8 .mgn-visual img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
  }
  /* compact visual for the Φακοί Οράσεως menu: fixed height, pinned to top */
  .mgn-v8 .mgn-grid-2v .mgn-visual {
    height: 320px;
    min-height: 0;
    align-self: start;
  }
  .mgn-v8 .mgn-visual:hover img { transform: scale(1.03); }
  .mgn-v8 .mgn-visual-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 46px 18px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.62));
    color: #fff;
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  }
  .mgn-v8 .mgn-visual-label b {
    display: block;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px;
  }
  .mgn-v8 .mgn-visual-label span {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: .9;
    margin-top: 2px;
  }

}

/* mobile: meganav content is desktop-only (mobile uses the drawer) */
@media (max-width: 767px) {
  .mgn-usp { display: none; }
  .mgn-wish { display: none; }
}

/* Global horizontal-overflow guard (2026-08-07): selides me Bootstrap .row xwris .container
   (arthra/info pages) ksexeilizan liga px -> monimo orizontio scrollbar. To clip (oxi hidden!)
   DEN dimiourgei scroll container ara DEN spaei ta position:sticky (PDP gallery/buy bar). */
html, body { overflow-x: clip; }

/* 23/9/2026: ΘΕΜΑΤΑ megamenu - latest-article rows with thumbnail */
@media (min-width: 768px) {
  .mgn-v8 .mgn-col a.mgn-news { display: flex; align-items: center; gap: 10px; padding: 5px 0; line-height: 1.3; }
  .mgn-v8 .mgn-col a.mgn-news img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; flex: none; background: #f2f4f6; }
  .mgn-v8 .mgn-col a.mgn-news span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
  .mgn-v8 .mgn-col a.mgn-news:hover { padding-left: 0; }
  .mgn-v8 .mgn-col a.mgn-news:hover span { color: #5089b0; }
}
