/*
Theme Name: Core Directory
Author: Core Themes
Description: A self-contained multi-platform software, games & courses download directory theme. Includes custom meta boxes, platform taxonomy, category filters and a clean two-column layout. No external plugin or page-builder required.
Version: 1.8.8
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: core
Tags: directory, software, download, custom-colors, two-columns, full-width-template, custom-menu, featured-images, threaded-comments
*/

/*
  Note: Real styling lives in assets/css/utilities.css (Tailwind-style)
  and assets/css/theme.css (components). This file only carries the
  required theme header + a tiny base reset so nothing breaks before
  the enqueued stylesheets load.
*/

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ce-ink, #111827);
  background: var(--ce-page, #f4f6f8);
  line-height: 1.5;
}

img { max-width: 100%; height: auto; vertical-align: middle; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; }

/* =========================================================================
   USER CUSTOM CSS (merged from Additional CSS) — loads last, wins cascade.
   Mobile-breaking values fixed: fixed widths → responsive equivalents.
   After updating the theme, CLEAR the Appearance → Additional CSS box.
   ========================================================================= */

/* Gradient breadcrumb bar */
.ce-crumbbar,
.ce-crumbbar-inner {
  background: linear-gradient(90deg, #05e6aa, #1cbdf9);
  color: #fff;
  border-bottom: 0;
}
.ce-crumbbar { display: flex; align-items: center; }
.ce-crumbbar-inner { padding: 14px 30px; min-height: 64px; width: 100%; }
.ce-crumbbar-title { font-size: 23px; font-weight: 600; line-height: 1.6; color: #fff; }
.ce-crumbs { font-size: 14px; font-weight: 600; line-height: 1.8; }
.ce-crumbs, .ce-crumbs a, .ce-crumbs .sep { color: #fff; }
.ce-crumbs .sep { font-size: 20px; font-weight: 600; margin: 0 5px; line-height: 1.8; }

/* Download button */
.ce-btn-dl { width: 100%; height: 50px; }

/* Card icons 90px */
.ce-card-ico { width: 62px; height: 62px; }
.ce-card-ico img { width: 62px; height: 62px; object-fit: cover; border-radius: 10px; }

/* Add to Chrome */
.ce-chrome-btn { color: #fff; border-radius: 10px; }

/* Rating: inline row */
.ce-rate { flex-direction: row; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* Post title */
.ce-post-title { font-size: 32px; font-weight: 600; line-height: 1.15; margin: 10px 0 20px; }

/* Hide micro text + version line (keep rating message) */
.ce-text-xs { display: none; }
.ce-rate .ce-rate-msg { display: block; width: 100%; text-align: center; }
.ce-dlbox .verline { display: none; }

/* Main content as white rounded card */
main.ce-py-6 {
  background-color: #fff;
  border: 1px solid var(--ce-line);
  padding: 15px 15px 25px;
  border-radius: 20px;
  margin-top: 20px;
}

/* Container — RESPONSIVE (the old fixed 1240px broke mobile) */
.ce-container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 1280px) { .ce-container { padding-left: 0; padding-right: 0; } }

/* Search box */
.ce-search {
  background: #ddd;
  border: 2px solid;
  border-radius: 10px;
  max-width: 560px;
}

/* Card meta columns flex evenly */
.ce-card-col { padding: 0 10px; min-width: 100px; flex: 1; }

/* Main grid breathing room */
.ce-grid-main { padding: 15px; }

/* Comments box */
.ce-comments { border: 1px solid var(--ce-line-2); border-radius: 12px; padding: 15px; }

/* Comment form inputs */
.ce-cform input[type=text],
.ce-cform input[type=email],
.ce-cform textarea { width: 100%; }

/* =========================================================================
   FileCR-style component sizing (gallery, favorites, comment button)
   ========================================================================= */

/* Gallery: FIXED 16:9 box — image size never changes the box (FileCR) */
.ce-gallery {
  aspect-ratio: 16 / 9;
  max-height: 420px;
  width: 100%;
  background: var(--ce-surface);
}
.ce-gallery-track { height: 100%; }
.ce-gallery-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ce-gallery-slide img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0;
  display: block;
}

/* Add to Favorites: small, FileCR-like */
.ce-btn-fav {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ce-ink-soft);
  border: 1px solid var(--ce-line-2);
  gap: 6px;
}
.ce-btn-fav svg { width: 16px; height: 16px; flex-shrink: 0; }
.ce-btn-fav:hover { color: #e0245e; border-color: #e0245e; background: #fff; }

/* Download button icon size */
.ce-btn-dl svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Sidebar SVG safety: never let an unsized inline svg blow up */
.ce-dlbox svg, .ce-widget svg { max-width: 24px; max-height: 24px; }
.ce-rate-star svg { width: 22px; height: 22px; }

/* Comment submit: FileCR-style blue pill with send icon */
.ce-cform .submit,
.ce-cform input[type=submit] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ce-link);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.ce-cform .submit::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M3 11l18-8-8 18-2-7z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M3 11l18-8-8 18-2-7z"/></svg>') center / contain no-repeat;
}
.ce-cform .submit:hover { filter: brightness(1.08); }

/* Footer widget columns */
.ce-footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ce-header-line);
}
.ce-footer-widget li { list-style: none; padding: 4px 0; font-size: 13px; }
.ce-footer-widget ul { margin: 0; padding: 0; }
.ce-footer-widget p { font-size: 13px; line-height: 1.6; }

