/*
Theme Name: Beauty Makeups Editorial
Theme URI: https://malbell.com/
Author: Beauty Makeups
Description: A lightweight editorial WordPress theme for an independent English-language beauty magazine.
Version: 1.1.1
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: beauty-makeups-editorial
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, one-column, two-columns, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --bm-bg: #faf8f5;
  --bm-surface: #f1ebe6;
  --bm-text: #22201f;
  --bm-muted: #6e6661;
  --bm-accent: #7d3548;
  --bm-rose: #d8b7bc;
  --bm-border: #e6dfda;
  --bm-white: #fff;
  --bm-serif: Georgia, "Times New Roman", serif;
  --bm-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --bm-container: 1240px;
  --bm-reading: 780px;
  --bm-shadow: 0 18px 50px rgba(55, 42, 40, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--bm-text);
  background: var(--bm-bg);
  font-family: var(--bm-sans);
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--bm-rose); text-underline-offset: .18em; }
a:hover, a:focus-visible { color: var(--bm-accent); }
button, input { font: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus { position: fixed; z-index: 100000; top: 12px; left: 12px; width: auto; height: auto; clip: auto; padding: 12px 16px; background: #fff; }
.bm-container { width: min(calc(100% - 40px), var(--bm-container)); margin-inline: auto; }
.bm-section { padding: 88px 0; }
.bm-section--tint { background: var(--bm-surface); }
.bm-section__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; border-bottom: 1px solid var(--bm-border); padding-bottom: 18px; }
.bm-kicker, .bm-card__category, .bm-entry__category {
  color: var(--bm-accent); font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
}
.bm-section__title { margin: 0; font: 500 clamp(32px, 4vw, 48px)/1.08 var(--bm-serif); letter-spacing: -.035em; }
.bm-section__link { color: var(--bm-accent); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }

/* Header */
.bm-site-header { position: relative; z-index: 50; background: rgba(250, 248, 245, .97); border-bottom: 1px solid var(--bm-border); }
.bm-header__inner { min-height: 98px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 42px; }
.bm-brand { position: relative; display: inline-block; padding-left: 18px; text-decoration: none; }
.bm-brand::before { content: ""; position: absolute; top: 1px; bottom: 1px; left: 0; width: 5px; background: var(--bm-accent); }
.bm-brand__name { display: block; font: 600 clamp(23px, 2.4vw, 31px)/1 var(--bm-serif); letter-spacing: .075em; white-space: nowrap; }
.bm-brand__tagline { display: block; margin-top: 8px; color: var(--bm-muted); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.bm-primary-nav ul { display: flex; justify-content: center; align-items: center; gap: clamp(18px, 2.1vw, 34px); margin: 0; padding: 0; list-style: none; }
.bm-primary-nav a { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.bm-primary-nav .current-menu-item > a, .bm-primary-nav .current_page_item > a { color: var(--bm-accent); }
.bm-header__actions { display: flex; align-items: center; gap: 8px; }
.bm-search-toggle, .bm-menu-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: var(--bm-text); background: transparent; border: 1px solid var(--bm-border); border-radius: 50%; cursor: pointer;
}
.bm-search-toggle svg, .bm-menu-toggle svg { width: 19px; height: 19px; }
.bm-menu-toggle { display: none; }
.bm-search-panel { display: none; border-top: 1px solid var(--bm-border); background: var(--bm-white); }
.bm-search-panel.is-open { display: block; }
.bm-search-panel .search-form { display: flex; gap: 12px; padding: 18px 0; }
.bm-search-panel .search-field { width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid var(--bm-border); background: var(--bm-bg); }
.bm-search-panel .search-submit, .bm-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; color: #fff; background: var(--bm-accent); border: 1px solid var(--bm-accent); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Hero */
.bm-hero { padding: 34px 0 76px; }
.bm-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(430px, .9fr); min-height: 610px; background: var(--bm-surface); border-bottom: 6px solid var(--bm-accent); }
.bm-hero__media { min-height: 520px; overflow: hidden; background: linear-gradient(135deg, var(--bm-rose), var(--bm-surface)); }
.bm-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.bm-hero__copy { position: relative; align-self: center; padding: clamp(38px, 4vw, 54px); margin-left: -46px; background: rgba(250, 248, 245, .97); box-shadow: var(--bm-shadow); }
.bm-hero__copy::before { content: "BEAUTY / EDITORIAL"; display: block; margin-bottom: 26px; color: var(--bm-muted); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.bm-hero__title { margin: 12px 0 20px; font: 500 clamp(40px, 3.3vw, 46px)/1.08 var(--bm-serif); letter-spacing: -.035em; overflow-wrap: normal; }
.bm-hero__excerpt { max-width: 43ch; margin: 0 0 26px; color: var(--bm-muted); font: 400 17px/1.6 var(--bm-sans); }

/* Cards and homepage grids */
.bm-featured-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .82fr) minmax(0, .82fr); gap: 28px; align-items: start; }
.bm-featured-grid:has(.bm-card:only-child) { grid-template-columns: minmax(0, 760px); }
.bm-featured-grid:has(.bm-card:nth-child(2):last-child) { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
.bm-featured-grid .bm-card:first-child .bm-card__media { aspect-ratio: 4/5; }
.bm-card { width: 100%; min-width: 0; max-width: 100%; }
.bm-card__media { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--bm-surface); text-decoration: none; }
.bm-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bm-card:hover .bm-card__media img { transform: scale(1.025); }
.bm-card__body { padding: 20px 2px 0; }
.bm-card__title { margin: 10px 0 10px; font: 500 clamp(23px, 2.2vw, 33px)/1.18 var(--bm-serif); letter-spacing: -.025em; overflow-wrap: break-word; word-break: normal; }
.bm-card__title a { text-decoration: none; }
.bm-card__excerpt { margin: 0; color: var(--bm-muted); font-size: 15px; line-height: 1.65; }
.bm-card__read { display: inline-block; margin-top: 16px; color: var(--bm-accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.bm-explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bm-explore-card { position: relative; display: grid; grid-template-rows: 168px 1fr; min-width: 0; min-height: 390px; color: var(--bm-text); background: var(--bm-white); border: 1px solid var(--bm-border); text-decoration: none; isolation: isolate; }
.bm-explore-card__media { width: 100%; height: 168px; object-fit: cover; }
.bm-explore-card__content { position: relative; z-index: 1; padding: 22px 24px 25px; }
.bm-explore-card__number { display: block; margin-bottom: 14px; color: var(--bm-accent); font: italic 16px/1 var(--bm-serif); }
.bm-explore-card__title { margin: 0; font: 500 28px/1.1 var(--bm-serif); }
.bm-explore-card__description { display: block; margin-top: 12px; color: var(--bm-muted); font-size: 13px; line-height: 1.5; }
.bm-explore-card__meta { display: block; margin-top: 14px; color: var(--bm-accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bm-latest-grid, .bm-archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 28px; width: 100%; min-width: 0; }
.bm-guides-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.bm-guides-layout__media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--bm-rose), var(--bm-surface)); overflow: hidden; }
.bm-guides-layout__media img { width: 100%; height: 100%; object-fit: cover; }
.bm-guides-layout__copy { padding: 30px 0; }
.bm-guides-layout__title { margin: 12px 0 20px; font: 500 clamp(34px, 4vw, 54px)/1.06 var(--bm-serif); letter-spacing: -.035em; }

