/*
Theme Name: Molecule
Theme URI: https://github.com/YayCommerce/WPShadcn
Author: YayCommerce
Author URI: https://yaycommerce.com
Description: A modern WordPress FSE theme inspired by a component-driven design system with light/dark mode support. Features clean, accessible design with customizable components and blocks.
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 5.3
Version: 1.1.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: shadcn
Tags: full-site-editing, custom-colors, custom-logo, custom-menu, editor-style, featured-images, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-patterns, block-styles, style-variations, blog, portfolio, news, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, grid-layout, flexible-header, footer-widgets, full-width-template
*/

/* ==========================================================================
   CSS Custom Properties (Shadcn Design System)
   ========================================================================== */

:root {
  --radius: 0.625rem;
  --spacing: 0.25rem;
  --wp--preset--color--border: #e5e5e5;
  --wp--preset--color--input: #e5e5e5;
  --wp--preset--color--ring: #a1a1a1;
  --wp--preset--color--sidebar: #fafafa;
  --wp--preset--color--sidebar-foreground: #0a0a0a;
  --wp--preset--color--sidebar-primary: #171717;
  --wp--preset--color--sidebar-primary-foreground: #fafafa;
  --wp--preset--color--sidebar-accent: #f5f5f5;
  --wp--preset--color--sidebar-accent-foreground: #171717;
  --wp--preset--color--sidebar-border: #e5e5e5;
  --wp--preset--color--sidebar-ring: #a1a1a1;

  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  --default-transition-duration: 0.15s;

  --text-xs--line-height: calc(1 / 0.75);
  --text-sm--line-height: calc(1.25 / 0.875);
  --text-base--line-height: calc(1.5 / 1);
  --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl--line-height: calc(2.25 / 1.875);
  --text-4xl--line-height: calc(2.5 / 2.25);
  --text-5xl--line-height: 1;
  --text-7xl--line-height: 1;

  --border: var(--wp--preset--color--border);
  --input: var(--wp--preset--color--input);
  --ring: var(--wp--preset--color--ring);
  --sidebar: var(--wp--preset--color--sidebar);
  --sidebar-foreground: var(--wp--preset--color--sidebar-foreground);
  --sidebar-primary: var(--wp--preset--color--sidebar-primary);
  --sidebar-primary-foreground: var(
    --wp--preset--color--sidebar-primary-foreground
  );
  --sidebar-accent: var(--wp--preset--color--sidebar-accent);
  --sidebar-accent-foreground: var(
    --wp--preset--color--sidebar-accent-foreground
  );
  --sidebar-border: var(--wp--preset--color--sidebar-border);
  --sidebar-ring: var(--wp--preset--color--sidebar-ring);
  --code: var(--wp--preset--color--code);
  --code-foreground: var(--wp--preset--color--code-foreground);
  --background: var(--wp--preset--color--background);
  --foreground: var(--wp--preset--color--foreground);
  --card: var(--wp--preset--color--card);
  --card-foreground: var(--wp--preset--color--card-foreground);
  --popover: var(--wp--preset--color--popover);
  --popover-foreground: var(--wp--preset--color--popover-foreground);
  --primary: var(--wp--preset--color--primary);
  --primary-foreground: var(--wp--preset--color--primary-foreground);
  --secondary: var(--wp--preset--color--secondary);
  --secondary-foreground: var(--wp--preset--color--secondary-foreground);
  --muted: var(--wp--preset--color--muted);
  --muted-foreground: var(--wp--preset--color--muted-foreground);
  --accent: var(--wp--preset--color--accent);
  --accent-foreground: var(--wp--preset--color--accent-foreground);
  --destructive: var(--wp--preset--color--destructive);
  --destructive-foreground: var(--wp--preset--color--destructive-foreground);
}

.dark {
  --wp--preset--color--background: #0a0a0a;
  --wp--preset--color--foreground: #fafafa;
  --wp--preset--color--card: #171717;
  --wp--preset--color--card-foreground: #fafafa;
  --wp--preset--color--popover: #262626;
  --wp--preset--color--popover-foreground: #fafafa;
  --wp--preset--color--primary: #e5e5e5;
  --wp--preset--color--primary-foreground: #171717;
  --wp--preset--color--secondary: #262626;
  --wp--preset--color--secondary-foreground: #fafafa;
  --wp--preset--color--muted: #262626;
  --wp--preset--color--muted-foreground: #a1a1a1;
  --wp--preset--color--accent: #404040;
  --wp--preset--color--accent-foreground: #fafafa;
  --wp--preset--color--destructive: #ff6467;
  --wp--preset--color--border: rgba(255, 255, 255, 0.1);
  --wp--preset--color--input: rgba(255, 255, 255, 0.15);
  --wp--preset--color--ring: rgb(115, 115, 115);
  --wp--preset--color--sidebar: #171717;
  --wp--preset--color--sidebar-foreground: #fafafa;
  --wp--preset--color--sidebar-primary: #1447e6;
  --wp--preset--color--sidebar-primary-foreground: #fafafa;
  --wp--preset--color--sidebar-accent: #262626;
  --wp--preset--color--sidebar-accent-foreground: #fafafa;
  --wp--preset--color--sidebar-border: rgba(255, 255, 255, 0.1);
  --wp--preset--color--sidebar-ring: #525252;
  --wp--preset--color--code: #161616;
  --wp--preset--color--code-foreground: #a1a1a2;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
  border-color: var(--border);
}

