*{
    font-family: 'Anuphan';
    text-decoration: none !important;
}
  body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow-x: hidden;
    text-decoration: none !important;
    
  }
a,
a:hover,
a:focus,
a:active {
  text-decoration: none !important;
}
.x a{
    color: #fff !important;
}
.header {
      position: sticky;
      top: 0;
      z-index: 1000;
      background: linear-gradient(90deg, #287837 -20.7%, #08A94C 66.86%);
      color: white;
      padding: 0px 15px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    /* Navbar style */
    .navbar-brand img {
      height: 70px;
    }

    .navbar-nav .nav-link {
      color: #fff !important;
      font-weight: 500;
      padding: 8px 15px;
    }

    .navbar-nav .nav-link:hover {
      color: #C4D94E !important;
    }

    /* Offcanvas (เมนูเลื่อนจากด้านข้างบนมือถือ) */
    .offcanvas {
    background: #e5ffe5;
    color: #004606 !important;
    }

    .offcanvas .nav-link {
      color: #004606 !important;
      padding: 10px 20px;
    }

    .offcanvas .nav-link:hover {
      /* background: #066500; */
      color: #C4D94E;
    }

#loadingScreen {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,93,7,0.5);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

/* Spinner container */
.spinnerWrapper {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Spinner */
.spinner {
  width: 70px;
  height: 70px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #54ac33;
  border-radius: 50%;
  animation: spinx 1s linear infinite;
}

/* โลโก้อยู่ตรงกลาง spinner */
.spinnerLogo {
  position: absolute;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  width: 50px; /* ขนาดโลโก้ */
  height: 50px;
}

@keyframes spinx {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.xcontainer {
    position: relative;
    height: 240px; /* ต้องมีพื้นที่ให้ซ่อน */
    overflow: hidden;
}

  .xfooter {
    position: absolute;
    bottom: -200px; /* ซ่อนครึ่งล่างไว้ใต้จอ */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 100px);  /* ล้นข้างละ 30px */
    height: 350px;
    background: linear-gradient(90deg, rgba(9, 36, 9, 1) 0%, #16b000 100%);
    border: 3px solid #C4D94E;
    border-radius: 50%;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    z-index: 1;
  }

  /* ครึ่งวงกลมล้นออกซ้ายขวา */
  .footer {
    position: fixed;
    bottom: -50px; /* ซ่อนครึ่งล่างไว้ใต้จอ */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 70px); /* ล้นข้างละ 30px */
    height: 135px;
    background: linear-gradient(90deg, rgba(9, 36, 9, 1) 0%, #16b000 100%);
    border: 3px solid #C4D94E;
    border-radius: 50%;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    z-index: 1;
      
  -webkit-mask: radial-gradient(
    circle 40px at center top, /* ขนาดวงหลุม 45px */
    transparent 0, transparent 40px,
    black 41px, black 100%
  );
  mask: radial-gradient(
    circle 40px at center top,
    transparent 0, transparent 40px,
    black 41px, black 100%
  );
  }

  /* โลโก้ตรงกลาง */
  .footer-logo {
    position: fixed;
    bottom: 50px !important;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 3px solid #C4D94E;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 3;
  }

  .footer-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
  }

  /* เมนูไอคอน */
  .footer-menu {
    position: fixed;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2;
    padding: 5px 0;
  }

  .footer-menu button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    cursor: pointer;
    line-height: 15px;
  }

  .footer-menu button span {
    font-size: 12px;
  }

  /* ให้โลโก้ตรงกลางมีระยะห่าง */
  .footer-menu button:nth-child(3) {
    /* margin: 0 5px; เว้นช่องให้โลโก้ */
  }
    .icox{
        font-size: 28px;
    }
    .mhi{
      height: 40px !important; 
    }

@media (min-width: 768px) {
    .nshow {
        display: none;
    }
    .xcontainer {
        display: block !important;
    }
}
@media (max-width: 768px) {
    .xcontainer {
        display: none !important;
    }
}

  @media (max-width: 480px) {
      
    .footer {
      width: calc(100% + 80px);
      height: 130px;
      bottom: -45px;
    }

    .footer-logo {
      width: 70px;
      height: 70px;
      bottom: 60px;
    }

    .footer-menu button {
      font-size: 18px;
    }

    .footer-menu button span {
      font-size: 10px;
    }

    .footer-menu button:nth-child(3) {
      /* margin: 0 50px; */
    }

  }

.lottery-search-wrapper {
    margin: 40px auto;
    padding: 20px 0 20px 0;
    background: rgba(15,155,15,0.1);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    text-align: center;
    box-shadow: 0 1px 6px rgba(15,155,15,0.5);
    color: #045414;
}
.title { font-size: 26px; margin-bottom: 18px; }
.search-input {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap:wrap;
}

.digit {
    position: relative;
    width: 60px;
    height: 68px;
    text-align: center;
    font-size: 28px;
    border-radius: 12px;
    border: 0px solid rgba(255,255,255,0.08);
    outline: none;
    background: linear-gradient(45deg, #0f9b0f, #00b09b);
    color: #fff;
    transition: 0.15s;
    -webkit-appearance: none;
    box-shadow: 0 1px 6px rgba(15,155,15,0.5);
}

.digit:focus {
    background: linear-gradient(45deg, #1d976c, #93f9b9);
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.digit.error {
    border: 1px solid #ff4e4e !important;
    background: rgba(255,0,0,0.12);
}
@keyframes shakeX {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-3px); }
    50%  { transform: translateX(3px); }
    75%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}
.shake { animation: shakeX 0.22s; }
.result-box { margin-top: 20px; }
.result-card {
    background: rgba(255,255,255,0.06);
    padding: 18px;
    border-radius: 12px;
    margin: 10px auto;
    max-width: 420px;
    color:#fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    text-align: center;
}
.result-number { font-size: 28px; font-weight:700; color:#ffeb3b; }
.buy-btn {
    margin-top:10px;
    padding: 10px 15px;
    font-size: 18px;
    background: #ffca28;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.buy-btn:hover { background: #ffe082; }
/* responsive */
@media(max-width:540px){
    .digit { width: 44px; height:54px; font-size:20px; }
    .search-input {
     gap: 5px;   
    }
}

.bxzx {
  position: relative;
  background: linear-gradient(0deg, #00b09b 0%, #0f9b0f 50%, #00b09b 100%);
  box-shadow: 0px 0px 10px 0px rgba(15,155,15,0.5);
  border: 0px solid #cccccc;
  border-radius: 10px;
  height: 100px auto;
  text-align: center;
  color: aliceblue;
  padding: 5px 25px 5px 25px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.bxzx::before {
  content: "";
  position: absolute;
  inset: 1px;                 
  border: 1px solid #e8e8e8;   
  border-radius: 10px;
}
.bxzx:hover {
  box-shadow: 0 8px 18px rgba(15,155,15,0.5);
  transform: translateY(-4px);
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 คอลัมน์ */
  gap: 12px; /* ช่องว่างระหว่างช่อง */
  max-width: 422px;
  margin: auto;
}

.radio-item {
  position: relative;
  padding: 12px;
  background: #CDE35A;
  /* border: 0px solid #ccc; */
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 1px 6px rgba(15,155,15,0.5);
}

.radio-item::before {
  content: "";
  position: absolute;
  inset: 1px;                 
  border: 1px solid #e8e8e8;   
  border-radius: 12px;
}

.radio-item:hover {
  border-color: #00a86b;
  background: #f4fff8;
}

.radio-item input[type="radio"] {
  display: none;
}

.radio-item.selected {
  border-color: #00a86b; 
  background: linear-gradient(180deg, #08A94C 0%, #08A048 30.5%, #056C30 74.5%, #03431E 100%);
  color: aliceblue;
  /* background: #e6ffe9; */
}

.sbo{
max-width: 422px; 
margin: auto;    
}
@media(max-width:540px){
    .radio-grid{
        padding: 0 20px 0 20px;
        font-size: 13px;
        gap: 5px;
    }
    .sbo{
      padding: 0 20px 0 20px;   
    }
}

.botton_search {
  position: relative;
  background: linear-gradient(0deg, #00b09b 0%, #0f9b0f 50%, #00b09b 100%);
  box-shadow: 0px 0px 10px 0px rgba(15,155,15,0.5);
  border-radius: 12px;
  text-align: center;
  color: aliceblue;
  padding: 12px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: none;
}
.botton_search::before {
  content: "";
  position: absolute;
  inset: 1px;                 
  border: 1px solid #e8e8e8;   
  border-radius: 12px;
}
.botton_search:hover {
  box-shadow: 0 8px 18px rgba(15,155,15,0.5);
  transform: translateY(-4px);
}
.box-parent {
    padding: 5px !important;
    /* border: 1px #BB1417 solid; */
    position: relative;
    height:  50px;
}
.lottery-footer {
    position: absolute;
    z-index: 9;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;

    margin: 0 auto;
    padding: 20px 0;
    background: #E7FFE5;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(15,155,15,0.5);
    color: #045414;
}

.btn-x{
  width: 30px;
  height: 30px;
  background: linear-gradient(0deg, #00b09b 0%, #0f9b0f 50%, #00b09b 100%);
  box-shadow: 0px 0px 10px 0px rgba(15,155,15,0.5); 
  border-radius: 50%;
  overflow: hidden;
  color: brown;
  border: none;
  font-size: 20px;
}
.navbar-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 18px !important;
    color: #fff !important;
}
.my-swal-popup {
  border-radius: 20px !important; 
}
.my-swal-popup .swal2-confirm,
.my-swal-popup .swal2-cancel {
  border-radius: 999px !important;
}
.my-swal-container {
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

    .cardBg{
        background: linear-gradient(45deg, #0f9b0f, #00b09b);
        padding: 5px;
        
    }
    .bnm{
     box-shadow: 0 1px 6px rgba(15,155,15,0.5);  
     border-radius: 12px;
     overflow: hidden;
    }
    .borCo{
    position: relative;
    overflow: hidden;
        
    }
    .borCo img{
    transition: transform 0.35s ease;    
    }
    .borCo:hover img{
    transform: scale(1.12);    
    }
.buy-success {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;

  transform: scale(0.8);
  transition: all .35s ease;
}

.buy-success i {
  font-size: 40px;
  color: #00e676;
  background: #fff;
  border-radius: 50%;
  padding: 8px;
  margin-bottom: 8px;
}

.buy-success span {
  color: #fff;
  font-size: 14px;
}
    
@media (max-width: 480px) {
.buy-success i {
  font-size: 20px;
  padding: 8px;
  margin-bottom: 4px;
}

.buy-success span {
  color: #fff;
  font-size: 12px;
}    
    }

/* show state */
.borCo.ordered .buy-success {
  opacity: 1;
  transform: scale(1);
}
    .bage{
        width: 35px; 
        height: 35px; 
        border-radius: 50px; 
        border: 1px #fff solid;  
        background: linear-gradient(45deg, #00b09b, #0f9b0f); 
        z-index: 1; 
        position: absolute; 
        border-radius: 50px; 
        margin-top: -18px; 
        display:flex; 
        justify-content:center; 
        align-items:center;
    }
    
    .boxz{
        position: absolute;
        background: rgba(0,63,39,0.8);
        z-index: 1;
        width: 55px;
        top: 0;
        bottom: 0;
        text-align: center;
        color: aliceblue;
        font-size: 14px;
        padding-top: 4px;
    }
 @media (max-width: 480px) {
    .boxz {
        width: 45px;
        font-size: 9px; /* ปรับตามต้องการ */
    }
} 
.grid-box {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* 4 ช่อง */
    gap: 10px;
}
    
.xitem {
    background: #e5ffe5;
    padding: 10px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
.xitem a img{
 width: 80px;
 transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.xitem a:hover img {
  transform: translateY(-6px) scale(1.1);
}

/* บนมือถือ (หน้าจอ <= 480px) */
@media (max-width: 480px) {
     .grid-box {
        grid-template-columns: repeat(4, 1fr); 
         gap: 5px;
    } 
    .xitem{
     padding: 0 3px 8px 3px; 
     font-size: 12px;
    }
    .xitem img{
     padding: 5px; 
     width: 70px;
    }
}
    
.loadingx {
  animation: spinx 0.8s linear infinite;
}

@keyframes spinx {
  100% { transform: rotate(360deg); }
}
    
.fly-product {
  position: fixed;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.35));
  transition: filter 0.2s linear;
}
.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}
    
#cartIcon {
 position: relative;
    }

/* badge จำนวน */
.cart-count {
  position: absolute;
  top: -6px;
  right: 0px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* font-weight: bold; */
}

/* timer */
.cart-timer {
  position: absolute;
  top: 34px;
  left: 4px;
  /* right: -20px; */
  background: #000;
  color: #fff;
  font-size: 9px;
  padding: 0 6px;
  border-radius: 50px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-5px);
  transition: .25s;
}
    
.cart-countx {
  position: absolute;
  top: 20px;
  left: 39%;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* font-weight: bold; */
}
    
.cart-timerx {
  margin: 5px;
  background: #000;
  color: #fff;
  font-size: 9px;
  padding: 0 6px;
  border-radius: 50px;
  white-space: nowrap;
  opacity: 1;
  transform: translateY(-5px);
  transition: .25s;
}

/* show timer */
#cartIcon.active .cart-timer {
  opacity: 1;
  transform: translateY(0);
}
    
#cartIconx {
  opacity: 0;
  transform: translateY(80px);
  transition: .35s ease;
  pointer-events: none;
}

#cartIconx.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: popUp .35s ease;
}

#cartIconx.show {
  animation: popUp .35s ease;
}

@keyframes popUp {
  0%   { transform: translateY(80px) scale(.9); }
  60%  { transform: translateY(-6px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

.cart-inner.shake {
  animation: shakex 0.4s;
}
@keyframes shakex {
  0%   { transform: translateY(0) translateX(0); }
  25%  { transform: translateY(0) translateX(-4px); }
  50%  { transform: translateY(0) translateX(4px); }
  75%  { transform: translateY(0) translateX(-4px); }
  100% { transform: translateY(0) translateX(0); }
}

    .x-log {
      right: -2px;  
    }
    .x-menu {
      position: relative;
      display: inline-block;
    }
        .x-login {
      position: absolute;
      top: 100%;
      /* background: white;
      border-radius: 15px;
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);*/
      width: 160px auto;
      /* padding: 15px; */
      transform: scale(0.75);
      opacity: 0;
      pointer-events: none;
      transform-origin: top right;
      transition: transform 0.2s ease, opacity 0.2s ease;
      z-index: 999;
    }

    .x-menu:hover .x-login {
      transform: scale(1.03);
      opacity: 1;
      pointer-events: auto;
    }
    .x-font{
    font-size: 20px;
    padding: 4px;
    color: #1e496e;
    }
.faa {
  line-height: 27px;  
  width: 30px;
  height: 30px;
  text-align: center;
  text-decoration: none;
  border-radius: 50%;
}

.menu-card{
  width:230px;
  background:#fff;
  border-radius:18px;
  border:1.5px solid #c5e0cc;
  box-shadow:0 12px 40px rgba(26,92,42,.14), 0 2px 8px rgba(26,92,42,.06);
  overflow:hidden;
}

/* list */
.menu-list{padding:.4rem 0}

.menu-row{
  display:flex;align-items:center;gap:0;
  text-decoration:none;
  padding:.62rem 1rem;
  position:relative;
  transition:background .15s;
  cursor:pointer;
  opacity:0;
  animation:rowIn .3s ease forwards;
}
.menu-row:nth-child(1){animation-delay:.04s}
.menu-row:nth-child(2){animation-delay:.08s}
.menu-row:nth-child(3){animation-delay:.12s}
.menu-row:nth-child(4){animation-delay:.16s}
.menu-row:nth-child(5){animation-delay:.20s}
.menu-row:nth-child(6){animation-delay:.24s}
.menu-row:nth-child(7){animation-delay:.28s}
.menu-row:nth-child(8){animation-delay:.32s}
@keyframes rowIn{
  from{opacity:0;transform:translateX(-10px)}
  to{opacity:1;transform:translateX(0)}
}

/* accent bar */
.menu-row::before{
  content:'';
  position:absolute;left:0;top:50%;
  width:3px;height:0;
  border-radius:0 3px 3px 0;
  background:linear-gradient(180deg,#2d8a47,#4caf65);
  transform:translateY(-50%);
  transition:height .2s ease;
}
.menu-row:hover::before{height:65%}
.menu-row:hover{background:#f0faf2}
.menu-row:hover .row-icon{color:#1a5c2a;transform:scale(1.15) rotate(-5deg)}
.menu-row:hover .row-label{color:#1a5c2a;font-weight:700}
.menu-row:hover .row-arrow{opacity:1;transform:translateX(0)}

/* icon cell */
.row-icon{
  font-size:17px;
  color:#2d8a47;
  width:30px;flex-shrink:0;
  transition:transform .2s, color .15s;
}

/* label */
.row-label{
  font-size:.88rem;font-weight:600;
  color:#1a2e1e;flex:1;
  transition:color .15s,font-weight .15s;
  font-family:'Sarabun',sans-serif;
  padding-left:.1rem;
}

/* arrow */
.row-arrow{
  font-size:14px;color:#6b9175;
  opacity:0;transform:translateX(-5px);
  transition:opacity .15s,transform .15s;
}

/* section divider */
.menu-divider{
  height:1px;
  background:linear-gradient(90deg,transparent,#c5e0cc 25%,#c5e0cc 75%,transparent);
  margin:.3rem .9rem;
}

/* logout */
.menu-row.logout .row-icon{color:#c0392b}
.menu-row.logout .row-label{color:#c0392b}
.menu-row.logout:hover{background:rgba(192,57,43,.05)}
.menu-row.logout:hover::before{background:linear-gradient(180deg,#e74c3c,#c0392b)}
.menu-row.logout:hover .row-icon{color:#a93226}

/* footer */
.menu-footer{
  background:#f7fdf8;
  border-top:1px solid #e8f5ec;
  padding:.55rem 1rem;
  text-align:center;
  font-size:.68rem;
  color:#8aab90;
}

.footer-nav { display:flex; flex-wrap:wrap; gap:.25rem; justify-content:flex-end; }

.fn-link {
  display:inline-flex; align-items:center;
  color:#097810; text-decoration:none;
  padding:.3rem .65rem; border-radius:8px;
  position:relative;
  transition:color .2s, background .2s;
  opacity:0; animation:linkFade .4s ease forwards;
}
.fn-link:nth-child(1){animation-delay:.05s}
.fn-link:nth-child(3){animation-delay:.10s}
.fn-link:nth-child(5){animation-delay:.15s}
.fn-link:nth-child(7){animation-delay:.20s}
.fn-link:nth-child(9){animation-delay:.25s}

@keyframes linkFade {
  from { opacity:0; transform:translateY(5px) }
  to   { opacity:1; transform:translateY(0) }
}

.fn-link::after {
  content:''; position:absolute;
  bottom:2px; left:.65rem; right:.65rem;
  height:1.5px; background: #1BB9B9;
  border-radius:2px;
  transform:scaleX(0); transform-origin:left;
  transition:transform .22s ease;
}
.fn-link:hover { color: #20C70A; background:rgba(255,255,255,.1); }
.fn-link:hover::after { transform:scaleX(1); }

.fn-sep { color:rgba(255,255,255,.3); user-select:none; }
