/*
Theme Name: FreeCraftSVG
Theme URI: https://freecraftsvg.com/
Description: Child theme for FreeCraftSVG - full-width browse grid, instant category filtering and short one-line file titles. Built on Kadence.
Author: FreeCraftSVG
Template: kadence
Version: 1.4.1
Text Domain: kadence-child-freecraft
*/

/* ==========================================================================
   Tokens - these follow the Kadence palette so one change in the Customizer
   still moves the whole site.
   ========================================================================== */
:root {
  --fcb-accent:      var(--global-palette1, #7C4DDB);
  --fcb-accent-deep: var(--global-palette2, #6234BC);
  --fcb-tint:        var(--global-palette7, #F2E6F2);
  --fcb-soft:        #E9DAF3;
  --fcb-panel:       var(--global-palette9, #FFFFFF);
  --fcb-ink:         var(--global-palette3, #2A2036);
  --fcb-muted:       var(--global-palette5, #574C66);
  --fcb-hair:        #E9DCF2;
  --fcb-radius:      14px;
  --fcb-lift:        0 2px 6px rgba(42,32,54,.06), 0 16px 36px rgba(107,69,157,.14);
}

/* ==========================================================================
   1. Wider canvas on browse pages
   ========================================================================== */
.fcb-browse .content-container.site-container { max-width: 1600px; }

/* Kadence's archive hero eats a whole screen before any design shows.
   Tighten it so the grid starts high on the page. */
.fcb-browse .page-title.entry-title,
.fcb-browse .archive-hero-section .entry-header { margin-bottom: 0; }
.fcb-browse .entry-hero-container-inner .entry-header,
.fcb-browse .archive-hero-section .entry-hero-container-inner { padding-top: 34px; padding-bottom: 26px; }
.fcb-browse .archive-hero-section .archive-description p { margin-bottom: 0; }

/* ==========================================================================
   2. The grid - archives (Kadence markup) and the [fcs_browse] shortcode
      share one set of rules.
   ========================================================================== */
.fcb-browse ul.content-wrap.grid-cols.post-archive,
.fcb-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Fixed column counts rather than auto-fill: at 1600px auto-fill was packing
   seven tiles a row, which reads as a contact sheet instead of a shop. */
@media (min-width: 700px)  { .fcb-browse ul.content-wrap.grid-cols.post-archive, .fcb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1000px) { .fcb-browse ul.content-wrap.grid-cols.post-archive, .fcb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
@media (min-width: 1500px) { .fcb-browse ul.content-wrap.grid-cols.post-archive, .fcb-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; } }
.fcb-browse ul.content-wrap.grid-cols.post-archive > li.entry-list-item {
  margin: 0;
  padding: 0;
  width: auto;
  max-width: none;
  flex: none;
}

/* The card itself */
.fcb-browse article.loop-entry,
.fcb-card {
  background: var(--fcb-panel);
  border: 1px solid var(--fcb-hair);
  border-radius: var(--fcb-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fcb-browse article.loop-entry:hover,
.fcb-card:hover {
  border-color: var(--fcb-accent);
  box-shadow: var(--fcb-lift);
  transform: translateY(-3px);
}

/* Thumbnail */
.fcb-browse .loop-entry a.post-thumbnail,
.fcb-card .fcb-thumb {
  display: block;
  margin: 0;
  aspect-ratio: 1 / 1;
  background: var(--fcb-tint);
  overflow: hidden;
  max-width: 100%;
}
.fcb-browse .loop-entry .post-thumbnail-inner { height: 100%; }
.fcb-browse .loop-entry .post-thumbnail img,
.fcb-card .fcb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.fcb-browse article.loop-entry:hover .post-thumbnail img,
.fcb-card:hover .fcb-thumb img { transform: scale(1.04); }

/* Title - one short line, never the long keyword headline */
.fcb-browse .loop-entry .entry-content-wrap,
.fcb-card .fcb-cardtitle { padding: 13px 14px 15px; }
.fcb-browse .loop-entry .entry-header { margin: 0; padding: 0; }
.fcb-browse .loop-entry .entry-title,
.fcb-card .fcb-cardtitle {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0;
  color: var(--fcb-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fcb-browse .loop-entry .entry-title a { color: var(--fcb-ink); text-decoration: none; }
.fcb-browse article.loop-entry:hover .entry-title a,
.fcb-card:hover .fcb-cardtitle { color: var(--fcb-accent); }

/* Everything Kadence normally stacks under a card that we do not want here */
.fcb-browse .loop-entry .entry-footer,
.fcb-browse .loop-entry .entry-meta,
.fcb-browse .loop-entry .entry-summary,
.fcb-browse .loop-entry .entry-taxonomies,
.fcb-browse .loop-entry .entry-actions,
.fcb-browse .loop-entry .post-readmore { display: none !important; }

/* ==========================================================================
   3. Search + category pills
   ========================================================================== */
.fcb-bar { margin: 0 0 22px; }
.fcb-searchwrap { position: relative; max-width: 520px; margin: 0 auto 16px; }
.fcb-searchwrap svg {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--fcb-muted); pointer-events: none;
}
.fcb-bar input[type="search"] {
  width: 100%;
  border: 1px solid var(--fcb-hair);
  background: var(--fcb-panel);
  color: var(--fcb-ink);
  border-radius: 999px;
  padding: 15px 20px 15px 50px;
  font-size: 16.5px;
  box-shadow: 0 1px 2px rgba(42,32,54,.04), 0 8px 24px rgba(107,69,157,.07);
  -webkit-appearance: none;
}
.fcb-bar input[type="search"]::placeholder { color: var(--fcb-muted); }
.fcb-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--fcb-accent);
  box-shadow: 0 0 0 4px var(--fcb-soft);
}

.fcb-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 6px;
  -webkit-overflow-scrolling: touch;
}
.fcb-pills::-webkit-scrollbar { display: none; }
.fcb-pill {
  flex: 0 0 auto;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--fcb-hair);
  background: var(--fcb-panel);
  color: var(--fcb-ink);
  border-radius: 999px;
  padding: 11px 17px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.fcb-pill .fcb-n { color: var(--fcb-muted); font-size: 13.5px; margin-left: 5px; font-variant-numeric: tabular-nums; }
.fcb-pill:hover { border-color: var(--fcb-accent); text-decoration: none; }
.fcb-pill.is-on { background: var(--fcb-accent); border-color: var(--fcb-accent); }
.fcb-pill.is-on .fcb-n { color: rgba(255,255,255,.72); }

/* Kadence sets its own link colour with enough weight to win here, which
   left the pill labels white on white. Match its specificity. */
.fcb-bar .fcb-pills a.fcb-pill,
.fcb-bar .fcb-pills a.fcb-pill:visited,
.fcb-bar .fcb-pills button.fcb-pill { color: var(--fcb-ink); }
.fcb-bar .fcb-pills a.fcb-pill:hover,
.fcb-bar .fcb-pills button.fcb-pill:hover { color: var(--fcb-accent); }
.fcb-bar .fcb-pills a.fcb-pill.is-on,
.fcb-bar .fcb-pills a.fcb-pill.is-on:visited,
.fcb-bar .fcb-pills a.fcb-pill.is-on:hover,
.fcb-bar .fcb-pills button.fcb-pill.is-on { color: #fff; }

.fcb-count { font-size: 14.5px; color: var(--fcb-muted); margin: 4px 0 16px; }
.fcb-count strong { color: var(--fcb-ink); font-weight: 600; }

.fcb-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--fcb-muted);
  border: 1px dashed var(--fcb-hair);
  border-radius: var(--fcb-radius);
}
.fcb-empty b { display: block; font-size: 20px; color: var(--fcb-ink); margin-bottom: 6px; }

/* ==========================================================================
   4. Handy tips
   ========================================================================== */
.fcb-tips { margin: 48px 0 8px; }
.fcb-tips > h2 { font-size: clamp(25px, 3vw, 33px); margin: 0 0 12px; letter-spacing: -.02em; }
.fcb-tips > p.fcb-lede { color: var(--fcb-muted); max-width: 64ch; margin: 0 0 26px; }
.fcb-tipgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; }
.fcb-tip {
  background: var(--fcb-panel);
  border: 1px solid var(--fcb-hair);
  border-radius: var(--fcb-radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s;
}
.fcb-tip:hover { border-color: var(--fcb-accent); box-shadow: var(--fcb-lift); text-decoration: none; }
.fcb-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--fcb-accent); }
.fcb-tip h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0; color: var(--fcb-ink); }
.fcb-tip p { margin: 0; font-size: 15px; color: var(--fcb-muted); line-height: 1.5; }
.fcb-tip .fcb-go { margin-top: auto; font-weight: 600; font-size: 15px; color: var(--fcb-accent); }

/* ==========================================================================
   5. Popular searches
   ========================================================================== */
.fcb-tags { margin: 44px 0 8px; }
.fcb-tags h2 { font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--fcb-muted); margin: 0 0 16px; }
.fcb-taglist { display: flex; flex-wrap: wrap; gap: 9px; }
.fcb-taglist a {
  font-size: 14.5px; font-weight: 500;
  border: 1px solid var(--fcb-hair); border-radius: 999px;
  padding: 8px 15px; color: var(--fcb-muted);
  background: var(--fcb-panel); text-decoration: none;
}
.fcb-taglist a:hover { border-color: var(--fcb-accent); color: var(--fcb-accent); text-decoration: none; }

/* ==========================================================================
   6. Phone - this audience reads on a phone, so 2 real columns and type
      that does not shrink.
   ========================================================================== */
@media (max-width: 719px) {
  .fcb-browse ul.content-wrap.grid-cols.post-archive,
  .fcb-grid { gap: 14px; }
  /* On a narrow tile a clamp always cuts something - "So Many Beautiful
     Reasons To Be Happy Boho SVG" needs five lines. Let phone titles wrap
     in full instead; nobody should have to guess what a file is called. */
  .fcb-browse article.loop-entry h2.entry-title,
  .fcb-card .fcb-cardtitle {
    line-height: 1.3;
    -webkit-line-clamp: none;
    display: block;
    overflow: visible;
    padding-left: 0;
    padding-right: 0;
  }
  .fcb-browse .loop-entry .entry-content-wrap,
  .fcb-card .fcb-cardtitle { padding: 12px 12px 14px; }
  .fcb-bar input[type="search"] { font-size: 16.5px; padding: 15px 18px 15px 48px; }
  /* 44px minimum tap target - this audience taps with a thumb, not a mouse */
  .fcb-pill { padding: 14px 17px; font-size: 15.5px; }

  /* The site's own padding gets tight at phone width; keep a real gutter
     around the grid so tiles never touch the screen edge. */
  .fcb-browse-block,
  .fcb-tips,
  .fcb-tags { padding-left: 8px; padding-right: 8px; }
  .fcb-searchwrap { margin-bottom: 14px; }
  .fcb-tips { margin-top: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .fcb-browse article.loop-entry,
  .fcb-card,
  .fcb-card .fcb-thumb img,
  .fcb-browse .loop-entry .post-thumbnail img { transition: none !important; }
  .fcb-browse article.loop-entry:hover,
  .fcb-card:hover { transform: none; }
}

/* ==========================================================================
   7. Living alongside the site's own Additional CSS
      The site underlines every link inside .entry-content, which is right for
      body copy and wrong for cards, pills and tag chips. Opt those out.
   ========================================================================== */
.fcb-browse .entry-content a.fcb-card,
.fcb-browse .entry-content a.fcb-card:hover,
.fcb-browse .entry-content a.fcb-tip,
.fcb-browse .entry-content a.fcb-tip:hover,
.fcb-browse .entry-content a.fcb-pill,
.fcb-browse .entry-content a.fcb-pill:hover,
.fcb-browse .entry-content .fcb-taglist a,
.fcb-browse .entry-content .fcb-taglist a:hover,
.fcb-browse .entry-content .fcb-pills a,
.fcb-browse .entry-content .fcb-pills a:hover { text-decoration: none; }

/* The card is one big link, so the title inside must not inherit link colour. */
.fcb-browse .entry-content a.fcb-card .fcb-cardtitle { color: var(--fcb-ink); }
.fcb-browse .entry-content a.fcb-card:hover .fcb-cardtitle { color: var(--fcb-accent); }

/* The shortcode grid sits inside .entry-content, where the theme's content
   width would otherwise squeeze it. */
.fcb-browse .entry-content > .fcb-browse-block,
.fcb-browse .entry-content > .fcb-tips,
.fcb-browse .entry-content > .fcb-tags { max-width: none; }


/* ==========================================================================
   8. Pager
   ========================================================================== */
.fcb-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 34px 0 4px;
}
.fcb-pager:empty { display: none; }
.fcb-page {
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--fcb-hair);
  background: var(--fcb-panel);
  color: var(--fcb-ink);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.fcb-page:hover:not(:disabled) { border-color: var(--fcb-accent); color: var(--fcb-accent); }
.fcb-page.is-on { background: var(--fcb-accent); border-color: var(--fcb-accent); color: #fff; }
.fcb-page:disabled { opacity: .35; cursor: default; }
.fcb-gap { color: var(--fcb-muted); padding: 0 2px; }

/* ==========================================================================
   9. "What's in every download" strip, above the site footer
   ========================================================================== */
.fcb-formats { background: var(--fcb-tint); border-top: 1px solid var(--fcb-hair); }
.fcb-formats-in {
  max-width: 1100px;
  margin: 0 auto;
  padding-block: 40px;
  padding-left: 24px;
  padding-right: 24px;
}
.fcb-formats h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--fcb-ink);
  letter-spacing: -.01em;
}
.fcb-formats-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px 30px;
  margin: 0;
}
.fcb-formats-list > div { display: flex; gap: 12px; align-items: flex-start; }
.fcb-formats dt {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  background: var(--fcb-accent);
  border-radius: 6px;
  padding: 5px 9px;
  line-height: 1;
  margin-top: 2px;
}
.fcb-formats-list > div:nth-child(3) dt { background: var(--fcb-ink); }
.fcb-formats dd {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--fcb-muted);
}
.fcb-formats dd a { color: var(--fcb-accent); font-weight: 600; }