body {
  font-feature-settings: "rlig" 1, "calt" 1;
}

button[disabled] {
  opacity: 0.5;
}

fieldset {
  border: 1px solid var(--border);
}

/* Ensure table grid lines stay visible across blocks and classic content. */
table,
.wp-block-table table {
  border-collapse: collapse;
  border: 1px solid color-mix(in oklab, var(--border) 85%, transparent);
}

table th,
table td,
.wp-block-table th,
.wp-block-table td {
  border: 1px solid color-mix(in oklab, var(--border) 85%, transparent);
  padding: 0.75rem 1rem;
}

/* ==========================================================================
   Button Styles (Shadcn inspired)
   ========================================================================== */

.wp-block-button__link {
  transition-property: all;
  transition-timing-function: var(--default-transition-timing-function);
  transition-duration: var(--default-transition-duration);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Force pill shape for all theme and WooCommerce buttons. */
.wp-block-button__link,
.wp-element-button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  border-radius: 9999px !important;
}

/* Button variants */
.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.wp-block-button.is-style-secondary .wp-block-button__link {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover {
  background-color: color-mix(in oklab, var(--secondary) 80%, transparent);
}

.wp-block-button.is-style-destructive .wp-block-button__link {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}

.wp-block-button.is-style-destructive .wp-block-button__link:hover {
  background-color: color-mix(in oklab, var(--destructive) 90%, transparent);
}

.wp-block-button.is-style-ghost .wp-block-button__link {
  background-color: transparent;
  color: var(--primary);
}

.wp-block-button.is-style-ghost .wp-block-button__link:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* ==========================================================================
   Theme mode toggler
   ========================================================================== */

.dark-mode-toggle {
  display: none !important;
  justify-content: center;
  border-radius: calc(var(--radius) - 2px);
  transition-property: background-color;
  transition-timing-function: var(--default-transition-timing-function);
  transition-duration: var(--default-transition-duration);
}

.dark-mode-toggle:hover {
  background-color: var(--accent);
}

.dark-mode-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.has-xs-font-size {
  line-height: var(--text-xs--line-height);
}
.has-sm-font-size {
  line-height: var(--text-sm--line-height);
}
.has-base-font-size {
  line-height: var(--text-base--line-height);
}
.has-lg-font-size {
  line-height: var(--text-lg--line-height);
}
.has-xl-font-size {
  line-height: var(--text-xl--line-height);
}
.has-2-xl-font-size {
  line-height: var(--text-2xl--line-height);
}
.has-3-xl-font-size {
  line-height: var(--text-3xl--line-height);
}
.has-4-xl-font-size {
  line-height: var(--text-4xl--line-height);
}
.has-5-xl-font-size {
  line-height: var(--text-5xl--line-height);
}
.has-7-xl-font-size {
  line-height: var(--text-7xl--line-height);
}
/* .required {
  color: var(--destructive);
} */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .dark-mode-toggle {
    display: none;
  }

  * {
    background: white !important;
    color: black !important;
  }
}

/* ==========================================================================
   Pill Navigation Styles
   ========================================================================== */

@media screen and (min-width: 600px) {
  .wp-block-navigation.is-style-pill .wp-block-navigation-item__content {
    text-decoration: none;
  }

  .wp-block-navigation.is-style-pill .wp-block-navigation-item.has-child,
  .wp-block-navigation.is-style-pill .wp-block-navigation-submenu__toggle {
    cursor: default;
  }

  .wp-block-navigation.is-style-pill .wp-block-navigation-item__content {
    padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--3);
  }

  .wp-block-navigation.is-style-pill
    ul:not(.wp-block-navigation__submenu-container)
    > .wp-block-navigation-item {
    background-color: var(--background);
    border-radius: calc(var(--radius) - 2px);
  }

  .wp-block-navigation.is-style-pill
    ul:not(.wp-block-navigation__submenu-container)
    > .wp-block-navigation-item
    > .wp-block-navigation-item__content {
    color: var(--foreground);
    border-radius: calc(var(--radius) - 2px);
  }

  .wp-block-navigation.is-style-pill
    ul:not(.wp-block-navigation__submenu-container)
    > .wp-block-navigation-item:hover {
    background-color: var(--accent);
  }
  .wp-block-navigation.is-style-pill
    ul:not(.wp-block-navigation__submenu-container)
    > .wp-block-navigation-item:hover
    > .wp-block-navigation-item__content {
    color: var(--accent-foreground);
  }

  .wp-block-navigation.is-style-pill
    ul:not(.wp-block-navigation__submenu-container)
    > .wp-block-navigation-item:has(.wp-block-navigation-submenu__toggle)
    > .wp-block-navigation-item__content {
    padding-right: 0;
  }

  .wp-block-navigation.is-style-pill .wp-block-navigation-submenu__toggle {
    width: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--wp--preset--spacing--2) var(--wp--preset--spacing--4);
    margin: 0;
  }

  .wp-block-navigation.is-style-pill
    ul:not(.wp-block-navigation__submenu-container)
    > .wp-block-navigation-item
    > .wp-block-navigation-submenu__toggle
    svg {
    transition-property: transform;
    transition-timing-function: var(--default-transition-timing-function);
    transition-duration: var(--default-transition-duration);
  }

  .wp-block-navigation.is-style-pill
    ul:not(.wp-block-navigation__submenu-container)
    > .wp-block-navigation-item:hover
    > .wp-block-navigation-submenu__toggle
    svg {
    transform: rotate(180deg);
  }

  .wp-block-navigation.is-style-pill .wp-block-navigation__submenu-container {
    padding: var(--wp--preset--spacing--2);
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid var(--border);
    margin-top: var(--wp--preset--spacing--2);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  }

  .wp-block-navigation.is-style-pill
    .wp-block-navigation__submenu-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    top: calc(var(--wp--preset--spacing--3) * -1);
    z-index: -1;
  }

  .wp-block-navigation.is-style-pill
    .wp-block-navigation__submenu-container
    > .wp-block-navigation-item {
    border-radius: calc(var(--radius) - 4px);
  }

  .wp-block-navigation.is-style-pill
    .wp-block-navigation__submenu-container
    > .wp-block-navigation-item:hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
  }

  .dark
    .wp-block-navigation.is-style-pill
    .wp-block-navigation__submenu-container {
    background-color: var(--popover) !important;
  }
}

