/**
 * vl-archive.css — Product archive & shop page styles
 * Geladen auf: is_shop(), is_product_category(), is_product_archive()
 *
 * @package vandalierer-labs
 */

/* ── Breadcrumb ──────────────────────────────────────────── */
/* Base styles in vl-global.css */
.vl-breadcrumb { max-width: 1100px; }

/* ── Archive main ────────────────────────────────────────── */
.vl-main--archive {
  background: var(--warm-bg);
  min-height: 100vh;
}

/* ── Kategorie-Hero ──────────────────────────────────────── */
.vl-archive-hero {
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--warm-border);
  padding: 28px 40px 20px;
}

.vl-archive-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.vl-archive-cat-img {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  border: 1.5px solid var(--warm-border);
  background: var(--warm-card);
  overflow: hidden;
  flex-shrink: 0;
}
.vl-archive-cat-img img { width: 100%; height: 100%; object-fit: cover; }

.vl-archive-hero-text { flex: 1; }

.vl-archive-cat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--terra);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vl-archive-cat-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--bark);
  line-height: 1.1;
  margin-bottom: 6px;
  font-family: 'DIN1451AltHeadline', 'DIN1451Alt', sans-serif;
}

.vl-archive-cat-desc {
  font-size: 13px;
  color: var(--muted-text);
  line-height: 1.6;
  max-width: 540px;
}

/* Toolbar: Produktanzahl + Sortierung */
.vl-archive-toolbar {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vl-archive-result-count .woocommerce-result-count {
  font-size: 12px;
  color: var(--muted-text);
  margin: 0;
}

.vl-archive-ordering .woocommerce-ordering { margin: 0; }
.vl-archive-ordering select {
  font-size: 12px;
  font-family: inherit;
  border: 1.5px solid var(--warm-border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--bark);
  background: var(--warm-card);
  cursor: pointer;
  outline: none;
  transition: border-color .15s;
}
.vl-archive-ordering select:focus { border-color: var(--terra); }

/* ── Archive body + grid ─────────────────────────────────── */
.vl-archive-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 40px 80px;
}

/* WC notices wrapper (cart notices etc.) */
.vl-archive-body .woocommerce-notices-wrapper { margin-bottom: 20px; }

.vl-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

/* ── Product card ────────────────────────────────────────── */
.vl-pc {
  background: rgba(255,255,255,.95);
  border: 1.5px solid var(--warm-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}

.vl-pc:hover {
  border-color: var(--terra-pale);
  box-shadow: 0 4px 20px rgba(44,31,20,.08);
}

/* Product image — centered with padding (like design system prototype) */
.vl-pc-img-link { display: block; text-decoration: none; }

.vl-pc-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--warm-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid rgba(196,99,58,.06);
  overflow: hidden;
}

.vl-pc-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .3s ease;
}
.vl-pc:hover .vl-pc-thumb { transform: scale(1.05); }

.vl-pc-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .4;
}

/* Sale / New badges */
.vl-pc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--terra);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  line-height: 1.4;
}

.vl-pc-badge--new {
  left: auto;
  right: 10px;
  background: var(--sage, #6a9c7f);
}

/* Card body */
.vl-pc-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vl-pc-cat {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted-light);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.vl-pc-name-link { text-decoration: none; }
.vl-pc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--bark);
  line-height: 1.3;
  margin-bottom: 8px;
  transition: color .15s;
}
.vl-pc-name-link:hover .vl-pc-name { color: var(--terra); }

.vl-pc-desc {
  font-size: 11px;
  color: var(--muted-text);
  line-height: 1.5;
  margin-bottom: 10px;
  flex: 1;
}

/* Footer: price + cart icon button */
.vl-pc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(196,99,58,.06);
  margin-top: auto;
}

.vl-pc-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--terra);
  font-family: 'DIN1451Alt', sans-serif;
  line-height: 1.2;
}
.vl-pc-price del {
  font-size: 11px;
  color: var(--muted-light);
  font-weight: 400;
  font-family: inherit;
  display: block;
}
.vl-pc-price ins { text-decoration: none; }

/* Icon-only cart button */
.vl-pc-cart-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--terra);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.vl-pc-cart-btn:hover { background: #b3562f; }
.vl-pc-cart-btn:active { transform: scale(.94); }

/* AJAX state feedback */
.vl-pc-cart-btn.loading { opacity: .65; cursor: wait; pointer-events: none; }
.vl-pc-cart-btn.added   { background: #3d7a50; }

/* Secondary (variable / out-of-stock) — outlined */
.vl-pc-cart-btn--secondary {
  background: transparent;
  color: var(--terra);
  border: 1.5px solid rgba(196,99,58,.3);
}
.vl-pc-cart-btn--secondary:hover {
  background: rgba(196,99,58,.06);
  border-color: var(--terra);
}

/* ── CTA-Karte (Energy Planer) ───────────────────────────── */
.vl-pc--cta {
  background: rgba(244,236,224,.35);
  border: 1.5px dashed var(--warm-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 260px;
  padding: 28px 20px;
  text-decoration: none;
  transition: border-color .2s, background .2s;
  cursor: pointer;
}

.vl-pc--cta:hover {
  border-color: var(--terra);
  background: rgba(196,99,58,.04);
}

.vl-pc-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(196,99,58,.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vl-pc-cta-text { text-align: center; }

.vl-pc-cta-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--bark);
  margin-bottom: 4px;
}

.vl-pc-cta-sub {
  font-size: 11px;
  color: var(--muted-text);
  line-height: 1.5;
}

.vl-pc-cta-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--terra);
  padding: 6px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--terra);
  transition: background .15s, color .15s;
}
.vl-pc--cta:hover .vl-pc-cta-btn {
  background: var(--terra);
  color: #fff;
}

/* ── Empty state ─────────────────────────────────────────── */
.vl-archive-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 80px 24px;
  text-align: center;
}

.vl-archive-empty-icon { opacity: .4; margin-bottom: 4px; }
.vl-archive-empty-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--bark);
}
.vl-archive-empty-sub { font-size: 13px; color: var(--muted-text); margin-bottom: 8px; }

/* ── Pagination ──────────────────────────────────────────── */
.woocommerce-pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.woocommerce-pagination ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-text);
  background: rgba(255,255,255,.8);
  border: 1.5px solid var(--warm-border);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}

.woocommerce-pagination ul li a:hover { border-color: var(--terra); color: var(--terra); }
.woocommerce-pagination ul li span.current {
  background: var(--terra);
  border-color: var(--terra);
  color: #fff;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .vl-archive-hero   { padding: 20px 24px 16px; }
  .vl-archive-body   { padding: 20px 24px 60px; }
  .vl-products-grid  { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
  .vl-archive-cat-title { font-size: 22px; }
}

@media (max-width: 560px) {
  .vl-products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .vl-archive-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .vl-pc-body { padding: 10px 12px 12px; }
  .vl-pc-name { font-size: 13px; }
  .vl-pc-desc { display: none; } /* zu klein für Beschreibung auf xs */
  .vl-pc-price { font-size: 14px; }
}
