/* Header 39 Unified & Inline Styles */
    /* Sticky Header for Mobile & Desktop (Crisp White Bar) */
    #header {
      position: sticky !important;
      top: 0 !important;
      z-index: 99990 !important;
      background: #ffffff !important;
      transition: all 0.3s ease !important;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }
    .header-top {
      background-color: #f8fafc !important;
      border-bottom: 1px solid #eef2f6 !important;
    }
    .header-middle {
      background: #ffffff !important;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    }
    @media (max-width: 991px) {
      #header {
        position: sticky !important;
        top: 0 !important;
        z-index: 99990 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
      }
      .header-middle {
        padding: 8px 0 !important;
        background: #ffffff !important;
      }
    }

    /* Desktop Navigation & Header Controls (Clean & High Contrast on White) */
    @media (min-width: 992px) {
      #remove-megamenu,
      .megamenu-wrapper #remove-megamenu,
      .megamenu-drawer-header,
      #remove-megamenu-btn,
      .megamenu-drawer-close,
      #so-megamenu-backdrop {
        display: none !important;
      }
      .typeheader-39 .container-megamenu.horizontal ul.megamenu > li > a {
        color: #1e293b !important;
        font-weight: 500 !important;
        background: transparent !important;
        transition: color 0.2s ease !important;
      }
      .typeheader-39 .container-megamenu.horizontal ul.megamenu > li > a strong {
        color: #1e293b !important;
        font-weight: 500 !important;
        transition: color 0.2s ease !important;
      }
      .typeheader-39 .container-megamenu.horizontal ul.megamenu > li:hover > a,
      .typeheader-39 .container-megamenu.horizontal ul.megamenu > li.active > a,
      .typeheader-39 .container-megamenu.horizontal ul.megamenu > li:hover > a strong,
      .typeheader-39 .container-megamenu.horizontal ul.megamenu > li.active > a strong {
        color: #0099ff !important;
        background: transparent !important;
      }
      .typeheader-39 #sosearchpro .search {
        background-color: #f8fafc !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 25px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
        transition: all 0.2s ease !important;
      }
      .typeheader-39 #sosearchpro .search:focus-within {
        background-color: #ffffff !important;
        border-color: #0099ff !important;
        box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.15) !important;
      }
      .typeheader-39 ul.signin-w > li > a i,
      .typeheader-39 .shopping_cart .btn-shopping-cart .top_cart .icon-c {
        background-color: #f8fafc !important;
        border: 1.5px solid #e2e8f0 !important;
        color: #1e293b !important;
        transition: all 0.2s ease !important;
      }
      .typeheader-39 ul.signin-w > li > a:hover i,
      .typeheader-39 .shopping_cart .btn-shopping-cart .top_cart:hover .icon-c {
        background-color: #0099ff !important;
        border-color: #0099ff !important;
        color: #ffffff !important;
      }
    }

    /* ---- Header Cart Dropdown & Quickcart Modal Fixes ---- */
    #header,
    header.typeheader-39,
    .typeheader-39 .header-middle,
    .typeheader-39 .header-middle > .container,
    .typeheader-39 .header-middle > .container-full,
    .typeheader-39 .middle2,
    .typeheader-39 .shopping_cart {
      overflow: visible !important;
    }

    .typeheader-39 .shopping_cart .dropdown-menu.shoppingcart-box {
      min-width: 330px !important;
      max-width: 360px !important;
      width: 340px !important;
      position: absolute !important;
      top: 100% !important;
      right: 0 !important;
      left: auto !important;
      transform: none !important;
      background: #ffffff !important;
      border: 1px solid #e5e7eb !important;
      border-radius: 12px !important;
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
      padding: 0 !important;
      margin-top: 8px !important;
      z-index: 999999 !important;
      overflow: hidden !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .content-item {
      max-height: 240px !important;
      overflow-y: auto !important;
      overflow-x: hidden !important;
      padding: 4px 10px !important;
      scrollbar-width: thin;
      scrollbar-color: #d1d5db #f9fafb;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .content-item::-webkit-scrollbar {
      width: 5px;
    }
    .typeheader-39 .shopping_cart .shoppingcart-box .content-item::-webkit-scrollbar-track {
      background: #f9fafb;
    }
    .typeheader-39 .shopping_cart .shoppingcart-box .content-item::-webkit-scrollbar-thumb {
      background: #d1d5db;
      border-radius: 3px;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .table {
      margin-bottom: 0 !important;
      width: 100% !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .table tr {
      border-bottom: 1px solid #f3f4f6 !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .table tr:last-child {
      border-bottom: none !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .table td {
      padding: 8px 4px !important;
      vertical-align: middle !important;
      background: transparent !important;
      font-size: 12px !important;
      color: #374151 !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .size-img-cart {
      width: 44px !important;
      min-width: 44px !important;
      padding-left: 0 !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .size-img-cart img {
      width: 40px !important;
      height: 40px !important;
      object-fit: cover !important;
      border-radius: 6px !important;
      border: 1px solid #e5e7eb !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .col-product-name a {
      color: #111827 !important;
      font-weight: 500 !important;
      font-size: 12px !important;
      text-decoration: none !important;
      display: -webkit-box !important;
      -webkit-line-clamp: 2 !important;
      -webkit-box-orient: vertical !important;
      overflow: hidden !important;
      line-height: 1.35 !important;
      transition: color 0.15s ease !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .col-product-name a:hover {
      color: #4b5563 !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .col-quantity-cart {
      white-space: nowrap !important;
      color: #6b7280 !important;
      font-weight: 500 !important;
      font-size: 11.5px !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .col-total-cart {
      white-space: nowrap !important;
      color: #111827 !important;
      font-weight: 600 !important;
      font-size: 12px !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .btn-remove-item {
      width: 22px !important;
      height: 22px !important;
      padding: 0 !important;
      border-radius: 50% !important;
      background: #f3f4f6 !important;
      color: #9ca3af !important;
      border: none !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      font-size: 10px !important;
      transition: all 0.15s ease !important;
      cursor: pointer !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .btn-remove-item:hover {
      background: #fee2e2 !important;
      color: #ef4444 !important;
    }

    .typeheader-39 .shopping_cart .cart-totals-wrap {
      background: #f9fafb !important;
      border-top: 1px solid #f3f4f6 !important;
      border-bottom: 1px solid #f3f4f6 !important;
      padding: 6px 12px !important;
    }

    .typeheader-39 .shopping_cart .cart-totals-wrap .table-totals td {
      padding: 3px 0 !important;
      font-size: 12px !important;
      color: #4b5563 !important;
      border: none !important;
      background: transparent !important;
    }

    .typeheader-39 .shopping_cart .cart-totals-wrap .table-totals tr:last-child td {
      font-size: 13px !important;
      font-weight: 700 !important;
      color: #111827 !important;
      padding-top: 4px !important;
    }

    .typeheader-39 .shopping_cart .cart-totals-wrap .table-totals tr:last-child .total-amount {
      color: #111827 !important;
      font-size: 13.5px !important;
      font-weight: 700 !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .checkout {
      padding: 8px 12px !important;
      background: #ffffff !important;
      display: flex !important;
      gap: 8px !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .btn-view-cart {
      flex: 1 1 50% !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 6px !important;
      background: #ffffff !important;
      color: #374151 !important;
      border: 1px solid #d1d5db !important;
      border-radius: 6px !important;
      padding: 7px 10px !important;
      font-size: 12px !important;
      font-weight: 500 !important;
      text-decoration: none !important;
      transition: all 0.15s ease !important;
      cursor: pointer !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .btn-view-cart:hover {
      background: #f9fafb !important;
      color: #111827 !important;
      border-color: #9ca3af !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .btn-checkout {
      flex: 1 1 50% !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 6px !important;
      background: #18181b !important;
      color: #ffffff !important;
      border: 1px solid #18181b !important;
      border-radius: 6px !important;
      padding: 7px 10px !important;
      font-size: 12px !important;
      font-weight: 600 !important;
      text-decoration: none !important;
      box-shadow: none !important;
      transition: all 0.15s ease !important;
      cursor: pointer !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .btn-checkout:hover {
      background: #000000 !important;
      border-color: #000000 !important;
      color: #ffffff !important;
      transform: none !important;
    }

    .typeheader-39 .shopping_cart .shoppingcart-box .empty {
      padding: 20px 16px !important;
      color: #6b7280 !important;
      font-size: 13px !important;
      font-weight: 500 !important;
      margin: 0 !important;
      text-align: center !important;
    }

    /* Quick Cart Modal - Wide Horizontal & Sharp Square (No Rounded Corners) */
    #previewModal.modal {
      padding-top: 15px !important;
      z-index: 999999 !important;
    }

    #previewModal .modal-dialog {
      max-width: 580px !important;
      width: calc(100% - 24px) !important;
      margin: 15px auto 0 auto !important;
      top: 0 !important;
      transform: none !important;
    }

    #previewModal .modal-content {
      border-radius: 0px !important;
      border: 1px solid #000000 !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
      overflow: hidden !important;
      background: #ffffff !important;
    }

    #previewModal .modal-header {
      padding: 10px 16px !important;
      background: #f8fafc !important;
      border-bottom: 1px solid #e2e8f0 !important;
      border-radius: 0px !important;
      display: flex !important;
      flex-direction: row-reverse !important;
      align-items: center !important;
      justify-content: space-between !important;
    }

    #previewModal .modal-header .modal-title,
    #previewModal .modal-header h4 {
      font-size: 13.5px !important;
      font-weight: 600 !important;
      color: #0f172a !important;
      margin: 0 !important;
      line-height: 1.4 !important;
      flex: 1 1 auto !important;
      text-align: left !important;
      display: flex !important;
      align-items: center !important;
      gap: 6px !important;
    }

    #previewModal .modal-header .modal-title i,
    #previewModal .modal-header h4 i {
      color: #10b981 !important;
      font-size: 15px !important;
    }

    #previewModal .modal-header .close,
    #previewModal .modal-header .btn-close,
    #previewModal .modal-header .btn-close-modal,
    #previewModal .modal-header button[data-bs-dismiss] {
      background: transparent !important;
      border: none !important;
      border-radius: 0px !important;
      font-size: 20px !important;
      color: #94a3b8 !important;
      cursor: pointer !important;
      opacity: 0.7 !important;
      transition: all 0.15s ease !important;
      padding: 0 4px !important;
      line-height: 1 !important;
      margin-left: 8px !important;
    }

    #previewModal .modal-header .close:hover,
    #previewModal .modal-header .btn-close:hover,
    #previewModal .modal-header .btn-close-modal:hover,
    #previewModal .modal-header button[data-bs-dismiss]:hover {
      color: #0f172a !important;
      opacity: 1 !important;
    }

    #previewModal .modal-body {
      padding: 14px 16px !important;
      background: #ffffff !important;
      border-radius: 0px !important;
    }

    /* Reset any legacy theme conflicting layouts */
    #previewModal .jl-qc-container {
      display: block !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    /* Row 1: Product info */
    #previewModal .jl-qc-item-row {
      display: flex !important;
      align-items: center !important;
      gap: 14px !important;
      width: 100% !important;
      margin-bottom: 12px !important;
    }

    #previewModal .jl-qc-thumb-box {
      flex: 0 0 54px !important;
      width: 54px !important;
      height: 54px !important;
    }

    #previewModal .jl-qc-thumb-img {
      width: 54px !important;
      height: 54px !important;
      border-radius: 0px !important;
      border: 1px solid #e2e8f0 !important;
      object-fit: cover !important;
    }

    #previewModal .jl-qc-meta-box {
      flex: 1 1 auto !important;
      min-width: 0 !important;
    }

    #previewModal .jl-qc-item-title {
      font-size: 13.5px !important;
      font-weight: 600 !important;
      line-height: 1.35 !important;
      margin: 0 0 3px 0 !important;
      display: -webkit-box !important;
      -webkit-line-clamp: 2 !important;
      -webkit-box-orient: vertical !important;
      overflow: hidden !important;
    }

    #previewModal .jl-qc-item-title a {
      color: #0f172a !important;
      text-decoration: none !important;
    }

    #previewModal .jl-qc-item-title a:hover {
      color: #0099ff !important;
    }

    #previewModal .jl-qc-item-opt {
      font-size: 11px !important;
      color: #64748b !important;
      line-height: 1.3 !important;
    }

    #previewModal .jl-qc-item-price-row {
      display: flex !important;
      align-items: baseline !important;
      gap: 5px !important;
      margin-top: 3px !important;
    }

    #previewModal .jl-qc-qty-badge {
      font-size: 12px !important;
      font-weight: 500 !important;
      color: #64748b !important;
    }

    #previewModal .jl-qc-unit-price {
      font-size: 13.5px !important;
      font-weight: 700 !important;
      color: #0f172a !important;
    }

    /* Row 2: Subtotal bar (Full width horizontal bar) */
    #previewModal .jl-qc-total-row {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      width: 100% !important;
      background: #f8fafc !important;
      border: 1px solid #e2e8f0 !important;
      border-radius: 0px !important;
      padding: 9px 14px !important;
      margin: 0 0 12px 0 !important;
      box-sizing: border-box !important;
    }

    #previewModal .jl-qc-total-label {
      font-size: 13px !important;
      color: #475569 !important;
      font-weight: 500 !important;
      white-space: nowrap !important;
    }

    #previewModal .jl-qc-total-right {
      display: flex !important;
      align-items: baseline !important;
      gap: 6px !important;
      white-space: nowrap !important;
    }

    #previewModal .jl-qc-total-price {
      font-size: 15.5px !important;
      font-weight: 700 !important;
      color: #0f172a !important;
      letter-spacing: -0.3px !important;
    }

    #previewModal .jl-qc-total-qty {
      font-size: 12px !important;
      color: #64748b !important;
      font-weight: normal !important;
    }

    /* Row 3: Action Buttons (Side by Side, Sharp Corners) */
    #previewModal .jl-qc-action-row {
      display: flex !important;
      flex-direction: row !important;
      gap: 10px !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }

    #previewModal .jl-qc-btn-primary {
      flex: 1 1 50% !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 6px !important;
      background: #18181b !important;
      color: #ffffff !important;
      border: 1px solid #18181b !important;
      border-radius: 0px !important;
      padding: 9px 14px !important;
      font-size: 12.5px !important;
      font-weight: 600 !important;
      text-decoration: none !important;
      box-shadow: none !important;
      transition: all 0.15s ease !important;
      cursor: pointer !important;
      white-space: nowrap !important;
    }

    #previewModal .jl-qc-btn-primary:hover {
      background: #000000 !important;
      border-color: #000000 !important;
      color: #ffffff !important;
      transform: none !important;
    }

    #previewModal .jl-qc-btn-secondary {
      flex: 1 1 50% !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 4px !important;
      background: #ffffff !important;
      color: #334155 !important;
      border: 1px solid #cbd5e1 !important;
      border-radius: 0px !important;
      padding: 9px 14px !important;
      font-size: 12.5px !important;
      font-weight: 500 !important;
      text-decoration: none !important;
      box-shadow: none !important;
      transition: all 0.15s ease !important;
      cursor: pointer !important;
      white-space: nowrap !important;
    }

    #previewModal .jl-qc-btn-secondary:hover {
      background: #f8fafc !important;
      color: #0f172a !important;
      border-color: #94a3b8 !important;
      transform: none !important;
    }

    /* User Account Menu - Opaque & Elevated Dropdown */
    #header,
    header.typeheader-39,
    .typeheader-39 .header-middle,
    .typeheader-39 .middle2,
    .typeheader-39 ul.signin-w,
    .typeheader-39 .signin-w #my_account {
      position: relative !important;
      z-index: 10050 !important;
    }
    .typeheader-39 .signin-w #my_account {
      position: relative !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu {
      position: absolute !important;
      top: 100% !important;
      right: 0 !important;
      left: auto !important;
      transform: none !important;
      min-width: 200px !important;
      background: #ffffff !important;
      background-color: #ffffff !important;
      border: 1px solid #e2e8f0 !important;
      border-radius: 8px !important;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.06) !important;
      padding: 6px 0 !important;
      margin-top: 8px !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      z-index: 999999 !important;
      opacity: 1 !important;
      overflow: hidden !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu:not(.show) {
      display: none !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu.show,
    .typeheader-39 .signin-w #my_account.open .dropdown-menu {
      display: block !important;
      opacity: 1 !important;
      visibility: visible !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu li {
      display: block !important;
      width: 100% !important;
      margin: 0 !important;
      padding: 0 !important;
      line-height: normal !important;
      background: transparent !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu li.divider-item {
      border-top: 1px solid #f1f5f9 !important;
      margin: 4px 0 !important;
      padding-top: 4px !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu li a {
      display: flex !important;
      align-items: center !important;
      padding: 8px 16px !important;
      color: #1e293b !important;
      font-size: 13px !important;
      font-weight: 500 !important;
      line-height: 1.4 !important;
      text-decoration: none !important;
      background: #ffffff !important;
      transition: all 0.15s ease !important;
      white-space: nowrap !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu li a:hover {
      background: #f8fafc !important;
      color: #0099ff !important;
      padding-left: 19px !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu li a i {
      width: 18px !important;
      text-align: center !important;
      margin-right: 8px !important;
      font-size: 13px !important;
      color: #64748b !important;
      background: transparent !important;
      border: none !important;
      border-radius: 0 !important;
      height: auto !important;
      line-height: 1 !important;
      display: inline-block !important;
      padding: 0 !important;
    }
    .typeheader-39 .signin-w #my_account .dropdown-menu li a:hover i {
      color: #0099ff !important;
    }

    /* Hide Back To Top Button when Drawer or Search Popup is Open */
    body.megamenu-open #jl-back-to-top,
    body.megamenu-open .backtotop,
    body.megamenu-open .back-to-top,
    body.megamenu-open .so-backtotop,
    body.search-popup-open #jl-back-to-top,
    body.search-popup-open .backtotop {
      display: none !important;
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    /* Megamenu Dark Backdrop Overlay */
    #so-megamenu-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.65);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      z-index: 999998;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    }
    #so-megamenu-backdrop.is-active {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    /* Mobile Drawer Modern Styling & Stacking Context Fix */
    @media (max-width: 991px) {
      body.megamenu-open #header,
      body.megamenu-open header.typeheader-39,
      body.megamenu-open .typeheader-39 .header-middle {
        z-index: 1000005 !important;
      }
      body.megamenu-open .typeheader-39 .header-middle .container-full,
      body.megamenu-open .typeheader-39 .custom-header-mobile,
      body.megamenu-open .typeheader-39 .mobile-header-row,
      body.megamenu-open .typeheader-39 .mobile-left,
      body.megamenu-open .typeheader-39 .main-menu,
      body.megamenu-open .typeheader-39 .responsive,
      body.megamenu-open .typeheader-39 .navbar-default,
      body.megamenu-open .typeheader-39 .container-megamenu {
        position: static !important;
        z-index: auto !important;
        transform: none !important;
        filter: none !important;
        backdrop-filter: none !important;
      }

      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper,
      html body .megamenu-wrapper.responsive,
      html body .megamenu-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100% !important;
        max-height: 100vh !important;
        width: 320px !important;
        max-width: 86vw !important;
        background: #0f172a !important;
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6) !important;
        z-index: 9999999 !important;
        padding: 0 0 30px 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        pointer-events: auto !important;
        filter: none !important;
        backdrop-filter: none !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
      }

      /* Completely eliminate all theme duplicate/overlapping pseudo-element buttons */
      .megamenu-wrapper ul.megamenu > li:before,
      .megamenu-wrapper ul.megamenu > li:after,
      .megamenu-wrapper ul.megamenu > li.hover:before,
      .megamenu-wrapper ul.megamenu > li.hover:after,
      .megamenu-wrapper ul.megamenu > li.click:before,
      .megamenu-wrapper ul.megamenu > li.click:after,
      .megamenu-wrapper ul.megamenu > li.active:before,
      .megamenu-wrapper ul.megamenu > li.active:after,
      .megamenu-wrapper ul.megamenu > li.is-open:before,
      .megamenu-wrapper ul.megamenu > li.is-open:after,
      .megamenu-wrapper ul.megamenu > li > a:before,
      .megamenu-wrapper ul.megamenu > li > a:after,
      .megamenu-wrapper ul.megamenu > li > a > span:before,
      .megamenu-wrapper ul.megamenu > li > a > span:after,
      .megamenu-style-dev.responsive ul.megamenu > li:before,
      .megamenu-style-dev.responsive ul.megamenu > li:after,
      .megamenu-style-dev.responsive ul.megamenu > li.hover:before,
      .megamenu-style-dev.responsive ul.megamenu > li.hover:after,
      .megamenu-style-dev.responsive ul.megamenu > li.click:before,
      .megamenu-style-dev.responsive ul.megamenu > li.click:after,
      .megamenu-style-dev.responsive ul.megamenu > li.active:before,
      .megamenu-style-dev.responsive ul.megamenu > li.active:after,
      .responsive ul.megamenu > li:before,
      .responsive ul.megamenu > li:after,
      .responsive ul.megamenu > li.hover:before,
      .responsive ul.megamenu > li.hover:after,
      .responsive ul.megamenu > li.click:before,
      .responsive ul.megamenu > li.click:after,
      .responsive ul.megamenu > li.active:before,
      .responsive ul.megamenu > li.active:after {
        content: none !important;
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
      }

      .megamenu-wrapper .megamenu-pattern {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        box-sizing: border-box !important;
      }
      .megamenu-wrapper .megamenu-pattern > .container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
        box-sizing: border-box !important;
      }
      .megamenu-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 22px;
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        color: #ffffff;
        margin: 0 0 16px 0;
        box-sizing: border-box;
      }
      .megamenu-drawer-title {
        font-size: 21px;
        font-weight: 800;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #ffffff;
        margin: 0;
      }
      .megamenu-drawer-title i {
        color: #0099FF;
        font-size: 21px;
      }
      .megamenu-drawer-close {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 18px;
        transition: all 0.2s ease;
        padding: 0;
      }
      .megamenu-drawer-close:hover,
      .megamenu-drawer-close:active {
        background: #ef4444;
        border-color: #ef4444;
        transform: rotate(90deg);
      }
      .megamenu-wrapper #remove-megamenu {
        display: none !important;
      }

      /* Category Items List with Balanced Side Spacing */
      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper ul.megamenu,
      html body .megamenu-wrapper ul.megamenu {
        padding: 0 16px !important;
        margin: 0 !important;
        list-style: none !important;
        background: transparent !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
      }
      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper ul.megamenu > li,
      html body .megamenu-style-dev.responsive ul.megamenu > li,
      html body .megamenu-wrapper ul.megamenu > li {
        position: relative !important;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
        background: #1e293b !important;
        border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 14px !important;
        transition: all 0.2s ease !important;
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        float: none !important;
      }
      html body .megamenu-style-dev.responsive ul.megamenu > li.active,
      html body .megamenu-style-dev.responsive ul.megamenu > li.is-open,
      html body .megamenu-wrapper ul.megamenu > li.active,
      html body .megamenu-wrapper ul.megamenu > li.is-open {
        background: #1e293b !important;
        border: 1.5px solid #0099FF !important;
        box-shadow: 0 4px 16px rgba(0, 153, 255, 0.22) !important;
      }

      /* Anchor item with generous padding - never touching edges */
      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper ul.megamenu > li > a,
      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper ul.megamenu > li.active > a,
      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper ul.megamenu > li.is-open > a,
      html body .megamenu-style-dev.responsive ul.megamenu > li > a,
      html body .megamenu-style-dev.responsive ul.megamenu > li.active > a,
      html body .megamenu-style-dev.responsive ul.megamenu > li.is-open > a,
      html body .megamenu-wrapper ul.megamenu > li > a,
      html body .megamenu-wrapper ul.megamenu > li.active > a,
      html body .megamenu-wrapper ul.megamenu > li.is-open > a {
        display: flex !important;
        align-items: center !important;
        min-height: 58px !important;
        height: auto !important;
        padding: 15px 62px 15px 20px !important;
        margin: 0 !important;
        color: #ffffff !important;
        font-size: 19.5px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        background: transparent !important;
        width: 100% !important;
        box-sizing: border-box !important;
        line-height: 1.35 !important;
      }
      html body .megamenu-wrapper ul.megamenu > li > a strong {
        font-weight: 700 !important;
        color: #ffffff !important;
        display: inline-block !important;
      }
      html body .megamenu-wrapper ul.megamenu > li:hover > a strong,
      html body .megamenu-wrapper ul.megamenu > li.active > a strong,
      html body .megamenu-wrapper ul.megamenu > li.is-open > a strong {
        color: #38bdf8 !important;
      }
      html body .megamenu-wrapper ul.megamenu > li > a .caret {
        display: none !important;
      }

      /* Single Unified Submenu Toggle (+ / -) Pure Vector CSS Button */
      html body .megamenu-style-dev.responsive ul.megamenu > li .close-menu,
      html body .megamenu-style-dev.responsive ul.megamenu > li.active .close-menu,
      html body .megamenu-style-dev.responsive ul.megamenu > li.is-open .close-menu,
      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper ul.megamenu > li .close-menu,
      html body .megamenu-style-dev .navbar-default .horizontal .megamenu-wrapper ul.megamenu > li.active .close-menu,
      html body .megamenu-wrapper .close-menu,
      html body .megamenu-wrapper ul.megamenu > li .close-menu,
      html body .megamenu-wrapper ul.megamenu > li.active .close-menu,
      html body .megamenu-wrapper ul.megamenu > li.is-open .close-menu {
        position: absolute !important;
        right: 14px !important;
        top: 10px !important;
        left: auto !important;
        width: 38px !important;
        height: 38px !important;
        line-height: 38px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        margin: 0 !important;
        padding: 0 !important;
        transition: all 0.2s ease !important;
        z-index: 10 !important;
        box-sizing: border-box !important;
      }

      /* Closed state button */
      html body .megamenu-style-dev.responsive ul.megamenu > li .close-menu,
      html body .megamenu-wrapper ul.megamenu > li .close-menu {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1.5px solid rgba(255, 255, 255, 0.16) !important;
      }

      /* Active / Open state button */
      html body .megamenu-style-dev.responsive ul.megamenu > li.active .close-menu,
      html body .megamenu-style-dev.responsive ul.megamenu > li.is-open .close-menu,
      html body .megamenu-wrapper ul.megamenu > li.active .close-menu,
      html body .megamenu-wrapper ul.megamenu > li.is-open .close-menu {
        background: #0099FF !important;
        border: 1.5px solid #0099FF !important;
        right: 14px !important;
        top: 10px !important;
        left: auto !important;
        box-shadow: 0 2px 10px rgba(0, 153, 255, 0.4) !important;
      }

      /* Pure CSS Vector Plus/Minus Bars */
      html body .megamenu-wrapper .close-menu:before {
        content: "" !important;
        position: absolute !important;
        width: 14px !important;
        height: 2.5px !important;
        background-color: #cbd5e1 !important;
        border-radius: 2px !important;
        transition: transform 0.2s ease, background-color 0.2s ease !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        top: 17.5px !important;
        left: 12px !important;
        right: auto !important;
        bottom: auto !important;
      }
      html body .megamenu-wrapper .close-menu:after {
        content: "" !important;
        position: absolute !important;
        width: 2.5px !important;
        height: 14px !important;
        background-color: #cbd5e1 !important;
        border-radius: 2px !important;
        transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        top: 12px !important;
        left: 17.5px !important;
        right: auto !important;
        bottom: auto !important;
      }
      html body .megamenu-wrapper .close-menu:hover {
        background: rgba(255, 255, 255, 0.18) !important;
        border-color: rgba(255, 255, 255, 0.25) !important;
      }
      html body .megamenu-wrapper .close-menu:hover:before,
      html body .megamenu-wrapper .close-menu:hover:after {
        background-color: #38bdf8 !important;
      }

      html body .megamenu-wrapper ul.megamenu > li.active .close-menu:before,
      html body .megamenu-wrapper ul.megamenu > li.is-open .close-menu:before {
        background-color: #ffffff !important;
        transform: rotate(0deg) !important;
      }
      html body .megamenu-wrapper ul.megamenu > li.active .close-menu:after,
      html body .megamenu-wrapper ul.megamenu > li.is-open .close-menu:after {
        background-color: #ffffff !important;
        transform: rotate(90deg) !important;
        opacity: 0 !important;
      }
      html body .megamenu-wrapper ul.megamenu > li:not(.with-sub-menu) .close-menu {
        display: none !important;
      }

      /* Submenu Content Area */
      .megamenu-wrapper .sub-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: #0f172a !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 10px 12px !important;
        border-radius: 0 0 14px 14px !important;
        box-sizing: border-box !important;
      }
      .megamenu-wrapper .sub-menu .content {
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
      }
      .megamenu-wrapper .sub-menu,
      .megamenu-wrapper .sub-menu * {
        box-sizing: border-box !important;
      }
      .megamenu-wrapper .sub-menu .row,
      .megamenu-wrapper .sub-menu div[class*="row"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        --bs-gutter-x: 0 !important;
        --bs-gutter-y: 0 !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
      }
      .megamenu-wrapper .sub-menu [class*="col-"],
      .megamenu-wrapper .sub-menu .categories,
      .megamenu-wrapper .sub-menu .hover-menu,
      .megamenu-wrapper .sub-menu .menu {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        float: none !important;
        background: transparent !important;
      }
      .megamenu-wrapper .sub-menu ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
      }
      .megamenu-wrapper .sub-menu li {
        margin: 3px 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        width: 100% !important;
      }
      .megamenu-wrapper .sub-menu a {
        display: flex !important;
        align-items: center !important;
        color: #f1f5f9 !important;
        padding: 11px 14px !important;
        font-size: 17.5px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        border-radius: 10px !important;
        text-decoration: none !important;
        transition: all 0.15s ease !important;
        box-sizing: border-box !important;
        width: 100% !important;
        background: transparent !important;
      }
      .megamenu-wrapper .sub-menu a:before {
        content: "\f105" !important;
        font-family: FontAwesome !important;
        font-size: 15px !important;
        color: #0099FF !important;
        margin-right: 10px !important;
        line-height: 1 !important;
      }
      .megamenu-wrapper .sub-menu a:hover,
      .megamenu-wrapper .sub-menu a:active {
        color: #38bdf8 !important;
        background: rgba(0, 153, 255, 0.16) !important;
        padding-left: 18px !important;
      }
    }

    /* Modern Search Popup Modal */
    #jl-mobile-search-popup {
      position: fixed;
      inset: 0;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding-top: 14vh;
      z-index: 10000000;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
    }
    #jl-mobile-search-popup.is-show {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
    #jl-mobile-search-popup .jlms-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.7);
      backdrop-filter: blur(5px);
      -webkit-backdrop-filter: blur(5px);
    }
    #jl-mobile-search-popup .jlms-box {
      position: relative;
      width: min(92%, 520px);
      background: #ffffff;
      border-radius: 16px;
      box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
      padding: 18px 20px 22px;
      transform: translateY(-20px) scale(0.96);
      transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 2;
    }
    #jl-mobile-search-popup.is-show .jlms-box {
      transform: translateY(0) scale(1);
    }
    #jl-mobile-search-popup .jlms-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
      padding-bottom: 10px;
      border-bottom: 1px solid #f1f5f9;
    }
    #jl-mobile-search-popup .jlms-title {
      font-size: 19px;
      font-weight: 800;
      color: #0f172a;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    #jl-mobile-search-popup .jlms-title i {
      color: #0284c7;
      font-size: 19px;
    }
    #jl-mobile-search-popup .jlms-close {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: none;
      background: #f1f5f9;
      color: #64748b;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 18px;
      transition: background 0.2s, color 0.2s;
      padding: 0;
    }
    #jl-mobile-search-popup .jlms-close:hover,
    #jl-mobile-search-popup .jlms-close:active {
      background: #fee2e2;
      color: #ef4444;
    }
    #jl-mobile-search-popup #jlms-form {
      display: flex;
      gap: 8px;
    }
    #jl-mobile-search-popup .jlms-input-box {
      position: relative;
      flex: 1;
      display: flex;
      align-items: center;
    }
    #jl-mobile-search-popup #jlms-input {
      width: 100%;
      padding: 13px 40px 13px 16px;
      border: 1.5px solid #cbd5e1;
      border-radius: 10px;
      font-size: 17.5px;
      color: #1e293b;
      outline: none;
      background: #f8fafc;
      transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    }
    #jl-mobile-search-popup #jlms-input:focus {
      border-color: #0284c7;
      box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
      background: #ffffff;
    }
    #jl-mobile-search-popup .jlms-clear-btn {
      position: absolute;
      right: 10px;
      border: none;
      background: transparent;
      color: #94a3b8;
      cursor: pointer;
      font-size: 18px;
      padding: 4px;
    }
    #jl-mobile-search-popup .jlms-clear-btn:hover {
      color: #64748b;
    }
    #jl-mobile-search-popup .jlms-btn {
      border: none;
      background: #0284c7;
      color: #ffffff;
      padding: 13px 22px;
      border-radius: 10px;
      cursor: pointer;
      font-size: 17.5px;
      font-weight: 700;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: background 0.2s, transform 0.1s;
    }
    #jl-mobile-search-popup .jlms-btn:hover {
      background: #0369a1;
    }
    #jl-mobile-search-popup .jlms-btn:active {
      transform: scale(0.97);
    }
    #jl-mobile-search-popup .jlms-quick-tags {
      margin-top: 14px;
    }
    #jl-mobile-search-popup .jlms-quick-title {
      font-size: 15px;
      font-weight: 700;
      color: #475569;
      margin-bottom: 8px;
    }
    #jl-mobile-search-popup .jlms-tags-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    #jl-mobile-search-popup .jlms-tag-item {
      border: 1px solid #cbd5e1;
      background: #f8fafc;
      color: #1e293b;
      padding: 7px 14px;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    #jl-mobile-search-popup .jlms-tag-item:hover,
    #jl-mobile-search-popup .jlms-tag-item:active {
      background: #0284c7;
      color: #ffffff;
      border-color: #0284c7;
    }

    /* Mobile Autocomplete Dropdown */
    .jlms-dropdown {
      max-height: 48vh;
      overflow-y: auto;
      margin-top: 12px;
      border-radius: 12px;
      border: 1px solid #e2e8f0;
      background: #ffffff;
      box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
      padding: 6px;
    }
    .jlms-dropdown-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      border-radius: 10px;
      border-bottom: 1px solid #f8fafc;
      text-decoration: none !important;
      color: inherit;
      transition: background 0.15s;
    }
    .jlms-dropdown-item:hover, .jlms-dropdown-item:active {
      background: #f0f9ff;
    }
    .jlms-dropdown-item img {
      width: 50px;
      height: 50px;
      object-fit: contain;
      border-radius: 8px;
      background: #f8fafc;
      padding: 2px;
      border: 1px solid #e2e8f0;
      flex-shrink: 0;
    }
    .jlms-di-body {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .jlms-di-title {
      font-size: 16.5px;
      font-weight: 700;
      color: #0f172a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .jlms-di-badge {
      display: inline-block;
      font-size: 13px;
      font-weight: 700;
      background: #e0f2fe;
      color: #0369a1;
      padding: 2px 7px;
      border-radius: 5px;
      margin-right: 6px;
    }
    .jlms-di-price {
      font-size: 16.5px;
      font-weight: 800;
      color: #0284c7;
    }
    .jlms-dropdown-footer {
      padding: 14px;
      text-align: center;
      font-size: 16px;
      font-weight: 700;
      color: #0284c7;
      background: #f8fafc;
      border-radius: 8px;
      margin-top: 4px;
      cursor: pointer;
    }
    .jlms-dropdown-footer:hover, .jlms-dropdown-footer:active {
      background: #e0f2fe;
      color: #0369a1;
    }
    .jlms-dropdown-empty {
      padding: 20px;
      text-align: center;
      font-size: 16px;
      color: #64748b;
    }
    @media (min-width: 1025px) {
      #jl-mobile-search-popup { padding-top: 18vh; }
    }

    /* Product Card Non-Overlapping Button Group & Out-of-Stock Overlay */
    body .products-list .product-grid .product-item-container .left-block {
      position: relative !important;
      overflow: visible !important;
    }
    body .products-list .product-grid .product-item-container .left-block .product-image-container {
      position: relative !important;
      overflow: hidden !important;
      border-radius: 10px !important;
    }
    body .products-list .product-grid .product-item-container .left-block .cartinfo--left,
    body .products-list .product-grid .product-item-container .left-block .button-group.cartinfo--left {
      scale: 1 !important;
      transform: none !important;
      -webkit-transform: none !important;
      top: auto !important;
      bottom: auto !important;
      left: auto !important;
      right: auto !important;
      position: relative !important;
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) 38px 38px !important;
      column-gap: 8px !important;
      gap: 8px !important;
      align-items: center !important;
      justify-items: stretch !important;
      width: 100% !important;
      max-width: 240px !important;
      margin: 12px auto 8px auto !important;
      padding: 0 8px !important;
      box-sizing: border-box !important;
      z-index: 5 !important;
    }
    body .products-list .product-grid .product-item-container .left-block .button-group .btn-button {
      height: 38px !important;
      min-height: 38px !important;
      line-height: 38px !important;
      width: 100% !important;
      min-width: 0 !important;
      margin: 0 !important;
      padding: 0 8px !important;
      border-radius: 8px !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      transform: none !important;
      -webkit-transform: none !important;
      opacity: 1 !important;
      visibility: visible !important;
      box-sizing: border-box !important;
    }
    body .products-list .product-grid .product-item-container .left-block .button-group .btn-button.disabled {
      opacity: 0.65 !important;
      cursor: not-allowed !important;
      background-color: #94a3b8 !important;
      border-color: #94a3b8 !important;
      color: #ffffff !important;
    }
    body .products-list .product-grid .product-item-container .right-block {
      clear: both !important;
      padding-top: 4px !important;
      position: relative !important;
      z-index: 2 !important;
    }
    body .products-list .product-grid .product-item-container .right-block h4 {
      margin-top: 4px !important;
      margin-bottom: 6px !important;
    }

    /* Empty Cart Icon SVG Stroke Always Visible */
    #checkout-cart .jl-cart-empty-icon svg,
    #checkout-cart .jl-cart-empty-icon svg path,
    #checkout-cart .jl-cart-empty-icon svg circle {
      stroke: #0099ff !important;
      fill: none !important;
    }

