/* ================================================
   pages/shop.css — 商店（課程）頁所有樣式
   Source: frontend-polish.css (SHOP section lines 768-936)
   ================================================ */

/* SHOP */
.frontend-shop {
  background: #f2f4f7;
}

.frontend-shop .frontend-archive-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.frontend-shop .frontend-sidebar {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e2e6ed;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 24px;
}

.frontend-shop .frontend-sidebar .ct-widget {
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eaecf0;
}

.frontend-shop .frontend-sidebar .ct-widget:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.frontend-shop .frontend-sidebar .ct-widget h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: #1f2e44;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.frontend-shop .frontend-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.frontend-shop .frontend-sidebar li + li {
  margin-top: 6px;
}

.frontend-shop .frontend-sidebar .wp-block-categories-list a,
.frontend-shop .frontend-sidebar .wp-block-categories-list .current-cat > a {
  color: #1f2e44 !important;
}

.frontend-shop .frontend-sidebar .current-cat > a {
  font-weight: 700;
}

.frontend-shop .frontend-ordering {
  justify-content: flex-end;
}

.frontend-shop .frontend-ordering .orderby {
  min-width: 220px;
  border: 1px solid #d6dbe3;
  padding: 8px 10px;
  background: #fff;
}

.frontend-shop ul.products.frontend-product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.frontend-shop ul.products.frontend-product-grid li.product {
  margin: 0;
}

/* Shop product cards equal height */
.frontend-shop ul.products.frontend-product-grid li.product {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(17,24,39,0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.frontend-shop ul.products.frontend-product-grid li.product:hover,
.frontend-blog .entry-card:hover,
.frontend-blog .entry-card:focus-within {
  box-shadow: 0 6px 20px rgba(17,24,39,0.13);
  transform: translateY(-2px);
}

.frontend-shop ul.products.frontend-product-grid li.product > a {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 12px 16px;
  text-decoration: none;
  color: inherit;
}

.frontend-shop ul.products.frontend-product-grid li.product > a .ct-image-container {
  margin: 0 -12px;
}

.frontend-shop ul.products.frontend-product-grid li.product img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.frontend-shop .woocommerce-loop-product__title {
  flex: 1;
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.4;
  min-height: 44px;
}

.frontend-shop .price {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 700;
}

.frontend-shop .price del {
  opacity: 0.45;
}

.frontend-shop .price ins {
  text-decoration: none;
  color: #ea6e7f;
}

.frontend-shop .frontend-product-cats {
  display: block;
  margin-top: 6px;
  color: #516273;
}

.frontend-shop .frontend-filter-form {
  display: grid;
  gap: 10px;
}

.frontend-shop .frontend-filter-form .form-control {
  border: 1px solid #cfd6e0;
  padding: 8px 10px;
  width: 100%;
  background: #fff;
}

.frontend-shop .frontend-filter-actions {
  display: flex;
  gap: 8px;
}


/* ── Responsive: SHOP breakpoints (from frontend-polish.css) ── */

@media (max-width: 1200px) {
  .frontend-shop ul.products.frontend-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .frontend-shop .frontend-archive-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .frontend-shop .frontend-sidebar {
    order: 2;
    position: static;
  }
}

@media (max-width: 767px) {
  .frontend-shop ul.products.frontend-product-grid {
    grid-template-columns: 1fr;
  }

  .frontend-shop .frontend-ordering {
    justify-content: stretch;
  }

  .frontend-shop .frontend-ordering .orderby {
    width: 100%;
  }
}
