/* ==================================================================
   Expert Marketplace Core — Category / archive redesign (2026-12-03)
   NEW stylesheet, enqueued ONLY on download archives, download
   category/tag archives and the /downloads/ page (see
   includes/archive-account-redesign.php).
   Design system: navy #0b1120, indigo #6366f1, violet #8b5cf6,
   gold #f59e0b, canvas #f8fafc, 16px radius, soft shadows.
   Restyles only — all content, counts and prices stay as published.
   ================================================================== */

/* Canvas: generous whitespace, no horizontal overflow. */
body.post-type-archive-download,
body.tax-download_category,
body.tax-download_tag,
body.page-id-0 {
  background: #f8fafc;
}
body.post-type-archive-download main,
body.tax-download_category main,
body.tax-download_tag main {
  background: #f8fafc;
  padding-bottom: 72px;
}
body.post-type-archive-download img,
body.tax-download_category img,
body.tax-download_tag img {
  max-width: 100%;
  height: auto;
}

/* ---- Archive header: gold rule, navy title, calm subtitle. ---- */
body.post-type-archive-download main h1,
body.tax-download_category main h1,
body.tax-download_tag main h1,
body.post-type-archive-download .page-header h1,
body.tax-download_category .page-header h1,
body.tax-download_tag .page-header h1,
body.post-type-archive-download .archive-header h1,
body.tax-download_category .archive-header h1 {
  color: #0b1120;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 8px 0 12px;
}
body.post-type-archive-download main h1::before,
body.tax-download_category main h1::before,
body.tax-download_tag main h1::before {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #6366f1);
  margin-bottom: 18px;
}
body.post-type-archive-download main h2,
body.tax-download_category main h2,
body.tax-download_tag main h2 {
  color: #334155;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  max-width: 760px;
  margin: 0 0 14px;
}
body.post-type-archive-download main p,
body.tax-download_category main p,
body.tax-download_tag main p {
  color: #475569;
  line-height: 1.75;
  max-width: 780px;
}

/* Eyebrow ("CATEGORY" / "ALL PRODUCTS") as an indigo pill. */
body.post-type-archive-download main h1 + p,
body.tax-download_category main h1 + p,
body.tax-download_tag main h1 + p {
  color: #475569;
}

/* ---- Category pills: links to sibling category archives. ---- */
body.post-type-archive-download main a[href*="/downloads/category/"],
body.tax-download_category main a[href*="/downloads/category/"],
body.tax-download_tag main a[href*="/downloads/category/"] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #0b1120;
  font-weight: 700;
  padding: 10px 18px;
  margin: 0 8px 8px 0;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(11, 17, 32, 0.05);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
body.post-type-archive-download main a[href*="/downloads/category/"]:hover,
body.tax-download_category main a[href*="/downloads/category/"]:hover,
body.tax-download_tag main a[href*="/downloads/category/"]:hover {
  border-color: #6366f1;
  color: #4f46e5;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.18);
}

/* ---- Sort + search bar as one white card. ---- */
body.post-type-archive-download main search,
body.tax-download_category main search,
body.tax-download_tag main search,
body.post-type-archive-download main form,
body.tax-download_category main form,
body.tax-download_tag main form {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(11, 17, 32, 0.06);
  padding: 16px;
  margin: 24px 0 28px;
}
body.post-type-archive-download main select,
body.tax-download_category main select,
body.tax-download_tag main select,
body.post-type-archive-download main input[type="search"],
body.tax-download_category main input[type="search"],
body.tax-download_tag main input[type="search"],
body.post-type-archive-download main input[type="text"],
body.tax-download_category main input[type="text"],
body.tax-download_tag main input[type="text"] {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #0b1120;
  min-height: 48px;
  padding: 10px 14px;
}
body.post-type-archive-download main select:focus,
body.tax-download_category main select:focus,
body.tax-download_tag main select:focus,
body.post-type-archive-download main input:focus,
body.tax-download_category main input:focus,
body.tax-download_tag main input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  outline: none;
}
body.post-type-archive-download main form button,
body.tax-download_category main form button,
body.tax-download_tag main form button,
body.post-type-archive-download main search button,
body.tax-download_category main search button,
body.tax-download_tag main search button {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 700;
  min-height: 48px;
  padding: 12px 24px;
  cursor: pointer;
}

