/*
 * FlachDings — new visual layer
 *
 * Loaded after the legacy structural stylesheets. It intentionally replaces the
 * visual language (typography, palette, surfaces, radii, shadows, motion) while
 * leaving the legacy grid and builder utility classes intact so the UX Builder
 * and existing content keep working.
 */

:root {
  --fo-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  --fo-font-mono: "SFMono-Regular", ui-monospace, "Cascadia Code", "Liberation Mono", monospace;

  --fo-ink: #1d1d1f;
  --fo-ink-soft: #424245;
  --fo-muted: #6e6e73;
  --fo-line: rgba(0, 0, 0, 0.08);
  --fo-line-strong: rgba(0, 0, 0, 0.14);

  --fo-bg: #fbfbfd;
  --fo-surface: #ffffff;
  --fo-surface-2: #f5f5f7;
  --fo-surface-3: #ececf0;
  --fo-ink-bg: #111113;

  --fo-accent: #0071e3;
  --fo-accent-hover: #0077ed;
  --fo-accent-soft: rgba(0, 113, 227, 0.12);
  --fo-success: #30d158;
  --fo-warning: #ff9f0a;
  --fo-danger: #ff453a;

  --fo-radius-xs: 10px;
  --fo-radius-sm: 14px;
  --fo-radius: 20px;
  --fo-radius-lg: 28px;
  --fo-radius-pill: 999px;

  --fo-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --fo-shadow-2: 0 2px 6px rgba(0, 0, 0, 0.05), 0 24px 64px rgba(0, 0, 0, 0.08);
  --fo-shadow-3: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 2px rgba(0, 0, 0, 0.04);

  --fo-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --fo-dur: 0.6s;
  --fo-container: 1240px;
}

/* Keep legacy components on the new palette even when the legacy theme prints custom
 * properties later in the document. */
body {
  --fs-color-primary: var(--fo-accent) !important;
  --fs-color-secondary: var(--fo-ink) !important;
  --fs-color-success: var(--fo-success) !important;
  --fs-color-alert: var(--fo-danger) !important;
  --fs-color-base: var(--fo-ink) !important;
  --fs-experimental-link-color: var(--fo-accent) !important;
  --fs-experimental-link-color-hover: var(--fo-accent-hover) !important;
}

html {
  background: var(--fo-bg);
  scroll-behavior: smooth;
}

body,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .button,
body button,
body input,
body select,
body textarea {
  font-family: var(--fo-font-sans) !important;
}