@media screen and (max-width: 768px) {
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__container,
  .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation__responsive-container-content
    .wp-block-navigation__submenu-container {
    gap: var(--wp--preset--spacing--5);
  }
}

/* ==========================================================================
   Molecule Top Navigation
   ========================================================================== */

.molecule-top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgb(255 255 255 / 88%) !important;
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
  /* Side padding lives on .molecule-top-nav-inner, not here */
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.wp-site-blocks {
  padding-top: var(--molecule-top-nav-offset, 0px);
}

/* Prevent global root block spacing from pushing the fixed header down. */
:where(.wp-site-blocks) > .molecule-top-nav {
  margin-block-start: 0 !important;
}

/* Keep separators subtle and flat across patterns/pages. */
hr,
hr.wp-block-separator,
.wp-block-separator {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid
    color-mix(in oklab, var(--border) 85%, transparent)
    !important;
  box-shadow: none !important;
  filter: none !important;
}

.wp-block-separator.has-alpha-channel-opacity {
  opacity: 1 !important;
}

/* Keep sticky top nav visible below the WordPress admin toolbar. */
body.admin-bar .molecule-top-nav {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .molecule-top-nav {
    top: 46px;
  }
}

/* Inner nav: carry the max-width + side padding here (mirrors Next.js
   max-w-7xl mx-auto px-4 sm:px-6 lg:px-8). Outer .molecule-top-nav keeps
   its full-width background/border; padding is NOT on it so no double margin. */
.molecule-top-nav-inner {
  max-width: 80rem;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-top: 0.95rem;
  padding-bottom: 0.95rem;
  padding-right: 1rem !important;
  padding-left: 1rem !important;
  box-sizing: border-box;
}

/* Keep consistent side padding across breakpoints. */
@media (min-width: 640px) {
  .molecule-top-nav-inner {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
  }
}

@media (min-width: 1024px) {
  .molecule-top-nav-inner {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
  }
}

.molecule-top-nav-mobile {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.5rem;
}

.molecule-top-nav-mobile .molecule-top-nav-icons {
  justify-content: flex-end;
  overflow: visible;
  flex-shrink: 0;
}

.molecule-top-nav-mobile .molecule-top-nav-icons .molecule-icon-link {
  flex-shrink: 0;
}

/* Custom hamburger button */
.molecule-mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  border: 0;
  color: #111827;
  cursor: pointer;
  padding: 0;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-mobile-menu-button:hover,
.molecule-mobile-menu-button:focus-visible {
  background-color: var(--accent);
  outline: none;
}

.molecule-mobile-menu-button svg {
  width: 22px;
  height: 22px;
}

/* Mobile drawer backdrop */
.molecule-mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1099;
  background-color: rgb(0 0 0 / 0.4);
  opacity: 0;
  transition: opacity var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-mobile-drawer-backdrop.is-open {
  opacity: 1;
}

/* Mobile slide-in drawer */
.molecule-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1100;
  width: min(80vw, 320px);
  background-color: var(--background, #ffffff);
  box-shadow: 2px 0 12px rgb(0 0 0 / 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--default-transition-duration)
    var(--default-transition-timing-function);
  overflow-y: auto;
}

.molecule-mobile-drawer.is-open {
  transform: translateX(0);
}

/* Drawer header row (close button + quick icons) */
.molecule-mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

/* Close button */
.molecule-mobile-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  border: 0;
  color: #111827;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-mobile-drawer-close:hover,
.molecule-mobile-drawer-close:focus-visible {
  background-color: var(--accent);
  outline: none;
}

.molecule-mobile-drawer-close svg {
  width: 24px;
  height: 24px;
}

