/* ACH WooCommerce Category / Archive Page  (sandbox, reversible)
   Clean DJI-style product grid. Scoped to .ach-archive — no theme conflicts. */

.ach-main { width: 100%; }

.ach-archive {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111827;
  box-sizing: border-box;
}
.ach-archive *, .ach-archive *::before, .ach-archive *::after { box-sizing: border-box; }

/* Header */
.ach-archive-head { text-align: center; margin-bottom: 1.5rem; }
.ach-archive-title { font-size: 36px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 .5rem; color: #111827; }
.ach-archive-desc { max-width: 720px; margin: 0 auto; color: #6b7280; font-size: 15px; line-height: 1.6; }
.ach-archive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; padding: .75rem 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.ach-result-count { font-size: 14px; color: #6b7280; }
.ach-archive-sort .woocommerce-ordering { margin: 0; }
.ach-archive-sort select { font-size: 14px; padding: .5rem 2rem .5rem .75rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #111827; cursor: pointer; max-width: 100%; }

/* Grid */
ul.ach-grid { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* Card */
.ach-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow .25s ease, transform .25s ease; list-style: none; margin: 0; }
.ach-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.10); transform: translateY(-2px); }

.ach-card-media { position: relative; width: 100%; height: 260px; background: #fff; overflow: hidden; }
.ach-media-link { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 14px; }
.ach-card-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; transition: transform .4s ease; }
.ach-card:hover .ach-card-media img { transform: scale(1.04); }

.ach-badge { position: absolute; z-index: 3; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 6px; letter-spacing: .01em; pointer-events: none; }
.ach-badge-sale { top: 10px; left: 10px; background: #e53935; color: #fff; }
.ach-badge-soldout { top: 10px; right: 10px; background: #333; color: #fff; }

.ach-card-body { display: block; flex: 1 1 auto; padding: 14px 16px 6px; text-decoration: none; color: inherit; }
.ach-card-body:hover { color: inherit; }
.ach-card-title { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0 0 8px; color: #111827; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }

.ach-card-rating { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.ach-stars { position: relative; display: inline-block; font-size: 14px; line-height: 1; font-family: Arial, "Segoe UI Symbol", sans-serif; letter-spacing: 1px; --ach-pct: 0%; }
.ach-stars::before { content: "★★★★★"; color: #e5e7eb; }
.ach-stars::after { content: "★★★★★"; color: #f59e0b; position: absolute; top: 0; left: 0; width: var(--ach-pct); overflow: hidden; white-space: nowrap; }
.ach-rating-num { font-size: 13px; font-weight: 600; color: #374151; }
.ach-rating-count { font-size: 12px; color: #9ca3af; }

.ach-card-price { padding: 0 16px 14px; font-size: 15px; line-height: 1.3; }
.ach-archive .ach-card-price .woocommerce-Price-amount { color: #111827; font-weight: 600; }
.ach-card-price del { text-decoration: none; margin-left: 6px; }
.ach-archive .ach-card-price del .woocommerce-Price-amount { color: #9ca3af; font-weight: 400; text-decoration: line-through; }
.ach-card-price ins { text-decoration: none; }
.ach-archive .ach-card-price ins .woocommerce-Price-amount { color: #e53935; font-weight: 600; }

.ach-card-cart { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px; background: linear-gradient(to top, #fff 72%, rgba(255,255,255,0)); transform: translateY(115%); opacity: 0; transition: transform .28s ease, opacity .28s ease; z-index: 4; }
.ach-card:hover .ach-card-cart { transform: translateY(0); opacity: 1; }
.ach-archive .ach-card-cart .button, .ach-archive .ach-card-cart a.button, .ach-archive .ach-card-cart a.add_to_cart_button { display: block; width: 100%; margin: 0; min-height: 0; text-align: center; background: #111827; color: #fff; border: none; border-radius: 8px; padding: 11px 14px; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .2s ease; }
.ach-archive .ach-card-cart .button:hover, .ach-archive .ach-card-cart a.button:hover { background: #e53935; color: #fff; }
.ach-card-cart .added_to_cart { display: none; }
.ach-card-cart .button.loading, .ach-card-cart a.loading { opacity: .7; }

.ach-no-products { text-align: center; color: #6b7280; font-size: 15px; padding: 3rem 0; }

/* Pagination */
.ach-archive .woocommerce-pagination { margin-top: 3rem; text-align: center; }
.ach-archive .woocommerce-pagination ul { display: inline-flex; gap: 6px; list-style: none; margin: 0; padding: 0; border: none; }
.ach-archive .woocommerce-pagination ul li { margin: 0; border: none; }
.ach-archive .woocommerce-pagination ul li a, .ach-archive .woocommerce-pagination ul li span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #111827; text-decoration: none; font-size: 14px; }
.ach-archive .woocommerce-pagination ul li span.current { background: #111827; color: #fff; border-color: #111827; }
.ach-archive .woocommerce-pagination ul li a:hover { border-color: #111827; }

/* Responsive */
@media (max-width: 768px) {
  .ach-archive { padding: 1.75rem 1rem 3rem; }
  .ach-archive-title { font-size: 28px; }
  ul.ach-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .ach-card-media { height: 200px; }
  .ach-media-link { padding: 10px; }
  .ach-card-cart { position: static; transform: none; opacity: 1; background: none; padding: 0 16px 14px; }
}
@media (max-width: 480px) {
  ul.ach-grid { grid-template-columns: 1fr; gap: 1rem; }
  .ach-card-media { height: 240px; }
  .ach-card-title { min-height: 0; }
}