/* =========================================================================
   MOBILE HARD OVERRIDES — these defeat any leftover Additional CSS too.
   ========================================================================= */
@media (max-width: 900px) {
  .ce-container { width: 100% !important; padding-left: 12px !important; padding-right: 12px !important; }
  .ce-crumbbar, .ce-crumbbar-inner { height: auto !important; min-height: 0 !important; }
  .ce-crumbbar-inner { padding: 12px 14px !important; flex-wrap: wrap; gap: 4px; }
  .ce-crumbbar-title { font-size: 18px !important; line-height: 1.3 !important; width: 100% !important; }
  .ce-crumbs { width: 100% !important; justify-content: flex-start !important; }
  .ce-grid-main { grid-template-columns: minmax(0, 1fr) !important; padding: 0 !important; }
  .ce-grid-arch { grid-template-columns: minmax(0, 1fr) !important; }
  main.ce-py-6 { padding: 10px 10px 18px !important; border-radius: 14px !important; margin-top: 12px !important; }
  .ce-post-title { font-size: 24px !important; }
  .ce-card-ico, .ce-card-ico img { width: 60px !important; height: 60px !important; }
  .ce-card { flex-wrap: wrap; padding: 12px !important; }
  .ce-card-meta { width: 100%; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ce-line); justify-content: space-between; }
  .ce-card-col { min-width: 0 !important; padding: 0 6px !important; border-left: 0 !important; }
  .ce-gallery { max-height: 240px !important; }
  .ce-header-inner { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .ce-search { order: 5; flex-basis: 100%; max-width: 100% !important; }
  .ce-chrome-btn { padding: 7px 12px; font-size: 13px; margin-left: auto; }
  .ce-footer-widgets { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ce-section-head { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
}
@media (max-width: 520px) {
  .ce-footer-widgets { grid-template-columns: minmax(0,1fr); }
  .ce-card-size { font-size: 17px; }
  .ce-stars .s { width: 12px; height: 12px; }
}

/* =========================================================================
   v1.5 — Product Info aligned table + 90x90 sidebar thumbs
   ========================================================================= */

/* Product Information: clean two-column table, values aligned left,
   all starting on the same line (no left/right scatter) */
.ce-info-row {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.ce-info-row .k { color: var(--ce-ink-soft); white-space: nowrap; }
.ce-info-row .v {
  font-weight: 600;
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Related Products / sidebar items: equal 90x90 cropped thumbs */
.ce-mini-ico {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ce-surface);
}
.ce-mini-ico img {
  width: 90px;
  height: 90px;
  object-fit: cover; /* CSS crop even when the 90x90 file doesn't exist yet */
  display: block;
}
.ce-mini { gap: 12px; padding: 10px 0; }
.ce-mini-title { font-size: 14px; }

@media (max-width: 900px) {
  .ce-mini-ico, .ce-mini-ico img { width: 64px; height: 64px; }
  .ce-info-row { grid-template-columns: 110px minmax(0, 1fr); }
}

/* =========================================================================
   v1.6 — Split layout (white panels on gray page) + FileCR clean sidebar
   ========================================================================= */

/* Main wrapper becomes TRANSPARENT — content & sidebar get their own
   white panels, page background shows between them (FileCR look) */
main.ce-py-6 {
  background: transparent;
  border: 0;
  padding: 24px 0;
  border-radius: 0;
  margin-top: 0;
}

/* Content column panels (single post article, archive list section,
   full-width centered column) */
.ce-grid-main > article,
.ce-grid-arch > section,
main .ce-mx-auto {
  background: #fff;
  border: 1px solid var(--ce-line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

/* Homepage content column: sections float directly on the page bg —
   the section head + cards are already white panels */
.ce-grid-main > div > section .ce-section-head { margin-bottom: 14px; }

/* Sidebar widgets already render as white panels (.ce-widget / .ce-dlbox) */

/* ---- FileCR clean sidebar items: 65x65, rounded 15, stacked meta ---- */
.ce-mini-ico,
.ce-mini-ico img {
  width: 65px;
  height: 65px;
}
.ce-mini-ico { border-radius: 15px; flex-shrink: 0; overflow: hidden; }
.ce-mini-ico img { border-radius: 15px; object-fit: cover; display: block; }

.ce-mini { gap: 12px; padding: 9px 0; align-items: center; }
.ce-mini-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.ce-mini-meta {
  display: flex;
  flex-direction: column;   /* category on one line, size below */
  align-items: flex-start;
  gap: 2px;
  margin-top: 3px;
}
.ce-mini-cat { font-size: 12px; color: var(--ce-link); font-weight: 500; }
.ce-mini-size {
  font-size: 13px;
  font-weight: 700;
  color: var(--ce-ink);
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .ce-mini-ico, .ce-mini-ico img { width: 56px !important; height: 56px !important; }
  .ce-grid-main > article,
  .ce-grid-arch > section,
  main .ce-mx-auto { padding: 14px; border-radius: 12px; }
  main.ce-py-6 { padding: 14px 0 !important; }
}

/* =========================================================================
   v1.6.1 — Hamburger menu + compact mobile header
   ========================================================================= */

/* Hamburger hidden on desktop */
.ce-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ce-header-line);
  border-radius: 8px;
  color: var(--ce-header-ink);
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ce-nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  body { padding: 2px; }

  /* Compact single-row header: [☰] [logo] [search] [chrome] */
  .ce-nav-toggle { display: inline-flex; }
  .ce-header-inner { flex-wrap: nowrap !important; gap: 8px !important; padding: 8px 6px !important; }
  .ce-search { order: 0 !important; flex: 1 1 auto !important; min-width: 0; padding: 4px 8px; }
  .ce-search input { font-size: 13px; }
  .ce-search .ce-search-ico { width: 26px; height: 26px; }
  .ce-header-link { display: none; } /* Categories link → lives in nav panel */
  .ce-chrome-btn { padding: 8px 10px; }
  .ce-chrome-btn span { display: none; } /* icon-only on mobile */
  .ce-logo { width: 38px; height: 38px; }

  /* Nav: hidden until hamburger opens it; vertical panel */
  .ce-platnav { display: none; }
  .ce-platnav.is-open { display: block; }
  .ce-platnav-inner { flex-direction: column; overflow: visible; }
  .ce-platnav-item {
    border-right: 0 !important;
    border-left: 0 !important;
    border-bottom: 1px solid var(--ce-line);
    padding: 13px 16px;
    font-size: 14px;
  }

  /* Headings smaller */
  .ce-crumbbar-title { font-size: 16px !important; }
  .ce-post-title { font-size: 21px !important; margin: 6px 0 12px !important; }
  .ce-post-sub { font-size: 14px !important; }
  .ce-section-head .title { font-size: 15px; }
  .ce-widget-title { font-size: 16px; }
}

/* =========================================================================
   v1.7.2 — Search look + hide breadcrumbs on mobile
   ========================================================================= */

/* Search: white field, light border */
.ce-search {
  background: #ffffff;
  border: 1px solid var(--ce-line-2);
}
.ce-search .ce-search-ico { background: #f4f6f8; }

@media (max-width: 900px) {
  /* Breadcrumb trail hidden on mobile — title only */
  .ce-crumbs { display: none !important; }
  .ce-crumbbar-title { width: auto !important; }
}

/* =========================================================================
   v1.8.0 — Heading hierarchy + Product Info colons + buttons
   ========================================================================= */

/* Headings used structurally keep their visual size */
h1.ce-crumbbar-title, h2.ce-card-title, h3.ce-mini-title { margin: 0; }
h2.ce-card-title { font-size: 16px; font-weight: 700; }
h2.ce-card-title a { color: var(--ce-ink); }
h2.ce-card-title a:hover { color: var(--ce-link); }
h3.ce-mini-title { font-size: 13px; font-weight: 600; line-height: 1.3; }

/* Homepage H1 (site name — tagline) */
.ce-home-h1 { font-size: 22px; font-weight: 800; margin: 4px 0 18px; color: var(--ce-ink); }
.ce-home-h1 .ce-home-tag { font-size: 15px; font-weight: 500; color: var(--ce-ink-soft); }

/* Product Information: colon after every label + tight spacing */
.ce-info-row { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; }
.ce-info-row .k { min-width: 105px; }
.ce-info-row .k::after { content: ":"; }

/* Add to Favorite: solid green (per screenshot) */
.ce-btn-fav {
  background: #3d9272;
  border-color: #3d9272;
  color: #fff;
}
.ce-btn-fav:hover { background: #347e62; border-color: #347e62; color: #fff; }
.ce-btn-fav svg { color: #fff; }

/* Torrent Magnet button: dark block under Direct Download */
.ce-btn-magnet {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 16px; margin-top: 10px;
  background: #2f3439; color: #fff;
  font-weight: 700; font-size: 14px; border-radius: 8px;
}
.ce-btn-magnet:hover { background: #23272b; color: #fff; }
.ce-btn-magnet svg { width: 18px; height: 18px; }

/* =========================================================================
   v1.8.1 — Assistant card, bigger platform icons, rating counts
   ========================================================================= */

/* Logo: clean (no forced bg/color — your logo image shows as-is) */

/* Platform icons on cards: bigger, brand-colored (colors come inline) */
.ce-card-platform svg { width: 26px; height: 26px; }
.ce-card-platform { gap: 8px; font-size: 13px; }

/* Rating counts */
.ce-rate-count { font-size: 13px; color: var(--ce-ink-soft); font-weight: 600; }
.ce-rate-count-sm { font-size: 11px; color: var(--ce-ink-mute); margin-top: 3px; }

/* ---- FileCR-style Assistant card (footer) ---- */
.ce-assist-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  color: var(--ce-ink);
}
.ce-assist-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.ce-assist-title { font-size: 20px; font-weight: 800; line-height: 1.2; color: var(--ce-ink); }
.ce-assist-badge {
  background: #1c2530; color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 7px;
  white-space: nowrap; margin-top: 3px;
}
.ce-assist-feats { list-style: none; margin: 0 0 16px; padding: 0; }
.ce-assist-feats li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--ce-ink);
  padding: 5px 0; line-height: 1.4;
}
.ce-assist-feats svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--ce-ink); }
.ce-assist-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 16px;
  background: #3d9272; color: #fff;
  border-radius: 9999px; font-size: 14px;
}
.ce-assist-cta:hover { background: #347e62; color: #fff; }
.ce-assist-cta svg { width: 18px; height: 18px; }
.ce-assist-cta em { font-style: normal; font-size: 12px; opacity: .85; }
.ce-assist-how {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: max-content; margin: 12px auto 0;
  padding: 9px 20px;
  border: 1.5px solid #38bdf8; color: #38bdf8;
  border-radius: 9999px; font-size: 14px; font-weight: 600;
}
.ce-assist-how:hover { background: #f0f9ff; color: #0ea5e9; }
.ce-assist-how svg { width: 18px; height: 18px; }

/* =========================================================================
   v1.8.2 — Live search dropdown + 30px platform icons
   ========================================================================= */
.ce-search { position: relative; }
.ce-livesearch {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--ce-line-2);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .15);
  z-index: 80;
  max-height: 430px;
  overflow-y: auto;
}
.ce-ls-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ce-line);
}
.ce-ls-item:last-child { border-bottom: 0; }
.ce-ls-item:hover { background: var(--ce-surface); }
.ce-ls-item img,
.ce-ls-ph {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 9px; object-fit: cover;
  background: var(--ce-surface);
}
.ce-ls-body { min-width: 0; }
.ce-ls-title {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--ce-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ce-ls-meta { display: block; font-size: 11.5px; color: var(--ce-ink-mute); margin-top: 2px; }
.ce-ls-meta b { color: var(--ce-link); font-weight: 600; }
.ce-ls-empty { padding: 16px; font-size: 13px; color: var(--ce-ink-soft); text-align: center; }

/* Platform icons: FileCR-size */
.ce-card-platform svg { width: 30px !important; height: 30px !important; }

@media (max-width: 900px) {
  .ce-livesearch { max-height: 320px; }
}

/* =========================================================================
   v1.8.3 — FileCR-style compact rating widget
   ========================================================================= */
.ce-rate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}