body {
  background: var(--fo-bg);
  color: var(--fo-ink);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6 {
  color: var(--fo-ink);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

body h1 { font-size: clamp(2.5rem, 5.6vw, 5rem); }
body h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
body h3 { font-size: clamp(1.45rem, 2.4vw, 2.1rem); }
body h4 { font-size: clamp(1.15rem, 1.7vw, 1.45rem); }

body p { color: var(--fo-ink-soft); }

body a {
  color: var(--fo-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.35s var(--fo-ease);
}

body a:hover { color: var(--fo-accent-hover); }

::selection {
  background: var(--fo-accent-soft);
  color: var(--fo-ink);
}

:focus-visible {
  outline: 2px solid var(--fo-accent);
  outline-offset: 3px;
}

.container,
.row .container {
  max-width: var(--fo-container);
}

/* Header ------------------------------------------------------------------ */

#header.header {
  background-color: rgba(251, 251, 253, 0.82);
  border-bottom: 1px solid var(--fo-line);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.header-top {
  background-color: rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid var(--fo-line);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-main {
  background-color: transparent;
  box-shadow: none;
}

.header-inner {
  min-height: 76px;
  gap: 12px;
}

.header-inner > .flex-col {
  min-width: 0;
}

#logo {
  flex: 0 0 auto;
  margin-right: clamp(16px, 2vw, 36px);
}

#logo .logo img {
  max-height: 46px;
  width: auto;
}

.header-nav {
  gap: 4px;
}

.header-nav > li > a,
.nav-top-link,
.nav > li > a {
  color: var(--fo-ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--fo-ease), opacity 0.3s var(--fo-ease);
}

.header-nav > li > a:hover,
.nav-top-link:hover,
.nav > li > a:hover {
  color: var(--fo-accent);
  opacity: 1;
}

.nav-dropdown,
.ux-nav-vertical-menu .nav-dropdown {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-radius);
  box-shadow: var(--fo-shadow-2);
  padding: 10px;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.nav-dropdown li a {
  border-radius: var(--fo-radius-xs);
  padding: 0.6rem 0.9rem;
  transition: background-color 0.3s var(--fo-ease), color 0.3s var(--fo-ease);
}

.nav-dropdown li a:hover {
  background: var(--fo-surface-2);
  color: var(--fo-ink);
}

.header-button .button,
.header-button.button {
  border-radius: var(--fo-radius-pill);
  padding: 0.7rem 1.15rem;
  font-size: 0.86rem;
}

.top-divider,
.header-divider {
  opacity: 0.35;
}

/* Page titles ------------------------------------------------------------- */

div.page-title {
  background-color: var(--fo-surface-2);
  border-bottom: 1px solid var(--fo-line);
  padding: clamp(56px, 8vw, 112px) 0;
}

div.page-title .page-title-inner {
  min-height: 0;
}

div.page-title:not(:has(h1)) {
  padding: clamp(24px, 4vw, 52px) 0;
}

div.page-title h1,
div.page-title .page-title-inner h1 {
  color: var(--fo-ink);
  font-size: clamp(2.25rem, 5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  text-transform: none !important;
}

div.page-title .breadcrumbs {
  color: var(--fo-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

div.page-title .breadcrumbs a { color: var(--fo-muted); }
div.page-title .breadcrumbs a:hover { color: var(--fo-accent); }

/* Buttons ----------------------------------------------------------------- */

body .button,
body button,
body input[type="submit"],
body input[type="button"],
body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0.85em 1.65em;
  border: 1px solid transparent;
  border-radius: var(--fo-radius-pill);
  background: var(--fo-ink);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  text-transform: none;
  box-shadow: var(--fo-shadow-3);
  transition: transform 0.45s var(--fo-ease), box-shadow 0.45s var(--fo-ease),
    background-color 0.35s var(--fo-ease), color 0.35s var(--fo-ease),
    border-color 0.35s var(--fo-ease);
  cursor: pointer;
}

body .button:hover,
body button:hover,
body input[type="submit"]:hover,
body .woocommerce a.button:hover,
body .woocommerce button.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--fo-shadow-1);
}

body .button:active,
body button:active,
body input[type="submit"]:active {
  transform: translateY(0) scale(0.985);
}

body .button.primary,
body .button.primary:hover {
  background: var(--fo-accent);
  color: #fff;
}

body .button.primary:hover { background: var(--fo-accent-hover); }

body .button.secondary {
  background: var(--fo-ink);
  color: #fff;
}

body .button.is-outline,
body .button.is-outline:hover {
  background: transparent;
  border-color: var(--fo-line-strong);
  color: var(--fo-ink);
  box-shadow: none;
}

body .button.is-outline:hover {
  border-color: var(--fo-ink);
  background: rgba(0, 0, 0, 0.03);
}

body .button.is-link {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--fo-accent);
  box-shadow: none;
}

body .button.is-link:hover {
  transform: none;
  color: var(--fo-accent-hover);
  box-shadow: none;
}

body .button.is-smaller,
body .button.is-small {
  min-height: 38px;
  padding: 0.65em 1.2em;
  font-size: 0.84rem;
}

body .button.is-large {
  min-height: 54px;
  padding: 1em 2em;
  font-size: 1rem;
}

body .button.is-xlarge {
  min-height: 62px;
  padding: 1.1em 2.4em;
  font-size: 1.08rem;
}

body .button.is-underline {
  border-radius: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--fo-ink);
}

body .quantity .button,
body .quantity input[type="button"],
body .quantity input[type="number"] {
  border-radius: var(--fo-radius-xs);
}

