:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #000000;
  --muted: #666666;
  --accent: #000000;
  --round: 20px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
  overflow: hidden;
  height: 100vh;
}

.app {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100vh;
}

/* در دسکتاپ مخفی، فقط موبایل نشون داده می‌شه */
.mobile-header {
  display: none;
}

.filters-panel {
  padding: 24px;
  overflow-y: auto;
  border-right: 1px solid #ddd;
  background: var(--bg);
}

.filters-panel img.archive-icon {
  width: 140px;
  margin-bottom: 24px;
  display: block;
  cursor: pointer;
}

label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.range {
  width: 100%;
  margin-bottom: 20px;
}

.rug-rect {
  margin: 16px auto;
  border: 2px solid #999;
  transition: all 0.4s ease;
  background: #fff;
}

@media (max-width: 768px) {
  .rug-rect {
    max-width: 220px;
    min-width: 10px;
    max-height: 280px;
    min-height: 20px;
  }
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.actions button img {
  width: 340px;
  height: auto;
  display: block;
}

.color-picker {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-top: 20px;
  padding: 8px 4px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.color-picker::-webkit-scrollbar {
  height: 6px;
}

.color-picker::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 6px;
}

.color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  cursor: pointer;
  flex-shrink: 0;
}

.color-btn {
  width: 22px;
  height: 22px;
  border: 2px solid #888;
  margin-bottom: 4px;
  transform: rotate(45deg);
}

.color-label {
  font-size: 10px;
  text-align: center;
}

.products {
  padding: 0 20px;
  overflow-y: auto;
  background: var(--bg);
}

.track {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding-top: 20px;
}

@media (max-width: 768px) {
  .track {
    padding: 20px 20px 0 20px;
    justify-content: center;
  }
  .cardp {
    width: 90%;
    max-width: 90%;
    box-sizing: border-box;
    margin: 0 auto;
  }
}

.cardp {
  width: 360px;
  background: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.cardp:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.cardp .media {
  aspect-ratio: 7/10;
  position: relative;
}

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

.cardp .meta {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 95%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  padding: 12px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
}

.cardp:hover .meta {
  opacity: 1;
  transform: translateY(0);
}

.cardp .price {
  font-weight: bold;
  margin-top: 4px;
}

.cardp .btn {
  margin-top: 6px;
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
}

.cardp .top-icons {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 6px;
  z-index: 2;
  padding: 10px 30px;
}

.cardp .top-icons a {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 4px;
  padding: 10px;
}

.cardp .top-icons a img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* Responsive for Mobile and Tablet */
@media (max-width: 1024px) {
  body {
    overflow: auto;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .mobile-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 70px;
    background: url("https://arsin.us/explore/icon/Titlemobile.png") no-repeat center;
    background-size: contain;
    z-index: 2000;
    cursor: pointer;
    transition: opacity 0.3s ease;
  }

  .mobile-header.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .products {
    padding-top: 80px !important;
  }

  .filters-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 330px;
    height: 100vh;
    background: var(--bg);
    z-index: 3000;
    padding-top: 60px;
    transition: left 0.35s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  }

  .filters-panel.open {
    left: 0;
  }

  .track {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 18px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .track {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 18px;
  }
}

.load-more-wrapper {
  text-align: center;
  padding: 20px 0 30px;
}

#loadMoreBtn {
  padding: 10px 44px;
  /*border-radius: 0px;*/
  border: 1px solid #000;
  background: #fff;
  color: #131313;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#loadMoreBtn:hover {
  opacity: 0.85;
}

