/* =====================================================================
   Caspian Monarque — refinement layer
   Loaded after the theme styles. Remove the enqueue in functions.php to switch it off.
   ===================================================================== */

/* ---- Tokens: most of the refinement is five variable changes ---- */
/* "html:root" outranks the theme's own ":root" block, which loads after this file. */
html:root {
  --color-bg-primary: #00857E;   /* was #05ACA3 — white text goes 2.82:1 -> 4.51:1 */
  --color-txt-fourth: #00857E;   /* teal links / prices / eyebrows on light grounds */
  --lh-paragraph: 1.55;          /* was 1.3 */
  --font-h5: "Futura PT", sans-serif;                                             /* drops Montserrat */
  --font-heading: "Poynter OldStyle Display", Georgia, "Times New Roman", serif;   /* serif fallback */
  --cm-section: 6rem;            /* one vertical rhythm value */
}
@media (max-width: 768px) { html:root { --cm-section: 3.5rem; } }

/* ---- Top bar: readable language switcher ---- */
html body .announcement-bar--right .wpml-ls .wpml-ls-flag { display: none; }
html body .announcement-bar--right .wpml-ls .wpml-ls-item-en a { padding-right: 0; background-image: none; }
html body .announcement-bar--right .wpml-ls ul li a {
  opacity: .82; height: auto; color: #fff; font-size: .875rem; letter-spacing: .1em;
  text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent;
}
html body .announcement-bar--right .wpml-ls ul li.wpml-ls-current-language a { opacity: 1; border-bottom-color: #fff; }
html body .announcement-bar--right .wpml-ls ul li + li { margin-left: 1.125rem; }
html body .announcement-bar--right .wpml-ls-item-en a::after { content: "EN"; }
html body .announcement-bar--right .wpml-ls-item-fr a::after { content: "FR"; }
html body .announcement-bar--right .wpml-ls-item-de a::after { content: "DE"; }
html body .announcement-bar--right .wpml-ls-item-es a::after { content: "ES"; }
html body .announcement-bar--right .wpml-ls-item-it a::after { content: "IT"; }

/* ---- Hero: the video stays. It fades in over a navy ground once it starts playing,
        so the first screen is never blank, and the headline is readable from the first paint. ---- */
html body .slider-block .video { background-color: #000E34; }
html body .slider-block video[data-cm-defer] { opacity: 0; transition: opacity .9s ease; }
html body .slider-block video[data-cm-defer].is-playing,
html body .slider-block video[data-cm-defer][poster] { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html body .slider-block video[data-cm-defer] { transition: none; }
}
@media (min-width: 768px) {
  html body.home .slider-block .slide.with-video .inner {
    display: flex; align-items: flex-end; padding: 0 0 4.5rem; min-height: 44rem;
  }
  html body.home .slider-block .slide.with-video .inner .container { width: 100%; }
  html body.home .slider-block .video::after {
    background: linear-gradient(180deg, rgba(0,14,52,.10) 0%, rgba(0,14,52,.32) 45%, rgba(0,14,52,.80) 100%);
  }
  html body.home .slider-block .with-video .inner .content > p.mob {
    display: block; color: #fff; font-size: .8125rem; letter-spacing: .18em;
    text-transform: uppercase; margin-bottom: 1rem;
  }
  html body.home .slider-block .with-video .inner .content > h1.title {
    display: block; color: #fff; font-size: 3.5rem; line-height: 1.1;
    max-width: 44rem; margin-bottom: 2rem;
  }
  html body.home .slider-block .slide.with-video .btn {
    position: static; transform: none; border-width: 1px;
    background-color: var(--color-bg-primary);
  }
}

/* ---- Buttons: one tracking value, one primary, one secondary ---- */
html body .btn,
html body .blocks-with-icon .button-wrapper a { letter-spacing: .08em; }
html body.home .variant-product .inner .add-to-cart {
  letter-spacing: .06em; width: calc(100% - 3rem); margin: 0 auto 1.5rem;
  border: 1px solid var(--color-bg-primary); color: var(--color-bg-primary);
}
html body.home .variant-product .inner .add-to-cart .icon { display: none; }
html body.home .variant-product .inner .add-to-cart:hover { color: #fff; }
html body.home .variant-product .inner ul li button { width: 2.75rem; height: 2.75rem; font-size: .8125rem; }
@media (max-width: 768px) {
  html body.home .variant-product .inner .add-to-cart { display: flex !important; width: calc(100% - 2rem); margin-bottom: 1rem; }
  html body.home .variant-product .inner ul li button { width: 2.5rem; height: 2.5rem; }
}

/* ---- "Connoisseurs Crave": title and explanation together, no flip ---- */
html body.home .blocks-with-icon .blocks-wrapper > button { display: none; }
html body.home .blocks-with-icon .blocks { --blocks-in-row: 5; --space-between: 2rem; align-items: flex-start; }
html body.home .blocks-with-icon .blocks .block { margin-bottom: 2.5rem; }
html body.home .blocks-with-icon .blocks .inner { transform: none !important; transform-style: flat; min-height: 0; height: auto; }
html body.home .blocks-with-icon .blocks .front,
html body.home .blocks-with-icon .blocks .back {
  position: static; height: auto; transform: none; backface-visibility: visible;
}
html body.home .blocks-with-icon .blocks .icon { margin-bottom: 1.25rem; }
html body.home .blocks-with-icon .blocks .title { text-align: center; font-size: 1.0625rem; -webkit-line-clamp: unset; }
html body.home .blocks-with-icon .blocks .back { margin-top: .625rem; }
html body.home .blocks-with-icon .blocks p {
  padding: 0; -webkit-line-clamp: unset; font-size: .9375rem; color: var(--color-txt-sixth);
}
@media (max-width: 992px) { html body.home .blocks-with-icon .blocks { --blocks-in-row: 2; } }
@media (max-width: 768px) {
  html body.home .blocks-with-icon .blocks { --blocks-in-row: 1; }
  html body.home .blocks-with-icon .blocks .block { margin-bottom: 2rem; }
}

/* ---- Type: one heading rhythm, readable measure, plain eyebrows ---- */
html body.home h2 { line-height: 1.15; }
html body.home #caviar-slider .caviar-slider--top .info h2 { font-size: 3rem; }   /* desktop heading only */
html body h5 { font-style: normal; letter-spacing: .16em; font-size: .8125rem; }
html body [data-eggs_radar] h5 { color: #05ACA3; }            /* bright teal stays on navy: 6.68:1 */
html body.home .image-with-text .text p { max-width: 40rem; margin-left: auto; margin-right: auto; }
html body.home #caviar-slider .caviar-slider--mid .item { font-size: .875rem; line-height: 1.45; }
html body.home #caviar-slider .caviar-slider--mid .item em { font-style: normal; letter-spacing: .12em; font-size: .75rem; color: #545C74; }
html body footer.front-footer a { letter-spacing: 0; }
@media (max-width: 767px) {
  html body [data-eggs_radar] h2 { font-size: 2rem !important; line-height: 1.15 !important; }
  html body.home .logos-slider .header h3 { font-size: 1.25rem; line-height: 1.35; }
  html body.home .logos-slider .slide h3::before,
  html body.home .logos-slider .slide h3::after { width: 1.75rem; height: 1.75rem; }
  html body.home .logos-slider .slide h3::before { margin-right: .875rem; }
  html body.home .logos-slider .slide h3::after { margin-left: .875rem; }
  html body.home .variant-product p { font-size: .875rem; }
}

/* ---- Rhythm: the same vertical padding on every band ---- */
html body.home .best-selling,
html body.home .logos-slider,
html body.home .image-with-text,
html body.home .blocks-with-icon,
html body.home .full-width { padding-top: var(--cm-section); padding-bottom: var(--cm-section); }
html body [data-eggs_radar] { padding-top: var(--cm-section) !important; }

/* =====================================================================
   Product page
   ===================================================================== */

/* ---- Buy box: three tin sizes per row and less air above the title, so
        "Add to cart" and the shipping line sit inside the first screen on a
        768px-high laptop (they were below it). ---- */
@media (min-width: 769px) {
  html body.single-product .product-hero .content { padding-top: 2.5rem; }
}
@media (min-width: 1100px) {
  html body.single-product .product-hero .variation-radios .variation-radio-item { width: 33.333%; }
  html body.single-product .product-hero .variation-radio-item label {
    padding: .9375rem .625rem .9375rem .75rem; align-items: center;
  }
  html body.single-product .product-hero .variation-radio-item label img { margin-right: .5rem; }
}
/* "Serves 1–2" is what tells a buyer how much to order: make it readable. */
html body.single-product .product-hero .variation-title,
html body.single-product .product-hero .variation-radio span.text { font-size: .8125rem; letter-spacing: .04em; }

/* ---- Phone: the sticky buy bar goes from two rows (162px, a fifth of the
        screen) to one row with the size and the button. ---- */
@media (max-width: 768px) {
  html body.single-product .product-hero .popup { height: auto; }
  html body.single-product .product-hero .popup .inner {
    flex-direction: row; align-items: center; gap: .75rem; padding: .625rem 1rem;
  }
  html body.single-product .product-hero .popup .image,
  html body.single-product .product-hero .popup .select h2,
  html body.single-product .product-hero .popup .quantity { display: none; }
  html body.single-product .product-hero .popup .left,
  html body.single-product .product-hero .popup .right { flex: 1 1 50%; width: auto; min-width: 0; }
  html body.single-product .product-hero .popup .select,
  html body.single-product .product-hero .popup .btn.submit { width: 100%; }
  html body.single-product .product-hero .popup .btn.submit {
    height: 3.25rem; align-self: center; white-space: nowrap; letter-spacing: .04em;
    padding: 0 .5rem !important;
  }
  html body.single-product .product-hero .popup .fake-select .serves { font-size: .6875rem; }
  html body.single-product .product-hero .variation-radio span.text { font-size: .75rem; }
}

/* ---- Tabs: the two inactive tabs were #CFCFCF on white (1.5:1). ---- */
html body.single-product .product-info .row .tab-button { color: #545C74; border-bottom-color: #B9BECB; }
html body.single-product .product-info .row .tab-button.active {
  color: var(--color-txt-fourth); border-bottom-color: var(--color-txt-fourth);
}

/* ---- Specification block: labels in the body face instead of italic Montserrat. ---- */
html body.single-product .product-parameters h6,
html body.single-product .product-parameters .line-box span {
  font-family: var(--font-body); font-style: normal; letter-spacing: .12em; font-size: .8125rem;
}

/* ---- The repeated product name further down was larger (56px) than the page title (38px). ---- */
html body.single-product #caviar-slider .caviar-slider--top .info h2 { font-size: 2.375rem; line-height: 1.15; }

/* =====================================================================
   Second round: menu, fact tiles, card button, top bar
   ===================================================================== */

/* ---- Header menu: the five tins instead of one featured product ---- */
html body header .cm-tins { display: flex; gap: 2.25rem; margin-left: auto; padding: .25rem 3.5rem 1.75rem 0; }
html body header .nav-box .navigation .navigation-wrapper .cm-tins a {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; width: 9rem; text-transform: none;
}
html body header .nav-box .navigation .navigation-wrapper .cm-tins img { width: 8.5rem; height: 6.5rem; object-fit: contain; margin-bottom: .875rem; }
html body header .nav-box .navigation .navigation-wrapper .cm-tins strong { font: 400 1.25rem/1.2 var(--font-heading); color: var(--color-txt-third); text-transform: uppercase; }
html body header .nav-box .navigation .navigation-wrapper .cm-tins span { font-size: .8125rem; letter-spacing: .06em; color: #545C74; margin-top: .375rem; text-transform: uppercase; }

/* ---- Home page fact tiles: one set per caviar, only the selected set shown ---- */
html body #caviar-slider .caviar-slider--mid:not(.active) { display: none; }

/* ---- Best-seller cards on product pages get the same button as on the home page ---- */
html body.single-product .variant-product .inner .add-to-cart {
  letter-spacing: .06em; width: calc(100% - 3rem); margin: 0 auto 1.5rem;
  border: 1px solid var(--color-bg-primary); color: var(--color-bg-primary);
}
html body.single-product .variant-product .inner .add-to-cart .icon { display: none; }
html body.single-product .variant-product .inner .add-to-cart:hover { color: #fff; }
@media (max-width: 768px) {
  html body.single-product .variant-product .inner .add-to-cart { display: flex !important; width: calc(100% - 2rem); margin-bottom: 1rem; }
}

/* ---- Top bar: shipping line on the left, the existing link beside it ---- */
html body header .announcement-bar .inner > span:first-child { letter-spacing: .03em; }
html body header .announcement-bar .inner > span:first-child + span:not(.announcement-bar--right) { margin-left: auto; margin-right: 2rem; opacity: .9; }