/* ---- Global Overflow & Sticky Header Rules ---- */
html, body {
  overflow-x: clip !important;
  overflow-y: visible !important;
  max-width: 100% !important;
}

#wrapper {
  overflow: visible !important;
  max-width: 100% !important;
}

#header,
header.typeheader-39 {
  position: sticky !important;
  top: 0 !important;
  z-index: 99990 !important;
  background: #ffffff !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.typeheader-39 .header-top {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #eef2f6 !important;
}

.typeheader-39 .contact-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-wrap: nowrap !important;
}
.typeheader-39 .contact-inner {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}
.typeheader-39 .contact-inner img {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
}

.typeheader-39 .header-middle {
  background: #ffffff !important;
}

@media (min-width: 992px) {
  #remove-megamenu,
  .megamenu-wrapper #remove-megamenu,
  .megamenu-drawer-header,
  #remove-megamenu-btn,
  .megamenu-drawer-close,
  #so-megamenu-backdrop {
    display: none !important;
  }
}

/* ---- CLS / aspect-ratio fixes for homepage (index39) images ----
   These images are authored as raw HTML inside the So Page Builder module,
   so we reserve their space here (by src) to stop layout shift without
   editing every widget. object-fit:contain guarantees no distortion. */

/* Smart Life app banner: preserve aspect-ratio without blowing up width */
img[src*="banners/index39/model/Smart"]{
  max-width: 220px;
  max-height: 45px;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}