/* Quick-action icons inside drawer header */
.molecule-mobile-drawer-quick-icons {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.molecule-mobile-drawer-quick-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: #111827;
  text-decoration: none;
  position: relative;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-mobile-drawer-quick-icons a:hover,
.molecule-mobile-drawer-quick-icons a:focus-visible {
  background-color: var(--accent);
}

.molecule-mobile-drawer-quick-icons svg {
  width: 22px;
  height: 22px;
}

/* Main nav links inside drawer */
.molecule-mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.25rem;
}

.molecule-mobile-drawer-nav a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  color: #111827;
  text-decoration: none;
  font-size: var(--wp--preset--font-size--sm, 0.9375rem);
  font-weight: 500;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-mobile-drawer-nav a:hover,
.molecule-mobile-drawer-nav a:focus-visible {
  background-color: var(--accent);
}

.molecule-top-nav-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.molecule-top-nav-logo img,
.molecule-top-nav-logo .custom-logo {
  width: auto;
  height: 24px;
  max-height: 24px;
}

.molecule-top-nav-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.molecule-top-nav-icons > * {
  margin: 0 !important;
}


.molecule-icon-link {
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  text-decoration: none;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-icon-link:hover,
.molecule-icon-link:focus-visible {
  background-color: #f3f4f6;
  color: #111827;
}

.molecule-cart-icon-link {
  position: relative;
}

.molecule-cart-count {
  position: absolute;
  top: 0.375rem;
  right: 0.35rem;
  transform: translate(50%, -50%);
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.2rem;
  border-radius: 9999px;
  background-color: #000000;
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.125rem;
  text-align: center;
  pointer-events: none;
}

.molecule-top-nav-desktop {
  display: none !important;
  margin-top: 0 !important;
}

/* Ensure desktop dropdown panels render above adjacent header content. */
.molecule-top-nav,
.molecule-top-nav-inner,
.molecule-top-nav-desktop,
.molecule-desktop-navigation {
  overflow: visible;
}

/* Desktop nav: flex row of links and dropdown */
.molecule-desktop-navigation {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.molecule-desktop-navigation > a {
  color: #111827;
  font-size: var(--wp--preset--font-size--sm);
  text-decoration: none;
  padding: 0.375rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-desktop-navigation > a:hover,
.molecule-desktop-navigation > a:focus-visible {
  background-color: #f3f4f6;
  color: #111827;
}

/* PHP dropdown wrapper — inline-flex so the button sits flush in the nav
   row just like the sibling <a> elements, giving identical hover geometry */
.molecule-desktop-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Dropdown toggle button — same rounded icon-link style */
.molecule-desktop-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: #111827;
  font-size: var(--wp--preset--font-size--sm);
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  padding: 0.375rem 0.5rem;
  border-radius: calc(var(--radius) - 2px) !important;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-desktop-dropdown-toggle:hover,
.molecule-desktop-dropdown-toggle:focus-visible {
  background-color: #f3f4f6;
  color: #111827;
}

.molecule-desktop-dropdown-toggle svg {
  width: 0.85rem;
  height: 0.85rem;
  transition: transform var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-desktop-nav-dropdown.is-open .molecule-desktop-dropdown-toggle svg {
  transform: rotate(180deg);
}

/* Transparent bridge on the wrapper so cursor can travel from toggle to panel
   without the gap triggering a close. Lives outside the clipped panel. */
.molecule-desktop-nav-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0.35rem;
  pointer-events: auto;
}

/* Dropdown panel */
.molecule-desktop-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 1001;
  min-width: 10rem;
  padding: 0.25rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius, 0.5rem);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  /* Clip child hover backgrounds to the panel's rounded corners */
  overflow: hidden;
}

.molecule-desktop-dropdown-panel a {
  display: block;
  padding: 0.375rem 0.5rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: var(--wp--preset--font-size--sm);
  color: #111827;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
  /* Explicitly constrain to panel content box — prevents box-model edge cases */
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.molecule-desktop-dropdown-panel a:hover,
.molecule-desktop-dropdown-panel a:focus-visible {
  background-color: #f3f4f6;
  color: #111827;
}

/* Keep page titles aligned with constrained page content. */
.page main .wp-block-post-title {
  max-width: var(--wp--style--global--content-size);
  margin-top: 0;
  margin-right: auto;
  margin-bottom: var(--wp--preset--spacing--6);
  margin-left: auto;
  text-align: left;
}

/* Keep footer navigation links light-weight regardless of global nav styles. */
footer .wp-block-navigation .wp-block-navigation-item__content,
footer .wp-block-navigation .wp-block-navigation-item__label {
  font-weight: 400;
}

/* Responsive side padding matching Next.js px-4 → sm:px-6 → lg:px-8.
   Two layers:
   1. CSS variable override on body — covers elements that read
      --wp--style--root--padding-right/left via the .has-global-padding class rule.
   2. !important overrides on direct children of .wp-site-blocks and
      .wp-block-template-part — covers all top-level blocks whose inline styles
      hardcode var(--wp--preset--spacing--4), including <main>, full-width
      sections, and the header/footer template wrappers. Nested
      has-global-padding blocks (cards, columns, etc.) are not matched because
      they are not direct children of these roots. */
body {
  --wp--style--root--padding-right: 1rem;
  --wp--style--root--padding-left: 1rem;
}

@media (min-width: 640px) {
  body {
    --wp--style--root--padding-right: 1.5rem;
    --wp--style--root--padding-left: 1.5rem;
  }

  .wp-site-blocks > .has-global-padding,
  .wp-block-template-part > .has-global-padding {
    padding-right: 1.5rem !important;
    padding-left: 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  body {
    --wp--style--root--padding-right: 2rem;
    --wp--style--root--padding-left: 2rem;
  }

  .wp-site-blocks > .has-global-padding,
  .wp-block-template-part > .has-global-padding {
    padding-right: 2rem !important;
    padding-left: 2rem !important;
  }

  .molecule-top-nav-mobile {
    display: none !important;
  }

  .molecule-top-nav-desktop {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 1rem;
    margin-top: 0 !important;
  }

  /* Give logo and icons equal outer columns so center links stay centered. */
  .molecule-top-nav-desktop .molecule-top-nav-logo,
  .molecule-top-nav-desktop .molecule-top-nav-icons {
    min-width: 0;
  }

  .molecule-top-nav-desktop .molecule-top-nav-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .molecule-top-nav-desktop .molecule-top-nav-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .molecule-top-nav-desktop .molecule-desktop-navigation {
    justify-self: center;
    justify-content: center;
    min-width: 0;
  }
}




/* Keep mobile drawer fixed to viewport, not header bounds. */
@media (max-width: 1023px) {
  .molecule-top-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* At small mobile sizes only the cart icon stays in the top bar. */
@media (max-width: 639px) {
  .molecule-top-nav-mobile .molecule-header-search,
  .molecule-top-nav-mobile .molecule-header-account {
    display: none !important;
  }
}

/* ==========================================================================
   Inputs
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
.wp-block-search__input,
.wc-block-components-textarea,
.wc-block-components-form .wc-block-components-text-input input[type="text"],
.wc-block-components-form .wc-block-components-text-input input[type="email"],
.wc-block-components-form .wc-block-components-text-input input[type="number"],
.wc-block-components-form
  .wc-block-components-text-input
  input[type="password"],
.wc-block-components-form .wc-block-components-text-input input[type="search"],
.wc-block-components-form .wc-block-components-text-input input[type="url"],
.wc-block-components-form .wc-block-components-text-input input[type="tel"],
.wc-block-components-form .wc-block-components-text-input textarea,
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-text-input input[type="password"],
.wc-block-components-text-input input[type="search"],
.wc-block-components-text-input input[type="url"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input textarea,
select,
.wc-blocks-components-select .wc-blocks-components-select__select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row select,
.woocommerce-page form .form-row textarea.input-text {
  background-color: transparent;
  color: var(--foreground) !important;
  border-width: 1px !important;
  border-style: solid;
  border-color: var(--border);
  border-radius: calc(var(--radius) - 2px) !important;
  padding: 0.25rem 0.75rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25/0.875 !important;
  height: calc(var(--spacing) * 9);
  box-shadow: 0 0.0625rem 0.125rem 0 rgb(0 0 0 / 0.05);
  transition-property: border-color;
  transition-timing-function: var(--default-transition-timing-function);
  transition-duration: var(--default-transition-duration);
}

textarea,
.wc-block-components-textarea,
.wc-block-components-form .wc-block-components-text-input textarea {
  height: auto;
}

.wp-block-search__input:focus-visible,
.wp-block-search__input:focus,
input[type="text"]:focus-visible,
input[type="text"]:focus,
input[type="email"]:focus-visible,
input[type="email"]:focus,
input[type="password"]:focus-visible,
input[type="password"]:focus,
input[type="search"]:focus-visible,
input[type="search"]:focus,
input[type="url"]:focus-visible,
input[type="url"]:focus,
input[type="tel"]:focus-visible,
input[type="tel"]:focus,
input[type="number"]:focus-visible,
input[type="number"]:focus,
textarea:focus-visible,
textarea:focus,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="text"]:focus-visible,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="text"]:focus,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="email"]:focus-visible,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="email"]:focus,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="password"]:focus-visible,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="password"]:focus,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="search"]:focus-visible,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="search"]:focus,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="url"]:focus-visible,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="url"]:focus,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="tel"]:focus-visible,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="tel"]:focus,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="number"]:focus-visible,
.wc-block-components-form
  .wc-block-components-text-input
  input[type="number"]:focus,
.wc-block-components-text-input input[type="text"]:focus-visible,
.wc-block-components-text-input input[type="text"]:focus,
.wc-block-components-text-input input[type="email"]:focus-visible,
.wc-block-components-text-input input[type="email"]:focus,
.wc-block-components-text-input input[type="number"]:focus-visible,
.wc-block-components-text-input input[type="number"]:focus,
.wc-block-components-text-input input[type="password"]:focus-visible,
.wc-block-components-text-input input[type="password"]:focus,
.wc-block-components-text-input input[type="search"]:focus-visible,
.wc-block-components-text-input input[type="search"]:focus,
.wc-block-components-text-input input[type="tel"]:focus-visible,
.wc-block-components-text-input input[type="tel"]:focus,
.wc-block-components-text-input input[type="url"]:focus-visible,
.wc-block-components-text-input input[type="url"]:focus,
.wc-block-components-textarea:focus-visible,
.wc-block-components-textarea:focus,
select:focus-visible,
select:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus-visible,
.wc-blocks-components-select .wc-blocks-components-select__select:focus,
.woocommerce-page form .form-row input.input-text:focus-visible,
.woocommerce-page form .form-row input.input-text:focus,
.woocommerce-page form .form-row select:focus-visible,
.woocommerce-page form .form-row select:focus,
.woocommerce-page form .form-row textarea.input-text:focus-visible,
.woocommerce-page form .form-row textarea.input-text:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, oklch(70.8% 0 0) 50%, transparent);
}

select,
.wc-blocks-components-select .wc-blocks-components-select__select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='oklch(80.6% 0 0)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 0.75rem auto;
  appearance: none;
}

/**
 * Select Options Styling (for browsers that support it)
 * Note: Limited styling support across browsers
 */
select option {
  background-color: var(--background);
  color: var(--foreground);
  padding: 0.5rem;
}

select option:checked {
  background: linear-gradient(var(--primary), var(--primary));
  background-color: var(--primary);
  color: var(--primary-foreground);
}

input[type="checkbox"],
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"],
input[type="radio"],
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="radio"],
.wc-block-components-radio-control .wc-block-components-radio-control__input {
  display: inline-flex;
  appearance: none;
  -webkit-appearance: none;
  cursor: inherit;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  background-color: transparent;
  border-width: 1px;
  border-style: solid;
  border-color: var(--border);
  border-radius: 4px;
  color: var(--primary-foreground);
  box-shadow: none;
}

input[type="checkbox"],
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"] {
  position: relative;
}

input[type="checkbox"]:checked,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"]:checked {
  background-color: var(--primary);
}

input[type="radio"],
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="radio"],
.wc-block-components-radio-control .wc-block-components-radio-control__input {
  border-radius: 100%;
}