/* Single post */
.bm-entry-header { padding: 78px 0 40px; text-align: center; }
.bm-entry-header__inner { width: min(calc(100% - 40px), 900px); max-width: 900px; margin: 0 auto; }
.bm-entry-title { margin: 14px auto 22px; max-width: 880px; font: 500 clamp(36px, 4vw, 42px)/1.13 var(--bm-serif); letter-spacing: -.03em; overflow-wrap: normal; word-break: normal; }
.bm-entry-deck { max-width: 740px; margin: 0 auto; color: var(--bm-muted); font-size: 19px; line-height: 1.65; }
.bm-entry-meta { margin-top: 22px; color: var(--bm-muted); font-size: 13px; letter-spacing: .05em; }
.bm-entry-hero { width: min(calc(100% - 40px), 1180px); margin: 8px auto 64px; }
.bm-entry-hero img { width: 100%; max-height: 720px; object-fit: cover; }
.bm-entry-content { width: min(calc(100% - 40px), var(--bm-reading)); margin: 0 auto; font: 400 18px/1.75 var(--bm-sans); }
.bm-entry-content > p, .bm-entry-content .beauty-editorial > p { margin: 0 0 1.45em; }
.bm-entry-content h2 { margin: 2.15em 0 .7em; font: 600 clamp(27px, 3vw, 30px)/1.22 var(--bm-serif) !important; letter-spacing: -.025em; }
.bm-entry-content h3 { margin: 1.85em 0 .65em; font: 600 clamp(21px, 2.4vw, 24px)/1.3 var(--bm-serif) !important; }
.bm-entry-content figure { margin: 42px 0; }
.bm-entry-content figcaption { margin-top: 10px; color: var(--bm-muted); font-size: 13px; text-align: center; }
.bm-entry-content blockquote { margin: 36px 0; padding: 20px 28px; border-left: 3px solid var(--bm-accent); background: var(--bm-surface); font: italic 22px/1.55 var(--bm-serif); }
.bm-entry-content a { color: var(--bm-accent); }
.bm-entry-content .beauty-editorial { max-width: 100% !important; padding-inline: 0 !important; }
.single-post.bm-has-thumbnail .bm-entry-content .beauty-editorial__hero { display: none; }
.bm-entry-content .beauty-editorial__table-scroll, .bm-entry-content > table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bm-entry-content table { width: 100%; min-width: 700px; border-collapse: collapse; font-family: var(--bm-sans); font-size: 15px; }
.bm-entry-content th, .bm-entry-content td { padding: 14px 16px; border: 1px solid var(--bm-border); text-align: left; vertical-align: top; }
.bm-entry-content th { color: #fff; background: var(--bm-text); }
.bm-entry-content tr:nth-child(even) td { background: var(--bm-surface); }
.bm-related { margin-top: 86px; border-top: 1px solid var(--bm-border); }

/* Archives and pages */
.bm-archive-header { padding: 72px 0 42px; border-bottom: 1px solid var(--bm-border); }
.bm-archive-title, .bm-page-title { margin: 0; font: 500 clamp(42px, 6vw, 70px)/1.05 var(--bm-serif); letter-spacing: -.045em; }
.bm-archive-description { max-width: 720px; margin-top: 16px; color: var(--bm-muted); }
.bm-archive-grid > * { min-width: 0; }
.bm-archive-grid:has(.bm-card:only-child) { grid-template-columns: minmax(0, 760px); }
.bm-archive-grid:has(.bm-card:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bm-page { padding: 68px 0 90px; }
.bm-page__header { width: min(calc(100% - 40px), 860px); margin: 0 auto 38px; }
.bm-page__content { width: min(calc(100% - 40px), 860px); margin: 0 auto; }
.bm-empty { padding: 40px; background: var(--bm-surface); color: var(--bm-muted); }
.nav-links { display: flex; justify-content: center; gap: 10px; margin-top: 56px; }
.page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--bm-border); text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--bm-accent); border-color: var(--bm-accent); }

