/*
  shop_page
    category_filter
    products_list
    sp_pagination
    single_template_card
  media_queries
*/

/* ============================================
                   shop_page
============================================ */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}
/* ========== category_filter ========== */
.shop-sidebar {
  position: sticky;
  top: 110px;
  align-self: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.shop-sidebar h3 {
  margin-bottom: 24px;
  font-size: 1.2rem;
}
.shop-sidebar a {
  width: 100%;
}

.filter-group {
  margin-bottom: 28px;
}

.filter-group h4 {
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #dfe4ff;
}

.filter-list {
  display: grid;
  gap: 12px;
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: 0.3s ease;
  color: var(--muted);
}

.filter-item:hover,
.filter-item.active {
  background: rgba(108,99,255,0.12);
  border-color: rgba(108,99,255,0.25);
  color: var(--text);
}
/* ========== products_list ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.shop-page-hero {
  padding: 140px 0 70px;
  padding-top: 70px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(53,89,217,0.14), transparent);
}

.shop-page-hero h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 20px;
}

.shop-page-hero p {
  color: var(--muted);
  font-size: 1.05rem;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.results-count {
  color: var(--muted);
}

.shop-controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.shop-search {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 18px;
  min-width: 220px;
  outline: none;
  transition: 0.3s ease;
  backdrop-filter: blur(12px);
}

.shop-search:focus {
  border-color: rgba(53,89,217,0.45);
  box-shadow: 0 0 0 4px rgba(53,89,217,0.12);
}

.shop-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 18px;
  padding: 14px 54px 14px 18px;
  min-width: 220px;
  outline: none;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s ease;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.shop-select:hover {
  border-color: rgba(53,89,217,0.35);
  background-color: rgba(53,89,217,0.08);
}

.shop-select:focus {
  border-color: rgba(53,89,217,0.55);
  box-shadow: 0 0 0 4px rgba(53,89,217,0.14);
}

.shop-select option {
  background: #0d1226;
  color: #ffffff;
}
/* ========== sp_pagination ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.pagination button {
  width: 52px;
  height: 52px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
}
.pagination button.btn_ {
  font-size: 20px;
}
.pagination button.active:not(.btn_) {
  border-color: rgba(108,99,255,0.25);
}

.pagination .ellipsis {
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: context-menu;
}

.pagination button:not(:disabled):hover,
.pagination button.active {
  background-color: rgba(16, 24, 58, 0.8);
  color: white;
}
/* ========== single_template_card ========== */
.product-card {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  transition: 0.35s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(108,99,255,0.35);
  box-shadow: var(--shadow);
}

.product-image {
  height: 260px;
  overflow: hidden;
  position: relative;
}

.product-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,8,22,0.75), transparent 50%);
  z-index: 1;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(5,8,22,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
}

.product-content {
  padding: 28px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.product-content h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.product-content p {
  color: var(--muted);
  margin-bottom: 26px;
  min-height: 72px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.price {
  font-size: 1.4rem;
  font-weight: 700;
}
/* ============================================
                 media_queries
============================================ */
@media (max-width: 1100px) {

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: relative;
    top: 0;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-controls {
    width: 100%;
    flex-direction: column;
  }

  .shop-select,
  .shop-search {
    width: 100%;
  }

  .nav-links {
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: rgba(5,8,22,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 20px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: flex;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .section-title,
  .footer-content,
  .product-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