@media (max-width: 991px) {
  img[src*="banners/index39/model/Smart"]{
    max-width: 180px !important;
    max-height: 36px !important;
    width: auto !important;
    height: auto !important;
  }
}

/* Smart Life video background: strictly contain within section to prevent bleeding into package cards */
.video-outtercontainer {
  position: relative !important;
  overflow: hidden !important;
}
.video-background {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  position: absolute !important;
  z-index: -1 !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
}

/* Topbar & Searchbar Enhancements */
.typeheader-39 .welcome-msg {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}
.typeheader-39 .welcome-rotator-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  color: inherit !important;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer !important;
  overflow: hidden !important;
}
.typeheader-39 .welcome-rotator {
  position: relative !important;
  width: 100% !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  text-align: center !important;
}
.typeheader-39 .welcome-text {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #1e293b !important;
  white-space: nowrap !important;
  letter-spacing: 0.15px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, color 0.2s ease !important;
  will-change: transform, opacity !important;
  line-height: 1.2 !important;
}
.typeheader-39 .welcome-rotator-link:hover .welcome-text {
  color: #0284c7 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}
.typeheader-39 .jl-searchbar input {
  font-size: 12.5px !important;
  letter-spacing: 0.1px !important;
}
.typeheader-39 .jl-searchbar input::placeholder {
  color: #777777 !important;
  opacity: 1 !important;
  font-size: 12.5px !important;
}

/* ========================================================
   How-To / Equipment Operation Section (การทำงานของอุปกรณ์)
   Unified Overlay Cards (ไม่แยกเลเยอร์) & Seamless Background
   ======================================================== */

/* Section wrapper */
.layout-39 .wrapper-full .container {
  max-width: 1400px !important;
}

.howto-container {
  position: relative !important;
  background-color: #1D1B20 !important;
  padding: 1.5rem 1rem !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.head-group {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 1.5rem 1rem 0.5rem 1rem !important;
  gap: 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.headtext {
  font-size: clamp(32px, 5.5vw, 48px) !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  line-height: 1.25 !important;
}

.underline {
  width: 90px !important;
  max-width: 90px !important;
  height: 5px !important;
  background-color: #0099FF !important;
  border-radius: 4px !important;
  box-shadow: 0 0 12px rgba(0, 153, 255, 0.6) !important;
  margin: 8px auto 0 auto !important;
}

/* Step badges */
.bordertext {
  display: inline-block !important;
  margin: 1.25rem auto 0.65rem auto !important;
  border-radius: 12px !important;
  text-align: center !important;
  padding: 0.75rem 2.25rem !important;
  max-width: 92vw !important;
  min-width: 0 !important;
  font-size: clamp(20px, 4.8vw, 25px) !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35) !important;
  box-sizing: border-box !important;
  word-wrap: break-word !important;
}

.bordercolortoright {
  background: linear-gradient(90deg, rgba(0, 153, 255, 0.25) 0%, #0099FF 100%) !important;
}

.bordercolortoleft {
  background: linear-gradient(270deg, rgba(0, 153, 255, 0.25) 0%, #0099FF 100%) !important;
}

/* Subtitle under badges */
.howto-container > .normaltext:not(.bordertext) {
  font-size: clamp(18.5px, 4.2vw, 22px) !important;
  font-weight: 500 !important;
  color: #f8fafc !important;
  max-width: 820px !important;
  margin: 0 auto 0.85rem auto !important;
  padding: 0 1rem !important;
  line-height: 1.5 !important;
}

/* ========================================================
   Step 1: Unified Overlay Cards (ไม่แยกเลเยอร์)
   ======================================================== */
.howto1-container {
  max-width: 1080px !important;
  margin: 2.25rem auto 0 auto !important;
  padding: 0 1rem !important;
}

.howto1-container .row {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  margin-left: -10px !important;
  margin-right: -10px !important;
}

.howto1-container .col-12.col-md-4 {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* Card Container */
.howto1-group {
  position: relative !important;
  width: 100% !important;
  height: 440px !important;
  border-radius: 16px !important;
  overflow: visible !important;
  background: #1e1b24 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  margin-top: 28px !important;
  margin-bottom: 1rem !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.howto1-group:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(0, 153, 255, 0.25) !important;
}

/* Video inside Card (Unified Layer) */
.howto1-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center bottom !important;
  border-radius: 15px !important;
  z-index: 1 !important;
  display: block !important;
}

/* Dark Gradient Overlay over Video for readable text */
.howto1-group::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border-radius: 15px !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(0, 0, 0, 0.12) 70%, rgba(0, 0, 0, 0.48) 100%) !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

/* Circular Blue Icon (Centered at Top of Card) */
.howto1-icon {
  position: absolute !important;
  top: -28px !important;
  left: 50% !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  border-radius: 50% !important;
  background-color: #0099ff !important;
  border: 2.5px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 4px 14px rgba(0, 153, 255, 0.5) !important;
  z-index: 5 !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.howto1-icon1 {
  background-image: url('/image/catalog/banners/index39/How%20To%201/opsystem-Icon-1.webp') !important;
}
.howto1-icon2 {
  background-image: url('/image/catalog/banners/index39/How%20To%201/opsystem-Icon-2.webp') !important;
}
.howto1-icon3 {
  background-image: url('/image/catalog/banners/index39/How%20To%201/opsystem-Icon-3.webp') !important;
}

/* Text Overlay (Centered at Top Portion) */
.howto1-textgroup {
  position: absolute !important;
  top: 34px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 4 !important;
  padding: 0 18px !important;
  min-height: auto !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: center !important;
  gap: 6px !important;
  pointer-events: none !important;
}

.howto1-textgroup .normaltext {
  font-size: 23px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  text-align: center !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9) !important;
  line-height: 1.3 !important;
  margin: 0 !important;
}

.howto1-textgroup .subtext {
  font-size: 18px !important;
  font-weight: 500 !important;
  color: #f8fafc !important;
  text-align: center !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9) !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

/* ========================================================
   Steps 2, 3, 4, 5: Seamless Media (No box/border, blends into dark BG)
   ======================================================== */
.image-wrap {
  width: 100% !important;
  max-width: 820px !important;
  margin: 0.5rem auto 0 auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.image-video {
  width: 100% !important;
  max-width: 820px !important;
  height: auto !important;
  max-height: 480px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

/* ========================================================
   Mobile Specific (<= 768px): Senior-Friendly, Clear, No Overflow
   ======================================================== */
@media (max-width: 768px) {
  .howto-container {
    padding: 1.25rem 0.75rem !important;
  }

  .head-group {
    padding: 1.25rem 0.5rem 0.5rem 0.5rem !important;
  }

  .headtext {
    font-size: clamp(30px, 7vw, 42px) !important;
  }

  .underline {
    width: 90px !important;
    height: 5px !important;
  }

  .bordertext {
    padding: 0.75rem 1.4rem !important;
    font-size: clamp(19.5px, 5vw, 24px) !important;
    font-weight: 800 !important;
    margin: 1.15rem auto 0.65rem auto !important;
    max-width: 94% !important;
    min-width: 0 !important;
    border-radius: 12px !important;
  }

  .howto-container > .normaltext:not(.bordertext) {
    font-size: clamp(18px, 4.6vw, 20.5px) !important;
    font-weight: 500 !important;
    color: #f8fafc !important;
    padding: 0 0.5rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.5 !important;
  }

  /* Step 1 on Mobile: Full-width stacked cards for maximum readability */
  .howto1-container {
    width: 100% !important;
    max-width: 440px !important;
    padding: 0 8px !important;
    margin: 1.25rem auto 1rem auto !important;
  }

  .howto1-container .row {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    gap: 36px !important;
    padding: 24px 0 8px 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .howto1-container .col-12.col-md-4 {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .howto1-group {
    height: 330px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 18px !important;
  }

  .howto1-image {
    object-position: center bottom !important;
  }

  .howto1-icon {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    top: -27px !important;
  }

  .howto1-textgroup {
    top: 32px !important;
    padding: 0 16px !important;
    gap: 6px !important;
  }

  .howto1-textgroup .normaltext {
    font-size: 22px !important;
    font-weight: 800 !important;
  }

  .howto1-textgroup .subtext {
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #f8fafc !important;
  }

  /* Steps 2-5 Media on mobile: compact, fully contained */
  .image-wrap {
    max-width: 100% !important;
    margin: 0.5rem auto 0 auto !important;
  }

  .image-video {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 260px !important;
    object-fit: contain !important;
  }
}

/* Hero BACKGROUND slides (BG-Slide1..5, 1920x1080 = 16:9). This is the LCP image
   and the main CLS culprit (~0.097): the .page-builder hero container has no height
   until it loads, so reserve a 16:9 box up-front. If the live mobile hero renders
   taller/cover, add a per-breakpoint min-height override below to match. */
img[src*="banners/index39/Banner/BG-Slide"]{
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* Main hero slides (PIC-Slide1..5, ~1000x800): reserve a 5:4 box to prevent CLS. */
img[src*="banners/index39/Banner/PIC-Slide"]{
  aspect-ratio: 5 / 4;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* "Product of Thailand" footer badge (241x80): reserve space at 150px wide. */
img[src*="banners/index39/productofTH"]{
  aspect-ratio: 241 / 80;
  width: 150px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
/* =========================
   Base / Global
   ========================= */
*{
  font-family: "Kanit", sans-serif;
  font-weight: 400;
  font-style: normal;
}
html, body{ padding-bottom: 0 !important; }
.layout-39{ padding-top: 0 !important; }
/* JL: Hide legacy back-to-top; ensure modern .backtotop is at bottom-LEFT */
.layout-39 .back-to-top, .back-to-top {
  display: none !important;
}
.backtotop {
  position: fixed !important;
  left: 24px !important;
  right: auto !important;
  bottom: 30px !important;
  z-index: 9999 !important;
}
@media (max-width: 991px) {
  .backtotop {
    left: 12px !important;
    right: auto !important;
    bottom: 70px !important;
  }
}

/* Modern Floating Alert Toast */
.alert.alert-success, .alert.alert-info, .alert.alert-warning {
  position: fixed !important;
  top: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 999999 !important;
  width: auto !important;
  min-width: 320px !important;
  max-width: 720px !important;
  margin: 0 !important;
  padding: 12px 20px 12px 16px !important;
  background: #fff !important;
  color: #1e293b !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.15), 0 2px 8px rgba(0,0,0,.06) !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  animation: cwAlertSlide .3s cubic-bezier(0.16,1,0.3,1) !important;
}
@keyframes cwAlertSlide {
  from { opacity: 0; transform: translate(-50%,-20px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%,0) scale(1); }
}
.alert.alert-success { border: 1px solid #bbf7d0 !important; border-left: 5px solid #16a34a !important; }
.alert.alert-info { border: 1px solid #bae6fd !important; border-left: 5px solid #0099ff !important; }
.alert.alert-warning { border: 1px solid #fde68a !important; border-left: 5px solid #f59e0b !important; }
.alert.alert-success > i.fa-check-circle, .alert.alert-success > i.fa-circle-check { color: #16a34a !important; font-size: 20px !important; flex-shrink: 0 !important; }
.alert.alert-info > i.fa-info-circle { color: #0099ff !important; font-size: 20px !important; flex-shrink: 0 !important; }
.alert.alert-warning > i.fa-exclamation-circle { color: #f59e0b !important; font-size: 20px !important; flex-shrink: 0 !important; }
.alert.alert-success a[href*="compare"] {
  display: inline-flex !important;
  align-items: center !important;
  background: #f0f9ff !important;
  color: #0099ff !important;
  padding: 3px 10px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  border: 1px solid #bae6fd !important;
  margin: 0 4px !important;
  vertical-align: middle !important;
  transition: all .15s ease !important;
}
.alert.alert-success a[href*="compare"]:hover { background: #0099ff !important; color: #fff !important; border-color: #0099ff !important; }
.alert.alert-success a:not([href*="compare"]) { color: #0f172a !important; font-weight: 700 !important; text-decoration: underline !important; text-underline-offset: 2px !important; }
.alert.alert-success a:not([href*="compare"]):hover { color: #0099ff !important; }
.alert .close, .alert .btn-close {
  position: static !important;
  margin-left: auto !important;
  padding: 2px 6px !important;
  color: #94a3b8 !important;
  opacity: .8 !important;
  font-size: 18px !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  transition: all .15s !important;
}
.alert .close:hover, .alert .btn-close:hover { color: #ef4444 !important; opacity: 1 !important; }
.alert.fadeOut { opacity: 0 !important; transform: translate(-50%,-15px) !important; transition: opacity .4s ease, transform .4s ease !important; }
@media (max-width: 600px) {
  .alert.alert-success, .alert.alert-info, .alert.alert-warning {
    width: calc(100% - 20px) !important;
    max-width: 420px !important;
    top: 10px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    gap: 8px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
  }
  .alert.alert-success a:not([href*="compare"]) {
    display: inline !important;
    max-width: none !important;
    white-space: normal !important;
    color: #0f172a !important;
    font-weight: 700 !important;
  }
  .alert.alert-success a[href*="compare"] {
    padding: 2px 7px !important;
    font-size: 11px !important;
    margin: 0 2px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .alert.alert-success > i.fa-check-circle {
    font-size: 16px !important;
    flex-shrink: 0 !important;
  }
}

/* Footer Contact List: Equal logo sizes 36x36px & perfect alignment */
.contact-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 12px 0 0 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}
.contact-list li {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  min-height: 38px !important;
  padding-left: 48px !important;
  margin: 0 !important;
}
.contact-list li::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 36px !important;
  height: 36px !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
}
.contact-list li.line::before {
  background-image: url('/image/catalog/banners/index39/LOGO/LINE.webp') !important;
}
.contact-list li.tel::before {
  background-image: url('/image/catalog/banners/index39/LOGO/Contact.webp') !important;
}
.contact-list li.email::before {
  background-image: url('https://cdn-icons-png.flaticon.com/512/281/281769.png') !important;
}
.contact-list li a {
  position: static !important;
  top: auto !important;
  left: auto !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  color: #a8ddff !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.contact-list li a:hover {
  text-decoration: underline !important;
  color: #ffffff !important;
}

.header.typeheader-39 .megamenu-style-dev .navbar-default .horizontal .navbar-toggle{
  background-color:#0099ff !important;
  border: 2px solid #0099ff !important;
}

.header-middle{
  padding-top: 15px;
  padding-bottom: 15px;
}
.header-middle .logo img{
  max-height: 70px;
  width: auto;
}

/* contact */
.contact-wrapper{
  display:flex;
  justify-content:flex-start;
  gap:24px;
  padding:1rem 0;
  margin:0;
  flex-wrap:wrap;
}
.contact-line, .contact-tel{ padding:0; margin:0; }
.contact-inner{
  display:flex;
  align-items:center;
  gap:.5rem;
}
.contact-inner > img{
  width:30px; height:30px;
  display:block; margin:0; padding:0; border:none;
}
.contact-inner > div{
  font-size:24px;
  color:#000;
}

/* menu */
.main-menu ul li a{
  font-size:16px;
  padding:5px 8px;
  display:block;
  white-space:nowrap;
}

/* desktop right area */
.middle2{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:15px !important;
}

/* theme text sizes */
.typeheader-39 .container-megamenu.horizontal ul.megamenu > li > a strong{
  font-weight:400 !important;
  font-size:18px;
}
.typeheader-39 ul.top-link > li .btn-group .btn-link{ font-size:18px; }
.typeheader-39 .welcome-msg{ font-size:18px; }
.typeheader-39 ul.top-link > li i{ display:none; }

/* Logo Desktop Alignment - Only on Desktop (≥992px) */
@media (min-width: 992px) {
  .typeheader-39 .navbar-logo {
    display: flex !important;
    align-items: center !important;
    padding-left: 15px !important;
    position: relative !important;
    left: 0 !important;
    margin: 0 !important;
  }
  .typeheader-39 .navbar-logo .logo {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .typeheader-39 .navbar-logo .logo a,
  .typeheader-39 .navbar-logo .logo img,
  .typeheader-39 .header-middle .logo img {
    margin-left: 0 !important;
    padding-left: 0 !important;
    transform: none !important;
    max-height: 52px !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }
}

/* Strictly hide desktop logo on mobile (<992px) to prevent double logo */
@media (max-width: 991px) {
  .typeheader-39 .navbar-logo {
    display: none !important;
  }
}

/* Senior-Friendly Quick Action Floating Bar */
.jl-senior-floating-bar {
  position: fixed;
  right: 24px;
  bottom: 30px;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.jl-senior-floating-bar.jl-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(16px) !important;
}
.jl-senior-floating-bar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 9999px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.22);
  text-decoration: none !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}
.jl-senior-floating-bar a:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.jl-float-line {
  background: #06c755 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff;
}
.jl-float-tel {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff;
}
.jl-float-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: #ffffff;
}
.jl-float-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.jl-float-text strong {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}
.jl-float-text small {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 991px) {
  .jl-senior-floating-bar {
    display: none !important;
  }
  .bottom-bar-mobile {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(255, 255, 255, 0.99) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-top: 1.5px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    height: 70px !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px !important;
    z-index: 10050 !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Auto-hide bottom bar when scrolling near footer */
  .bottom-bar-mobile.is-hide-footer {
    transform: translateY(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Completely hide bottom bar when mobile sidebar drawer is open */
  body.megamenu-open .bottom-bar-mobile,
  .bottom-bar-mobile.is-hide-sidebar {
    transform: translateY(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  .bottom-bar-mobile .container {
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 4px !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    gap: 6px !important;
  }
  .bottom-bar-mobile .bottom-icon {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    text-decoration: none !important;
    padding: 6px 4px 5px 4px !important;
    border-radius: 12px !important;
    transition: background-color 0.12s ease, transform 0.12s ease, color 0.12s ease, box-shadow 0.12s ease !important;
    color: #334155 !important;
    background: transparent !important;
    position: relative !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
  }
  .bottom-bar-mobile .bottom-icon::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) scaleX(0) !important;
    width: 32px !important;
    height: 3.5px !important;
    border-radius: 0 0 4px 4px !important;
    background: linear-gradient(90deg, #0284c7, #38bdf8) !important;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .bottom-bar-mobile .bottom-icon i {
    font-size: 22px !important;
    line-height: 1 !important;
    margin: 0 !important;
    color: #334155 !important;
    transition: transform 0.15s ease, color 0.12s ease !important;
  }
  .bottom-bar-mobile .bottom-icon span {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    display: block !important;
    transition: color 0.12s ease, font-weight 0.12s ease !important;
  }
  .bottom-bar-mobile .bottom-icon.active,
  .bottom-bar-mobile .bottom-icon.is-switching {
    background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.18) !important;
  }
  .bottom-bar-mobile .bottom-icon.active::before,
  .bottom-bar-mobile .bottom-icon.is-switching::before {
    transform: translateX(-50%) scaleX(1) !important;
  }
  .bottom-bar-mobile .bottom-icon.active i,
  .bottom-bar-mobile .bottom-icon.is-switching i {
    color: #0284c7 !important;
    transform: translateY(-1px) !important;
  }
  .bottom-bar-mobile .bottom-icon.active span,
  .bottom-bar-mobile .bottom-icon.is-switching span {
    color: #0369a1 !important;
    font-weight: 800 !important;
  }
  .bottom-bar-mobile .bottom-icon:active {
    transform: scale(0.94) !important;
    background: #e0f2fe !important;
  }
  .bottom-bar-mobile .icon-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .bottom-bar-mobile .cart-badge-count {
    position: absolute !important;
    top: -6px !important;
    right: -10px !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    min-width: 17px !important;
    height: 17px !important;
    border-radius: 9999px !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 4px !important;
    border: 1.5px solid #ffffff !important;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4) !important;
    line-height: 1 !important;
  }
  /* Top progress indicator bar when switching mobile bottom tabs */
  #jl-bottom-nav-progress {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 3px !important;
    width: 0% !important;
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #0099ff 100%) !important;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.7) !important;
    z-index: 10000010 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease !important;
  }
  #jl-bottom-nav-progress.is-loading {
    opacity: 1 !important;
    width: 82% !important;
  }
}

/* ===== STICKY FOOTER: ดันฟุตเตอร์ลงด้านล่างสุดเสมอ ไม่ลอยกลางจอทุกหน้า ===== */
html {
  height: 100% !important;
}
body {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
}
#wrapper, .wrapper-full, .page-wrapper {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 0 auto !important;
  min-height: 100vh !important;
  width: 100% !important;
}
#wrapper > main,
.main-container {
  flex: 1 0 auto !important;
}
/* Prevent title/subcategory container from expanding and pushing down product grid */
.container:has(> .title-category),
#wrapper > .container:not(.product-listing),
.wrapper-full > .container:not(.product-listing) {
  flex: 0 0 auto !important;
  min-height: 0 !important;
}
#checkout-cart #content,
.checkout-cart #content,
body.checkout-cart #content {
  min-height: calc(100vh - 250px) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}
footer.footer-container, footer, .site-footer, .typefooter-39 {
  margin-top: auto !important;
  flex-shrink: 0 !important;
}

/* ซ่อน Compare Widget บนหน้าบัญชีผู้ใช้และหน้าตะกร้า เพื่อไม่ให้บังปุ่มและฟอร์ม */
body.account-login #compare-widget,
body.account-register #compare-widget,
body.account-forgotten #compare-widget,
body.account-account #compare-widget,
body.checkout-cart #compare-widget,
body.checkout-checkout #compare-widget {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ปรับฟุตเตอร์บนมือถือให้กะทัดรัด สบายตา และไม่สูงลอย */
@media (max-width: 767px) {
  .site-footer {
    padding: 20px 14px 85px 14px !important;
  }
  .site-footer .footer-grid {
    gap: 12px !important;
    padding-top: 8px !important;
  }
  .site-footer .panel {
    padding: 14px 14px !important;
    border-radius: 10px !important;
  }
  .site-footer .menu-btn {
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    margin-bottom: 6px !important;
  }
  .site-footer .footer-license {
    padding-bottom: 12px !important;
    font-size: 12px !important;
  }
}

/* dropdown arrow (default desktop) */
.dropdown-toggle::after{
  align-self:center;
  width:6.4px;
  height:6.4px;
  color:black;
}

/* =========================
   Language: one-line + layer safe
   ========================= */
.typeheader-39 .lang-curr,
.typeheader-39 .lang-curr *{
  white-space: nowrap !important;
}
.typeheader-39 .lang-curr{
  position: relative;
  z-index: 10050;
  margin:0;
}
.typeheader-39 .lang-curr .dropdown-menu{
  right: 0;
  left: auto;
  top: 100%;
  margin-top: 4px;
}
/* Prevent hidden dropdown from capturing clicks or eating space */
.typeheader-39 .lang-curr .dropdown-menu:not(.show),
header .header-top .top-link > li .dropdown-menu:not(.show),
header #form-language .dropdown-menu:not(.show) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}
.typeheader-39 .lang-curr .dropdown-menu.show,
header #form-language .dropdown-menu.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: block !important;
  z-index: 10060 !important;
}

/* Package section smooth scroll offset */
html {
  scroll-behavior: smooth;
}
#cw30-packages, .cw30-pkg-section {
  scroll-margin-top: 90px !important;
}

/* =========================
   Responsive (desktop)
   ========================= */
@media (max-width: 1580px){
  .typeheader-39 .container-megamenu.horizontal ul.megamenu > li > a{ font-size:14px !important; }
  .header-middle .logo img{ max-height:50px; }
  .middle2{ justify-content:flex-end !important; gap:8px !important; }
}

@media (max-width: 1180px){
  .typeheader-39 .container-megamenu.horizontal ul.megamenu > li > a strong{ font-size:14px; }
  .typeheader-39 ul.top-link > li .btn-group .btn-link{ font-size:14px; }
  .typeheader-39 .welcome-msg{ font-size:14px; }
  .contact-inner > div{ font-size:14px; }
}

/* =========================
   MOBILE HEADER (<992px only)
   ========================= */
@media (max-width: 991px){

  /* hide desktop top bar to prevent overlay */
  .typeheader-39 .header-top{ display:none !important; }

  /* header-middle fixed */
  .typeheader-39 .header-middle{
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background:#fff;
    width:100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding-top:6px !important;
    padding-bottom:6px !important;
  }

  /* push page content down */
  body{ padding-top: 72px !important; }

  /* mobile row layout */
  .typeheader-39 .mobile-header-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    flex-wrap:nowrap;     /* never wrap */
    padding:0 10px;
  }

  .typeheader-39 .mobile-left{
    flex: 0 0 auto;
    min-width: 40px;
  }

  .typeheader-39 .mobile-center{
    flex: 1 1 auto;
    min-width: 0;
    text-align:center;
  }

  .typeheader-39 .mobile-center .logo{
    margin:0 auto;
    max-width:150px;
  }

  .typeheader-39 .mobile-right{
    flex: 0 0 auto;
    display:flex;
    align-items:center;
    gap:8px;
    min-width:max-content;
  }

  /* kill theme float inside language widget */
  .typeheader-39 .mobile-right .pull-left{
    float:none !important;
    width:auto !important;
  }

  /* language inline */
  .typeheader-39 .mobile-right .lang-curr,
  .typeheader-39 .mobile-right .lang-curr > li{
    display:flex !important;
    align-items:center !important;
    margin:0 !important;
    padding:0 !important;
  }

  /* center the actual form */
  .typeheader-39 .mobile-right #form-language{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:28px !important;
    margin:0 !important;
  }

  /* language button */
  .typeheader-39 .mobile-right .lang-curr .btn-link{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    height:28px !important;
    width:28px !important;
    padding:0 !important;
    border:none !important;
    background:transparent !important;
    line-height:1;
  }

  /* mobile flag - exact match 28px icons next to it */
  .typeheader-39 .mobile-right #form-language .dropdown-toggle img{
    width:28px !important;
    height:28px !important;
    max-width:28px !important;
    max-height:28px !important;
    object-fit:cover !important;
    border-radius:6px !important;
    display:block !important;
    box-shadow:0 1px 3px rgba(0,0,0,0.18) !important;
    flex:0 0 auto !important;
    margin:0 !important;
  }

  /* remove arrow, caret & text on mobile button only */
  .typeheader-39 .mobile-right .lang-curr .dropdown-toggle::after,
  .typeheader-39 .mobile-right .lang-curr .btn-link::after,
  .typeheader-39 .mobile-right .lang-curr .btn-link > i,
  .typeheader-39 .mobile-right .lang-curr .btn-link > span{
    display:none !important;
    content:none !important;
  }

  /* icons (LINE, Tel) */
  .typeheader-39 .mobile-right > a img{
    height:28px !important;
    width:28px !important;
    display:block;
    flex:0 0 auto;
  }

  /* hide desktop right area on mobile */
  .typeheader-39 .middle2{ display:none !important; }
}
@media (max-width: 426px){
  .typeheader-39 .lang-curr {
    transform: scale(0.95);
    transform-origin: right center;
  }
}
@media (max-width: 375px){
  .typeheader-39 .mobile-right > a img{
    height:26px !important;
    width:26px !important;
  }
  .typeheader-39 .mobile-right #form-language,
  .typeheader-39 .mobile-right .lang-curr .btn-link{
    height:26px !important;
    width:26px !important;
  }
  .typeheader-39 .mobile-right #form-language .dropdown-toggle img{
    width:26px !important;
    height:26px !important;
    max-width:26px !important;
    max-height:26px !important;
    border-radius:5px !important;
  }
}

/* Language Flag Sizing & Dropdown */
#form-language .dropdown-toggle{
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 2px 4px !important;
  color: #333 !important;
  text-decoration: none !important;
}

/* Desktop navbar flag */
.typeheader-39 .header-top #form-language .dropdown-toggle img,
header:not(.typeheader-39) #form-language .dropdown-toggle img{
  width: 22px !important;
  height: 15px !important;
  max-width: 22px !important;
  max-height: 15px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18) !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}

/* Dropdown menu items flags (both Desktop and Mobile) */
#form-language .dropdown-item img,
.typeheader-39 #form-language .dropdown-item img{
  width: 20px !important;
  height: 14px !important;
  max-width: 20px !important;
  max-height: 14px !important;
  object-fit: cover !important;
  border-radius: 2px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18) !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}
#form-language .dropdown-menu,
.typeheader-39 #form-language .dropdown-menu{
  min-width: 140px !important;
  padding: 6px 0 !important;
  border-radius: 6px !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
}
#form-language .dropdown-item,
.typeheader-39 #form-language .dropdown-item{
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  color: #333 !important;
  font-weight: 500 !important;
}
#form-language .dropdown-item span,
.typeheader-39 #form-language .dropdown-item span,
.typeheader-39 .mobile-right #form-language .dropdown-item span,
#form-language .dropdown-item .lang-text,
.typeheader-39 #form-language .dropdown-item .lang-text{
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #333 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
#form-language .dropdown-item:hover,
.typeheader-39 #form-language .dropdown-item:hover{
  background: #f0f7ff !important;
  color: #1565c0 !important;
}

/* NEVER show compare widget on homepage */
body.common-home #compare-widget,
body.common-home #cw-trigger,
body.common-home #cw-mini,
body.common-home #cw-panel{
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* =========================
   Tablet/Desktop 992–1024: force desktop behavior
   (กัน header เพี้ยนที่ 1024)
   ========================= */
@media (min-width: 992px) and (max-width: 1024px){

  .typeheader-39 .header-top{
    display:block !important;
    position:relative !important;
  }

  .typeheader-39 .header-middle{
    position:relative !important;
    top:auto !important;
    box-shadow:none !important;
  }

  body{ padding-top:0 !important; }

  /* กัน .logo global/absolute ไปทำร้าย layout */
  .typeheader-39 .header-middle .logo{
    position:relative !important;
    top:auto !important;
    left:auto !important;
    transform:none !important;
    width:auto !important;
    height:auto !important;
  }
}

/* =========================
   Bottom bar mobile (Managed in upper mobile block)
   ========================= */
