:root {
  --top-bg: linear-gradient(180deg, #0f2a57, #102c5a);
  --menu-bg: #183a6e;
  --white: #fff;
  --text-dim: #cbd6ee;
  --text-muted: #9fb1d6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  /* background-image: url('../images/bg-body.jpg'); */
  background: #fff;
  background-size: cover;     
  background-repeat: no-repeat;
  background-position: center; 
  background-attachment: fixed;
}
html, body {
  overflow-y: scroll;
  scrollbar-width: none;           
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;                 
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
}
.topbar {
  background: var(--top-bg);
  padding: 12px 0;
  color: var(--white);
  position: relative;
  z-index: 1000;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  max-width: 100%;    
}
.topbar-inner > .mobile-toggle {
  flex: 0 0 auto;
}
.topbar-inner > .header-logo {
  flex: 0 0 auto;
}
.topbar-inner > .header-search,
.topbar-inner > .header-account {
  min-width: 0;
}
.site-header .topbar-inner {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 30px;
  color: white;
  margin-right: 5px;
}

.header-logo img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.header-search {
  flex: 1 1 360px;
  max-width: 400px;
  margin: 0 10px 0 20px;
  display: flex;
}

.header-search input {
  flex: 1;
  padding: 12px 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
}
.header-account {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
}

.account-info {
  background: rgba(255, 255, 255, 0.15);
  padding: 0 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 140px;
  height: 46px;
  line-height: 1.2;
}
.account-info .main {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-info .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-dropdown {
  position: relative;
  height: 46px;
  min-width: 140px;
}
.account-dropdown a {
    text-decoration: none;
}
.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
  height: 100%;
}
.account-btn i {
  font-size: 20px;
}
.account-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1;
  overflow: hidden;
}
.account-btn .sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  display: flex;
  align-items: center;
}
.account-btn .sub i {
  font-size: 11px;
  margin-left: 4px;
  vertical-align: middle;
}

.dropdown-menu {
  position: absolute;
  top: 102%;
  right: 0;
  background: #fff;
  border-radius: 8px;
  padding: 8px 0;
  min-width: 200px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 9999;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: #222;
  text-decoration: none;
  transition: background 0.2s ease;
}

.dropdown-menu a i {
  font-size: 16px;
  width: 18px;
  text-align: center;
}

.dropdown-menu a:hover {
  background: #f0f2f5;
}

.account-dropdown:hover .dropdown-menu {
  display: block;
}
.site-header {
  position: relative;
  z-index: 10;
}

.menubar {
  background: var(--menu-bg);
}
.menubar-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}
.menubar-inner-wrapper {
  position: relative;
  overflow: visible; 
}

.menubar-inner-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  flex: 1;
  z-index: 10;
  position: relative;
}


.menubar-inner {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  white-space: nowrap;
  justify-content: space-between;
}
.menu-scroll-group {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.menu-scroll {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
}
.menu-scroll:hover {
  color: red;
}

.menu-item {
  color: var(--white);
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  padding: 6px 4px;
  font-weight: bold;
  /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); */
  /* -webkit-text-stroke: 0.3px #000; */
}
.menu-item i {
  font-size: 12px;
  margin-left: 4px;
  vertical-align: middle;
}
.menu-item.active::after,
.menu-item:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: #fff;
}

.menubar-inner-scroll::-webkit-scrollbar {
  display: none;
}

.mobile-popup-menu {
  display: none;
  flex-direction: column;
  background: rgb(250, 250, 250);
  position: fixed;
  top: 110px;
  width: 60%;
  left: 0;
  z-index: 999;
  padding: 12px 16px;
  transform: rotateY(90deg);
  transform-origin: left center;
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  perspective: 1000px;
  backface-visibility: hidden;
  min-height: 60vh;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 2px 0 12px rgba(0,0,0,0.2);
}
/* .mobile-popup-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  position: fixed;
  top: 110px;
  left: 0;
  width:60%;         
  min-height: 60vh;      
  max-height: 100vh;      
  overflow-y: auto;       
  padding: 16px 0;



  transform: translateX(-100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 9999;
} */
.mobile-popup-menu.show {
  display: flex;
  transform: rotateY(0deg);
  opacity: 1;
}

.mobile-popup-menu a {
  padding: 12px 0;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid rgba(22, 21, 21, 0.15);
  font-size: 16px;
}

.mobile-popup-menu a:hover {
  background: #f5f5f5;
  padding-left: 26px; 
}
.mobile-popup-menu a:last-child {
  border-bottom: none;
}
.mobile-popup-menu a i {
  font-size: 12px;
  margin-left: 4px;
  vertical-align: middle;
}

.mobile-account-icon {
  display: none;
}
.mobile-account-icon {
  display: none;
}

.mobile-account-icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  transition: background 0.2s ease;
}

.mobile-account-icon a:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .header-search input {
    padding: 6px 10px;  
    height: 36px;    
    font-size: 13px;
  }
  .mobile-popup-menu .menu-item {
        font-size: 13px;
    }
  .mobile-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
  }

  .header-logo {
    display: flex;
    justify-content: center;
    flex: 1;
  }

  .header-logo img {
    height: 40px;
    object-fit: contain;
  }

  .mobile-toggle {
    display: block;
  }

  .mobile-account-icon {
    display: block;
  }

  /* .header-search {
    display: flex;
    padding: 0;          
    margin: 6px 0 0 0;  
    width: 100%;
    order: 3;
  } */
