/* Shared site-wide styles: linked from every page's <head> */

/* Logo: transparent PNG sits straight on the header, same size on every page */
.brand-logo {
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 190px !important;
  height: 70px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: fill; display: block; }
.brand .brand-name, .brand .brand-tagline { display: none; }   /* the logo already says it */
@media (max-width: 900px) {
  .brand-logo { width: 150px !important; height: 56px !important; }
}

/* no blue flash when the logo link is clicked or tapped */
.brand,
.brand * {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.brand:focus:not(:focus-visible) { outline: none; }

/* ===== mobile categories drawer ===== */
.cm-burger { display: none; width: 44px; height: 44px; border: none; background: none; padding: 0;
  cursor: pointer; align-items: center; justify-content: center; color: #1565A8;
  -webkit-tap-highlight-color: transparent; }
@media (max-width: 900px) {
  .cm-burger { display: flex; grid-area: menu; }
  .cat-nav { display: none !important; }
  .header-wrap {
    grid-template-columns: auto 1fr auto auto !important;
    grid-template-areas: "menu brand account cart" "search search search search" "loc loc loc loc" !important;
  }
}
.cm-drawer-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.55); opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease; z-index: 99990; }
.cm-drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(100%, 420px); background: #fff;
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .28s ease;
  z-index: 99991; box-shadow: 0 0 40px rgba(0,0,0,.3); }
body.cm-menu-open { overflow: hidden; }
body.cm-menu-open .cm-drawer-overlay { opacity: 1; visibility: visible; }
body.cm-menu-open .cm-drawer { transform: translateX(0); }
.cm-drawer-head { flex: 0 0 auto; height: 64px; padding: 0 12px 0 22px; background: #1565A8; color: #fff;
  display: flex; align-items: center; justify-content: space-between; font-size: 19px; font-weight: 700; }
.cm-drawer-close { border: none; background: none; color: #fff; font-size: 38px; line-height: 1; width: 48px; height: 48px; cursor: pointer; }
.cm-drawer-list { flex: 1; overflow-y: auto; padding: 16px; -webkit-overflow-scrolling: touch; }
.cm-cat { background: #f4f4f4; border-radius: 8px; margin-bottom: 4px; overflow: hidden; }
.cm-cat-btn { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; border: none; background: none;
  font-size: 16px; color: #0e4a82; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cm-ico { width: 26px; height: 26px; flex: 0 0 26px; fill: none; stroke: #1565A8; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cm-chev { width: 20px; height: 20px; margin-left: auto; flex: 0 0 20px; fill: none; stroke: #6b7280; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.cm-cat.open { background: #eef5fb; }
.cm-cat.open .cm-chev { transform: rotate(180deg); stroke: #1565A8; }
.cm-cat-links { display: none; padding: 2px 16px 14px 56px; }
.cm-cat.open .cm-cat-links { display: block; }
.cm-cat-links a { display: block; padding: 10px 0; font-size: 15px; color: #4b5563; text-decoration: none; }
.cm-cat-links a:active { color: #1565A8; }
.cm-cat-links .cm-h { margin: 12px 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #1565A8; }
@media (prefers-reduced-motion: reduce) { .cm-drawer, .cm-drawer-overlay, .cm-chev { transition: none; } }

/* ===== mobile header: hamburger + logo hard left, account + cart hard right ===== */
@media (max-width: 900px) {
  .header-wrap {
    padding: 8px 10px 8px 4px !important;
    column-gap: 2px !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    grid-template-areas: "menu brand account cart" "search search search search" "loc loc loc loc" !important;
  }
  .cm-burger { margin: 0; justify-self: start; }
  .brand { justify-self: start; min-width: 0; margin: 0; }
  .brand-logo { margin-left: -6px !important; }
  .header-account { justify-self: end; margin-right: 4px; }
  .header-pill.cart { justify-self: end; }
}
@media (max-width: 400px) {
  .brand-logo { width: 132px !important; height: 50px !important; }
}

/* delivery map: no blue tap flash, focus ring or text selection when clicking the map */
#locMap,
#locMap * {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
#locMap:focus,
#locMap div:focus,
#locMap gmp-advanced-marker:focus,
#locMap [tabindex]:focus {
  outline: none !important;
  box-shadow: none !important;
}
#locMap .gm-style iframe + div { border: none !important; }   /* Google's own focus border */

/* "Deliver to" button in the header */
.header-location,
.header-location *,
.loc-confirm,
.sa-card {
  -webkit-tap-highlight-color: transparent;
}

/* Account page: Edit Profile + Change Password side by side, Delete Account underneath */
.acct-actions .prof-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.acct-actions .acct-danger { border-top: 1px solid #e5e7eb; padding-top: 18px; }
.acct-actions .btn-del { margin: 0; }

/* header-ux-v1 */
@media (min-width: 901px) {
  .site-header .header-location { gap: 10px; flex: 0 0 auto; }
  .site-header .header-location .location-text {
    display: flex !important; flex-direction: column !important;
    align-items: flex-start !important; gap: 0 !important;
    line-height: 1.2; min-width: 0;
  }
  .site-header .header-location .location-label { font-size: 11px; color: var(--cm-muted); font-weight: 600; }
  .site-header .header-location .location-address {
    display: block; max-width: 150px; font-size: 13px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .site-header .header-search { flex: 1 1 0 !important; min-width: 260px; max-width: none !important; }
}

/* footer-space-v1: tighter gap between newsletter and footer links */
.site-footer .cmf-newsletter { padding-bottom: 14px !important; }
.site-footer .cmf-news-msg:empty { min-height: 0 !important; margin-top: 0 !important; }
.site-footer .cmf-news-msg { min-height: 0 !important; margin-top: 8px !important; }
.site-footer .cmf-main { padding-top: 18px !important; }
@media (max-width: 640px) {
  .site-footer .cmf-newsletter { padding: 24px 14px 10px !important; }
  .site-footer .cmf-main { padding-top: 14px !important; }
  .site-footer .cmf-heading { margin-bottom: 8px; }
}
