/* ═══════════════════════════════════════════════
   GLOBALS — design tokens & reset
   woodworkstore.fr / ustolarzy theme
═══════════════════════════════════════════════ */

/* ── Custom properties ─────────────────────── */
:root {

  /* Colours */
  --color-orange: #D4A373;
  --color-text: #2F2B26;
  --color-bg-page: #FDFDFD;
  --color-bg-card: #F8F6F2;
  --color-navs: #4D3B2F;
  --color-brown: #8A6F4D;
  --color-green: #5D704D;
  --color-hover: #B98A5D;
  --color-coffee: #E6DDC7;
  --color-dark-gray: #454545;
  --color-beige: #F5F3EE;
  --color-white: #FFFFFF;

  /* Typography */
  --font-heading: 'EB Garamond', Georgia, serif;
  --font-label: 'Lora', Georgia, serif;
  --font-body: 'Noto Sans', system-ui, sans-serif;
  --font-ui: 'Poppins', system-ui, sans-serif;

  /* Layout */
  --container-max: 1920px;
  --container-pad: clamp(1.25rem, 5vw, 4rem);

  /* Transitions */
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .12);

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;

  /* Z-index scale */
  --z-header: 500;
  --z-canva: 600;
  --z-overlay: 590;
  --z-tooltip: 700;
  --z-modal: 800;

  /* Focus state (centralne zarządzanie focusem) */
  --focus-outline: 2px solid var(--color-orange);
  --focus-offset: 3px;

  /* Layout spacing */
  --spacing-section: clamp(48px, 6vw, 96px);
  --spacing-section-md: clamp(32px, 4vw, 56px);
  --spacing-compact: clamp(16px, 2vw, 32px);
  --spacing-gap: clamp(12px, 1.5vw, 20px);

  /* Overlay colors */
  --overlay-subtle: rgba(0, 0, 0, 0.05);
  --overlay-medium: rgba(0, 0, 0, 0.1);
  --overlay-dark-heavy: rgba(20, 12, 5, 0.65);
  --overlay-dark-light: rgba(20, 12, 5, 0.1);
  --overlay-dark-faint: rgba(20, 12, 5, 0.2);

  /* Visual effects */
  --scale-hover: 1.04;
  --opacity-hover: 0.8;

  /* Alias for accent color */
  --color-accent: var(--color-hover);

  /* Border color (used in cards) */
  --color-border: #E6E0D9;

  /* Header specific */
  --header-height: 75px;
  --header-height-compact: 40px;
  --header-topbar-height: 36px;
  --header-cart-icon-size: 20px;
  --header-logo-height: 36px;
  --header-logo-height-sm: 32px;

  /* Canva sizes */
  --canva-width-left: min(450px; , 90vw);
  --canva-width-right: min(400px, 92vw);
  --canva-max-height-top: 80vh;
  --canva-padding: 1.25rem;
  --canva-transition: .32s cubic-bezier(.4, 0, .2, 1);

  /* Overlay colors for header */
  --overlay-btn-light: rgba(255, 255, 255, 0.12);
  --overlay-btn-light-border: rgba(255, 255, 255, 0.25);
  --overlay-btn-light-border-2: rgba(255, 255, 255, 0.15);
  --overlay-search-medium: rgba(0, 0, 0, 0.15);
  --overlay-dark-medium: rgba(0, 0, 0, 0.1);
  --overlay-dark-heavy: rgba(0, 0, 0, 0.45);
  --overlay-dark-box: rgba(0, 0, 0, .12);
  --overlay-dark-box-right: rgba(0, 0, 0, .1);

  /* Button/Icon sizes */
  --btn-icon-size: 36px;
  --btn-icon-size-sm: 20px;
  --btn-icon-sm-size: 48px;
  --cart-count-size: 18px;
  --search-card-size: 1;

  /* Scale effects */
  --scale-icon: 1.15;
  --scale-cart: 1.05;

  /* Gap/Spacing */
  --gap-header-tight: 0.15rem;
  --gap-header-reduced: 0.5rem;
  --gap-header-normal: 0.85rem;
  --gap-header-relaxed: 1.15rem;
  --gap-search-result: 1rem;

  /* Footer specific spacing */
  --footer-col-padding-desktop: 64px 32px;
  --footer-col-padding-tablet: 40px 24px;
  --footer-col-padding-mobile: 32px 16px;

  /* Footer column widths (desktop) */
  --footer-col-nav-width: 20%;
  --footer-col-info-width: 20%;
  --footer-col-awards-width: 35%;

  /* Carousel */
  --footer-carousel-width: 90%;
  --footer-carousel-width-mobile: 100%;
}

/* ── Box sizing reset ──────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── Base ──────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Offset for fixed header on all pages except Home, Collections Hero and Single Product */
body:not(.home):not(.tax-collections):not(.single-product) .site-main {
  padding-top: calc(var(--header-height) + var(--header-topbar-height));
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 .75rem;
  color: var(--color-navs);
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

h4 {
  font-size: 1.125rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: .875rem;
}

p {
  margin: 0 0 1rem;
}

/* ── Links & interactive ───────────────────── */
a,
button {
  transition: color var(--transition);
}

a {
  color: var(--color-navs);
  text-decoration: none;
}

a:hover {
  color: var(--color-orange);
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

button {
  cursor: pointer;
  font: inherit;
  border: none;
  background: none;
}

/* ── Media elements ────────────────────────── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* ── Lists ─────────────────────────────────── */
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ── Forms ─────────────────────────────────── */
input,
select,
textarea {
  font: inherit;
}

/* ── Utility classes ───────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.screen-reader-text,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  overflow: visible;
  white-space: normal;
}

/* ── Accessibility ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Products Carousel ───────────────────── */
.products-carousel-wrapper {
  position: relative;
  margin: var(--spacing-compact) auto 0;
  max-width: var(--container-max);
  width: 100%;
}

.products-carousel {
  display: flex;
  gap: 20px;
  padding-inline: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.products-carousel::-webkit-scrollbar {
  display: none;
}

.products-carousel__item {
  flex: 0 0 calc(16.666% - 17px);
  min-width: 280px;
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .products-carousel__item {
    flex: 0 0 250px;
    min-width: 250px;
  }
}

/* ── Breadcrumbs ────────────────────────────── */
.site-breadcrumbs {
  margin-bottom: 1rem;
}

.site-breadcrumbs .woocommerce-breadcrumb {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0;
  color: #999;
}

.site-breadcrumbs .woocommerce-breadcrumb a {
  color: #999;
  font-size: 11px;

  transition: color 0.3s;
}

.site-breadcrumbs .woocommerce-breadcrumb a:hover {
  color: var(--color-orange);
}

.site-breadcrumbs--white .woocommerce-breadcrumb,
.site-breadcrumbs--white .woocommerce-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.site-breadcrumbs--white .woocommerce-breadcrumb a:hover {
  color: #fff;
}

/* ── Tag Clouds (Shared) ────────────────────── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag-item a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 12px;
  border: 1px solid var(--color-coffee);
  border-radius: 50px;
  color: #555;
  text-decoration: none;
  transition: all var(--transition);
  background: transparent;
}

.tag-item a:hover {
  background: var(--color-coffee);
  color: var(--color-white);
  border-color: var(--color-coffee);
}