input[type="checkbox"]:checked::after,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 3.5px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  -webkit-transform: rotate(45deg) translate(-50%, -50%);
  -ms-transform: rotate(45deg) translate(-50%, -50%);
  transform: rotate(45deg);
}

input[type="radio"]:checked,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="radio"]:checked,
.wc-block-components-radio-control
  .wc-block-components-radio-control__input:checked {
  border-color: var(--border);
}

input[type="radio"]:checked::before,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="radio"]:checked::before,
.wc-block-components-radio-control
  .wc-block-components-radio-control__input:checked::before {
  width: calc(var(--spacing) * 2);
  height: calc(var(--spacing) * 2);
  min-width: calc(var(--spacing) * 2);
  min-height: calc(var(--spacing) * 2);
  border-radius: 100%;
  background-color: var(--primary);
}

input[type="checkbox"]:focus-visible,
input[type="checkbox"]:focus,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"]:focus-visible,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"]:focus,
input[type="radio"]:focus-visible,
input[type="radio"]:focus,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="radio"]:focus-visible,
.wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="radio"]:focus,
.wc-block-components-radio-control
  .wc-block-components-radio-control__input:focus-visible,
.wc-block-components-radio-control
  .wc-block-components-radio-control__input:focus {
  outline: none;
}

/* ==========================================================================
   Dark Mode Inputs
   ========================================================================== */

