/*
Theme Name: Cosmod
Theme URI: https://cosmod.be/
Author: Cosmod
Author URI: https://cosmod.be/
Description: Thème léger pour Cosmod.be — conçu pour Custom Mega Menu + Cosmod Lightweight Products (Polylang FR/DE/EN/NL). Sans Elementor.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: cosmod-theme
Tags: e-commerce, woocommerce, custom-menu, translation-ready, one-column
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Base chrome only — product UI comes from Cosmod plugins. */

:root {
  --cosmod-ink: #111;
  --cosmod-muted: #666;
  --cosmod-line: #e8e8e8;
  --cosmod-bg: #fff;
  --cosmod-soft: #f6f5f2;
  --cosmod-max: 1320px;
  --cosmod-font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cosmod-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
}

body.cosmod-theme {
  margin: 0;
  min-height: 100%;
  font-family: var(--cosmod-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--cosmod-ink);
  background: var(--cosmod-bg);
  -webkit-font-smoothing: antialiased;
}

/* :where() keeps specificity at 0 so plugin rules (e.g. .cosmod-logo img) always win. */
:where(body.cosmod-theme) :where(img) {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Safety net: header logo size must never depend on the image's natural size. */
body.cosmod-theme .cosmod-header .cosmod-logo img {
  height: 48px;
  width: auto;
  max-width: 220px;
}

@media (max-width: 960px) {
  body.cosmod-theme .cosmod-header .cosmod-logo img {
    height: 26px;
    max-width: 132px;
  }
}

/* zero specificity: plugin link/button colours must win */
:where(body.cosmod-theme) :where(a) {
  color: inherit;
}

.cosmod-theme-main {
  min-height: 40vh;
}

.cosmod-theme-shell {
  width: min(100% - 32px, var(--cosmod-max));
  margin-inline: auto;
}

.cosmod-theme-page {
  padding: 28px 0 56px;
}

.cosmod-theme-page__title {
  margin: 0 0 20px;
  font-family: var(--cosmod-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}

.cosmod-theme-page__title::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin: 12px auto 0;
  background: #ccc;
}

.cosmod-theme-content > *:first-child {
  margin-top: 0;
}

.cosmod-theme-content > *:last-child {
  margin-bottom: 0;
}

.cosmod-theme-empty,
.cosmod-theme-404 {
  text-align: center;
  padding: 64px 20px;
}

.cosmod-theme-empty__title,
.cosmod-theme-404__title {
  font-family: var(--cosmod-serif);
  font-size: 1.75rem;
  margin: 0 0 12px;
}

.cosmod-theme-empty__text,
.cosmod-theme-404__text {
  color: var(--cosmod-muted);
  margin: 0 0 24px;
}

.cosmod-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: #111;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cosmod-theme-btn:hover {
  background: #333;
}

.cosmod-theme-notice {
  margin: 16px auto;
  width: min(100% - 32px, var(--cosmod-max));
  padding: 14px 16px;
  border: 1px solid #f0d9a8;
  background: #fff8ea;
  color: #5c4813;
  border-radius: 8px;
  font-size: 14px;
}

/* WooCommerce wrappers stay full-bleed; plugin CSS handles layout. */
.woocommerce-page .cosmod-theme-shell--woo {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.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;
}

/* Header menu: one line, larger font + wider mega-menu panels (overrides plugin inline widths). */
body.cosmod-theme .cosmod-header .cosmod-nav-slot .cmm-menu {
  flex-wrap: nowrap !important;
  gap: 4px 10px !important;
  justify-content: flex-start !important;
}
body.cosmod-theme .cosmod-header .cosmod-nav-slot .cmm-item > a {
  font-size: 17px !important;
  padding: 10px 14px !important;
  gap: 7px !important;
}
body.cosmod-theme .cosmod-header .cosmod-nav-slot .cmm-caret {
  font-size: 13px !important;
}
body.cosmod-theme .cosmod-header .cmm-panel-inner {
  gap: 40px !important;
  padding: 26px 40px !important;
}
body.cosmod-theme .cosmod-header .cmm-lane-col {
  width: auto !important;
  min-width: 230px !important;
  max-width: 300px !important;
}
body.cosmod-theme .cosmod-header .cmm-col-title,
body.cosmod-theme .cosmod-header .cmm-col-links a {
  overflow-wrap: normal !important;
  word-break: normal !important;
}
@media (max-width: 1500px) and (min-width: 961px) {
  body.cosmod-theme .cosmod-header .cosmod-nav-slot .cmm-item > a {
    font-size: 15.5px !important;
    padding: 9px 10px !important;
  }
}
@media (max-width: 1280px) and (min-width: 961px) {
  body.cosmod-theme .cosmod-header .cosmod-nav-slot .cmm-item > a {
    font-size: 14px !important;
    padding: 8px 8px !important;
  }
}

/* Language: dropdown like the demo (codes only, no flags). */
body.cosmod-theme .cosmod-header .cosmod-lang__menu .cosmod-lang__flag {
  display: none !important;
}
body.cosmod-theme .cosmod-header .cosmod-lang__menu a {
  justify-content: center !important;
  padding: 10px 16px !important;
}
body.cosmod-theme .cosmod-header .cosmod-lang__menu {
  min-width: 88px !important;
  padding: 6px 0 !important;
}

/* Home: spacing between sections like the demo. */
body.cosmod-theme .cosmod-home-shell .cosmod-lp-products--rail {
  margin-top: 72px !important;
  margin-bottom: 0 !important;
}
body.cosmod-theme .cosmod-home-shell .cosmod-lp-products--rail .cosmod-lp-title-wrap {
  margin-bottom: 26px !important;
}
body.cosmod-theme .cosmod-home-shell .cosmod-lp-products--rail .cosmod-lp-view-all,
body.cosmod-theme .cosmod-home-shell .cosmod-lp-products--rail .cosmod-lp-viewall {
  margin-top: 28px !important;
}
@media (max-width: 782px) {
  body.cosmod-theme .cosmod-home-shell .cosmod-lp-products--rail {
    margin-top: 44px !important;
  }
}


/* Без горизонтального скролла (скрытые панели мега-меню выходят за экран) */
html,
body.cosmod-theme {
  overflow-x: clip;
}
body.cosmod-theme .cosmod-header {
  overflow-x: clip;
}


/* Отступ 20px между блоком сервисов и отзывами */
body.cosmod-theme .cosmod-home-shell .cosmod-reviews {
  margin-top: 20px !important;
}

/* Логотипы брендов: один размер рамки для всех */
body.cosmod-theme .cosmod-brand-strip--cards .cosmod-brand-strip__logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}
body.cosmod-theme .cosmod-brand-strip--cards .cosmod-brand-strip__item img {
  width: 120px !important;
  height: 40px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  max-height: 40px !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 !important;
  display: block !important;
}