@media (max-width: 719px) {
  .fcb-formats-in { padding-block: 32px; }
  .fcb-formats-list { gap: 18px; }
  .fcb-pager { margin-top: 28px; }
}


/* ==========================================================================
   10. Featured image on a single post
       Kadence wraps it in a forced 1:1 ratio box, which left a 170px dead
       zone under a portrait pin and pushed the article off the first screen.
       Let the wrapper hug the image, and keep the image modest - a pin is a
       Pinterest asset, not a page header.
   ========================================================================== */
.single .post-thumbnail.article-post-thumbnail {
  padding-bottom: 0 !important;
  height: auto !important;
  margin-bottom: 0;
}
.single .post-thumbnail.article-post-thumbnail .post-thumbnail-inner {
  position: static !important;
  height: auto !important;
}
.single .wp-site-blocks .post-thumbnail img.post-top-featured {
  max-height: 460px;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  margin-left: auto;
  margin-right: auto;
  display: block;
  border-radius: 14px;
}

/* A little more room than Kadence's narrow preset. Stops here on purpose:
   past this the lines get too long to read comfortably. */
.single-post .content-container.site-container { max-width: 920px; }

/* ==========================================================================
   11. Article thumbnails in listings - never crop a pin
       The blocks carry inline object-fit:cover, hence the !important.
   ========================================================================== */