.dark .wp-block-search__input,
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="number"],
.dark input[type="search"],
.dark input[type="url"],
.dark input[type="tel"],
.dark textarea,
.dark .wc-block-components-textarea,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="text"],
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="email"],
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="password"],
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="number"],
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="search"],
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="tel"],
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="url"],
.dark .wc-block-components-text-input input[type="text"],
.dark .wc-block-components-text-input input[type="email"],
.dark .wc-block-components-text-input input[type="number"],
.dark .wc-block-components-text-input input[type="password"],
.dark .wc-block-components-text-input input[type="search"],
.dark .wc-block-components-text-input input[type="tel"],
.dark .wc-block-components-text-input input[type="url"],
.dark .wc-block-components-textarea,
.dark select,
.dark .wc-blocks-components-select .wc-blocks-components-select__select,
.dark input[type="checkbox"],
.dark
  .wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"],
input[type="radio"],
.dark
  .wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="radio"],
.dark
  .wc-block-components-radio-control
  .wc-block-components-radio-control__input {
  background-color: color-mix(in oklab, var(--input) 30%, transparent);
}

.dark .wp-block-search__input:focus-visible,
.dark .wp-block-search__input:focus,
.dark input[type="text"]:focus-visible,
.dark input[type="text"]:focus,
.dark input[type="email"]:focus-visible,
.dark input[type="email"]:focus,
.dark input[type="password"]:focus-visible,
.dark input[type="password"]:focus,
.dark input[type="search"]:focus-visible,
.dark input[type="search"]:focus,
.dark input[type="tel"]:focus-visible,
.dark input[type="tel"]:focus,
.dark input[type="url"]:focus-visible,
.dark input[type="url"]:focus,
.dark input[type="number"]:focus-visible,
.dark input[type="number"]:focus,
.dark textarea:focus-visible,
.dark textarea:focus,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="text"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="text"]:focus,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="email"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="email"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="number"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="number"]:focus,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="password"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="password"]:focus,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="search"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="search"]:focus,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="tel"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="tel"]:focus,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="url"]:focus-visible,
.dark
  .wc-block-components-form
  .wc-block-components-text-input
  input[type="url"]:focus,
