/* ==========================================================================
   Shared Storefront Masthead, Sticky Yellow Nav Bar, Footer & Cart Drawer
   Included by storefront_layout.php so every secondary and orphaned page shares
   the exact homepage typography, sticky-bottom layout, and footer theme.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin-ext-wght.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D1, U+02D8-02DF, U+02E5-02FF, U+0300-036F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --primary-blue: #0d47a1;
  --primary-blue-dark: #082d66;
  --accent-red: #d32f2f;
  --accent-cyan: #00bcd4;
  --accent-cyan-dark: #0097a7;
  --border-color: #d1d9e0;
  --text-secondary: #57606a;
  --sb2-font-stack: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "DejaVu Sans", "Liberation Sans", sans-serif;
}

html {
  font-size: 16px;
  overflow-x: clip;
}

body {
  overflow-x: clip !important;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  font-kerning: normal;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

main#main-content {
  flex: 1 0 auto;
  width: 100%;
}

.site-masthead,
.site-masthead a,
.sticky-nav-wrapper,
.sticky-nav-wrapper a,
.sticky-nav-wrapper button,
.site-footer,
.site-footer a {
  font-family: var(--sb2-font-stack) !important;
  font-kerning: normal;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.site-masthead {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  line-height: 1.5;
  box-sizing: border-box;
  text-align: left;
  width: 100%;
}

.site-masthead *,
.sticky-nav-wrapper *,
.site-footer *,
.cart-drawer * {
  box-sizing: border-box;
}

.masthead-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.masthead-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-iso-logo {
  width: 36px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.site-masthead .brand-name,
.site-masthead a.brand-name:link,
.site-masthead a.brand-name:visited {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: #0d47a1 !important;
  letter-spacing: -0.5px;
  text-decoration: none !important;
  line-height: 1.5;
}

.site-masthead .brand-name:hover {
  color: #0d47a1 !important;
  text-decoration: none !important;
}

.site-masthead .brand-contact {
  font-size: 0.85rem;
  color: #57606a;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  line-height: 1.5;
}

.site-masthead .brand-contact a,
.site-masthead .brand-contact a:link,
.site-masthead .brand-contact a:visited {
  color: #57606a !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: normal;
  line-height: 1.5;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none !important;
}

.site-masthead .brand-contact a:hover {
  color: #0d47a1 !important;
  text-decoration: underline !important;
}

.brand-contact-sep {
  display: inline;
}

/* Sticky Yellow Navigation Bar */
.sticky-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff8e1;
  border-bottom: 2px solid #ffe082;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  line-height: 1.5;
  width: 100%;
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  overflow-x: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-item a,
.nav-item a:link,
.nav-item a:visited {
  display: block;
  padding: 12px 18px;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #0d47a1 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.5;
  position: relative;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s;
}

.nav-item a:hover {
  text-decoration: none !important;
  background: rgba(13, 71, 161, 0.08);
}

.nav-item.active a {
  color: #082d66 !important;
  background: rgba(13, 71, 161, 0.12);
}

.nav-item.active a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #d32f2f;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-account-btn,
a.nav-account-btn:link,
a.nav-account-btn:visited {
  background: #ffffff;
  color: #0d47a1 !important;
  border: 1.5px solid #cbd5e1;
  padding: 7px 12px;
  border-radius: 6px;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  letter-spacing: normal;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.nav-account-btn:hover {
  background: #f1f5f9;
  border-color: #0d47a1;
  text-decoration: none !important;
}

.nav-account-btn.active {
  border-color: #0d47a1;
  background: #eff6ff;
}

.nav-cart-btn,
a.nav-cart-btn:link,
a.nav-cart-btn:visited {
  background: #0d47a1;
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  letter-spacing: normal;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s;
}

.nav-cart-btn:hover {
  background: #082d66;
  text-decoration: none !important;
  color: #ffffff !important;
}

.cart-badge {
  background: #d32f2f;
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}

/* Slide-out Cart Drawer */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
}

.cart-overlay.active {
  display: block;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 420px;
  max-width: 92vw;
  height: 100%;
  background: #f8fafc;
  z-index: 2001;
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.22);
  transition: transform 0.25s ease-in-out;
  display: flex;
  flex-direction: column;
  font-family: var(--sb2-font-stack);
  text-align: left;
  overscroll-behavior: contain;
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 15px 18px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.cart-drawer-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.cart-drawer-close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-drawer-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
}

.cart-drawer-footer {
  padding: 16px 18px;
  border-top: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.04);
}

.cart-drawer-checkout-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff !important;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.98rem;
  font-weight: 800;
  border-radius: 7px;
  letter-spacing: 0.2px;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: background 0.15s;
}

.cart-drawer-checkout-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  text-decoration: none !important;
}

/* Unified Sticky-Bottom Dark Navy Footer */
.site-footer {
  background: var(--primary-blue-dark);
  color: #ffffff;
  text-align: center;
  padding: 18px 16px;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  letter-spacing: normal;
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
}

.site-footer a,
.site-footer a:link,
.site-footer a:visited {
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: 500 !important;
  line-height: inherit !important;
  text-decoration: underline !important;
}

.site-footer a:hover {
  color: #dbeafe !important;
  text-decoration: underline !important;
}

@media (max-width: 767px) {
  .sticky-nav-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-container {
    padding: 0 8px;
    width: 100%;
  }
  .nav-item a,
  .nav-item a:link,
  .nav-item a:visited {
    padding: 10px 10px;
    font-size: 0.82rem !important;
  }
  .nav-account-btn,
  a.nav-account-btn:link,
  a.nav-account-btn:visited {
    padding: 6px 9px;
    font-size: 0.78rem !important;
  }
  .masthead-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .site-masthead .brand-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-top: 3px;
    font-size: 0.78rem;
  }
  .brand-contact-sep {
    display: none;
  }
  .site-masthead .brand-contact a,
  .site-masthead .brand-contact a:link,
  .site-masthead .brand-contact a:visited {
    white-space: nowrap;
    font-size: 0.82rem !important;
  }
}

@media (max-width: 480px) {
  .site-masthead {
    padding: 10px 12px;
  }
  .site-masthead .brand-name,
  .site-masthead a.brand-name:link,
  .site-masthead a.brand-name:visited {
    font-size: 1.2rem !important;
  }
  .nav-item a,
  .nav-item a:link,
  .nav-item a:visited {
    padding: 8px 8px;
    font-size: 0.78rem !important;
  }
}