.header-search {
    display: flex;
    align-items: center;  
    justify-content: center;
    width: 100%;
    max-height: 42px;      
    margin: 6px auto 0 auto;
    order: 3;
  }
  .desktop-only {
    display: none !important;
  }
}
.site-footer {
  color: #fff;
  background: linear-gradient(180deg, #0b1445 0%, #173a72 100%);
  margin-top: 30px;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 20px 22px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr; /* 4 cột */
  gap: 32px;
}

.brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.brand-logo { margin-top: -20px; height: 70px; object-fit: cover; }
.brand-name strong { font-size: 20px; line-height: 1; display: block; }
.brand-sub { font-size: 12px; opacity: .9; }

.brand-bullets {
  margin: 8px 0 8px 16px;
  padding: 0;
}
.brand-bullets li { margin: 6px 0; }
.brand-phone { margin-top: 8px; font-weight: 600; }

.footer-title {
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  position: relative;
}

.footer-list, .socials {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-list li,
.socials li { margin: 8px 0; }

.footer-list a, .socials a {
  color: #dce7ff;
  text-decoration: none;
}
.footer-list a:hover, .socials a:hover { text-decoration: underline; }

.acc summary {
  list-style: none;
  cursor: default; 
}
.acc summary::-webkit-details-marker { display: none; }

.footer-copy {
  background: #f3f4f6;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
  padding: 12px 10px;
}

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr; 
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .acc { border-top: 1px solid rgba(255,255,255,.15); padding-top: 12px; }
  .acc .footer-title {
    margin: 0;
    padding: 12px 0;
    cursor: pointer;
  }

  .acc .footer-title::after {
    content: "+";             
    float: right;
    font-weight: 800;
  }
  .acc[open] .footer-title::after {
    content: "−";           
  }

  /* .acc { 

  } */

  .footer-list li { margin: 10px 0; }
}
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  background-size: cover;
  padding: 24px;
}

.auth-box {
  padding: 32px;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  color: #181717;
}

.auth-box h2 {
  color: #ff5252;
  margin-bottom: 12px;
}

.auth-box p {
  font-size: 16px;
  margin-bottom: 24px;
}

.auth-box a {
  color: #0414f5;
  text-decoration: none;
  font-weight: bold;
}

.auth-box label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.auth-box input {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  margin-bottom: 16px;
  background: #f3f3f3;
  color: #000;
}

.auth-box button {
  width: 100%;
  background: #c62828;
  color: #fff;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease-in-out;
}

.auth-box button:hover {
  background: #b71c1c;
}
.account-info-box {
  display: flex;
  align-items: center;
  gap: 10px; 
  min-width: 0;
}

.account-balance {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  background-color: #394766;
}

.balance-view {
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.balance-icon {
  margin-right: 8px;
  color: #f8cb04;
}

.balance-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.balance-details .username,
.balance-details .balance {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-hover {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.topup-button {
  background-color: #e3ec91;
  color: #ec3939;
  padding: 6px;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
}

.account-balance:hover .balance-view {
  opacity: 0;
}

.account-balance:hover .balance-hover {
  opacity: 1;
  pointer-events: auto;
}


.purchase-history a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  text-decoration: none;
}

.purchase-history .history-text {
  font-size: 13px;
  line-height: 1.2;
}

.has-mega {
  position: relative;
}

.has-mega > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 1280px;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: none;
  z-index: 999;
  padding: 20px;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.mega-menu.open {
  display: grid;
}

.mega-menu.active {
  display: grid;
}

.mega-col h4 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2a44;
  text-transform: uppercase;
}

.mega-col a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  border-radius: 4px;
}

.mega-col a:hover {
  background: #f3f5ff;
  color: #0a3cff;
}

@media (max-width: 1024px) {
  .mega-menu { width: 92vw; }
}


.mobile-account-dropdown {
  position: absolute;
  right: 16px;
  top: 60px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 999;
}

.mobile-account-dropdown a {
  display: block;
  padding: 8px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.mobile-account-dropdown a:hover {
  background-color: #f5f5f5;
}
.mobile-balance {
  background-color: #f0fff0;
  border-bottom: 1px solid #ccc;
  margin-bottom: 6px;
  font-size: 14px;
  text-align: center;
}
.search-suggestions {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 999;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-suggestions div {
    padding: 10px;
    cursor: pointer;
}

.search-suggestions div:hover {
    background-color: #f0f0f0;
}
.search-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    width: 300px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    top: 75%;
}

.search-popup-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-popup-item img {
    width: 50px;
    height: 50px;
    margin-right: 12px;
    object-fit: cover;
    border-radius: 6px;
}
@media (max-width: 768px) {
  .search-popup {
    top: 90%;
  }
}

.zalo-fixed-box {
    position: fixed;
    top: 80%;
    left: 20px; 
    transform: translateY(-50%);
    z-index: 9999;
}

.zalo-fixed-box img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    animation: zaloPulse 1.5s infinite;
    box-shadow: 0 0 0 rgba(0, 104, 255, 0.7);
    transition: transform 0.2s ease;
}
@media (max-width: 768px) {
  .zalo-fixed-box {
    top: 90%;
    left: 10px;
  }
  .zalo-fixed-box img {
    width: 50px;
    height: 50px;
  }
}
.zalo-fixed-box img:hover {
    transform: scale(1.1);
}

/* Hiệu ứng ánh sáng tỏa ra */
@keyframes zaloPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(0, 104, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 104, 255, 0);
    }
}
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #0068ff;
    color: white;
    font-size: 22px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
    z-index: 9999;
}

#backToTop:hover {
    transform: scale(1.1);
    background: #004bcc;
}
.footer-map {
    margin-top: 10px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.footer-address {
    font-size: 14px;
    margin-top: 8px;
    color: #333;
}
