@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;
  }

  
  
#menu-btn{
    font-size: 3rem;
    cursor: pointer;
    color: var(--black);
    display: none;
}

.home{
    padding: 0;
}
.home .silde{
    text-align: center;
}
.banner_img{
    width: 100%;
}

.home .silde .content{
    width: 85rem;
    display: none;
}

.home .swiper-slide-active .content{
    display: inline-block;
}

.home .silde span{
    display: block;
    font-size: 2.2rem;
    color: var(--light-white);
    padding-bottom: 1rem;
    animation:fadeIn .2s linear backwards .2s;
}

.home .silde .content h3{
    font-size: 6vw;
    color: var(--white);
    text-transform: uppercase;
    line-height: 1;
    text-shadow: var(--text-shadow);
    padding: 1rem 0;
    animation:fadeIn .2s linear backwards .4s;
}

.home .swiper-button-next,
.home .swiper-button-prev{
    top: inherit;
    left: inherit;
    right: 0;
    bottom: 0;
    height: 7rem;
    width: 7rem;
    background: var(--white);
    color: var(--black);
}

.home .swiper-button-next:hover,
.home .swiper-button-prev:hover{
    background: var(--main-color);
    color: var(--white);
}

.home .swiper-button-next::after,
.home .swiper-button-prev::after{
    font-size: 2rem;
}

.home .swiper-button-prev{
    right: 7rem;
}



#menu-btn{
    font-size: 3rem;
    cursor: pointer;
    color: var(--black);
    display: none;
}

#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    background-color: red;
    color: white;
    border: none;
    outline: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

#scrollToTopBtn:hover {
    background-color:var(--main-color); /* Change to a darker color on hover */
}


/* search */
.search-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
  
  #search {
    padding: 10px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  
  button {
    padding: 10px 20px;
    background-color: var(--main-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  button:hover {
    background-color:#a5320c;
  }

/* Add to card on page */

.add-to-cart-btn {
    background-color: #a5320c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
  }
  
  #cart-notify {
    display: none;
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
  }
  
  #goToCartBtn {
    background-color: red;
    color: white;
    font-family: Battambang;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }

  #goToCartBtn:hover{
    background-color: #bd0000;
  }

  .cart-notify {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: none;
    z-index: 9999;
  }
  .cart-notify a {
    color: white;
    text-decoration: none;
    font-weight: bold;
  }
  


/* 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;
  }
  




/*for discount*/
.card1 {
    /* position: relative; */
    overflow: hidden; /* Ensure ribbon stays within card */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    background: white;
    margin: 10px;
    border-radius: 8px;
    
}

.card {
    position: relative;
    overflow: hidden; /* Ensure ribbon stays within card */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    background: white;
    margin: 10px;
    border-radius: 8px;
    
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: red;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Old price style (strikethrough) */
.old-price {
    text-decoration: line-through;
    color: gray;
    margin-right: 10px;
}

/* New price style */
.new-price {
    color: #cc2e2e; /* Green color for the new price */
    font-weight: bold;
}
.heading-title{
    text-align: center;
    font-size: 4rem;
    font-family: 'Khmer Viravuth';
    color: var(--main-color);
    text-transform: uppercase;
    padding-top: 1.5rem;
}

 h3{
    font-size: 2.5rem;
    color: var(--main-color);
    font-family: 'Times New Roman';
}

 p{
    font-size: 1.5rem;
    color: var(--light-black);
    font-family: Battambang;
    line-height: 2;
    padding: 1rem 0;
}


.btn{
    display: inline-block;
    background: var(--main-color) !important;
    margin-top: 1rem;
    color: var(--white);
    font-family: Battambang;
    font-size: 1.5rem;
    padding: 1rem 3rem;
    cursor: pointer;
}

.btn:hover{
    background: #c04d00 !important;
}

.waterimg {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
    object-fit: cover; /* Ensures the image covers the container */
}

.waterimg:hover{
    transform: scale(1.1);
}



/* about us */
.about{
    padding: 2rem;
    width: 100%;
    height: auto; /* កំណត់ height:auto ដើម្បីចៀសវាងលំហទំនេរ */
    /* display: flex; ប្រើ flex ដើម្បីបែងចែក content */
    gap: 2rem; /* បន្ថែមលំហរក្នុងចន្លោះអត្ថបទនិងរូបភាព */
    align-items: center;
}
.about-slider{
    background-color: rgba(255, 255, 255, 0.802);
    box-shadow: var(--box-shadow);
    width: 35%;
    border-radius: 50%;
}
.about_img{
    width: 100%;
}
.about .silde .content{
    width: 5rem;
    display: none;
}

.about p {
    font-size: 2rem; /* កំណត់ទំហំ font ឲ្យសមស្រប */
    line-height: 1.6; /* កំណត់ចន្លោះបន្ទាត់ */
    text-align: justify; /* ចង្អុលអត្ថបទឲ្យស្អាត */
}

.footer{
    background-color: var(--main-color);
    width: 100%;
    /* height: auto; */
    background-size: cover;
    background-position: center;
    padding:2rem;
    
}

.footer .box-container{
    padding-left: 20%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 2rem;
    
}

.footer .box-container .box h3{
    color: var(--white);
    font-size: 2rem;
    padding-bottom: 2rem;
    
}

.footer .box-container .box a{
    color: var(--white);
    font-size: 1.5rem;
    padding-bottom: 1rem;
    display: block;
}

.footer .box-container .box a i{
    color: var(--white);
    padding-right: .5rem;
    transition: .2s linear;
}


.footer .box-container .box a:hover i{
    padding-right: 2rem;
}

.footer .credit{
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: .1rem solid var(--light-white);
    font-size: 2rem;
    color: var(--white);
}

.footer .credit span{
    color: var(--light-white);
}

/* water card css  */
.card_control{
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    justify-items: center;
    padding:2rem 2rem;
    gap: 10px;
    margin-bottom: 2rem;
}

.card {
    background-color: white;
    width: 100%;
    max-width: 350px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 20px;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.card h3 {
    font-size: 2.5rem;
    margin: 10px 0;
    font-family: Battambang;
}


.card h2 {
    font-size: 2.5rem;
    margin: 10px 0;
    font-family: Battambang;
}

.card p {
    font-size: 2rem;
    color: #555;
    margin: 5px 0 15px;
}

.card a {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 2rem;
}

.card button:hover {
    background-color: #333;
}

/* promotion */

/* .card1 {
    background-color: white;
    width: 100%;
    max-width: 350px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 20px;
}

.card1 img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
.card1 h3 {
    font-size: 2.5rem;
    margin: 10px 0;
    font-family: Battambang;
}


.card1 h2 {
    font-size: 2.5rem;
    margin: 10px 0;
    font-family: Battambang;
}

.card1 p {
    font-size: 2rem;
    color: #555;
    margin: 5px 0 15px;
}

.card1 a {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 2rem;
}

.card1 button:hover {
    background-color: #333;
} */

/* admin */
.orders-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px;
  }
  
  .order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    transition: 0.3s;
  }
  
  .order-card:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .order-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #3b82f6;
  }
  
  .order-card ul {
    padding-left: 20px;
    margin-bottom: 10px;
  }
  
  .status-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 5px;
    background-color: #f1f5f9;
    font-weight: bold;
  }
  .delete-btn {
    background-color: #f87171;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
  }
  .delete-btn:hover {
    background-color: #ef4444;
  }
  


  /* 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;
  }
  

/* 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;
    }
  }
  