/* ===============================
   GLOBAL RESET
================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, Arial, sans-serif;
}

body {
  background: #f8f9fa;
  color: #333;
  line-height: 1.4;
}

/* Utility */
.container {
  width: 92%;
  max-width: 1200px;
  margin: auto;
}

/* ===============================
   HEADER
================================= */
.ms-header {
  background: #fff;
  border-bottom: 1px solid #e3e3e3;
  padding: 12px 0;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO BLOCK */
.logo-block {
  text-decoration: none;
  color: #000;
  display: inline-block;
}

.site-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1;
}

.site-tagline {
  font-size: 13px;
  color: #555;
  margin-top: -2px;
}

/* NAV ACTIONS */
.nav-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.btn-link {
  color: #0077cc;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-primary {
  background: #0077cc;
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: #005fa3;
}

/* ===============================
   HERO SECTION
================================= */
.hero {
  text-align: center;
  padding: 50px 0 40px;
  background: #eef5ff;
  border-bottom: 1px solid #d7e3ff;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 16px;
  color: #444;
  margin-bottom: 30px;
}

/* SEARCH BAR */
.search-form {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.search-form input {
  width: 60%;
  max-width: 480px;
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #bbb;
}

.search-form button {
  padding: 12px 18px;
  background: #0077cc;
  border: none;
  color: #fff;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
}

.search-form button:hover {
  background: #005fa3;
}

.hero-tip {
  margin-top: 12px;
  font-size: 14px;
  color: #666;
}

/* ===============================
   FOOTER
================================= */
.ms-footer {
  background: #fff;
  padding: 20px 0;
  border-top: 1px solid #e3e3e3;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links a {
  margin-left: 16px;
  color: #0077cc;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ===============================
   MODALS (Login / Register / Forgot / RFQ)
================================= */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: #fff;
  padding: 25px 28px;
  border-radius: 10px;
  width: 95%;
  max-width: 420px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: relative;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Close Button */
.modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 20px;
  cursor: pointer;
  border: none;
  background: none;
}

/* Modal Forms */
.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-bottom: 14px;
  font-size: 15px;
}

.modal-content button {
  width: 100%;
  padding: 12px;
  background: #0077cc;
  border-radius: 8px;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.modal-content button:hover {
  background: #005fa3;
}
/* Remove underline on header links */
.ms-header a {
    text-decoration: none !important;
}

/* Logo styling */
.logo-block {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    padding: 4px 0;
}

.site-title {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(90deg, #007bff, #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.site-tagline {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-top: 2px;
}

/* Header Links */
.nav-actions .btn-link {
    padding: 8px 10px;
    font-weight: 500;
    transition: 0.2s;
}

.nav-actions .btn-link:hover {
    color: #007bff;
}

/* RFQ Button */
.nav-actions .btn-primary {
    background: #ff6b00;
    padding: 8px 14px;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.2s;
}

.nav-actions .btn-primary:hover {
    background: #e65d00;
}
/* Header */
.ms-header a { text-decoration: none !important; }

/* Logo */
.logo-block { display:flex; flex-direction:column; line-height:1.1; }
.site-title {
  font-size:28px; font-weight:800; 
  background:linear-gradient(90deg,#007bff,#00c6ff);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.site-tagline { font-size:13px; font-weight:500; color:#666; margin-top:2px; }

/* Header Links */
.nav-actions .btn-link { padding:8px 10px; font-weight:500; }
.nav-actions .btn-link:hover { color:#007bff; }
.nav-actions .btn-primary {
  background:#ff6b00; padding:8px 14px; color:#fff; border-radius:6px; font-weight:600;
}
.nav-actions .btn-primary:hover { background:#e65d00; }

/* Modal common */
.modal { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); justify-content:center; align-items:center; z-index:1000; }
.modal.show { display:flex; }
.modal-dialog { background:#fff; padding:20px; border-radius:8px; width:100%; max-width:420px; position:relative; }
.close-btn { position:absolute; top:10px; right:10px; background:none; border:none; font-size:18px; cursor:pointer; }
/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden !important;
}

/* Containers must not force width */
.container, .header-flex, .hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}/* ===========================
   MODAL SYSTEM (FIXED)
   =========================== */

.ms-modal {
    display: none;                 /* Hidden by default */
    position: fixed;
    z-index: 9999;                 /* On top of everything */
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.55);  /* Overlay */
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.ms-modal.active {
    display: flex;  /* SHOW modal */
}

.ms-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    animation: fadeSlide 0.25s ease-out;
}

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ms-modal-content h2 {
    margin-top: 0;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Close button */
.ms-modal-content .close-modal {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #555;
    transition: 0.2s;
}
.ms-modal-content .close-modal:hover {
    color: #000;
}

/* Inputs */
.ms-modal-content input,
.ms-modal-content textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}

.ms-modal-content textarea {
    resize: vertical;
}

/* Buttons */
.ms-modal-content .btn-primary {
    width: 100%;
    padding: 12px;
    background: #0066ff;
    border: none;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.ms-modal-content .btn-primary:hover {
    background: #004fcc;
}/* ACCOUNT DROPDOWN WRAPPER */
.account-dropdown-container {
    position: relative;
    display: inline-block;
}

.account-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s ease;
}

.account-btn:hover {
    background: #f5f5f5;
}

/* DROPDOWN BOX */
.account-dropdown {
    position: absolute;
    right: 0;
    top: 48px;
    width: 220px;
    background: #fff;
    border-radius: 14px;
    padding: 8px 0;
    box-shadow: 0 10px 26px rgba(0,0,0,0.16);
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.25s ease;
    z-index: 999;
}

.account-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ITEMS */
.account-dropdown a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}

.account-dropdown a:hover {
    background: #f8f8f8;
}
.account-dropdown {
    display: none;
}
.account-dropdown.show {
    display: block;
}.account-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  padding: 10px 0;
  z-index: 999;
}

.account-dropdown.show {
  display: block;
}

.account-dropdown a {
  display: block;
  padding: 10px 18px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

.account-dropdown a:hover {
  background: #f5f5f5;
}
.account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 10px;
    padding: 10px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 999999;   /* FIXED */
}

.account-dropdown.open {
    display: block;
}/* ============= FORCE SEARCH BAR VISIBLE ============= */
.search-section,
.global-search-section,
.ms-search-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}.form-msg {
  display: none;
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
}
.form-msg.success {
  background: #e8f7ee;
  color: #0a7a3d;
}
.form-msg.error {
  background: #fdecea;
  color: #b42318;
}

