/*
Theme Name: PetPharm Theme v0
Theme URI: https://blog-petpharm.tancredi.uno
Author: Felipe Tancredi
Description: Tema magazine para o blog PetPharm — layout denso, hero 70/30, grid 4-col, com slots de publicidade integrados e Customizer pra branding (logo, cores, textos do header e newsletter).
Version: 0.4.0
License: GPL v2 or later
Text Domain: petpharm-theme-v0
*/

:root {
  --primary: #ff6900;
  --link: #fa6550;
  --red: #cf2e2e;
  --dark: #1a1a1a;
  --gray: #818181;
  --muted: #aaa;
  --border: #e5e6e4;
  --bg: #fff;
  --bg-alt: #f6f6f6;
  --yellow: #ffd700;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #1a1a1a;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { line-height: 1.25; margin: 0; }
ul, ol { margin: 0; padding: 0; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ============ BRAND ROW ============ */
.brand-row { padding: 16px 0; background: var(--bg); }
.brand-row .container { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: center; }
.logo-block { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-block:hover { text-decoration: none; }
.logo-mark { width: 44px; height: 44px; background: var(--red); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: white; font-weight: 800; font-size: 22px; flex-shrink: 0; }
.logo-text { font-size: 22px; font-weight: 800; color: var(--dark); letter-spacing: -0.5px; line-height: 1; }
.logo-text small { display: block; font-size: 10px; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; }
.logo-image { max-height: 56px; width: auto; display: block; }

.promo-yellow { background: var(--yellow); padding: 12px 16px; display: flex; align-items: center; gap: 12px; border-radius: 4px; }
.promo-yellow .we { background: var(--dark); color: white; padding: 6px 10px; font-size: 11px; font-weight: 800; letter-spacing: 1px; border-radius: 2px; flex-shrink: 0; }
.promo-yellow .text { font-size: 12px; font-weight: 700; color: var(--dark); }
.promo-yellow:hover { text-decoration: none; }

.brand-cta { background: var(--bg-alt); border: 1px solid var(--border); padding: 12px 16px; border-radius: 4px; text-align: center; }
.brand-cta strong { display: block; font-size: 12px; color: var(--dark); margin-bottom: 4px; }
.brand-cta .small-input { display: flex; gap: 4px; }
.brand-cta input { flex: 1; padding: 6px 10px; border: 1px solid var(--border); font-size: 12px; min-width: 0; }
.brand-cta button { padding: 6px 12px; background: var(--primary); color: white; border: 0; font-weight: 700; cursor: pointer; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============ TOP NAV ============ */
.top-nav { background: var(--bg); border-top: 3px solid var(--red); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.top-nav .container { display: flex; align-items: stretch; overflow-x: auto; }
.top-nav a { padding: 14px 20px; font-size: 13px; font-weight: 700; color: var(--dark); text-transform: uppercase; letter-spacing: 0.5px; border-right: 1px solid var(--border); white-space: nowrap; }
.top-nav a:hover, .top-nav a.active { background: var(--primary); color: white; text-decoration: none; }
.top-nav a:first-child { border-left: 1px solid var(--border); }

/* ============ SUB-ROW (3 destaques horizontais) ============ */
.highlights-row { padding: 16px 0; background: var(--bg-alt); }
.highlights-row .container { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.mini-card { background: white; padding: 12px; display: grid; grid-template-columns: 100px 1fr; gap: 12px; align-items: center; border-radius: 4px; border-left: 3px solid var(--red); }
.mini-card .thumb { aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: var(--bg-alt); border-radius: 2px; }
.mini-card .info .cat { font-size: 9px; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: 1px; }
.mini-card .info h3 { font-size: 13px; font-weight: 700; line-height: 1.3; margin-top: 4px; }
.mini-card .info h3 a { color: var(--dark); }
.mini-card .info h3 a:hover { color: var(--primary); text-decoration: none; }

/* ============ HERO 70/30 ============ */
.hero-section { padding: 24px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.hero-feature { position: relative; aspect-ratio: 16/9; background-size: cover; background-position: center; overflow: hidden; background-color: var(--bg-alt); }
.hero-feature .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%); }
.hero-feature .content { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 28px; color: white; }
.hero-feature .cat { display: inline-block; background: var(--red); color: white; font-size: 11px; font-weight: 800; padding: 4px 10px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.hero-feature h1 { font-size: 28px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.hero-feature h1 a { color: white; }
.hero-feature h1 a:hover { color: var(--primary); text-decoration: none; }
.hero-feature .meta { font-size: 12px; color: rgba(255,255,255,.85); }
.hero-feature .meta strong { color: white; }

.hero-list { background: white; border: 1px solid var(--border); }
.hero-list-title { background: var(--red); color: white; padding: 12px 16px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.hero-list ul { list-style: none; }
.hero-list li { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.hero-list li:last-child { border-bottom: 0; }
.hero-list .thumb { aspect-ratio: 4/3; background-size: cover; background-position: center; background-color: var(--bg-alt); }
.hero-list .info .cat { font-size: 9px; color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.hero-list .info h4 { font-size: 12px; font-weight: 700; line-height: 1.3; margin-top: 2px; }
.hero-list .info h4 a { color: var(--dark); }
.hero-list .info h4 a:hover { color: var(--primary); text-decoration: none; }

/* ============ NEWSLETTER BANNER ============ */
.newsletter-banner { padding: 12px 0 24px; }
.newsletter-banner-inner { background: var(--primary); color: white; padding: 32px 24px; text-align: center; border-radius: 4px; }
.newsletter-banner-inner h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.newsletter-banner-inner p { font-size: 14px; opacity: .9; margin-bottom: 16px; }
.newsletter-banner-inner form { display: inline-flex; gap: 0; max-width: 100%; }
.newsletter-banner-inner input { padding: 10px 14px; border: 0; font-size: 14px; min-width: 280px; max-width: 60vw; border-radius: 4px 0 0 4px; }
.newsletter-banner-inner button { padding: 10px 20px; background: var(--dark); color: white; border: 0; font-weight: 800; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; font-size: 12px; border-radius: 0 4px 4px 0; }
.newsletter-banner-inner button:hover { background: #000; }

/* ============ DENSE GRID 4-COL ============ */
.dense-section { padding: 8px 0 48px; }
.dense-section h2 { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; padding-left: 12px; border-left: 4px solid var(--red); }
.dense-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.post-card { background: white; }
.post-card .thumb { aspect-ratio: 4/3; background-size: cover; background-position: center; margin-bottom: 8px; background-color: var(--bg-alt); }
.post-card .cat-tag { display: inline-block; font-size: 9px; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.post-card h3 { font-size: 13px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.post-card h3 a { color: var(--dark); }
.post-card h3 a:hover { color: var(--primary); text-decoration: none; }
.post-card .meta { font-size: 10px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; }
.post-card .meta strong { color: var(--primary); }

/* ============ ARCHIVE / SEARCH ============ */
.archive-header { padding: 24px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.archive-header h1 { font-size: 26px; font-weight: 800; padding-left: 12px; border-left: 4px solid var(--red); }
.archive-header .desc { font-size: 13px; color: var(--gray); margin-top: 8px; }

.breadcrumb { padding: 16px 0 8px; font-size: 12px; color: var(--gray); }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }

.pagination-wrap { padding: 32px 0; display: flex; justify-content: center; }
.pagination-wrap .nav-links { display: flex; gap: 8px; }
.pagination-wrap .page-numbers { padding: 8px 14px; border: 1px solid var(--border); color: var(--dark); font-weight: 600; font-size: 13px; }
.pagination-wrap .page-numbers.current { background: var(--red); color: white; border-color: var(--red); }
.pagination-wrap .page-numbers:hover { background: var(--primary); color: white; border-color: var(--primary); text-decoration: none; }

/* ============ SINGLE POST ============ */
.post-single { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
.post-single .breadcrumb { padding: 0 0 16px; }
.post-single .cat-line { font-size: 11px; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.post-title { font-size: 36px; font-weight: 800; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.3px; }
.post-meta { font-size: 13px; color: var(--gray); margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.post-meta a { color: var(--dark); font-weight: 600; }
.post-meta a:hover { color: var(--primary); text-decoration: none; }
.post-featured-image { margin: 0 0 24px; }
.post-featured-image img { width: 100%; height: auto; display: block; }
.post-featured-image figcaption { font-size: 12px; color: var(--gray); margin-top: 6px; font-style: italic; text-align: center; }

.post-content { font-size: 17px; line-height: 1.7; }
.post-content h2 { font-size: 26px; font-weight: 800; margin: 36px 0 14px; }
.post-content h3 { font-size: 20px; font-weight: 700; margin: 28px 0 10px; }
.post-content p { margin: 0 0 18px; }
.post-content blockquote { border-left: 4px solid var(--red); margin: 28px 0; padding: 14px 22px; font-style: italic; color: var(--gray); background: var(--bg-alt); }
.post-content ul, .post-content ol { margin: 0 0 18px 28px; }
.post-content li { margin-bottom: 6px; }
.post-content a { color: var(--link); }
.post-content a:hover { color: var(--primary); }

.author-bio { display: flex; gap: 16px; padding: 20px; background: var(--bg-alt); margin-top: 32px; border-left: 3px solid var(--red); }
.author-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; flex-shrink: 0; }
.author-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.author-desc { font-size: 13px; color: var(--gray); }

.related-posts { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); }
.related-posts h2 { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; padding-left: 12px; border-left: 4px solid var(--red); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ============ FOOTER ============ */
.site-footer { background: var(--dark); color: white; padding: 48px 0 20px; margin-top: 32px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 24px; }
.footer-col h4 { font-size: 11px; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 1.5px; margin: 0 0 12px; }
.footer-col p { font-size: 12px; color: rgba(255,255,255,.7); line-height: 1.6; margin: 0; }
.footer-col ul { list-style: none; }
.footer-col li a { color: rgba(255,255,255,.7); font-size: 12px; padding: 3px 0; display: block; }
.footer-col li a:hover { color: var(--primary); text-decoration: none; }
.social-row { display: flex; gap: 8px; margin-top: 12px; }
.social-row a { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 13px; }
.social-row a:hover { background: var(--primary); border-color: var(--primary); text-decoration: none; }
.footer-bottom { padding-top: 16px; margin-top: 24px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: 11px; color: rgba(255,255,255,.4); }

/* ============ AD SLOTS ============ */
.ad-slot { margin: 16px 0; }
.ad-slot:empty { display: none; }
.ad-slot-placeholder {
  display: block;
  padding: 14px 18px;
  border: 1px dashed var(--border);
  text-align: center;
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: var(--bg-alt);
  font-weight: 700;
}
.ad-slot-top_banner, .ad-slot-footer_banner { margin: 0; }
.ad-slot-mid_banner { margin: 16px 0 24px; }
.ad-slot-in_content_1, .ad-slot-in_content_2 { margin: 28px 0; }
.hero-list .ad-slot { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.hero-list .ad-slot:last-child { border-bottom: 0; border-top: 1px solid var(--border); }

/* ============ STICKY BADGE ============ */
.badge-featured {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.hero-feature .badge-featured {
  font-size: 11px;
  padding: 4px 10px;
  letter-spacing: 1.5px;
  margin-right: 8px;
  background: var(--red);
}

/* ============ WHATSAPP FLOAT ============ */
.wa-float { position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; background: #25d366; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,.25); z-index: 1000; transition: transform .15s; }
.wa-float:hover { transform: scale(1.05); color: white; text-decoration: none; }
.wa-float svg { width: 28px; height: 28px; fill: white; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .dense-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .brand-row .container { grid-template-columns: 1fr; gap: 12px; }
  .promo-yellow, .brand-cta { width: 100%; }
  .highlights-row .container { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-feature { aspect-ratio: 16/10; }
  .hero-feature h1 { font-size: 22px; }
  .dense-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .post-title { font-size: 26px; }
  .post-content { font-size: 16px; }
}
@media (max-width: 480px) {
  .dense-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .top-nav a { padding: 12px 14px; font-size: 12px; }
}

/* ============================================================
   PetPharm theme patch — applied 2026-05-07
   Adds CSS for Gutenberg block alignments, image figures, tables
   and text alignment classes that were missing in v0.4.0.
   Source: _blog/THEME_NOTES.md (PetPharm repo)
   ============================================================ */

/* alinhamentos de imagem com wrap de texto */
.alignleft {
  float: left;
  margin: 0 2em 1em 0;
  max-width: 50%;
}
.alignright {
  float: right;
  margin: 0 0 1em 2em;
  max-width: 50%;
}
.aligncenter {
  display: block;
  margin: 2em auto;
  text-align: center;
}
.aligncenter img,
.aligncenter > * { margin: 0 auto; }

/* clear automatico apos figuras flutuantes */
.post-content::after,
.entry-content::after {
  content: "";
  display: table;
  clear: both;
}

/* alignwide / alignfull */
.alignwide {
  margin-left: -10%;
  margin-right: -10%;
  max-width: 120%;
}
.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}
.alignfull img,
.alignwide img { width: 100%; height: auto; }

/* figura/figcaption */
.wp-block-image { margin: 1.5em 0; }
.wp-block-image figcaption {
  font-size: 0.9em;
  color: var(--gray, #818181);
  margin-top: 0.5em;
  text-align: center;
}
.wp-block-image.alignleft figcaption,
.wp-block-image.alignright figcaption {
  text-align: left;
}

/* tabelas */
.wp-block-table {
  margin: 1.5em 0;
  overflow-x: auto;
}
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}
.wp-block-table th,
.wp-block-table td {
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e6e4);
  text-align: left;
  vertical-align: top;
}
.wp-block-table thead {
  background: var(--bg-alt, #f6f6f6);
  font-weight: 600;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(even) {
  background: var(--bg-alt, #f6f6f6);
}

/* pull quote */
.wp-block-pullquote {
  margin: 2em 0;
  padding: 1.5em 0;
  border-top: 3px solid var(--primary, #ff6900);
  border-bottom: 3px solid var(--primary, #ff6900);
  text-align: center;
}
.wp-block-pullquote blockquote { margin: 0; }
.wp-block-pullquote p {
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 0.5em 0;
}
.wp-block-pullquote cite {
  font-style: normal;
  color: var(--gray, #818181);
  font-size: 0.9em;
}

/* text-align (justify nao vem do WP inline) */
.has-text-align-justify { text-align: justify; }
.has-text-align-left { text-align: left; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }

/* footnotes / referencias (estilo PetPharm) */
.post-content ol.footnotes,
.post-content ol.references {
  font-size: 0.92em;
  line-height: 1.6;
  margin: 1em 0 1em 28px;
}
.post-content ol.footnotes { color: #444; }
.post-content ol.references { color: #333; }
.post-content ol.footnotes li,
.post-content ol.references li { margin-bottom: 0.6em; }

/* responsivo: floats viram bloco em mobile */
@media (max-width: 600px) {
  .alignleft, .alignright {
    float: none;
    margin: 1em 0;
    max-width: 100%;
  }
  .alignwide, .alignfull {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

/* ============================================================
   PetPharm theme patch v2 — applied 2026-05-08
   Adds:
   - .post-resumo (lede paragraph at top of post body — convencao
     editorial, escrita pelo autor, NAO derivada do excerpt)
   ============================================================ */

.post-content .post-resumo {
  font-size: 1.15em;
  line-height: 1.55;
  color: #444;
  font-style: italic;
  border-left: 3px solid var(--primary, #ff6900);
  padding: 0.4em 0 0.4em 1.2em;
  margin: 0 0 1.8em 0;
}

.post-content .post-resumo strong {
  color: #1a1a1a;
  font-style: normal;
}

/* ============================================================
   wp-block-cover — bloco "capa" embedado no corpo do post
   ============================================================ */
.wp-block-cover {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 0 2em 0;
  border-radius: 4px;
}
.wp-block-cover__image-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.wp-block-cover__background {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}
.wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  padding: 2em;
  max-width: 800px;
  text-align: center;
  color: white;
}
.wp-block-cover__inner-container p {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   PetPharm theme patch v3 — applied 2026-05-08
   Override do .post-resumo: estilo "linha fina" de jornal
   (italico discreto, fonte menor, sem decoracao chamativa)
   ============================================================ */

.post-content .post-resumo {
  font-size: 0.95em;
  line-height: 1.5;
  color: #666;
  font-style: italic;
  font-weight: normal;
  margin: -0.5em 0 1.6em 0;
  padding: 0 0 1em 0;
  border: none;
  border-bottom: 1px solid #eee;
}

.post-content .post-resumo strong {
  color: #444;
  font-style: italic;
  font-weight: normal;
}

/* ============================================================
   PetPharm theme patch v4 — applied 2026-05-08
   Override: remover border-bottom do .post-resumo
   (separacao com byline via espaco vertical apenas)
   ============================================================ */
.post-content .post-resumo {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1em;
}

/* ============================================================
   PetPharm theme patch v5 — applied 2026-05-08
   Override: mais respiro entre titulo e resumo
   (era negativo -0.5em, agora 1.2em positivo)
   ============================================================ */
.post-content .post-resumo {
  margin-top: 1.2em;
}

/* ============================================================
   PetPharm theme patch v7 — applied 2026-05-08
   Sidebar no single post (anuncio + posts relacionados)
   Layout: 70/30 desktop, stack mobile
   ============================================================ */

.post-single.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}

.post-main {
  min-width: 0;
}

.post-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}

.post-sidebar .sidebar-block {
  margin-bottom: 28px;
}

.post-sidebar .sidebar-block:last-child {
  margin-bottom: 0;
}

.post-sidebar .sidebar-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray, #818181);
  margin: 0 0 14px 0;
  padding: 0 0 10px 0;
  border-bottom: 2px solid var(--primary, #ff6900);
}

.related-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #e5e6e4);
  text-decoration: none;
  color: inherit;
}

.related-item:hover {
  text-decoration: none;
}

.related-item:hover .related-title {
  color: var(--link, #fa6550);
}

.related-item:last-child {
  border-bottom: none;
}

.related-thumb {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: #f6f6f6;
  border-radius: 3px;
}

.related-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.related-title {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--dark, #1a1a1a);
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.related-meta {
  font-size: 12px;
  color: var(--gray, #818181);
}

/* Sidebar ad blocks */
.sidebar-ad .ad-slot {
  margin: 0;
}

/* Responsive: stack em telas menores */
@media (max-width: 900px) {
  .post-single.has-sidebar {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .post-sidebar {
    position: static;
  }
}

/* ============================================================
   PetPharm theme patch v9 — applied 2026-05-08
   Fix layout do single com sidebar:
   - Override max-width (.post-single hardcoded a 760px no tema)
   - Hide ad slots vazios (sem reservar espaco visual)
   - Padding interno na sidebar
   ============================================================ */

.post-single.has-sidebar {
  max-width: 1280px;
}

/* Ad slot vazio nao reserva espaco — so aparece quando tem conteudo */
.sidebar-ad .ad-slot-empty {
  display: none;
}

/* Suaviza a borda dos blocos da sidebar */
.post-sidebar .sidebar-block {
  background: transparent;
}

/* Titulo da sidebar mais sutil */
.post-sidebar .sidebar-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--dark, #1a1a1a);
  text-transform: uppercase;
  border-bottom: 2px solid var(--primary, #ff6900);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

/* Em viewports menores, sidebar empilha (mantido) */
@media (max-width: 900px) {
  .post-single.has-sidebar {
    max-width: 760px;
  }
}

/* ============================================================
   PetPharm theme patch v11 — applied 2026-05-08
   Constrange aspect ratio dos ads na sidebar do single (sidebar_top
   e sidebar_bottom). Default: 1:1 (quadrado, 320x320). Imagens
   diferentes do quadrado sao cortadas via object-fit: cover.
   ============================================================ */

.post-sidebar .sidebar-ad .ad-slot {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  background: var(--bg-alt, #f6f6f6);
  border-radius: 4px;
}

.post-sidebar .sidebar-ad .ad-slot a,
.post-sidebar .sidebar-ad .ad-slot a img {
  display: block;
  width: 100%;
  height: 100%;
}

.post-sidebar .sidebar-ad .ad-slot img {
  object-fit: cover;
  object-position: center;
}

/* Slot vazio continua escondido (do v9) */
.post-sidebar .sidebar-ad .ad-slot-empty {
  display: none;
}