/* Forms ------------------------------------------------------------------- */

body input[type="text"],
body input[type="email"],
body input[type="url"],
body input[type="password"],
body input[type="search"],
body input[type="number"],
body input[type="tel"],
body input[type="date"],
body select,
body textarea,
body .input-text,
body .select,
body .woocommerce form .form-row input.input-text,
body .woocommerce form .form-row textarea {
  min-height: 48px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-radius-sm);
  background: var(--fo-surface);
  color: var(--fo-ink);
  font-size: 0.95rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: border-color 0.3s var(--fo-ease), box-shadow 0.3s var(--fo-ease),
    background-color 0.3s var(--fo-ease);
}

body textarea { min-height: 140px; }

body input:focus,
body select:focus,
body textarea:focus,
body .input-text:focus {
  border-color: var(--fo-accent);
  box-shadow: 0 0 0 4px var(--fo-accent-soft);
  outline: none;
}

body label {
  color: var(--fo-ink-soft);
  font-size: 0.86rem;
  font-weight: 500;
}

body .form-row {
  margin-bottom: 1.1rem;
}

/* Cards, products, blog --------------------------------------------------- */

body .product-small .box,
body .product-small.box,
body .post-item,
body #secondary .widget,
body .shop-sidebar .widget {
  background: var(--fo-surface);
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-radius-lg);
  box-shadow: var(--fo-shadow-1);
  transition: transform var(--fo-dur) var(--fo-ease),
    box-shadow var(--fo-dur) var(--fo-ease), border-color 0.35s var(--fo-ease);
}

body .product-small .box,
body .product-small.box {
  padding: 10px;
  overflow: hidden;
}

body .product-small .box:hover,
body .product-small.box:hover,
body .post-item:hover {
  transform: translateY(-6px);
  border-color: var(--fo-line-strong);
  box-shadow: var(--fo-shadow-2);
}

body .product-small .box-image,
body .product-small .box-image .box-image-inner {
  position: relative;
  border-radius: calc(var(--fo-radius-lg) - 10px);
  overflow: hidden;
  background: var(--fo-surface-2);
}

body .product-small .box-image > .onsale,
body .product-small .box-image .badge-container {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}

body .product-small .box-image .badge-inner {
  margin: 0;
}

body .product-small .box-image img {
  transition: transform 0.9s var(--fo-ease);
}

body .product-small:hover .box-image img {
  transform: scale(1.04);
}

body .product-small .box-text {
  padding: 18px 10px 12px;
  text-align: left;
}

