/* Header Main Flexbox Layout */
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  padding: 8px 0;
  min-height: 60px;
}

/* Left Section */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-left .logo {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
}

.header-left .logo i {
  color: #ef4444;
  font-size: 22px;
  line-height: 1;
}

.pro-desc {
  color: #000000 !important;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.gst-badge {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #e5e7eb !important;
  font-size: 12px !important;
  padding: 4px 8px !important;
  font-weight: 700;
  border-radius: 4px;
  white-space: nowrap;
}

/* Center Section - Search */
.header-center {
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
}

.search-form {
  display: flex;
  width: 100%;
  gap: 0;
}

.search-category {
  min-width: 120px;
  max-width: 150px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #000000;
  border-radius: 6px 0 0 6px;
  padding: 0 10px;
  height: 40px;
  border-right: none;
  font-size: 14px;
}

.search-input {
  flex: 1;
  height: 40px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #000000;
  border-left: none;
  border-right: none;
  padding: 0 15px;
  font-size: 14px;
}

.search-input::placeholder {
  color: #6b7280;
}

.search-btn {
  height: 40px;
  border: 1px solid #ed6dcf;
  background: #ed6dcf;
  color: #111827;
  border-radius: 0 6px 6px 0;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

/* Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.sales-support {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #000000;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 1 !important;
}

.sales-support i {
  font-size: 14px;
}

.account-link,
.account-dropdown .account-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #000000 !important;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.account-link span {
  font-weight: 600;
}

.account-link small {
  color: #000000 !important;
  font-size: 12px;
  font-weight: 400;
}

.account-dropdown {
  position: relative;
}

.account-dropdown .dropdown-menu {
  background: #ed6dcf;
  border: 1px solid #1f2937;
  border-radius: 8px;
  margin-top: 5px;
  min-width: 180px;
}

.account-dropdown .dropdown-item {
  color: #e5e7eb !important;
  font-size: 13px;
  padding: 8px 16px;
}

.account-dropdown .dropdown-item:hover {
  background: #111827;
  color: #ffffff !important;
}

.inquiry-btn {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #000000 !important;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.inquiry-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #000000 !important;
}

.cart-icon {
  position: relative;
  color: #000000;
  font-size: 20px;
  text-decoration: none;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.cart-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #dc2626;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
  .header-main {
    gap: 10px;
  }

  .header-center {
    margin: 0 15px;
    max-width: 400px;
  }

  .search-category {
    min-width: 100px;
    max-width: 120px;
  }

  .header-right {
    gap: 10px;
  }

  .sales-support {
    font-size: 12px;
    padding: 5px 10px;
  }

  .inquiry-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 991.98px) {
  .header-main {
    flex-wrap: wrap;
    white-space: normal;
    overflow: visible;
    justify-content: center;
    gap: 10px;
  }

  .header-left,
  .header-center,
  .header-right {
    flex: 1 1 100%;
    justify-content: center;
    margin: 0;
  }

  .header-center {
    max-width: none;
    order: -1;
  }
}

/* Sticky footer layout */
html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

footer.footer {
  margin-top: auto;
}

/* Overall header theme */
header.site-header {
  background: #ed6dcf !important;
  color: #fff;
}

/* Second row menu (fully tight) */
.ss-menu {
  background: #ffffff;
  border-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  line-height: 1;
}

.ss-menu .navbar {
  min-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}

.ss-menu .container-fluid {
  padding-top: 0;
  padding-bottom: 0;
}

.ss-menu .navbar-collapse {
  padding-top: 0;
  padding-bottom: 0;
}

.ss-menu .navbar-nav {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  align-items: center;
  line-height: 1 !important;
}

.ss-menu .nav-item {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1 !important;
  display: flex;
  align-items: center;
  position: relative;
}

.ss-menu .nav-link {
  color: #000000 !important;
  padding: 0 10px !important;
  font-size: 15px;
  display: flex;
  align-items: center;
  line-height: 1 !important;
}

.ss-menu .nav-link:hover {
  color: #ed6dcf !important;
}

.ss-menu .dropdown-menu {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
}

.ss-menu .dropdown-item {
  color: #000000;
  font-size: 13px;
  padding: 8px 16px;
  transition: all 0.2s ease;
}

.ss-menu .dropdown-item:hover {
  background: #f9fafb;
  color: #ed6dcf;
}

.ss-menu .dropdown-item:focus {
  background: #f9fafb;
  color: #ed6dcf;
}

.ss-menu .dropdown-item strong {
  color: #ed6dcf;
  font-size: 14px;
}

.ss-menu .dropdown-divider {
  border-color: #e5e7eb;
  margin: 0.5rem 0;
}

/* Desktop: Show dropdown on hover */
@media (min-width: 992px) {
  .ss-menu .nav-item.dropdown:hover .dropdown-menu {
    display: block;
  }

  .ss-menu .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
  }

  .ss-menu .nav-item.dropdown.show .dropdown-menu {
    display: block;
  }
}

