* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: Noto Sans Khmer, calibri;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}
html{
  scroll-padding-top:3cm; ;
}
.top {
  position: fixed;
  bottom: 65px;
  left: 40px;
}
@font-face {
    font-family:"Noto Sans Khmer" ;
    src: url(NotoSansKhmer-Regular.ttf);
}

@font-face {
  font-family: "Khmer OS Siemreap";
  src: url( KhmerOSSiemreap.ttf);
}
@font-face {
  font-family: "Cambria";
  src: url( Cambria.ttf);
}
@font-face {
  font-family: "Calibri";
  src: url(calibri-regular.ttf);
}

.mar {
  position: fixed;
  bottom: 0;
  left: 0;
  font-family: Khmer OS Siemreap, Cambria;
  font-size: 26px;
  color: rgb(52, 42, 113);
  padding: 2px 0;
}
/* top */
/* header  */
.header {
  background: linear-gradient(135deg, #63ddb3d9 0%, #a24b8c 100%);
  color: white;
  padding: 20px 0;
  text-align: center;
  font-size: 24px;
  display: flex;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
/* logo */
.logo {
  width: 200px;
  height: 50px;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  justify-content: flex-start;
}
/* top center */
.header-center {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
  font-family: Noto Sans Khmer, calibri;
}
/* signin and login bottons */
.Sign-bottons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-right: 20px;

}
.Sign-bottons button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-family: Khmer OS System, Cambria;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;  
  transition: background 0.3s ease;
}
.Sign-bottons a {
  text-decoration: none; /* removes underline */
  color: white;          /* make sure link text is visible */
}

.Sign-bottons button:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.3);
}