.dark .wc-block-components-textarea:focus-visible,
.dark .wc-block-components-textarea:focus,
.dark .wc-block-components-text-input input[type="text"]:focus-visible,
.dark .wc-block-components-text-input input[type="text"]:focus,
.dark .wc-block-components-text-input input[type="email"]:focus-visible,
.dark .wc-block-components-text-input input[type="email"]:focus,
.dark .wc-block-components-text-input input[type="number"]:focus-visible,
.dark .wc-block-components-text-input input[type="number"]:focus,
.dark .wc-block-components-text-input input[type="password"]:focus-visible,
.dark .wc-block-components-text-input input[type="password"]:focus,
.dark .wc-block-components-text-input input[type="search"]:focus-visible,
.dark .wc-block-components-text-input input[type="search"]:focus,
.dark .wc-block-components-text-input input[type="tel"]:focus-visible,
.dark .wc-block-components-text-input input[type="tel"]:focus,
.dark .wc-block-components-text-input input[type="url"]:focus-visible,
.dark .wc-block-components-text-input input[type="url"]:focus,
.dark select:focus-visible,
.dark select:focus,
.dark
  .wc-blocks-components-select
  .wc-blocks-components-select__select:focus-visible,
.dark .wc-blocks-components-select .wc-blocks-components-select__select:focus {
  border-width: 1px !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, oklch(55.6% 0 0) 50%, transparent);
}

.dark select,
.dark .wc-blocks-components-select .wc-blocks-components-select__select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='oklch(100% 0 0/.15)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.dark input[type="checkbox"]:checked,
.dark
  .wc-block-components-checkbox
  .wc-block-components-checkbox__input[type="checkbox"]:checked {
  background-color: var(--primary);
}

/* ==========================================================================
   Molecule Front Page
   ========================================================================== */

.molecule-home-main {
  display: block;
}

.molecule-hero-badge {
  display: inline-flex;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  background-color: #ffffff;
  gap: 0.5rem;
}

.molecule-stars {
  margin: 0;
  letter-spacing: 0.06em;
  line-height: 1;
  font-size: 0.8rem;
}

.molecule-hero-cover {
  border-radius: 1.5rem;
  overflow: hidden;
}

.molecule-hero-cover.wp-block-image {
  width: 100%;
  margin: 0;
}

.molecule-hero-cover.wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
}

.molecule-product-grid .wp-block-post-template {
  margin-top: var(--wp--preset--spacing--6);
}

.molecule-product-card .wc-block-components-product-price {
  font-weight: 600;
}

.molecule-product-card .wp-block-post-title {
  margin-top: var(--wp--preset--spacing--3);
  margin-bottom: var(--wp--preset--spacing--2);
}

.molecule-product-card .wp-block-post-title a,
.molecule-product-card .wp-block-post-title a:visited,
.molecule-product-card .wp-block-post-title a:hover,
.molecule-product-card .wp-block-post-title a:focus,
.molecule-product-card .wp-block-post-title a:focus-visible {
  text-decoration: none !important;
}

.molecule-why-choose {
  background: color-mix(in oklab, var(--background) 94%, #f4f4f5);
}

.molecule-feature-panel {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.molecule-feature-panel > summary {
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 500;
  list-style: none;
}

.molecule-feature-panel > summary::-webkit-details-marker {
  display: none;
}

.molecule-feature-panel > p {
  margin: 0.75rem 0 0;
}

.molecule-feature-image img {
  border-radius: 1.5rem;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.molecule-faq-list {
  border-top: none;
}

.molecule-faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 0 0 1rem;
}

.molecule-faq-item > summary {
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wp--preset--spacing--4);
}

.molecule-faq-item > summary::-webkit-details-marker {
  display: none;
}

.molecule-faq-item > summary::after {
  content: "+";
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
  color: var(--foreground);
  flex-shrink: 0;
}

.molecule-faq-item[open] > summary::after {
  content: "\2212";
}

.molecule-faq-item > p {
  margin: 0.85rem 0 0;
  color: var(--muted-foreground);
}

/* ==========================================================================
   Molecule Research Grid
   ========================================================================== */

.molecule-research-grid-query .wp-block-post-template {
  gap: var(--wp--preset--spacing--6);
}

.molecule-research-card {
  position: relative;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.25rem);
  background-color: var(--card);
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: transform var(--default-transition-duration)
      var(--default-transition-timing-function),
    box-shadow var(--default-transition-duration)
      var(--default-transition-timing-function);
}

.molecule-research-card:hover,
.molecule-research-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.1);
}

/* Prevent Gutenberg constrained-layout auto margins from creating
   a visual gap between card image and content. */
.molecule-research-card.is-layout-constrained > * {
  margin-block-start: 0;
}

.molecule-research-card-image,
.molecule-research-card-image img {
  display: block;
  line-height: 0;
  margin: 0;
  width: 100%;
}

