/*
Theme Name: The Cosmoline Child
Theme URI: https://thecosmoline.com
Description: High-performance, lightweight custom child theme for The Cosmoline. Built on the Kadence framework with custom variation swatch engine and luxury editorial styling.
Author: DevsCircle
Author URI: https://devscircle.com
Template: kadence
Version: 1.4.0
Text Domain: thecosmoline-child
*/

:root {
  /* The Cosmoline Pinterest Luxury Palette */
  --color-marble-garden: #646355;
  --color-matte-brown: #9E7E67;
  --color-dusty-rose: #A59083;
  --color-chic-beige: #D3C6BC;
  --color-arctic-white: #EAEAE7;
  --color-pure-white: #FFFFFF;
  --cosmo-paper: #fbf9f6;
  --cosmo-ink: #1a1a1a;
  --cosmo-hairline: rgba(100, 99, 85, 0.12);
  --cosmo-line: #D3C6BC;
  --cosmo-ease: cubic-bezier(0.25, 1, 0.5, 1);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Override Kadence's generated typography with the brand font stacks. */
body,
button,
input,
select,
textarea,
.thecosmoline-mobile-nav {
  font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6,
.entry-hero .entry-title {
  font-family: var(--font-serif);
}

.thecosmoline-mobile-nav {
  display: none;
}

/* CSS visibility keeps desktop/mobile output consistent behind page caches. */
@media screen and (max-width: 767px) {
  body.thecosmoline-has-mobile-nav {
    --thecosmoline-nav-height: 76px;
    padding-bottom: calc(var(--thecosmoline-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  html:has(body.thecosmoline-has-mobile-nav) {
    scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .thecosmoline-mobile-nav {
    position: fixed;
    z-index: 999;
    inset-inline: 0;
    bottom: 0;
    display: block;
    box-sizing: border-box;
    height: calc(var(--thecosmoline-nav-height) + env(safe-area-inset-bottom, 0px));
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: var(--color-pure-white);
    border-top: 1px solid var(--color-chic-beige);
    box-shadow: 0 -4px 20px rgb(100 99 85 / 8%);
    color: var(--color-marble-garden);
  }

  .thecosmoline-mobile-nav .thecosmoline-mobile-nav__list {
    display: flex;
    align-items: stretch;
    height: var(--thecosmoline-nav-height);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .thecosmoline-mobile-nav__item {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
  }

  .thecosmoline-mobile-nav .thecosmoline-mobile-nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    min-height: 76px;
    padding: 8px 2px;
    color: var(--color-marble-garden);
    text-decoration: none;
    -webkit-tap-highlight-color: rgb(165 144 131 / 20%);
  }

  .thecosmoline-mobile-nav__link:hover,
  .thecosmoline-mobile-nav__link.is-active {
    background: var(--color-arctic-white);
  }

  .thecosmoline-mobile-nav__link.is-active .thecosmoline-mobile-nav__label {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .thecosmoline-mobile-nav__link:focus-visible {
    outline: 2px solid var(--color-marble-garden);
    outline-offset: -4px;
    border-radius: 6px;
  }

  .thecosmoline-mobile-nav__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
  }

  .thecosmoline-mobile-nav__icon svg {
    display: block;
    width: 24px;
    height: 24px;
  }

  .thecosmoline-mobile-nav__icon--whatsapp {
    border-radius: 50%;
    background: var(--color-marble-garden);
    color: var(--color-pure-white);
    box-shadow: 0 2px 5px rgb(100 99 85 / 18%);
  }

  .thecosmoline-mobile-nav__label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
  }

  .thecosmoline-cart-count {
    position: absolute;
    top: -2px;
    inset-inline-end: -8px;
    box-sizing: border-box;
    min-width: 19px;
    padding: 2px 4px;
    border-radius: 12px;
    background: var(--color-marble-garden);
    color: var(--color-pure-white);
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }

  /* Keep Kadence's scroll-to-top control above the navigation. */
  body.thecosmoline-has-mobile-nav #kt-scroll-up {
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
}

@media print {
  .thecosmoline-mobile-nav {
    display: none;
  }
}

@font-face { font-family: Inter; src: url('assets/fonts/inter.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/playfair-display.woff2') format('woff2'); font-style: normal; font-weight: 500 600; font-display: swap; }
:root { --color-gold-accent: #C5A880; --global-palette1: #9e7e67; --global-palette2: #646355; --global-palette3: #45453b; --global-palette4: #646355; --global-palette5: #646355; --global-palette6: #a59083; --global-palette7: #eaeae7; --global-palette8: #f7f5f1; --global-palette9: #fff; --global-body-font-family: var(--font-sans); --global-heading-font-family: var(--font-serif); }
body { color: var(--color-marble-garden); background: white; letter-spacing: .01em; font-size: 14px; line-height: 1.75; }
h1,h2,h3,h4,h5,h6,.woocommerce-loop-product__title { font-weight: 500; letter-spacing: -.02em; color: var(--color-marble-garden); }
a { color: inherit; text-underline-offset: 4px; }
button,input,select,textarea { letter-spacing: .01em; }
svg:not(.cosmo-artwork) { width: 22px; height: 22px; max-width: 22px; max-height: 22px; flex-shrink: 0; }
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,select:focus-visible { outline: 2px solid var(--color-matte-brown); outline-offset: 4px; }
.thecosmoline-cart-status { display: inline-flex; position: relative; }
.thecosmoline-cart-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 20px; color: white; background: var(--color-marble-garden); font: 600 10px/1 var(--font-sans); }
[hidden] { display: none !important; }
.cosmo-menu-open { overflow: hidden; }
@media (max-width:767px) { .thecosmoline-mobile-nav { z-index: 9999; } .thecosmoline-mobile-nav__icon svg { width:22px; height:22px; max-width:22px; max-height:22px; } .thecosmoline-cart-status { position: absolute; top: -2px; right: -8px; } .thecosmoline-cart-count { position: static; line-height: 17px; } }

/* Editorial rhythm and tactile controls. */
body { color: var(--cosmo-ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1,h2,.entry-hero .entry-title { letter-spacing: -.025em; line-height: 1.08; }
h3,h4 { letter-spacing: -.02em; line-height: 1.3; }
::selection { background: var(--color-chic-beige); color: var(--cosmo-ink); }
button,input,select,textarea { accent-color: var(--color-marble-garden); }
a,button,input,textarea,select { -webkit-tap-highlight-color: transparent; }
button,input[type=submit],.wp-element-button { min-height: 48px; }
@media (max-width:767px) {
 .thecosmoline-mobile-nav { border-color: var(--cosmo-hairline); box-shadow: 0 -6px 25px rgb(69 69 59 / 4%); }
 .thecosmoline-mobile-nav .thecosmoline-mobile-nav__link { gap: 2px; transition: background-color .2s ease; }
 .thecosmoline-mobile-nav__label { font-size: 9px; letter-spacing: .04em; }
 .thecosmoline-mobile-nav__link.is-active .thecosmoline-mobile-nav__label { text-decoration: none; }
 .thecosmoline-mobile-nav__link.is-active .thecosmoline-mobile-nav__icon::after { content: ''; position: absolute; bottom: -6px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
 .thecosmoline-mobile-nav__icon--whatsapp { background: transparent; color: var(--color-marble-garden); box-shadow: none; }
 body.thecosmoline-has-mobile-nav.cosmo-has-buy-bar { padding-bottom: calc(174px + env(safe-area-inset-bottom,0px)); }
}