.fcs-grid-blog .wp-block-post-featured-image img,
.fcb-grid-blog .wp-block-post-featured-image img {
  aspect-ratio: 4 / 3 !important;
  object-fit: contain !important;
  background: var(--fcb-tint);
  border-radius: 10px;
}
.category-blog .loop-entry .post-thumbnail {
  padding-bottom: 75% !important;
  background: var(--fcb-tint);
}
.category-blog .loop-entry .post-thumbnail img { object-fit: contain; }

/* ==========================================================================
   12. Server-rendered bar and pager
       The search box is a real form and the pills and page numbers are real
       links, so none of it depends on JavaScript running.
   ========================================================================== */
.fcb-bar form.fcb-searchwrap { display: flex; align-items: center; gap: 8px; }
.fcb-bar form.fcb-searchwrap input[type="search"] { flex: 1 1 auto; }
.fcb-go-btn {
  flex: 0 0 auto;
  border: none;
  background: var(--fcb-accent);
  color: #fff;
  border-radius: 999px;
  padding: 15px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.fcb-go-btn:hover { background: var(--fcb-accent-deep); }

.fcb-count a { color: var(--fcb-accent); font-weight: 600; }

/* Page numbers: links when they go somewhere, plain text when they do not. */
.fcb-browse .fcb-pager a.fcb-page,
.fcb-pager a.fcb-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--fcb-ink);
}
.fcb-browse .entry-content .fcb-pager a.fcb-page,
.fcb-browse .entry-content .fcb-pager a.fcb-page:hover { text-decoration: none; }
.fcb-pager span.fcb-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--fcb-hair);
  background: var(--fcb-panel);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fcb-ink);
}
.fcb-pager span.fcb-page.is-on {
  background: var(--fcb-accent);
  border-color: var(--fcb-accent);
  color: #fff;
}
.fcb-pager .fcb-page.is-off { opacity: .35; }

@media (max-width: 719px) {
  .fcb-bar form.fcb-searchwrap { flex-wrap: wrap; }
  .fcb-go-btn { width: 100%; padding: 15px 22px; }
}

/* ==========================================================================
   13. Article thumbnail inside a tutorial card
       The card had no image at all, so a guide read as a wall of text next to
       the design grid. Contain, not cover - these are pins of mixed shapes.
   ========================================================================== */
.fcb-tip { padding: 0; overflow: hidden; }
.fcb-tipthumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--fcb-tint);
  overflow: hidden;
  margin: 0 0 4px;
}
.fcb-tipthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fcb-tip > .fcb-kicker { padding: 18px 20px 0; }
.fcb-tip > h3 { padding: 0 20px; }
.fcb-tip > p  { padding: 0 20px; }
.fcb-tip > .fcb-go { padding: 0 20px 20px; }
