:root {
  --bg: #262729;
  --bg-dark: #1e1e1e;
}

@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: 'SM Simplesmall';
  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);
}

/* ========================
   HEADER
   ======================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45px;
  background-color: #262729;
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-left img {
  height: 36px;
}

.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 20px;
  margin-left: -30px;
}

/* ========================
   TOOL BUTTONS
   ======================== */
.tool-btn {
  background: none;
  border: none;
  cursor: pointer;
  height: 45px;
  padding: 0 25px;
  position: relative;
}

.tool-btn img {
  width: 28px;
  height: 28px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.tool-btn.active img {
  filter: invert(93%) sepia(5%) saturate(198%) hue-rotate(192deg) brightness(200%) contrast(96%);
}

.tool-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: #E3E4EB;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.tool-btn.active::after {
  width: 100%;
}

/* ========================
   PANEL CONTAINER
   ======================== */
.panel-container {
  max-width: 100%;
  margin-top: 45px;
}

.panel {
  display: none;
  opacity: 0;
}

.panel.active {
  display: block;
  opacity: 1;
}

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

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

.store-header p {
  font-family: 'simple', sans-serif;
  font-size: 20px;
  color: #ffffff;
  margin: 0;
}

@media (max-width: 480px) {
  .store-header {
    margin: 50px 0 10px 10px;
    padding: 0;
  }
  .store-header p {
    font-size: 18px;
  }
}

.item {
  background-color: #333334;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
  padding: 5px;
  display: flex;
  flex-direction: column;
  text-align: left;
}

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

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

.info h3 {
  font-family: 'Khala Mid', sans-serif !important;
  font-weight: 500;
  font-size: 15px;
  margin: 0 0 5px;
  color: #E2E5E9;
}

.info p {
  font-size: 16px;
  font-family: 'simple', sans-serif;
  color: #B0B3B8;
  margin: 0 0 5px;
}

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

/* ========================
   TABS
   ======================== */
.store-tabs-container {
  padding: 15px 10px;
  background-color: var(--bg);
  display: flex;
  justify-content: center;
}

.store-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px;
  border-radius: 12px;
}

.tab-item {
  background: none;
  border: none;
  color: #888;
  padding: 8px 16px;
  font-family: 'simple', sans-serif;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.tab-item.active {
  background-color: #0099ff;
  color: #fff;
}

.store-tab-content {
  display: none;
}

.store-tab-content.active {
  display: block;
}

/* ========================
   SERVICE CATEGORIES
   ======================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 15px;
}

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.box-item {
  background: #333334;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.box-item:hover {
  background: #3d3d3f;
  transform: scale(1.05);
}

.box-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
}

.box-item p {
  color: #fff;
  font-family: 'regular';
  font-size: 13px;
  margin: 0;
}

/* ========================
   CATEGORY DETAIL PANEL
   ======================== */
.category-detail-panel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 7000;
  display: none;
  overflow-y: auto;
  padding-top: 45px;
}

.detail-header {
  position: sticky;
  top: 45px;
  background: var(--bg);
  padding: 10px;
  z-index: 100;
}

.back-btn-detail {
  background: #323334;
  border: none;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.back-btn-detail:hover {
  background: #3d3d3f;
}

.back-btn-detail img {
  width: 20px;
  height: 20px;
}

.detail-content {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 20px;
}

/* Cover and Profile */
.detail-cover-container {
  position: relative;
  width: 100%;
  margin-bottom: 60px;
}

.main-cover-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.profile-circle {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  overflow: hidden;
  background: #444;
}

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Category Name with Tick */
.detail-category-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 50px 0 20px 0;
  flex-wrap: wrap;
}

.category-name-text {
  color: #fff;
  font-family: 'Bold', sans-serif;
  font-size: 20px;
}

.verify-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* Action Buttons */
.detail-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px 0;
  margin: 0 10px;
}

.btn-action {
  flex: 1;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'Bold';
  font-size: 14px;
  text-align: center;
  transition: 0.2s;
}

.btn-action.msg {
  background: #0099ff;
  color: #fff;
}

.btn-action.msg:hover {
  background: #0077cc;
}

.btn-action.join {
  background: #333;
  color: #fff;
  border: 1px solid #555;
}

.btn-action.join:hover {
  background: #3d3d3f;
}

/* Posts Feed */
.posts-feed {
  padding: 10px;
  margin-top: 20px;
}

/* ========================
   POST CARD
   ======================== */
