/* =============================================================================
   RookiDroid theme — WooCommerce shop archives
   ============================================================================= */

/* =============================================================================
   WooCommerce native /shop/ page overrides
   The content-product.php template override makes every li.product contain
   a div.rd-product-card — so we only need grid layout + chrome styles here.
   ============================================================================= */

/* ── Result count & ordering bar ─────────────────────────────────────────── */
.woocommerce-result-count {
  font-family: var(--rd-font-mono);
  font-size: .85rem;
  color: var(--rd-text-muted);
}
.woocommerce-ordering select {
  font-family: var(--rd-font-body);
  font-size: .88rem;
  font-weight: 600;
  color: var(--rd-text);
  border: 2px solid var(--rd-border);
  border-radius: 0;
  padding: 9px 32px 9px 14px;
  background: var(--rd-surface);
  cursor: pointer;
  transition: border-color var(--rd-transition), box-shadow var(--rd-transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231b2a4a' stroke-width='2.5' stroke-linecap='square'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.woocommerce-ordering select:focus {
  outline: none;
  border-color: var(--rd-primary);
  box-shadow: var(--rd-shadow-glow);
}

/* ── Product grid ─────────────────────────────────────────────────────────── */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
  clear: both;
}

/* WooCommerce adds a clearfix ::before/::after with display:table — in CSS Grid these
   become real grid items and steal the first/last cell. Remove them. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
  display: none !important;
  content: none !important;
}

/* ── li.product — reset WooCommerce defaults, let rd-product-card style the card */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform: none !important;
}


/* ── rd-product-card when inside the WooCommerce loop ────────────────────── */
/* Ensure the card fills the grid cell */
.woocommerce ul.products li.product .rd-product-card {
  height: 100%;
}

/* ── Sale / onsale badge (WooCommerce default, shown outside the card) ──── */
.woocommerce span.onsale {
  --rd-chamfer: 4px;
  background: var(--rd-danger) !important;
  color: #fff !important;
  font-family: var(--rd-font-mono) !important;
  font-size: .68rem !important;
  font-weight: 700 !important;
  letter-spacing: .01em;
  padding: 4px 10px !important;
  border: 1px solid var(--rd-outline) !important;
  border-radius: 0 !important;
  clip-path: var(--rd-chamfer-clip);
  line-height: 1.4 !important;
  min-height: unset !important;
  min-width: unset !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
}

/* ── Category widget (sidebar) ────────────────────────────────────────────── */
.widget_product_categories .widget-title,
.widget_product_categories .widgettitle {
  font-family: var(--rd-font-display);
  letter-spacing: -0.01em;
  font-weight: 700;
  font-size: 1rem;
  color: var(--rd-text);
  width: fit-content;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--rd-yellow);
  margin-bottom: 12px;
}
.widget_product_categories .product-categories {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.widget_product_categories .product-categories li {
  padding: 4px 0;
}
.widget_product_categories .product-categories li a {
  font-family: var(--rd-font-body) !important;
  font-size: .9rem !important;
  color: var(--rd-text-secondary) !important;
  transition: color var(--rd-transition) !important;
  text-decoration: none !important;
}
.widget_product_categories .product-categories li a:hover,
.widget_product_categories .product-categories li.current-cat > a {
  color: var(--rd-primary) !important;
}
.widget_product_categories .product-categories .count {
  font-family: var(--rd-font-mono) !important;
  font-size: .78rem !important;
  color: var(--rd-text-muted) !important;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.woocommerce nav.woocommerce-pagination ul {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  margin: 40px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
  border: none !important;
}
.woocommerce nav.woocommerce-pagination ul li {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 0 !important;
  border: 2px solid var(--rd-navy) !important;
  clip-path: var(--rd-chamfer-clip);
  font-family: var(--rd-font-mono) !important;
  font-size: .88rem !important;
  font-weight: 700 !important;
  color: var(--rd-text-secondary) !important;
  background: var(--rd-surface) !important;
  transition: var(--rd-transition) !important;
  text-decoration: none !important;
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
  border-color: var(--rd-navy) !important;
  color: var(--rd-primary) !important;
  background: var(--rd-surface-alt) !important;
  transform: translate(-1px, -1px);
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--rd-primary) !important;
  border-color: var(--rd-outline) !important;
  color: #fff !important;
}

/* ── Shop page responsive ─────────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
@media (max-width: 1024px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 540px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(1, 1fr) !important;
    gap: 16px !important;
  }
}

/* ── Shop page hero banner ───────────────────────────────────────────────── */


/* Full-width banner, sits right under the site header */
.rd-shop-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(120deg, var(--rd-surface-alt) 45%, var(--rd-panel) 100%);
  padding: 52px 0 48px;
}

/* Chest trim along the bottom edge. */
.rd-shop-banner::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6px;
  z-index: 1;
  background: var(--rd-chest-trim);
  pointer-events: none;
}

/* Constrain content to match site column width */
.rd-shop-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navy panel lines on the right side */
.rd-shop-banner::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background-image: var(--rd-panel-lines);
  background-repeat: repeat;
  opacity: 0.14;
  pointer-events: none;
}

.rd-shop-banner__breadcrumb {
  display: flex;
  align-items: center;
  font-family: var(--rd-font-mono);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--rd-text-muted);
  margin-bottom: 18px;
}

.rd-shop-banner__breadcrumb a {
  color: var(--rd-text-muted);
  text-decoration: none;
  transition: color var(--rd-transition);
}

.rd-shop-banner__breadcrumb a:hover {
  color: var(--rd-primary);
}

.rd-shop-banner__breadcrumb span {
  margin: 0 5px;
}

.rd-shop-banner__breadcrumb span:last-child {
  margin: 0;
}

.rd-shop-banner__title {
  font-family: var(--rd-font-display);
  letter-spacing: -0.01em;
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  color: var(--rd-text);
  margin: 0 0 14px;
  line-height: 1.15;
}

.rd-shop-banner__subtitle {
  font-family: var(--rd-font-body);
  font-size: 1rem;
  color: var(--rd-text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 680px) {
  .rd-shop-banner {
    padding: 36px 0 32px;
  }
  .rd-shop-banner__inner {
    padding: 0 16px;
  }
  .rd-shop-banner::after {
    width: 60%;
    opacity: 0.07;
  }
}


/* ── Breadcrumb (product pages) ── */
.woocommerce .woocommerce-breadcrumb {
  margin: 0 0 28px;
  font-family: var(--rd-font-mono);
  font-size: .8rem;
  letter-spacing: .02em;
  color: var(--rd-text-muted);
}
.woocommerce .woocommerce-breadcrumb a {
  color: var(--rd-text-muted);
  text-decoration: none;
}
.woocommerce .woocommerce-breadcrumb a:hover { color: var(--rd-primary); }

/* Banner sits flush under the header; the grid below gets the usual gap. */
.rd-shop-banner + .rd-wc-content { padding-top: 40px; }