/* Olive/gold badge like FileCR's "4.4" pill */
.ce-rate-badge {
  display: inline-flex;
  align-items: center;
  background: #8a7d1e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 5px;
}
.ce-rate-count {
  font-size: 12px;
  color: var(--ce-ink-mute);
  font-weight: 600;
}
.ce-rate-count::before { content: "("; }
.ce-rate-count::after  { content: ")"; }

/* Small sleek stars */
.ce-rate-stars { display: inline-flex; gap: 2px; }
.ce-rate-star {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #d9d9d9;             /* empty */
  line-height: 0;
}
.ce-rate-star svg { width: 17px; height: 17px; display: block; }
.ce-rate-star.on { color: #f5a623; }          /* filled gold */
.ce-rate-star.hover { color: #ffc14d; }        /* hover preview */

/* Half star via gradient clip */
.ce-rate-star.half svg {
  fill: url(#ce-half) #d9d9d9;
}
.ce-rate-star.half { color: #f5a623; }
.ce-rate-star.half svg path {
  fill: #f5a623;
  clip-path: inset(0 50% 0 0);
}

/* Read-only (plugin-owned): no pointer, no hover */
.ce-rate.is-readonly .ce-rate-star { cursor: default; color: #d9d9d9; }
.ce-rate.is-readonly .ce-rate-star.on { color: #f5a623; }
.ce-rate.is-readonly .ce-rate-star.half { color: #f5a623; }

.ce-rate-msg { width: 100%; text-align: center; font-size: 11px; margin-top: 2px; }

/* =========================================================================
   v1.8.4 — Mobile header 3-col + mobile card list with image+title
   ========================================================================= */

/* MOBILE HEADER: Logo | Search (flex-grow) | Hamburger */
@media (max-width: 900px) {
  .ce-header-inner {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center;
    gap: 10px !important;
    padding: 8px 12px !important;
    flex-wrap: nowrap !important;
  }
  /* Logo: col 1 */
  .ce-logo { order: 0 !important; }
  /* Search: col 2, stretches */
  .ce-search {
    order: 0 !important;
    flex: unset !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }
  /* Categories link + Chrome btn: hidden on mobile */
  .ce-header-link,
  .ce-chrome-btn { display: none !important; }
  /* Hamburger: col 3 */
  .ce-nav-toggle {
    display: inline-flex !important;
    order: 0 !important;
    flex-shrink: 0;
  }
}

/* MOBILE CARDS: horizontal — thumbnail left, title right */
@media (max-width: 900px) {
  /* Make cards a horizontal flex row */
  .ce-card {
    flex-direction: row !important;
    align-items: center;
    padding: 10px 12px !important;
    gap: 12px !important;
  }
  /* Icon / feature image */
  .ce-card-ico {
    width: 70px !important;
    height: 70px !important;
    flex-shrink: 0;
  }
  .ce-card-ico img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 10px;
    object-fit: cover;
  }
  /* Body: title + category + desc */
  .ce-card-body {
    flex: 1 1 auto;
    min-width: 0;
  }
  h2.ce-card-title {
    font-size: 14px !important;
    white-space: normal !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Hide description + meta columns on mobile */
  .ce-card-desc { display: none !important; }
  .ce-card-meta { display: none !important; }
  /* Show sub-category under title */
  .ce-card-cat { display: block !important; font-size: 12px; color: var(--ce-link); margin-top: 3px; }
}

/* =========================================================================
   v1.8.5 — Competitor-style mobile cards
   ========================================================================= */

/* ---- Base card ---- */
.ce-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--ce-line);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}
.ce-card-ico {
  width: 90px; height: 90px; flex-shrink: 0;
  border-radius: 14px; overflow: hidden;
  background: var(--ce-surface);
  display: flex; align-items: center; justify-content: center;
}
.ce-card-ico img { width: 90px; height: 90px; object-fit: cover; display: block; border-radius: 14px; }
.ce-icon-ph { font-size: 32px; font-weight: 800; color: #fff; }

/* Body */
.ce-card-body { flex: 1 1 auto; min-width: 0; }
h2.ce-card-title { font-size: 15px; font-weight: 700; line-height: 1.3; margin: 0 0 3px; color: var(--ce-ink); }
h2.ce-card-title a { color: inherit; }
h2.ce-card-title a:hover { color: var(--ce-link); }
.ce-card-cat { font-size: 12px; font-weight: 600; color: var(--ce-link); display: block; margin-bottom: 4px; }
.ce-card-desc { font-size: 12px; color: var(--ce-ink-soft); margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Desktop meta cols */
.ce-card-meta { display: flex; align-items: center; flex-shrink: 0; border-left: 1px solid var(--ce-line); margin-left: 4px; }
.ce-card-col { padding: 0 14px; text-align: center; border-right: 1px solid var(--ce-line); min-width: 100px; }
.ce-card-col:last-child { border-right: 0; }
.ce-card-platform { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.ce-card-platform svg { width: 30px; height: 30px; }
.ce-dl-count { font-size: 11px; color: var(--ce-ink-mute); display: flex; align-items: center; gap: 3px; margin-top: 2px; }
.ce-dl-count svg { width: 12px; height: 12px; }
.ce-rep-label { font-size: 11px; color: var(--ce-ink-mute); display: block; margin-bottom: 3px; }
.ce-card-rep { display: flex; flex-direction: column; align-items: center; }
.ce-card-size { display: flex; align-items: baseline; gap: 2px; }
.ce-size-num { font-size: 26px; font-weight: 800; color: var(--ce-ink); line-height: 1; }
.ce-size-unit { font-size: 16px !important; font-weight: normal; color: var(--ce-ink); text-transform: uppercase; }

/* Mobile meta rows — hidden on desktop */
.ce-card-mob-meta, .ce-card-mob-rep { display: none; }

/* Ribbon */
.ce-ribbon { position: absolute; top: 10px; left: 0; background: #2ecc71; color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 0 6px 6px 0; text-transform: uppercase; letter-spacing: .4px; }

/* Section head */
.ce-section-head { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 2px solid var(--ce-link); margin-bottom: 12px; }
.ce-section-head .title { font-size: 18px; font-weight: 700; border-left: 3px solid var(--ce-link); padding-left: 10px; }
.ce-viewall { font-size: 13px; color: var(--ce-ink-soft); border: 1px solid var(--ce-line-2);
  padding: 5px 14px; border-radius: 6px; }
.ce-viewall:hover { color: var(--ce-link); }

/* =========================================================================
   MOBILE CARD — competitor layout
   ========================================================================= */
@media (max-width: 900px) {
  .ce-card { flex-wrap: wrap; padding: 12px; gap: 10px; border-radius: 10px; }

  /* Row 1: Icon + Body (title + cat) */
  .ce-card-ico { width: 70px !important; height: 70px !important; border-radius: 10px; }
  .ce-card-ico img { width: 70px !important; height: 70px !important; border-radius: 10px; }
  .ce-card-body { flex: 1 1 0; min-width: 0; }
  h2.ce-card-title { font-size: 14px; }
  .ce-card-desc { display: none; }

  /* Desktop meta: hidden on mobile */
  .ce-card-meta { display: none !important; }

  /* Stars compact */
  .ce-stars .s { width: 14px; height: 14px; }
}

/* =========================================================================
   v1.8.5p2 — Competitor-exact card layout fixes
   ========================================================================= */

/* Desktop filesize: compact, no overflow */
.ce-size-num { font-size: 22px !important; font-weight: 600; line-height: 1; }
.ce-size-unit { font-size: 16px !important; font-weight: normal; text-transform: uppercase; }
.ce-card-col.ce-card-size { min-width: 80px; max-width: 90px; justify-content: center; }

/* Title: single line, ellipsis */
h2.ce-card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
h2.ce-card-title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- MOBILE: competitor exact ---- */
@media (max-width: 900px) {
  .ce-card { flex-wrap: nowrap; align-items: flex-start; padding: 12px; gap: 10px; }

  /* Icon: 65px, direct under nothing — left column */
  .ce-card-ico { width: 65px !important; height: 65px !important; flex-shrink: 0; border-radius: 10px; }
  .ce-card-ico img { width: 65px !important; height: 65px !important; border-radius: 10px; }

  /* Body: right column, full width */
  .ce-card-body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

  /* Title: 2 lines max, wrap allowed */
  h2.ce-card-title { font-size: 13px !important; white-space: normal !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: unset; }
  h2.ce-card-title a { white-space: normal; overflow: visible; }

  /* Sub-cat */
  .ce-card-cat { font-size: 11px; }

  /* Desc: hidden */
  .ce-card-desc { display: none !important; }

  /* Desktop meta: hidden */
  .ce-card-meta { display: none !important; }

  /* OS row: icon(16px) + name + | + cloud icon + count — all on one line */
  .ce-card-mob-os {
    display: flex !important;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ce-ink-soft);
    margin-top: 4px;
  }
  .ce-card-mob-os svg { width: 16px !important; height: 16px !important; flex-shrink: 0; }
  .ce-mob-os-name { font-weight: 600; color: var(--ce-ink); }
  .ce-mob-dls { display: flex; align-items: center; gap: 3px;
    margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--ce-line); color: var(--ce-ink-mute); }
  .ce-mob-dls svg { width: 12px !important; height: 12px !important; }

  /* Rep row: "Reputation" label + stars left | size right */
  .ce-card-mob-rep {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
    width: 100%;
  }
  .ce-card-rep-col { display: flex; flex-direction: column; gap: 1px; }
  .ce-rep-label { font-size: 11px; color: var(--ce-ink-mute); }

  /* Size: large bold right */
  .ce-card-size-mob { text-align: right; line-height: 1; }
  .ce-s-num { font-size: 20px; font-weight: 800; color: var(--ce-ink); }
  .ce-s-unit { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ce-ink); margin-left: 1px; }
}

/* =========================================================================
   v1.8.7 — Competitor-exact mobile card (full-width bottom rows)
   ========================================================================= */

/* Card: CSS Grid on mobile so bottom rows span full width */
@media (max-width: 900px) {

  .ce-card {
    display: grid !important;
    grid-template-columns: 65px 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 0 10px !important;
    padding: 12px !important;
    border-radius: initial;
    align-items: start;
  }

  /* Ribbon spans both cols */
  .ce-ribbon { grid-column: 1 / -1; }

  /* Icon: col 1, row 1 */
  .ce-card-ico {
    grid-column: 1; grid-row: 1;
    width: 65px !important; height: 65px !important;
    border-radius: 10px; align-self: start;
    margin-top: 2px;
  }
  .ce-card-ico img { width: 65px !important; height: 65px !important; border-radius: 10px; }

  /* Body (title+cat+desc): col 2, row 1 */
  .ce-card-body {
    grid-column: 2; grid-row: 1;
    min-width: 0; padding: 0;
  }
  h2.ce-card-title {
    font-size: 13.5px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: unset !important;
    line-height: 1.35;
    margin-bottom: 2px;
  }
  h2.ce-card-title a { white-space: normal; overflow: visible; }
  .ce-card-cat { font-size: 11.5px; margin-bottom: 0; }
  .ce-card-desc { display: none !important; }

  /* Desktop meta: hidden */
  .ce-card-meta { display: none !important; }

  /* Bottom section: spans BOTH columns (col 1 + col 2) */
  .ce-mob-bottom {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ce-line);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  /* Row A: OS icon+name LEFT | cloud+count RIGHT */
  .ce-mob-row-os {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .ce-mob-os {
    display: flex; align-items: center; gap: 5px;
    font-size: 12.5px; font-weight: 600; color: var(--ce-ink);
  }
  .ce-mob-os svg { width: 16px !important; height: 16px !important; flex-shrink: 0; }
  .ce-mob-dls {
    display: flex; align-items: center; gap: 3px;
    font-size: 12px; color: var(--ce-ink-mute);
  }
  .ce-mob-dls svg { width: 13px !important; height: 13px !important; }

  /* Row B: labels — "Reputation" LEFT | "File Size" RIGHT */
  .ce-mob-row-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ce-ink-mute);
  }

  /* Row C: stars LEFT | size bold RIGHT */
  .ce-mob-row-rep {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .ce-mob-size {
    font-size: 20px;
    font-weight: 800;
    color: var(--ce-ink);
    line-height: 1;
  }
  .ce-mob-size em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 1px;
  }
  .ce-stars .s { width: 14px !important; height: 14px !important; }
}

/* Desktop: hide mobile bottom rows */
@media (min-width: 901px) {
  .ce-mob-bottom { display: none; }
}

/* === User custom additions from uploaded ZIP === */
.ce-card-platform { gap: 8px; font-size: 12px; }
.ce-card-platform { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.ce-size-num { font-size: 22px !important; font-weight: 600; line-height: 1; color: var(--ce-ink); }
    font-size: 15px;

/* =========================================================================
   v1.8.7 — Heading hierarchy visual resets
   ========================================================================= */
/* H2 section titles on homepage/archive keep visual size */
h2.title { font-size: 18px; font-weight: 700; margin: 0; }
h2.ce-section-head-title { font-size: 18px; font-weight: 700; margin: 0; }
/* H3 card titles on homepage (child of H2 section) */
h3.ce-card-title { font-size: 15px; font-weight: 700; margin: 0 0 3px; }
h3.ce-card-title a { color: var(--ce-ink); }
h3.ce-card-title a:hover { color: var(--ce-link); }
/* H2 card titles on single post sidebar */
h2.ce-mini-title { font-size: 13px; font-weight: 600; line-height: 1.3; margin: 0; }
/* H2 single sidebar post card titles */
h2.ce-card-title { font-size: 15px; font-weight: 700; margin: 0 0 3px; }
h2.ce-card-title a { color: var(--ce-ink); }
/* Desktop: desc ABOVE category (competitor layout) */
.ce-card-desc { display: block; margin-bottom: 4px; }
/* Description: 2 lines on desktop too */
.ce-card-desc {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  color: var(--ce-ink-soft);
  margin: 2px 0 4px;
}