/* marquee */
.marquee {
  background-color: #f4f4f4;
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}
.marquee p {
  display: inline-block;
  white-space: nowrap;
  
  font-size: 22px;
  color: #555;
}
@keyframes marquee {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ===== Menu Bar ===== */
.menu {
  background-color: #343a40; /* same as navbar */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Main Menu */
.menu ul {
  list-style-type: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 5px;
  margin: 0;
  background: #343a40; /* Added background for visibility */
}

.menu ul li {
  position: relative;
}
.menu ul li img {
  width: 100%;
  height: 28px;
}

.menu ul li a {
  font-family: "KH Koulen", "Courier New", Courier, monospace;
  font-size: 20px;
  color: white;
  text-decoration: none;
  display: block;
  padding: 20px;
  transition: background 0.3s, color 0.3s;
}

/* Hover effect */
.menu ul li a:hover {
  background-color: #495057;
}

/* active when class is on the <a> */
.menu ul li a.active {
  background-color: #04627c; /* active green */
  color: #fff;
  

}

.menu ul li a.active:hover {
   background-color: #495057;
}

/* Main Content Layout */
.main-container {
  display: flex;
  min-height: calc(100vh - 200px);
  gap: 1%;
  padding: 1%;
  background: rgb(207, 244, 243);
}

/* Left Sidebar - Product Navigation */
.left-sidebar {
  width: 10%;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
  text-align: center;
 
}


.product-nav-item {
  display: block;
  text-decoration: none;
  color: #007bff;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 5px;
  font-size: 15px;
  text-align: center;
  transition: all 0.3s;
}

.product-nav-item:hover {
  background: #f0f0f0;
  color: #0056b3;
}

/* Main Content Area */
.content-area {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

/* Product Grid */
.product-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 8px;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  width: 100%;
}
.magin-top {
  top: 10cm;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  transition: 0.5s;
}

.product-image {
  width: 100%;
  height: 300px;
  background: #f0f0f0; /* this box */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
}

.product-image .pic {
  object-fit: cover;
  height: 90%;
  width: 90%;
  border-radius: 8px 8px 0 0;
}

.product-info {
  padding: 15px;
  text-align: center;
}

.product-name {
  font-weight: bold;
  font-family: Noto Sans Khmer, calibri;
  font-size: 20px;
  margin-bottom: 5px;
  color: #022d29;
}

.product-information {
  margin-top: 8px;
  font-family: Noto Sans Khmer, calibri;
  font-size: 21px;
  margin-bottom: 5px;
  color: #035d54;
}

.product-information2 {
  margin-top: 8px;
  font-family: Noto Sans Khmer, calibri;
  font-size: 18px;
  margin-bottom: 5px;
  color: #035d54;
}

.product-price {
  color: #238d84;
  font-size: 19px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Add to Cart Button */
.add-to-cart-btn {
  font-family: Noto Sans Khmer, calibri;
  font-size: 16px;
  width: 100%;
  background: #37b69e;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-to-cart-btn:hover {
  background: #03715d;
  transition: 0.5s;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

/* Right Sidebar - Advertisements */
.right-sidebar {
  width: 15%;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
  padding-bottom: 2px;
}

.ad-space {
  background: #f9f9f9;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-direction: column; 
  align-items: center;  
  text-align: center;
  gap: 2px;
  transition: 0.2s ease-in-out;
}

.ad-space:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.ad-space img {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
}

.ad-space p {
  margin: 0;
  font-size: 16px;
  color: #444;
}
.products a {
  text-decoration: none; 
  color: inherit;        
  display: block;       
}

/* Footer */
.footer {
  background: #343a40;
  color: white;
  padding: 30px 80px 10px;
  margin-top: 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 40px;
}

.footer-section h3 {
  margin-bottom: 15px;
  color: #ffc107;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid #495057;
  color: #adb5bd;
}

/* responsive design  */
/* Tablet */
@media screen and (min-width: 490px) and (max-width: 1279px) {
  /* Header adjustments */
  .header {
    flex-direction: row;
    gap: 1px;
    padding: 10px;
    font-size: 20px; 
  }
  .header img {
    height: 100%; 
  }


  .header-center {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  font-family: Noto Sans Khmer, calibri;
}

  .Sign-bottons {
    justify-content: center;
    padding: 0px ;
  }

  .Sign-bottons button {
    padding: 5px 8px; 
    font-size: 12px; 
  }

  .logo {
    width: 120px;
    height: 40px;
  }

  .menu ul {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 5px;
  }

  .menu ul li a {
    font-size: 16px; 
    padding:10px 12px;
    
  }
  .menu ul li img{
    height: 25px; 
    width: auto;
  }
  
  

  /* Marquee text size */
  .marquee p {
    font-size: 16px; 
  }

  .mar {
    font-size: 20px; 
  }

  /* Main container layout */
  .main-container {
    flex-direction: column;
    gap: 20px;
  }

  .left-sidebar,
  .right-sidebar {
    width: 100%;
    position: static;
    padding: 15px;
    margin-top: 10px;
    margin-bottom:10px;
    height: fit-content;
  }

  .left-sidebar h3,
  .right-sidebar h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .product-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 4px 10px;
    justify-content: center;
  }

  .product-nav-item {
    font-size: 15px;
    padding: 10px 8px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .product-image {
    height: 450px; 
  }
  .product-image .pic {
    height: 350px;
    width: 350px;
  }

  .product-name {
    font-size: 20px; 
  }

  .product-information {
    font-size: 20px; 
  }

  .product-information2 {
    font-size: 18px; 
  }

  .product-price {
    font-size: 18px; 
  }

  .add-to-cart-btn {
    padding: 12px; 
    font-size: 16px; 
  }

  /* Section title */
  .section-title {
    font-size: 20px; 
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer-section h3 {
    font-size: 16px; 
  }

  .footer-section ul li a {
    font-size: 14px; 
  }

  .right-sidebar {
  display: flex;
  flex-direction: column; 
  gap: 15px;
  align-items: center; 
}

.right-sidebar h2 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 10px;
}

.right-sidebar .products {
  display: flex;
  gap: 15px;
}

.ad-space {
  display: grid;
  height: auto;
  font-size: 14px;
  text-align: center; 
}

.ad-space img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
}
.right-sidebar .products a {
  text-decoration: none; 
  color: inherit; 
}



  /* Top button */
  .top {
    width: 45px; 
    height: 45px;
    bottom: 50px;
    left: 20px;
  }
}

/* Mobile Responsive Styles */
@media (max-width: 489px) {
  .header {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    gap: 8px;
    padding: 8px;
    font-size: 18px; 
  }
  .header img {
    height: 100%; 
  }


  .header-center {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-family: Noto Sans Khmer, calibri;
}

  .Sign-bottons {
    justify-content: center;
    gap: 3px;
    padding-right: 0px ;
  }

  .Sign-bottons button {
    padding: 4px 5px;
    font-size: 11px;
    border-radius: 6px;
  }

  .logo {
    width: 100px;
    height: 40px;
  }

  .menu ul {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 5px;
  }

  .menu ul li a {
    font-size: 14px;
    padding: 10px 8px;
  }

  .menu ul li img {
    height: 20px; 
  }

  .marquee p {
    font-size: 16px; 
  }

  .mar {
    font-size: 20px; 
  }

  .main-container {
    flex-direction: column;
    gap: 20px;
    padding: 15px 10px;
  }

  .left-sidebar,
  .right-sidebar {
    width: 100%;
    position: static;
    padding: 15px;
    margin-top: 8px;
    margin-bottom: 8px;
  }

  .left-sidebar h3,
  .right-sidebar h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .product-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    justify-content: center;
  }

  .product-nav-item {
    font-size: 14px;
    padding: 10px 8px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 5px;
  }

  .product-card {
    border-radius: 10px;
    overflow: hidden;
  }

  .product-image {
    height: 300px;
  }

  .product-image .pic {
    height: 280px;
    width: 280px;
  }

  .product-info {
    padding: 20px 15px;
  }

  .product-name {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .product-information {
    font-size: 16px;
    line-height: 1.3;
    margin-bottom: 6px;
  }

  .product-information2 {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  .product-price {
    color: #238d84;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: bold;
  }

  .add-to-cart-btn {
    width: 100%;
    background: #37b69e;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .add-to-cart-btn:hover {
    background: #03715d;
    transition: 0.5s;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  }

  .add-to-cart-btn:active {
    transform: translateY(0);
  }

  .footer {
    padding: 32px 15px 16px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }
  .footer-section ul li {
    margin-bottom: 8px;
  }

  .footer-section ul li a {
    font-size: 14px;
    line-height: 1.4;
  }

  .footer-bottom {
    font-size: 13px;
    padding-top: 24px;
  }

  .right-sidebar {
    order: 1;
  }

  .ad-space {
    height: 140px;
    font-size: 16px;
    margin-bottom: 15px;
    border-radius: 8px;
    justify-content: space-arounds;
  }
.right-sidebar .products a {
  text-decoration: none; 
  color: inherit; 
}

  .top {
    width: 40px;
    height: 40px;
    bottom: 50px;
    left: 20px;
    left: auto;
  }

  .content-area {
    padding: 20px 15px;
    border-radius: 10px;
  }

  body {
    font-size: 16px;
    line-height: 1.5;
  }
}