/* ---- Product grid: 3 columns, 16px cards, soft shadow, lift. ---- */
body.post-type-archive-download main :has(> article),
body.tax-download_category main :has(> article),
body.tax-download_tag main :has(> article),
body.post-type-archive-download .edd_downloads_list,
body.tax-download_category .edd_downloads_list,
body.tax-download_tag .edd_downloads_list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
body.post-type-archive-download main article,
body.tax-download_category main article,
body.tax-download_tag main article,
body.post-type-archive-download .edd_download,
body.tax-download_category .edd_download,
body.tax-download_tag .edd_download {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(11, 17, 32, 0.06);
  overflow: hidden;
  padding-bottom: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.post-type-archive-download main article:hover,
body.tax-download_category main article:hover,
body.tax-download_tag main article:hover,
body.post-type-archive-download .edd_download:hover,
body.tax-download_category .edd_download:hover,
body.tax-download_tag .edd_download:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(11, 17, 32, 0.14);
}
body.post-type-archive-download main article img,
body.tax-download_category main article img,
body.tax-download_tag main article img,
body.post-type-archive-download .edd_download_image img,
body.tax-download_category .edd_download_image img,
body.tax-download_tag .edd_download_image img {
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  width: 100%;
}
body.post-type-archive-download main article h3,
body.tax-download_category main article h3,
body.tax-download_tag main article h3,
body.post-type-archive-download .edd_download_title,
body.tax-download_category .edd_download_title,
body.tax-download_tag .edd_download_title {
  color: #0b1120;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  padding: 18px 20px 0;
}
body.post-type-archive-download main article h3 a,
body.tax-download_category main article h3 a,
body.tax-download_tag main article h3 a,
body.post-type-archive-download .edd_download_title a,
body.tax-download_category .edd_download_title a,
body.tax-download_tag .edd_download_title a {
  color: #0b1120;
  text-decoration: none;
}
body.post-type-archive-download main article h3 a:hover,
body.tax-download_category main article h3 a:hover,
body.tax-download_tag main article h3 a:hover {
  color: #4f46e5;
}
body.post-type-archive-download main article .edd_price,
body.tax-download_category main article .edd_price,
body.tax-download_tag main article .edd_price {
  color: #0b1120;
  font-weight: 800;
  padding: 0 20px;
}
body.post-type-archive-download main article .edd-add-to-cart,
body.tax-download_category main article .edd-add-to-cart,
body.tax-download_tag main article .edd-add-to-cart,
body.post-type-archive-download main article button,
body.tax-download_category main article button,
body.tax-download_tag main article button {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 700;
  padding: 12px 18px;
}
body.post-type-archive-download main article .edd-add-to-cart:hover,
body.tax-download_category main article .edd-add-to-cart:hover,
body.tax-download_tag main article .edd-add-to-cart:hover {
  filter: brightness(1.06);
}

/* ---- Pagination: indigo pills. ---- */
body.post-type-archive-download main nav a,
body.tax-download_category main nav a,
body.tax-download_tag main nav a,
body.post-type-archive-download .pagination a,
body.tax-download_category .pagination a,
body.tax-download_tag .pagination a,
body.post-type-archive-download .edd_pagination a,
body.tax-download_category .edd_pagination a {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #0b1120;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  text-decoration: none;
}
body.post-type-archive-download main nav a:hover,
body.tax-download_category main nav a:hover,
body.tax-download_tag main nav a:hover {
  border-color: #6366f1;
  color: #4f46e5;
}
body.post-type-archive-download main nav [aria-current="page"],
body.tax-download_category main nav [aria-current="page"],
body.tax-download_tag main nav [aria-current="page"],
body.post-type-archive-download main nav .current,
body.tax-download_category main nav .current,
body.tax-download_tag main nav .current {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  color: #ffffff;
}

/* ---- FAQ section under the grid: white cards. ---- */
body.post-type-archive-download main section,
body.tax-download_category main section,
body.tax-download_tag main section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(11, 17, 32, 0.06);
  margin-top: 40px;
  padding: 28px;
}
body.post-type-archive-download main section h2,
body.tax-download_category main section h2,
body.tax-download_tag main section h2 {
  color: #0b1120;
}
body.post-type-archive-download main section h4,
body.tax-download_category main section h4,
body.tax-download_tag main section h4 {
  color: #0b1120;
  font-size: 16px;
  font-weight: 700;
  margin-top: 20px;
}