/* Footer */
.bm-site-footer { padding: 72px 0 30px; color: #f8f2ee; background: #211d1d; }
.bm-footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 64px; }
.bm-footer-title { margin: 0 0 20px; color: var(--bm-rose); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.bm-footer-nav ul { margin: 0; padding: 0; list-style: none; }
.bm-footer-nav li { margin-bottom: 10px; }
.bm-footer-nav a { color: #f8f2ee; text-decoration: none; }
.bm-footer-brand { margin: 0 0 18px; font: 500 32px/1 var(--bm-serif); letter-spacing: .04em; }
.bm-footer-copy { max-width: 440px; color: #c9bfba; font-size: 15px; }
.bm-footer-bottom { margin-top: 58px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); color: #9e938e; font-size: 12px; }

/* Never surface commerce UI in this editorial theme. Data and plugins remain untouched. */
.wc-block-mini-cart, .site-header-cart, .woocommerce-store-notice, .woocommerce-breadcrumb { display: none !important; }

@media (max-width: 1100px) {
  .bm-header__inner { grid-template-columns: 1fr auto; min-height: 82px; }
  .bm-primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 22px 20px; background: var(--bm-bg); border-bottom: 1px solid var(--bm-border); }
  .bm-primary-nav.is-open { display: block; }
  .bm-primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .bm-primary-nav a { display: block; padding: 11px 0; }
  .bm-menu-toggle { display: inline-grid; }
  .bm-hero__grid { grid-template-columns: 1fr; }
  .bm-hero__copy { width: min(86%, 720px); margin: -82px auto 0; padding: 44px 50px; position: relative; }
  .bm-hero__title { max-width: 18ch; font-size: 44px; line-height: 1.08; }
  .bm-hero__excerpt { margin-bottom: 24px; }
  .bm-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-featured-grid .bm-card:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: 620px; }
  .bm-latest-grid, .bm-archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bm-explore-grid { grid-template-columns: repeat(2, 1fr); }
  .bm-footer-grid { grid-template-columns: 1fr 1fr; }
  .bm-footer-about { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .bm-container { width: min(calc(100% - 28px), var(--bm-container)); }
  .bm-section { padding: 62px 0; }
  .bm-section__head { align-items: start; flex-direction: column; margin-bottom: 28px; }
  .bm-brand__tagline { display: none; }
  .bm-brand__name { font-size: 21px; }
  .bm-header__inner { min-height: 74px; gap: 12px; }
  .bm-header__actions { gap: 6px; }
  .bm-search-toggle, .bm-menu-toggle { width: 40px; height: 40px; }
  .bm-hero { padding: 18px 0 58px; }
  .bm-hero__grid { min-height: 0; }
  .bm-hero__media { min-height: 390px; }
  .bm-hero__copy { width: calc(100% - 24px); margin-top: -48px; padding: 28px 24px 32px; }
  .bm-hero__copy::before { margin-bottom: 20px; }
  .bm-hero__title { max-width: none; margin-bottom: 18px; font-size: clamp(32px, 8.8vw, 36px); line-height: 1.1; letter-spacing: -.03em; }
  .bm-hero__excerpt { margin-bottom: 22px; font-size: 16px; line-height: 1.55; }
  .bm-featured-grid, .bm-latest-grid, .bm-archive-grid, .bm-guides-layout, .bm-footer-grid { grid-template-columns: minmax(0, 1fr); }
  .bm-featured-grid .bm-card:first-child .bm-card__media { aspect-ratio: 4/3; }
  .bm-featured-grid .bm-card:last-child, .bm-footer-about { grid-column: auto; }
  .bm-explore-grid { grid-template-columns: 1fr 1fr; }
  .bm-explore-card { min-height: 350px; }
  .bm-explore-card__title { font-size: 23px; }
  .bm-entry-header { padding: 52px 0 30px; }
  .bm-entry-title { max-width: 100%; font-size: clamp(32px, 8.5vw, 35px); line-height: 1.16; letter-spacing: -.025em; }
  .bm-entry-deck { font-size: 17px; }
  .bm-entry-hero { width: 100%; margin-bottom: 46px; }
  .bm-entry-hero img { min-height: 320px; object-fit: cover; }
  .bm-entry-content { width: min(calc(100% - 36px), var(--bm-reading)); font-size: 17px; line-height: 1.72; }
  .bm-entry-content h2 { font-size: 27px !important; }
  .bm-entry-content h3 { font-size: 21px !important; }
  .bm-entry-content figure { margin: 32px 0; }
  .bm-footer-grid { gap: 38px; }
}

@media (max-width: 390px) {
  .bm-brand { padding-left: 13px; }
  .bm-brand::before { width: 4px; }
  .bm-brand__name { font-size: 19px; letter-spacing: .045em; }
  .bm-entry-title { font-size: 32px; }
}

@media (max-width: 430px) {
  .bm-explore-grid { grid-template-columns: 1fr; }
  .bm-explore-card { min-height: 350px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
