@import url('https://fonts.googleapis.com/css2?family=Battambang:wght@100;300;400;700;900&family=Khmer&display=swap');

:root{
    --main-color:#e75725;
    --text-color: #000000;
    --black:#222;
    --white:#ffffff;
    --light-black:#777;
    --light-white:#fff9;
    --dark-bg:rgba(0,0,0,.7);
    --light-bg:#ebebeb;
    --border:.1rem solid var(--black);
    --box-shadow:0 .5rem 1rem rgba(0, 0, 0, 0.1);
    --text-shadow: 0 1.5rem 3rem rgba(0,0,0,.3);

}


*{
    .khmer-regular {
        font-family: "khmer", sans-serif;
        font-weight: 400;
        font-style: normal;
      }
        margin: 0; padding: 0;
        box-sizing: border-box;
        outline: none; border: none;
        text-decoration: none;
        text-transform: capitalize;

}
html{
    font-size: 60%;
    overflow-x: 1rem;
}

html::-webkit-scrollbar-track{
    background-color: var(--main-color);
    
}

html::-webkit-scrollbar-thumb{
    background-color: var(--main-color);
}
body{
    background: var(--light-bg);
}


@keyframes fall {
    0% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(100vh);
    }
}



html{
  font-size: 60%;
  overflow-x: 1rem;
}

html::-webkit-scrollbar-track{
  background-color: var(--white);
  
}

html::-webkit-scrollbar-thumb{
  background-color: var(--main-color);
}
body{
  background: var(--light-bg);
}


@keyframes fadeIn {
  0%{
      transform: scale(0);
      opacity: 0;
  }
}


.header{
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background-color: var(--main-color);
  display: flex;
  padding: 2rem 10rem;
  box-shadow: var(--box-shadow);
  align-items: center;
  justify-content: space-between;
}

.header .logo {
  overflow: visible;
    width: auto;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.header .logo img {
  width: 160px;
  height: auto;
}

.header .logo h4 {
  font-size: 14px;
  color: var(--white); /* You can adjust color as needed */
  margin-top: 8px; /* Add spacing between image and text */
  font-family: 'AKbalthom Kbach';
  white-space: nowrap; /* មិនអោយធ្លាក់បន្ទាត់ក្រោម */
  overflow: hidden;
  text-overflow: ellipsis; /* បង្ហាញ ... បើអក្សរធំ */
}


.navbar {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  font-family: 'Khmer OS Battambang', sans-serif;
  justify-content: space-between;
  flex-wrap: wrap;
}

.navbar a {
  text-decoration: none;
  font-size: 2.5rem;
  color: var(--white);
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.navbar a:hover {
  background-color: #e0e0e0;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  font-size: 2.5rem;
  color: var(--white);
  font-family: 'Khmer OS Battambang', sans-serif;
  background-color: transparent;
  border: none;
  cursor: pointer;
  /* font-size: 16px; */
  padding: 8px 12px;
  border-radius: 6px;
}

.dropbtn:hover {
  background-color: #e0e0e0;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 160px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
  z-index: 1;
  border-radius: 6px;
  overflow: hidden;
}

.dropdown-content a {
  font-size: 2.5rem;
  color: var(--black);
  padding: 10px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: var(--main-color);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.cart-link {
  margin-left: auto;
  font-size: 20px;
}

p{
  font-size: 15px;
  font-family: 'Khmer OS Battambang', sans-serif;
}







#menu-btn{
  font-size: 3rem;
  cursor: pointer;
  color: var(--black);
  display: none;
}

/* login */

  .login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  
  .login-box {
    background: #fff;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    width: 320px;
    text-align: center;
  }
  
  .logo {
    width: 150px;
    margin-bottom: 20px;
  }
  
  .login-box h2 {
    font-family: 'Khmer OS Battambang', sans-serif;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
  }
  
  .login-box input {
    font-family: 'Khmer OS Battambang', sans-serif;
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
  }
  
  .login-box button {
    font-family: 'Khmer OS Battambang', sans-serif;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s;
  }
  
  .login-box button:hover {
    background-color: #2563eb;
  }
  
  .logout-btn {
    background-color: #ef4444;
  }
  
  .logout-btn:hover {
    background-color: #dc2626;
  }
  
  .user-info {
    margin-bottom: 15px;
    font-weight: bold;
    color: green;
  }


/* cart */
/* style.css */
.cart-container {
  max-width: 700px;
  
  margin: auto;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-family: 'Khmer OS Siemreap', sans-serif;
}

h2, h3 {
  font-family: 'Khmer OS Siemreap', sans-serif;
  font-size: 25px;
  color: var(--main-color);
  margin-top: 20px;
}

#cart-items > div {
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  background: #f8f9fa;
}

#cart-items strong {
  font-size: 15px;
  display: block;
  margin-bottom: 5px;
}

