:root {
  --bg: #F4F6F9;
  --bg-card: #FFFFFF;
  --text-main: #1A1A1A;
  --text-sub: #666666;
  --sheet-dur: 380ms;
}

@font-face {
  font-family: 'Bold';
  src: url('GoogleSans-Bold.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'Khala Mid';
  src: url('GoogleSans-Medium.ttf') format('truetype');
  font-style: normal;
}
@font-face {
  font-family: 'simple';
  src: url('GoogleSans-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'regular';
  src: url('GoogleSans-Regular.ttf') format('truetype');
}

body::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  font-family: 'simple', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
}

/* ========================
   FLOATING LOGO
   ======================== */
.floating-logo {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1000;
}

.floating-logo img {
  height: 36px;
}

/* ========================
   CONTAINER & PANEL
   ======================== */
.panel-container {
  max-width: 100%;
  padding-top: 70px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

/* ========================
   WELCOME BANNER
   ======================== */
.welcome-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0099ff 0%, #0056cc 100%);
  border-radius: 16px;
  padding: 24px 32px;
  margin: 0 auto 24px;
  max-width: 1068px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 153, 255, 0.2);
}

.welcome-text {
  flex: 1;
}

.welcome-text .welcome-title {
  font-family: 'Khala Mid', sans-serif;
  font-size: 24px;
  margin: 0 0 10px;
  line-height: 1.3;
}

.welcome-text .welcome-desc {
  font-family: 'simple', sans-serif;
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
  color: #e0f0ff;
}

.welcome-img {
  width: 120px; 
  flex-shrink: 0;
  margin-left: 20px;
}

.welcome-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

/* ========================
   CATEGORY TABS (ថ្មី)
   ======================== */
.category-tabs {
  display: flex;
  gap: 12px;
  padding: 0 16px;
  max-width: 1100px;
  margin: 0 auto 16px;
  overflow-x: auto;
  -ms-overflow-style: none; /* សម្រាប់ Edge */
  scrollbar-width: none;    /* សម្រាប់ Firefox */
}

.category-tabs::-webkit-scrollbar {
  display: none; /* លាក់ Scrollbar លើ Chrome/Safari */
}

.tab-btn {
  font-family: 'Khala Mid', sans-serif;
  font-size: 16px;
  padding: 10px 24px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background-color: var(--bg-card);
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.tab-btn:hover {
  border-color: #0099ff;
  color: #0099ff;
}

.tab-btn.active {
  background-color: #0099ff;
  color: #ffffff;
  border-color: #0099ff;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.25);
}

/* ========================
   STORE GRID
   ======================== */
.box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.store-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: left;
}

.store-header p {
  font-family: 'simple', sans-serif;
  font-size: 20px;
  color: var(--text-main);
  margin: 0;
}

.item {
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
  padding: 6px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
}

.item:hover {
  box-shadow: 0 4px 12px rgba(154, 154, 154, 0.08);
}

.item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  transition: filter 0.3s ease;
}

.item:hover img {
  filter: brightness(0.90);
}

.info {
  padding-left: 8px;
  padding-top: 10px;
  padding-bottom: 4px;
}

.info .title-prod {
  font-family: 'Khala Mid', sans-serif !important;
  font-size: 16px;
  margin: 0 0 5px;
  color: var(--text-main);
}

.info .desc-prod {
  font-size: 15px;
  font-family: 'simple', sans-serif;
  color: var(--text-sub);
  margin: 0 0 5px;
}

.info .desc-prod span {
  color: #0099ff;
  font-size: 15px;
  font-family: 'bold';
}

.btm-store {
  color: var(--text-sub);
  font-family: 'simple', 'sans-serif';
  padding: 30px 5px;
  font-size: 15px;
}

/* ========================
   FOOTER (ថ្មី)
   ======================== */
