/*
Theme Name: Reboot Child (MockupLab)
Theme URI: https://mockuplab.blog/
Description: MockupLab child theme for Reboot (WPShop). Brand styling, self-hosted fonts, mockup card / trial / license FAQ components.
Author: MockupLab
Template: reboot
Version: 1.0.0
Text Domain: reboot
*/

/* ---------- Self-hosted fonts (no Google Fonts CDN) ---------- */
@font-face{font-family:"DM Serif Display";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"DM Serif Display";font-style:italic;font-weight:400;font-display:swap;src:url(fonts/dm-serif-display-400-italic.woff2) format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(fonts/inter-var.woff2) format("woff2")}

/* ---------- Brand tokens ---------- */
:root{
  --ml-cream:#FAF6EF; --ml-cream-2:#F2EBDD; --ml-ink:#111111; --ml-muted:#5c574e;
  --ml-accent:#E24C24; --ml-accent-dark:#c23d1a; --ml-yellow:#FFD84D; --ml-line:#e3dccd;
  --ml-serif:"DM Serif Display",Georgia,"Times New Roman",serif;
  --ml-sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
body,button,input,select,textarea,.main-navigation,.top-menu,.post-card__meta,.entry-meta{font-family:var(--ml-sans)}
body{background:var(--ml-cream);color:var(--ml-ink);-webkit-font-smoothing:antialiased}
h1,h2,h3,h4,h5,h6,.site-title,.entry-title,.post-card__title,.related-posts__header,.widget-title,.table-of-contents__header,.widget__title{font-family:var(--ml-serif);font-weight:400;letter-spacing:-.01em;color:var(--ml-ink)}
a{color:var(--ml-ink);text-decoration-color:var(--ml-accent);text-underline-offset:3px}
a:hover{color:var(--ml-accent)}
.entry-content a:not(.ml-btn):not(.wp-block-button__link){color:var(--ml-accent-dark)}
.site-header,.main-navigation,.content-area,.site-content{background:var(--ml-cream)}
.site-header{border-bottom:1px solid var(--ml-line)}
.site-title,.site-title a{font-size:1.9rem;color:var(--ml-ink)}
.site-description{color:var(--ml-muted)}
.breadcrumb{font-size:.85rem;color:var(--ml-muted)}
.post-card{background:#fff;border:1px solid var(--ml-line);border-radius:14px;overflow:hidden;box-shadow:none}
.post-card__title a{text-decoration:none}
.post-card__category,
.post-card__category a,
.entry-category a,
.post-card:not(.post-card--small) .post-card__category,
.post-card:not(.post-card--small) .post-card__category a{
  background:#FBE3D9 !important;
  color:#E24C24 !important;
  border-radius:999px;
}
.post-card__category:hover,
.post-card__category a:hover,
.entry-category a:hover,
.post-card:not(.post-card--small) .post-card__category:hover,
.post-card:not(.post-card--small) .post-card__category a:hover{
  background:#F8D3C3 !important;
  color:#E24C24 !important;
}
.table-of-contents{background:var(--ml-cream-2);border:1px solid var(--ml-line);border-radius:12px}
.site-footer,.site-footer-container{background:var(--ml-ink);color:var(--ml-cream)}
.site-footer a{color:var(--ml-cream)}
.search-submit,.btn,.wp-block-button__link,input[type=submit]{background:var(--ml-accent);color:#fff;border-radius:10px}
.search-submit:hover,.btn:hover,.wp-block-button__link:hover,input[type=submit]:hover{background:var(--ml-accent-dark);color:#fff}
.entry-content h2{margin-top:2.2em}
.entry-content img{border-radius:10px}

/* ---------- Component: mockup card ---------- */
.ml-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:22px;margin:1.6em 0}
.ml-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--ml-line);border-radius:14px;overflow:hidden;margin:0}
.ml-card__img{display:block;aspect-ratio:4/5;background:var(--ml-cream-2);overflow:hidden}
.ml-card__img img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0;margin:0}
.ml-card__body{padding:16px 16px 18px;display:flex;flex-direction:column;gap:10px;flex:1}
.ml-card__title{font:400 1.2rem/1.25 var(--ml-serif);margin:0}
.ml-card__note{font-size:.9rem;color:var(--ml-muted);margin:0}
.ml-badges{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.ml-badge{display:inline-block;font:600 .72rem/1 var(--ml-sans);letter-spacing:.04em;text-transform:uppercase;padding:6px 9px;border-radius:999px;border:1px solid var(--ml-ink);color:var(--ml-ink);background:transparent}
.ml-badge--commercial{background:var(--ml-yellow);border-color:var(--ml-yellow)}
.ml-btn{display:inline-block;text-align:center;text-decoration:none;font:600 .95rem/1 var(--ml-sans);background:var(--ml-accent);color:#fff!important;padding:13px 18px;border-radius:10px;margin-top:auto}
.ml-btn:hover{background:var(--ml-accent-dark);color:#fff!important}

/* ---------- Component: trial block ---------- */
.ml-trial{background:var(--ml-ink);color:var(--ml-cream);border-radius:16px;padding:26px 28px;margin:2em 0;display:flex;flex-wrap:wrap;gap:16px 28px;align-items:center;justify-content:space-between}
.ml-trial__text{flex:1 1 320px}
.ml-trial__title{font:400 1.5rem/1.2 var(--ml-serif);margin:0 0 6px;color:var(--ml-cream)}
.ml-trial__text p{margin:0;color:#e9e2d3}
.ml-trial__note{display:block;margin-top:10px;font-size:.78rem;color:#bdb5a4}
.ml-trial .ml-btn{margin-top:0}

/* ---------- Component: license FAQ ---------- */
.ml-faq{margin:2em 0;border-top:1px solid var(--ml-line)}
.ml-faq__title{font:400 1.6rem/1.2 var(--ml-serif);margin:0 0 .6em}
.ml-faq details{border-bottom:1px solid var(--ml-line);padding:14px 2px}
.ml-faq summary{cursor:pointer;font-weight:600;list-style:none;display:flex;justify-content:space-between;gap:12px}
.ml-faq summary::-webkit-details-marker{display:none}
.ml-faq summary::after{content:"+";color:var(--ml-accent);font-size:1.3rem;line-height:1}
.ml-faq details[open] summary::after{content:"\2212"}
.ml-faq details p{margin:.7em 0 0;color:var(--ml-muted)}

@media (max-width:600px){
  .ml-grid{grid-template-columns:1fr 1fr;gap:12px}
  .ml-card__body{padding:12px}
  .ml-card__title{font-size:1.02rem}
  .ml-trial{padding:20px}
}
@media (max-width:380px){.ml-grid{grid-template-columns:1fr}}

/* ---------- Logo: image logo shown; keep text site title in DOM (h1 on home) but visually hidden ---------- */
.site-logotype{line-height:0}
.site-logotype img{display:block;width:160px;height:40px;max-width:100%}
.site-logotype ~ .site-branding__body .site-title{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- Fixes added with the first article (wpautop adds stray <br>/<p> inside shortcode output; featured image fill; category chip contrast) ---------- */
.ml-grid>br,.ml-grid>p:empty,.ml-card>br,.ml-card__body>br{display:none}
.entry-image.post-card__thumbnail img{width:100%;height:auto}
.entry-image .post-card__category a{background:transparent!important;color:#fff!important}
.ml-card__img{aspect-ratio:3/2}
@media (max-width:600px){.ml-grid{grid-template-columns:1fr}}

/* ---------- Collections / archive grid: show full 1200x630 covers, no side crop ---------- */
.post-card--grid .post-card__thumbnail {
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--ml-cream, #FAF6EF);
}
.post-card--grid .post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Reboot makes every 6th/1st grid card a wide overlay and cover-crops the image.
   Reset those to ordinary cards so the mockup panels stay fully visible. */
.post-card--grid:nth-child(6n),
.post-card--grid:nth-child(6n+1) {
  display: block;
  padding: 0;
  justify-content: flex-start;
}
.post-card--grid:nth-child(6n) .post-card__thumbnail,
.post-card--grid:nth-child(6n+1) .post-card__thumbnail {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  height: auto;
  margin: 0;
  overflow: hidden;
  z-index: auto;
  aspect-ratio: 1200 / 630;
}
.post-card--grid:nth-child(6n) .post-card__thumbnail img,
.post-card--grid:nth-child(6n+1) .post-card__thumbnail img {
  position: static;
  top: auto;
  left: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  transform: none;
  transition: none;
}
.post-card--grid:nth-child(6n):hover .post-card__thumbnail img,
.post-card--grid:nth-child(6n+1):hover .post-card__thumbnail img {
  transform: none;
}
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__thumbnail:before,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__thumbnail:before {
  display: none;
}
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__title,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__title,
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__title a,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__title a {
  padding-top: 0;
  color: inherit;
}
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__body,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__body {
  display: block;
  min-height: 0;
  justify-content: flex-start;
}
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__meta,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__meta {
  color: inherit;
  opacity: 1;
}

/* Even columns so every cover uses the same 1200x630 frame (2 on tablet, 3 on desktop). */
@media (min-width: 576px) {
  .post-cards--grid .post-card--grid,
  body.sidebar-none .post-cards--grid .post-card--grid,
  body.sidebar-none .post-cards--grid .post-card--grid:nth-child(6n),
  body.sidebar-none .post-cards--grid .post-card--grid:nth-child(6n+1) {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}
@media (min-width: 768px) {
  .post-cards--grid .post-card--grid,
  body.sidebar-none .post-cards--grid .post-card--grid,
  body.sidebar-none .post-cards--grid .post-card--grid:nth-child(6n),
  body.sidebar-none .post-cards--grid .post-card--grid:nth-child(6n+1) {
    flex: 0 0 calc(50% - 40px);
    max-width: calc(50% - 40px);
  }
}
@media (min-width: 992px) {
  .post-cards--grid .post-card--grid,
  body.sidebar-none .post-cards--grid .post-card--grid,
  body.sidebar-none .post-cards--grid .post-card--grid:nth-child(6n),
  body.sidebar-none .post-cards--grid .post-card--grid:nth-child(6n+1) {
    flex: 0 0 calc(33.333% - 40px);
    max-width: calc(33.333% - 40px);
  }
}

/* ---------- Card badge + text spacing (desktop and mobile) ----------
 * The theme pins the category badge on the cover, so it sits on the cover typography,
 * and .post-card__body has no horizontal padding. Put the badge under the image,
 * leave a 12px gap before the title, and pad the text 16px on both sides.
 */
.post-card--grid .post-card__thumbnail,
.post-card--grid:nth-child(6n) .post-card__thumbnail,
.post-card--grid:nth-child(6n+1) .post-card__thumbnail {
  aspect-ratio: auto;
  overflow: visible;
  background: transparent;
}
.post-card--grid .post-card__thumbnail img,
.post-card--grid:nth-child(6n) .post-card__thumbnail img,
.post-card--grid:nth-child(6n+1) .post-card__thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.post-card--grid .post-card__thumbnail .post-card__category,
.post-card--grid .post-card__category,
.post-card--grid:nth-child(6n) .post-card__category,
.post-card--grid:nth-child(6n+1) .post-card__category {
  position: static !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  display: inline-block;
  max-width: calc(100% - 32px);
  margin: 16px 16px 0;
}
.post-card--grid .post-card__body,
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__body,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__body {
  padding: 12px 16px 16px;
}

/* ---------- Uniform grid cards: same title size and visible excerpt ----------
 * Reboot styles every 6n / 6n+1 grid card as a featured overlay: larger title
 * (1.5em / 24px on desktop) and .post-card__description { display:none }.
 * There is no theme option to turn that variant off. Keep excerpt in the
 * default post_card_grid_order and show it on every card.
 */
.post-card--grid:nth-child(6n) .post-card__title,
.post-card--grid:nth-child(6n+1) .post-card__title,
body.sidebar-none .post-card--grid:nth-child(6n) .post-card__title,
body.sidebar-none .post-card--grid:nth-child(6n+1) .post-card__title,
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__title,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__title,
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__title a,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__title a {
  font-size: 1em;
  font-weight: 400;
  line-height: inherit;
}
@media (min-width: 768px) {
  .post-card--grid:nth-child(6n) .post-card__title,
  .post-card--grid:nth-child(6n+1) .post-card__title,
  body.sidebar-none .post-card--grid:nth-child(6n) .post-card__title,
  body.sidebar-none .post-card--grid:nth-child(6n+1) .post-card__title,
  .post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__title,
  .post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__title,
  .post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__title a,
  .post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__title a {
    font-size: 1.1em;
  }
}
.post-card--grid:nth-child(6n):not(.post-card--thumbnail-no) .post-card__description,
.post-card--grid:nth-child(6n+1):not(.post-card--thumbnail-no) .post-card__description {
  display: block;
  color: inherit;
}

/* ---------- Related posts ("You may also like"): uncropped covers, padding, even heights ----------
 * Theme default reboot_small (335x220, hard crop) cuts the cover typography.
 * Related cards have no .post-card__body, so title/excerpt sat flush to the edge.
 */
.related-posts .post-cards--vertical {
  align-items: stretch;
}
.related-posts .post-card--related {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}
.related-posts .post-card--related .post-card__thumbnail {
  flex: 0 0 auto;
  margin-bottom: 0;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--ml-cream, #FAF6EF);
}
.related-posts .post-card--related .post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.related-posts .post-card--related .post-card__title {
  padding: 12px 16px 0;
  margin-bottom: 10px;
  font-family: var(--ml-serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.25;
}
@media (min-width: 768px) {
  .related-posts .post-card--related .post-card__title {
    font-size: 20px;
  }
}
.related-posts .post-card--related .post-card__description {
  padding: 0 16px 16px;
  margin-bottom: 0;
  flex: 1 1 auto;
}
@media (min-width: 1200px) {
  .related-posts .post-cards--vertical {
    grid-template-columns: repeat(4, 1fr);
  }
}