input[type="number"] {
  font-size: 15px;
  width: 60px;
  padding: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

button {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background-color: #2563eb;
}

#cart-total {
  font-family: 'Khmer OS Siemreap', sans-serif;
  font-size: 25px;
  padding: 10px;
  margin-top: 10px;
  background-color: #f0fdf4;
  border-radius: 10px;
  color: #1e3a8a;
}

.delivery-info {
  font-size: 20px;
  font-family: 'Khmer OS Siemreap', sans-serif;
  margin-top: 15px;
}

.delivery-info label {
  font-family: 'Khmer OS Siemreap', sans-serif;
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

.delivery-info select,
.delivery-info input[type="text"],
input[type="tel"],
input[type="text"] {
  font-family: 'Khmer OS Siemreap', sans-serif;
  font-size: 20px;
  width: 100%;
  padding: 8px 12px;
  margin-top: 5px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

input.error {
  border-color: red;
  background-color: #ffe5e5;
}

button[onclick="goToPayment()"] {
  width: 100%;
  font-family: 'Khmer OS Siemreap', sans-serif;
  margin-top: 20px;
  font-size: 16px;
}

/* add to cart */
.cart-link {
  position: relative;
  font-size: 24px;
  color: white;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  display: none;
}






/* Responsive adjustments */
@media (min-width: 580px) {
  .card_control{
      grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .card_control{
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
  }
  
  .card {
      max-width: 500px;
  }

  .card button {
      padding: 12px 24px;
  }
}

@media (min-width: 1024px) {
  .card_control{
      grid-template-columns: repeat(4, 1fr);
      gap: 50px;
  }
  .card {
      max-width: 400px;
  }

  .card h2 {
      font-size: 3rem;
  }

  .card button {
      padding: 14px 28px;
  }
}
/* end water card  */

/* medai queries */

@media (max-width:991px){
  .header {
      padding: 2rem 2rem;
  }
  html{
      font-size: 55%;
  }
}

@media (max-width:768px){
  
  .header .logo img{
      width: 130px;
   }
  #menu-btn{
      display: inline-block;
      transition: .2s linear;
  }
  #menu-btn.fa-times{
      transition: rotate(180deg);
  }
  
  .header .navbar{
      position: absolute;
      top: 99%; left:0; right: 0;
      background-color: var(--main-color);
      border-top: var(--border);
      padding: 2rem;
      clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);

  }

  .header .navbar.active{
      clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .header .navbar a{
      display: block;
      margin: 2rem;
      text-align: center;
  }
}


@media (max-width:450px){
  html{
      font-size: 50%;
  }
  .heading-title{
      font-size: 3.5rem;
  }
  .h3{
      font-size: 2.5rem;
  }
}


/* ✅ Mobile Responsive Fix */
@media screen and (max-width: 768px) {
  .dropdown {
    width: 100%;
  }

  .dropbtn {
    width: 100%;
    text-align: left;
    background-color: #ccc;
    font-size: 18px;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    background-color: #f7f7f7;
  }

  .dropdown-content a {
    font-size: 16px;
    padding: 12px;
  }
}