.site-footer {
  background-color: #FFFFFF;
  padding: 40px 16px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 30px;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col .footer-title {
  font-family: 'Khala Mid', sans-serif !important;
  font-size: 18px;
  color: var(--text-main);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  font-family: 'simple', sans-serif;
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 12px;
  cursor: default;
}

.footer-bottom {
  max-width: 1100px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.footer-bottom p {
  font-family: 'simple', sans-serif;
  font-size: 14px;
  color: #999999;
  margin: 0;
}

/* ========================
   PRODUCT MODAL (SHEET)
   ======================== */
body.sheet-open {
  overflow: hidden;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  visibility: hidden;
  pointer-events: none;
}

.product-modal.is-visible {
  visibility: visible;
  pointer-events: auto;
}

.pm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity var(--sheet-dur) ease;
}

.product-modal.is-open .pm-backdrop {
  opacity: 1;
}

.pm-dialog {
  position: absolute;
  inset: 0;
  background-color: #FFFFFF;
  overflow: auto;
  opacity: 0;
  transform: translateX(0);
  transition: opacity var(--sheet-dur) ease;
}

.product-modal.is-open .pm-dialog {
  opacity: 1;
}

.pm-close {
  position: sticky;
  top: 12px;
  left: 12px;
  margin: 12px 0 0 12px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #F4F6F9;
  cursor: pointer;
}

.pm-close img {
  filter: brightness(0); 
}

.pm-content {
  padding: 0 16px 28px;
}

.content-store {
  max-width: 600px;
  margin: 0 auto;
  font-family: 'simple', sans-serif;
}

.pm-images-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 600px;
  margin: 8px auto 14px;
}

.cover-gallery {
  width: 600px; 
  height: auto;
  border-radius: 14px;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.content-store p {
  color: var(--text-main);
  font-size: 17px;
  line-height: 1.8;
  margin: 10px 0 12px;
  text-align: left;
}

.fix-list {
  margin: 0;
  padding-left: 20px;
}

.fix-list li {
  margin: 8px 0;
  line-height: 1.4;
  color: #444444;
}

.btn-store-info {
  width: 170px;
  height: 46px;
  border-radius: 999px;
  background-color: #0099ff;
  font-size: 16px;
  color: #ffffff;
  border: none;
  margin: 18px 0 10px;
  font-family: 'simple', sans-serif;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.2);
}

.btn-store-info:hover {
  background-color: #0061d8;
  box-shadow: 0 4px 16px rgba(0, 97, 216, 0.3);
}

/* ========================
   RESPONSIVE MEDIA QUERIES
   ======================== */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr; /* តម្រៀប Footer ជាជួរឈរនៅលើទូរស័ព្ទ */
  }
}

@media (max-width: 480px) {
  .floating-logo {
    top: 10px;
    left: 10px;
  }

  .floating-logo img {
    height: 34px;
  }

  .panel-container {
    padding-top: 60px;
  }
  
  .welcome-box {
    margin: 0 16px 16px;
    padding: 20px 16px;
    border-radius: 14px;
    flex-direction: row; 
    align-items: center;
  }

  .welcome-text .welcome-title {
    font-size: 18px; 
    margin-bottom: 6px;
  }

  .welcome-text .welcome-desc {
    font-size: 16px; 
  }

  .welcome-img {
    width: 80px; 
    margin-left: 12px;
  }

  .category-tabs {
    padding: 0 16px;
    margin-bottom: 12px;
  }
  
  .tab-btn {
    font-size: 15px;
    padding: 8px 20px;
  }

  .store-header {
    margin: 10px 0 10px 10px;
    padding: 0;
  }

  .store-header p {
    font-size: 20px; 
  }

  .box {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .item {
    border-radius: 10px;
  }

  .info .title-prod {
    font-size: 17px; 
  }

  .info .desc-prod {
    font-size: 16px; 
  }

  .info .desc-prod span {
    font-size: 16px; 
  }
  
  .pm-dialog {
    transform: translateX(100%);
    opacity: 1; 
    transition: transform var(--sheet-dur) cubic-bezier(.2,.9,.2,1);
  }

  .product-modal.is-open .pm-dialog {
    transform: translateX(0);
  }

  .pm-images-container {
    max-width: 100%;
  }
  
  .cover-gallery {
    width: 100%; 
    height: auto; 
  }

  .content-store p {
    font-size: 18px; 
  }

  .fix-list li {
    font-size: 16px;
  }
  
  .btm-store {
    font-size: 16px;
  }
}