.post-card {
  background: var(--bg-dark);
  margin: 0 auto 20px auto;
  max-width: 550px;
  position: relative;
}

.post-card:not(:last-child)::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.332);
  margin: 0 auto 0 auto;
}

.post-header {
  display: flex;
  align-items: center;
  padding: 15px;
}

.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.post-meta {
  display: flex;
  flex-direction: column;
}

.post-date {
  color: #888;
  font-size: 14px;
}

.post-author-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.post-author {
  color: #fff;
  font-family: 'Bold', sans-serif;
  font-size: 15px;
  display: inline-block;
}

.blue-tick {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.post-caption {
  padding: 0 15px 12px 15px;
  color: #eee;
  font-size: 16px;
  font-family: 'regular';
  line-height: 1.5;
}

.post-main-img {
  width: 100%;
  display: block;
}

@media (max-width: 768px) {
  .post-card {
    max-width: 100%;
    border-radius: 0;
  }
}

/* ========================
   DESIGN CARDS
   ======================== */
.design-global-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-global-header {
  text-align: center;
  padding: 0px 20px;
}

.service-global-header b {
  font-size: 32px;
  color: #fff;
  margin: 15px 0;
  font-family: 'bold', sans-serif;
}

.service-global-header p {
  color: #aaa;
  font-family: 'khala mid', sans-serif;
  margin: 0 auto;
  font-size: 18px;
}

.global-card {
  background: #1e1e20;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  padding: 30px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.global-card.featured {
  border: 1.5px solid #0099ff;
}

.card-badge {
  position: absolute;
  top: 20px;
  right: -30px;
  background: #0099ff;
  color: #fff;
  padding: 5px 45px;
  transform: rotate(45deg);
  font-size: 10px;
  font-family: 'bold', sans-serif;
}

.card-icon-wrap {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.card-icon-wrap img {
  width: 100%;
}

.card-body p {
  font-family: 'bold', sans-serif;
  color: #fff;
  font-size: 22px;
  margin-bottom: 15px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  color: #ccc;
  font-size: 18px;
  margin-bottom: 10px;
  gap: 10px;
}

.feature-list li img {
  width: 16px;
  height: 16px;
}

.card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.price-text {
  color: #888;
  font-size: 18px;
}

.price-text b {
  color: #fff;
  font-size: 18px;
  margin-left: 5px;
  font-family: 'bold', sans-serif;
}

.global-btn-order {
  background: #0099ff;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-family: 'bold', sans-serif;
  cursor: pointer;
  transition: 0.3s;
  font-size: 18px;
}

.global-btn-order:hover {
  background: #0077cc;
}

/* ========================
   PRODUCT MODAL
   ======================== */
:root {
  --header-h: 50px;
  --sheet-dur: 380ms;
}

body.sheet-open {
  overflow: hidden;
}

.product-modal {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  z-index: 5000;
  visibility: hidden;
  pointer-events: none;
}

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

.pm-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.pm-dialog {
  position: absolute;
  inset: 0;
  background-color: var(--bg);
  overflow: auto;
  transform: translateX(100%);
  opacity: 0;
  transition: transform var(--sheet-dur) cubic-bezier(.2,.9,.2,1),
              opacity var(--sheet-dur) ease;
}

.product-modal.is-open .pm-dialog {
  transform: translateX(0);
  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(15, 23, 42, 0.12);
  background: rgb(50, 51, 52);
  cursor: pointer;
}

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

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

.content-store .cover {
  width: 100%;
  max-width: 600px;
  border-radius: 14px;
  display: block;
  margin: 8px auto 14px;
}

.content-store p {
  color: #ffffff;
  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.3;
  color: #BDC1C6;
}

.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;
}

.btn-store-info:hover {
  background-color: #0061d8;
}

/* ========================
   UTILITIES
   ======================== */
.btm-store {
  color: white;
  font-family: 'simple', 'sans-serif';
  padding: 10px 5px;
}

a {
  text-decoration: none;
}

@media (max-width: 480px) {
  header {
    height: 50px;
    padding: 0 10px;
  }

  .header-left img {
    height: 34px;
  }

  .tool-btn {
    padding: 0 25px;
    margin-top: 5px;
  }

  .panel-container {
    margin-top: 55px;
  }

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

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-cover-img {
    height: 150px;
  }

  .profile-circle {
    width: 70px;
    height: 70px;
    bottom: -35px;
  }

  .detail-category-name {
    margin-top: 45px;
  }
}