body .product-small .product-title,
body .product-small .woocommerce-loop-product__title {
  color: var(--fo-ink);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

body .product-small .price,
body .product-small .amount {
  color: var(--fo-ink);
  font-size: 0.94rem;
  font-weight: 600;
}

body .product-small .button {
  min-height: 38px;
  padding: 0.55em 1.05em;
  font-size: 0.78rem;
}

body .onsale,
body .badge-inner,
body .product-small .onsale {
  border-radius: var(--fo-radius-pill);
  background: var(--fo-ink);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body .post-item {
  overflow: hidden;
}

body .post-item .box-text,
body .post-item .entry-content {
  padding: 24px;
}

body .post-item .entry-title,
body .post-item .entry-title a {
  color: var(--fo-ink);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

body .post-item .entry-image img {
  transition: transform 0.9s var(--fo-ease);
}

body .post-item:hover .entry-image img {
  transform: scale(1.03);
}

body #secondary .widget,
body .shop-sidebar .widget {
  padding: 24px;
  margin-bottom: 22px;
}

body .widget-title,
body #secondary .widget-title {
  color: var(--fo-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body .is-divider {
  background: var(--fo-line-strong);
  opacity: 0.5;
}

/* WooCommerce ------------------------------------------------------------- */

body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-radius-sm);
  background: var(--fo-surface);
  box-shadow: var(--fo-shadow-1);
  padding: 16px 20px;
}

body .woocommerce-message { border-left: 4px solid var(--fo-accent); }
body .woocommerce-info { border-left: 4px solid var(--fo-accent); }
body .woocommerce-error { border-left: 4px solid var(--fo-danger); }

body .woocommerce .star-rating span::before,
body .star-rating span::before {
  color: var(--fo-warning);
}

body .mini-cart,
body .cart-popup,
body .cart-popup-inner {
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-radius);
  box-shadow: var(--fo-shadow-2);
  background: var(--fo-surface);
}

body table.shop_table,
body .woocommerce table.shop_table {
  border: 1px solid var(--fo-line);
  border-radius: var(--fo-radius-sm);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

body table.shop_table th {
  background: var(--fo-surface-2);
  color: var(--fo-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body .woocommerce-tabs ul.tabs li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.2em;
  border-radius: var(--fo-radius-pill);
  border: 1px solid transparent;
  line-height: 1;
}

body .related.products > h2,
body .upsells.products > h2 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body .woocommerce-tabs ul.tabs li.active a {
  background: var(--fo-ink);
  color: #fff;
}

body .checkout h3,
body .woocommerce-checkout h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

/* Footer ------------------------------------------------------------------ */

.footer-widgets,
.footer-widgets.footer {
  background: var(--fo-ink-bg);
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-widgets h1,
.footer-widgets h2,
.footer-widgets h3,
.footer-widgets h4,
.footer-widgets h5,
.footer-widgets h6,
.footer-widgets .wp-block-heading,
.footer-widgets .widget-title {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.footer-widgets a,
.footer-widgets .widget a {
  color: rgba(255, 255, 255, 0.86);
}

.footer-widgets a:hover {
  color: #fff;
}

.footer-widgets p,
.footer-widgets li,
.footer-widgets .widget,
.footer-widgets .widget p {
  color: rgba(255, 255, 255, 0.66);
}

.footer-widgets .widget {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
  color: #fff;
}

.dark p,
.dark li {
  color: rgba(255, 255, 255, 0.72);
}

.absolute-footer,
.absolute-footer.dark {
  background: #0a0a0b;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
}

.absolute-footer a { color: rgba(255, 255, 255, 0.72); }
.absolute-footer a:hover { color: #fff; }

/* Content surfaces -------------------------------------------------------- */

body .entry-content,
body .entry-summary {
  color: var(--fo-ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

body .entry-content > p:first-of-type {
  font-size: 1.12rem;
  color: var(--fo-ink-soft);
}

body .col-inner.box-shadow-1,
body .col-inner.box-shadow-2,
body .col-inner.box-shadow-3 {
  border-radius: var(--fo-radius-lg);
  box-shadow: var(--fo-shadow-1);
}

body .flickity-page-dots .dot {
  background: var(--fo-line-strong);
  opacity: 0.5;
}

body .flickity-page-dots .dot.is-selected {
  background: var(--fo-ink);
  opacity: 1;
}

/* Accessibility ----------------------------------------------------------- */

.screen-reader-text:focus {
  background: var(--fo-surface);
  border-radius: var(--fo-radius-xs);
  box-shadow: var(--fo-shadow-2);
  color: var(--fo-ink);
  clip: auto;
  height: auto;
  left: 12px;
  padding: 12px 16px;
  top: 12px;
  width: auto;
  z-index: 100000;
}

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

}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 849px) {
  .header-inner {
    min-height: 64px;
  }

  body .page-title {
    padding: 44px 0;
  }

  body .product-small .box-text {
    padding: 14px 8px 10px;
  }

  body #secondary .widget {
    padding: 20px;
  }

  .absolute-footer {
    padding: 22px 0;
  }
}

@media (max-width: 549px) {
  body .products .product,
  body .products .product-small,
  body .related.products .product,
  body .upsells.products .product {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  body h1 { font-size: clamp(2rem, 9vw, 3rem); }
  body h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  body div.page-title h1 { font-size: clamp(1.7rem, 7.8vw, 2.4rem); letter-spacing: -0.03em; }

  body .button,
  body button,
  body input[type="submit"] {
    min-height: 44px;
    padding: 0.8em 1.3em;
  }
}