.molecule-research-card-image a {
  display: block;
  line-height: 0;
}

.molecule-research-card-image img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: calc(var(--radius) + 0.25rem) calc(var(--radius) + 0.25rem) 0 0 !important;
}

.molecule-research-card-content {
  padding: var(--wp--preset--spacing--5);
}

.molecule-research-card h3 {
  margin: 0;
  font-size: clamp(1.1rem, 1.1vw, 1.25rem);
  line-height: 1.35;
}

.molecule-research-card h3 a {
  text-decoration: none;
  color: var(--foreground);
}

.molecule-research-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.molecule-research-card h3 a:hover,
.molecule-research-card h3 a:focus-visible {
  color: var(--primary);
}

.molecule-research-card .wp-block-post-excerpt__excerpt {
  margin: 0;
}

/* Enforce heading weight across existing post/pattern content that still has
   inline font-weight values saved in the database. */
h1,
h2,
h3,
h4,
h5,
h6,
.wp-block-heading {
  font-weight: 400 !important;
}

/* ==========================================================================
   Search Modal
   ========================================================================== */

.molecule-search-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

.molecule-search-modal.is-open {
  display: flex;
}

.molecule-search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  backdrop-filter: blur(4px);
}

.molecule-search-modal__container {
  position: relative;
  width: min(52rem, 100%);
  margin: 5rem 1rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  color: #111827;
  box-shadow:
    0 25px 50px -12px rgb(0 0 0 / 0.25),
    0 12px 24px -12px rgb(0 0 0 / 0.2);
  overflow: hidden;
}

.molecule-search-modal__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.molecule-search-modal__input {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font-size: 1.125rem !important;
  font-weight: 400;
  line-height: 1.75rem;
  font-family: inherit;
  outline: none;
  height: auto !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: none;
}

.molecule-search-modal__input::placeholder {
  color: #6b7280;
  opacity: 1;
}

.molecule-search-modal__input:focus-visible {
  outline: none;
  border: 0 !important;
  box-shadow: none !important;
}

.molecule-search-modal__input:focus {
  outline: none;
  border: 0 !important;
  box-shadow: none !important;
}

.molecule-search-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0.5rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #374151;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-search-modal__close:hover {
  background: #f3f4f6;
  color: #111827;
}

.molecule-search-modal__close svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.molecule-search-modal__results {
  max-height: 60vh;
  overflow: auto;
  padding: 0;
}

.molecule-search-modal__state {
  margin: 0;
  padding: 2rem;
  color: #6b7280;
  text-align: center;
  font-size: 1rem;
}

.molecule-search-modal__list {
  display: block;
  border-top: 1px solid #f3f4f6;
}

.molecule-search-modal__item {
  display: block;
  padding: 1rem;
  border: 0;
  border-bottom: 1px solid #f3f4f6;
  border-radius: 0;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: background-color var(--default-transition-duration)
    var(--default-transition-timing-function);
}

.molecule-search-modal__item:last-child {
  border-bottom: 0;
}

.molecule-search-modal__item-content {
  min-width: 0;
}

.molecule-search-modal__item::before {
  content: "";
  display: table;
}

.molecule-search-modal__item::after {
  content: "";
  display: table;
  clear: both;
}

.molecule-search-modal__item .molecule-search-modal__thumb {
  float: left;
  width: 4rem;
  height: 4rem;
  margin-right: 1rem;
}

.molecule-search-modal__item .molecule-search-modal__item-content {
  overflow: hidden;
}

.molecule-search-modal__item-meta {
  display: flex;
  align-items: start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.molecule-search-modal__item:hover,
.molecule-search-modal__item:focus-visible {
  border-color: transparent;
  background: #f9fafb;
  color: inherit;
}

.molecule-search-modal__thumb {
  width: 4rem;
  height: 4rem;
  border-radius: 0.5rem;
  border: 0;
  overflow: hidden;
  background: #f3f4f6;
}

.molecule-search-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.molecule-search-modal__thumb-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.molecule-search-modal__item-content {
  min-width: 0;
}

.molecule-search-modal__badge {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  text-transform: capitalize;
  border: 0;
  border-radius: 9999px;
  padding: 0.25rem 0.5rem;
  background: #f3f4f6;
  color: #4b5563;
}

.molecule-search-modal__item-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.molecule-search-modal__item-excerpt {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.molecule-search-modal-open {
  overflow: hidden;
}

/* Hide Safari/Chromium native search clear icon (blue X). */
.molecule-search-modal__input::-webkit-search-decoration,
.molecule-search-modal__input::-webkit-search-cancel-button,
.molecule-search-modal__input::-webkit-search-results-button,
.molecule-search-modal__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.molecule-search-modal__input::-ms-clear,
.molecule-search-modal__input::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

@media (max-width: 767px) {
  .molecule-search-modal__container {
    margin-top: 4rem;
    margin-inline: 0.75rem;
    width: calc(100% - 1.5rem);
  }

  .molecule-search-modal__header {
    padding: 1rem;
  }

  .molecule-search-modal__item .molecule-search-modal__thumb {
    width: 3.5rem;
    height: 3.5rem;
  }
}