/* ---- Responsive: 2 columns on tablet, 1 column on phones. ---- */
@media (max-width: 1024px) {
  body.post-type-archive-download main :has(> article),
  body.tax-download_category main :has(> article),
  body.tax-download_tag main :has(> article),
  body.post-type-archive-download .edd_downloads_list,
  body.tax-download_category .edd_downloads_list,
  body.tax-download_tag .edd_downloads_list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}
@media (max-width: 640px) {
  body.post-type-archive-download main,
  body.tax-download_category main,
  body.tax-download_tag main {
    overflow-x: hidden;
    padding-bottom: 48px;
  }
  body.post-type-archive-download main :has(> article),
  body.tax-download_category main :has(> article),
  body.tax-download_tag main :has(> article),
  body.post-type-archive-download .edd_downloads_list,
  body.tax-download_category .edd_downloads_list,
  body.tax-download_tag .edd_downloads_list {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  body.post-type-archive-download main search,
  body.tax-download_category main search,
  body.tax-download_tag main search,
  body.post-type-archive-download main form,
  body.tax-download_category main form,
  body.tax-download_tag main form {
    padding: 14px;
  }
  body.post-type-archive-download main select,
  body.tax-download_category main select,
  body.tax-download_tag main select,
  body.post-type-archive-download main input[type="search"],
  body.tax-download_category main input[type="search"],
  body.tax-download_tag main input[type="search"],
  body.post-type-archive-download main input[type="text"],
  body.tax-download_category main input[type="text"],
  body.tax-download_tag main input[type="text"],
  body.post-type-archive-download main form button,
  body.tax-download_category main form button,
  body.tax-download_tag main form button {
    width: 100%;
  }
  body.post-type-archive-download main section,
  body.tax-download_category main section,
  body.tax-download_tag main section {
    padding: 20px;
  }
}
/* 390px phones: compact title, full-width actions, no overflow. */
@media (max-width: 390px) {
  body.post-type-archive-download main h1,
  body.tax-download_category main h1,
  body.tax-download_tag main h1 {
    font-size: 28px;
  }
  body.post-type-archive-dow
/* --- v1.1.0 Marketplace polish (2026-12-03): shop hero rhythm, toolbar card, card hierarchy. CSS only; no content, numbers or prices changed. Palette: navy #0b1120, indigo #6366f1, violet #8b5cf6, gold #f59e0b, canvas #f8fafc. Hero stays navy with light text. --- */
body[class*="download"] main h1{font-size:clamp(1.9rem,3.6vw,2.6rem);line-height:1.12;letter-spacing:-.02em}
body[class*="download"] main p{line-height:1.6}
body[class*="download"] .emc-cat-hero{padding:64px 0 48px}
body[class*="download"] .emc-cat-hero__desc{max-width:780px}
body[class*="download"] .emc-cat-hero__desc p{font-size:.95rem;line-height:1.6;margin-bottom:6px}
body[class*="download"] .emc-cat-pills{gap:10px;margin-top:24px}
body[class*="download"] .emc-cat-pill{padding:10px 18px;border-radius:999px;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
body[class*="download"] .emc-cat-pill:hover{transform:translateY(-2px);box-shadow:0 8px 18px -6px rgba(15,23,42,.18)}
body[class*="download"] .emc-shop-toolbar{background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 4px 16px rgba(15,23,42,.05);padding:14px 18px;margin-bottom:28px;gap:14px}
body[class*="download"] .emc-shop-toolbar input,body[class*="download"] .emc-shop-toolbar select{border-radius:10px}
body[class*="download"] .emc-shop-toolbar input:focus,body[class*="download"] .emc-shop-toolbar select:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.18);outline:none}
body[class*="download"] .emc-grid{gap:28px;margin-top:8px}
body[class*="download"] .emc-card{display:flex;flex-direction:column;background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;box-shadow:0 1px 2px rgba(15,23,42,.05);transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
body[class*="download"] .emc-card:hover{transform:translateY(-6px);border-color:#c7d2fe;box-shadow:0 20px 40px -12px rgba(15,23,42,.20)}
body[class*="download"] .emc-card__thumb{overflow:hidden}
body[class*="download"] .emc-card__thumb img{transition:transform .5s ease}
body[class*="download"] .emc-card:hover .emc-card__thumb img{transform:scale(1.06)}
body[class*="download"] .emc-card__body{padding:20px 20px 18px;display:flex;flex-direction:column;gap:8px;flex:1}
body[class*="download"] .emc-card__title{font-size:.98rem;line-height:1.45}
body[class*="download"] .emc-card__foot{margin-top:auto;padding-top:14px;border-top:1px solid #f1f5f9}
body[class*="download"] .emc-card__price{font-size:1.2rem;font-weight:800;color:#0b1120}
body[class*="download"] .emc-card__price del,body[class*="download"] .emc-card__price s{color:#94a3b8;font-size:.9rem;font-weight:600}
body[class*="download"] main article{transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
body[class*="download"] main article:hover{transform:translateY(-6px);border-color:#c7d2fe;box-shadow:0 20px 40px -12px rgba(15,23,42,.20)}
body[class*="download"] main article img{transition:transform .5s ease}
body[class*="download"] main article:hover img{transform:scale(1.04)}
body[class*="download"] .emc-pagination a,body[class*="download"] .page-numbers{padding:10px 15px;border-radius:10px}
body[class*="download"] .emc-load-more{padding:14px 28px;border-radius:12px}
@media(max-width:640px){body[class*="download"] .emc-cat-hero{padding:48px 0 36px}body[class*="download"] .emc-shop-toolbar{padding:12px}body[class*="download"] .emc-grid{gap:20px}}
nload main article .edd-add-to-cart,
  body.tax-download_category main article .edd-add-to-cart,
  body.tax-download_tag main article .edd-add-to-cart {
    width: 100%;
  }
/* --- v1.1.1 Correction (2026-12-03): on /downloads/ the hero intro paragraphs are direct children of main (not .emc-cat-hero__desc), so constrain them here. Navy hero text colours are untouched. --- */
body[class*="download"] main>p{max-width:820px;font-size:.95rem;line-height:1.6;margin-bottom:8px}
body[class*="download"] main>h2{max-width:820px}

}

/* ---- /downloads/ navy hero: keep its light text. The archive h2/p ----
   ---- rules above use dark text for white archive headers; on ----
   ---- /downloads/ the hero is navy, so restore light text here ----
   ---- (same specificity, later in the file wins). ---- */
body.post-type-archive-download main h1 {
  color: #ffffff;
}
body.post-type-archive-download main h2 {
  color: #dbeafe;
}
body.post-type-archive-download main p {
  color: #cbd5e1;
}

/* ============ Punch-list 1 (2026-12-03): /downloads/ hero measure, corrected selectors ============ */
/* The hero intro paragraph lives in main > .ef-container > header (theme archive-download.php),
   not as a direct child of main, so the v1.1.1 main>p rule never matched it. Cover the real
   nesting (and the direct-child case) and hide intro paragraphs 2-3. */
body.post-type-archive-download main.ef-content .ef-container>header p,
body.post-type-archive-download main .ef-container>header p,
body.post-type-archive-download main header p,
body.post-type-archive-download .ef-container>header p,
body.post-type-archive-download header p,
body[class*="download"] main>p{max-width:820px!important;}
body.post-type-archive-download main.ef-content .ef-container>header p:nth-of-type(2),
body.post-type-archive-download main.ef-content .ef-container>header p:nth-of-type(3),
body.post-type-archive-download main header p:nth-of-type(2),
body.post-type-archive-download main header p:nth-of-type(3){display:none!important;}

/* Punch-list 1 follow-up (2026-12-03): the live /downloads/ hero is rendered by Elementor's
   archive template (archive-download.php returns early when elementor_theme_do_location
   ('archive') is set), so the intro paragraph sits nested under main but NOT inside a
   <header> and NOT as a direct child of main. A descendant selector is what matches it. */
body.post-type-archive-download main p,
body[class*="download"] main p{max-width:820px!important;}