/* Home icon tight fit */
.ss-menu .nav-link .bi-house-door {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  margin: 0 6px 0 0;
  position: relative;
  top: -1px;
}

/* Mobile adjustments */
@media (max-width: 991.98px) {
  /* Mobile app-like top bar */
  .ss-mobilebar {
    background: #0f172a;
    border-bottom: 1px solid #1f2937;
  }

  .ss-mobilebar .logo {
    color: #fff;
    font-weight: 800;
    letter-spacing: .2px;
  }

  .ss-mobilebar .btn {
    line-height: 1;
  }

  .ss-mobilebar .btn:focus {
    box-shadow: none;
  }

  /* Mobile main menu (collapsed by default) */
  .ss-menu {
    border-top: 1px solid #1f2937;
  }

  .ss-menu .navbar {
    padding: 0;
  }

  .ss-menu .navbar-collapse {
    background: #0b1220;
    border-top: 1px solid #1f2937;
  }

  .ss-menu .navbar-collapse.collapse {
    display: none !important;
  }

  .ss-menu .navbar-collapse.collapse.show {
    display: block !important;
  }

  .ss-menu .navbar-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 6px 8px;
    gap: 4px;
  }

  .ss-menu .nav-item {
    width: 100%;
    position: relative;
  }

  .ss-menu .nav-item.dropdown {
    display: block;
  }

  .ss-menu .nav-link {
    display: block;
    text-align: left;
    padding: 12px 12px !important;
    border-radius: 8px;
    line-height: 1.3 !important;
    font-size: 15px;
  }

  .ss-menu .nav-link:hover {
    background: #111827;
  }

  .ss-menu .nav-link.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .ss-menu .dropdown-menu {
    position: static !important;
    float: none;
    background: rgba(17, 24, 39, 0.5);
    border: none;
    border-left: 2px solid #22c55e;
    padding: 4px 0 4px 14px;
    margin-top: 4px;
    margin-left: 12px;
    border-radius: 0;
    display: none;
  }

  .ss-menu .dropdown-menu.show {
    display: block;
  }

  .ss-menu .dropdown-item {
    padding: 8px 10px;
    border-radius: 6px;
    line-height: 1.25;
    font-size: 14px;
  }

  .ss-menu .dropdown-item:hover {
    background: #111827;
  }

  .ss-menu .dropdown-item strong {
    color: #22c55e;
    font-size: 15px;
    display: block;
    margin-bottom: 4px;
  }

  .ss-menu .dropdown-divider {
    border-color: #1f2937;
    margin: 4px 0;
  }

  .ss-menu .dropdown-toggle::after {
    margin-left: auto;
  }

  .ss-topbar .row>div {
    margin-bottom: 8px;
  }

  .ss-actions {
    justify-content: flex-start;
    gap: 10px;
  }

  .ss-search-wrap {
    flex-wrap: wrap;
  }

  .ss-cat {
    border-radius: 6px;
  }

  .ss-input {
    flex: 1 1 100%;
    border-radius: 6px;
    border-left: 1px solid #1f2937;
    margin-top: 6px;
  }

  .ss-btn {
    border-radius: 6px;
    margin-top: 6px;
  }

  /* Make collapsed mobile search breathe */
  #ssMobileSearch .ss-search-wrap {
    gap: 8px;
  }

  #ssMobileSearch .ss-cat {
    min-width: 110px;
  }
}

@media (min-width: 992px) {
  /* Desktop: fix the entire header to the very top */
  header.site-header {
    position: fixed;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 1035;
    margin-top: 0 !important;
    border-top: 0 !important;
  }

  /* Menu lives inside fixed header; no additional sticky to avoid gaps */
  .ss-menu {
    position: static;
    box-shadow: none;
  }

  /* Class hook remains harmless if present */
  header.site-header.hdr-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1035;
  }
}

/* Body padding helper when header is fixed (JS will override exact value). */
body.has-fixed-header {
  padding-top: 88px;
}