/* =============================================
   Theme AI Engine — wygenerowany automatycznie
   Nie edytuj ręcznie — zmiany zostaną nadpisane
   Warstwa 1: Uniwersalna (WooCommerce + typografia)
   ============================================= */

/* ---- A. Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ---- B. CSS Custom Properties ---- */
:root {
  --taie-primary:        #16A34A;
  --taie-primary-dark:   #12873E;
  --taie-primary-light:  #F0FAF4;
  --taie-secondary:      #1E3A8A;
  --taie-accent:         #BBF7D0;
  --taie-bg:             #FFFFFF;
  --taie-surface:        #F8F9FA;
  --taie-surface-alt:    #F3F4F6;
  --taie-text:           #111827;
  --taie-text-secondary: #4B5563;
  --taie-text-muted:     #9CA3AF;
  --taie-border:         #E5E7EB;
  --taie-border-light:   #E5E7EB;
  --taie-success:        #10B981;
  --taie-error:          #EF4444;

  --taie-font-heading:  'Syne', Georgia, serif;
  --taie-font-body:     'DM Sans', system-ui, sans-serif;
  --taie-size-base:     16px;
  --taie-size-sm:       14px;
  --taie-size-xs:       12px;
  --taie-size-h1:       clamp(2.2rem, 5vw, 4rem);
  --taie-size-h2:       clamp(1.6rem, 3vw, 2.8rem);
  --taie-size-h3:       clamp(1.2rem, 2vw, 1.8rem);
  --taie-size-h4:       1.25rem;
  --taie-weight-heading:700;
  --taie-weight-medium: 500;
  --taie-line-height:   1.7;
  --taie-ls-heading:    -0.02em;
  --taie-ls-caps:       0.08em;

  --taie-xs:4px; --taie-sm:8px; --taie-md:16px;
  --taie-lg:32px; --taie-xl:64px; --taie-xxl:120px;

  --taie-r-xs:2px; --taie-r-sm:4px;
  --taie-r-md:8px; --taie-r-lg:16px;
  --taie-r-xl:24px; --taie-r-pill:999px;

  --taie-shadow-xs:0 1px 2px rgba(0,0,0,0.05); --taie-shadow-sm:0 2px 8px rgba(0,0,0,0.06);
  --taie-shadow-md:0 4px 20px rgba(0,0,0,0.08); --taie-shadow-lg:0 8px 40px rgba(0,0,0,0.12);
  --taie-shadow-xl:0 20px 60px rgba(0,0,0,0.15);

  --taie-dur-fast:   150ms;
  --taie-dur-normal: 250ms;
  --taie-dur-slow:   400ms;
  --taie-ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --taie-ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- C. Reset i base ---- */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

body {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
  color: #111827 !important;
  background-color: #FFFFFF !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- D. Typografia — uniwersalna ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', Georgia, serif !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  color: #111827 !important;
}
h1 { font-size: clamp(2.2rem, 5vw, 4rem) !important; }
h2 { font-size: clamp(1.6rem, 3vw, 2.8rem) !important; }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem) !important; }
h4, h5, h6 { font-size: 1.25rem !important; }

p { color: #4B5563; margin-bottom: 1.5em; }

a {
  color: #16A34A !important;
  text-decoration: none;
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover, a:focus { color: #12873E !important; }

strong, b { font-weight: 500; }

/* ---- E. WooCommerce — Karty produktów ---- */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 32px !important;
  padding: 0 !important;
}
.woocommerce ul.products li.product {
  border-radius: 12px !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06) !important;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 250ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden !important;
  background: #F8F9FA !important;
  border: 1px solid #E5E7EB !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  animation: taie-fade-up 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
.woocommerce ul.products li.product:nth-child(2) { animation-delay: 50ms; }
.woocommerce ul.products li.product:nth-child(3) { animation-delay: 100ms; }
.woocommerce ul.products li.product:nth-child(4) { animation-delay: 150ms; }
.woocommerce ul.products li.product:nth-child(n+5) { animation-delay: 200ms; }
.woocommerce ul.products li.product:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
  transform: translateY(-4px) !important;
}
.woocommerce ul.products li.product a img {
  border-radius: 8px !important;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
  display: block;
}
.woocommerce ul.products li.product:hover a img { transform: scale(1.04) !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Syne', Georgia, serif !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  padding: 16px 16px 4px !important;
  letter-spacing: -0.02em !important;
  line-height: 1.3 !important;
}
.woocommerce ul.products li.product .price {
  color: #16A34A !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  padding: 0 16px 16px !important;
  display: block !important;
}
.woocommerce ul.products li.product .price del {
  color: #9CA3AF !important;
  font-weight: 400 !important;
  font-size: 0.9em !important;
  margin-right: 4px !important;
}
.woocommerce ul.products li.product .button {
  margin: 0 16px 16px !important;
  width: calc(100% - 32px) !important;
}

/* ---- F. WooCommerce — Wszystkie przyciski ---- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce-button,
.woocommerce .button.checkout-button,
.woocommerce .checkout-button,
.wc-block-components-button,
.wc-proceed-to-checkout a,
.woocommerce .actions button[type="submit"],
.woocommerce button[name="apply_coupon"],
.woocommerce .return-to-shop a {
  background-color: #16A34A !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 14px 32px !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 8px 30px rgba(22,163,74,0.30) !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce .button.checkout-button:hover,
.wc-proceed-to-checkout a:hover {
  background-color: #12873E !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12) !important;
  color: #FFFFFF !important;
}
.woocommerce a.button:disabled,
.woocommerce button.button:disabled { opacity: 0.55 !important; cursor: not-allowed !important; }

/* ---- G. WooCommerce — Badge, ceny, oceny ---- */
.woocommerce span.onsale {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  border-radius: 4px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.5 !important;
}
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before { color: #F59E0B !important; }
.woocommerce-Price-amount.amount {
  color: #16A34A !important;
  font-weight: 600 !important;
}

/* ---- H. WooCommerce — Pojedynczy produkt ---- */
.woocommerce div.product .product_title {
  font-family: 'Syne', Georgia, serif !important;
  font-size: clamp(1.6rem, 3vw, 2.8rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #111827 !important;
  margin-bottom: 16px !important;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: #16A34A !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
}
.woocommerce div.product .woocommerce-product-details__short-description {
  color: #4B5563 !important;
  line-height: 1.7 !important;
}
.woocommerce div.product form.cart .qty {
  border: 1px solid #E5E7EB !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  color: #111827 !important;
  background: #F8F9FA !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #4B5563 !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: #16A34A !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  border-top: 2px solid #16A34A !important;
  background: #F8F9FA !important;
}

/* ---- I. WooCommerce — Koszyk i kasa ---- */
.woocommerce table.shop_table {
  border: 1px solid #E5E7EB !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
.woocommerce table.shop_table th {
  background: #F3F4F6 !important;
  font-family: 'Syne', Georgia, serif !important;
  font-weight: 500 !important;
  color: #111827 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
  padding: 16px 32px !important;
}
.woocommerce table.shop_table td {
  padding: 16px 32px !important;
  border-top: 1px solid #E5E7EB !important;
  color: #111827 !important;
  vertical-align: middle !important;
}
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review {
  background: #F3F4F6 !important;
  border-radius: 16px !important;
  padding: 32px !important;
  border: 1px solid #E5E7EB !important;
}

/* ---- J. WooCommerce — Formularze ---- */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce-page form .form-row select {
  border: 2px solid #E5E7EB !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 16px !important;
  background: #F8F9FA !important;
  color: #111827 !important;
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce-page form .form-row input.input-text:focus {
  border-color: #16A34A !important;
  box-shadow: 0 0 0 3px #16A34A20 !important;
  outline: none !important;
}
.woocommerce form label,
.woocommerce-page form label {
  font-weight: 500 !important;
  font-size: 14px !important;
  color: #4B5563 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* ---- K. WooCommerce — Widgety boczne ---- */
.widget_price_filter .ui-slider .ui-slider-range { background: #16A34A !important; }
.widget_price_filter .ui-slider .ui-slider-handle {
  background: #16A34A !important;
  border-color: #12873E !important;
}
.widget_price_filter .price_slider_amount .button {
  background: #16A34A !important;
  color: #fff !important;
  border-radius: 8px !important;
}

/* ---- L. WooCommerce Blocks (Gutenberg) ---- */
.wc-block-product-template {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 32px !important;
}
.wc-block-grid__product,
.wc-block-product {
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #F8F9FA !important;
  border: 1px solid #E5E7EB !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06) !important;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 250ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.wc-block-grid__product:hover,
.wc-block-product:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
  transform: translateY(-4px) !important;
}
.wc-block-components-button:not(:disabled) {
  background-color: #16A34A !important;
  color: #FFFFFF !important;
  border-radius: 8px !important;
  border: none !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-weight: 500 !important;
}
.wc-block-components-button:not(:disabled):hover {
  background-color: #12873E !important;
}
.woocommerce-message,
.wc-block-components-notice-banner { border-left-color: #16A34A !important; }
.woocommerce-error { border-left-color: #EF4444 !important; }

/* ---- M. Formularze z wtyczek (CF7, Gravity Forms, Ninja Forms) ---- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.gfield input[type="text"],
.gfield input[type="email"],
.gfield input[type="tel"],
.gfield textarea,
.ninja-forms-field {
  border: 2px solid #E5E7EB !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: 16px !important;
  background: #F8F9FA !important;
  color: #111827 !important;
  width: 100% !important;
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.gfield input:focus,
.gfield textarea:focus {
  border-color: #16A34A !important;
  box-shadow: 0 0 0 3px #16A34A20 !important;
  outline: none !important;
}
.wpcf7 input[type="submit"],
.gform_button,
.ninja-forms-field[type="submit"] {
  background: #16A34A !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 14px 32px !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-weight: 500 !important;
  font-size: 15px !important;
  cursor: pointer !important;
  transition: background 150ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.wpcf7 input[type="submit"]:hover,
.gform_button:hover {
  background: #12873E !important;
  transform: translateY(-1px) !important;
}

/* ---- N. Footer — generyczny ---- */
footer, .site-footer, #footer, #colophon,
[id*="footer"]:not([id*="sub"]),
[class*="site-footer"] {
  background: #111827 !important;
  color: rgba(255,255,255,0.70) !important;
}
footer a, .site-footer a, #footer a,
#colophon a { color: rgba(255,255,255,0.70) !important; }
footer a:hover, .site-footer a:hover,
#footer a:hover, #colophon a:hover { color: #fff !important; }
footer .widget-title, .site-footer .widget-title,
#footer .widget-title {
  color: #fff !important;
  font-family: 'Syne', Georgia, serif !important;
  font-size: 1.25rem !important;
  letter-spacing: -0.02em !important;
}

/* ---- O. Responsywność ---- */
@media (max-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}
@media (max-width: 480px) {
  .woocommerce ul.products { grid-template-columns: 1fr !important; }
  .woocommerce a.button,
  .woocommerce button.button {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ---- P. Animacje wejścia ---- */
@keyframes taie-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Theme AI Engine: Generyczny overlay (motyw nierozpoznany) === */
/* Próbujemy pokryć popularne wzorce HTML dla nagłówka i nawigacji */

/* Nagłówek — szerokie pokrycie */
header, #header, #site-header, .site-header,
#masthead, .masthead, .page-header,
#top, .top-bar, .header-wrap, .header-inner,
[id*="header"]:not([id*="subheader"]),
[class*="site-header"]:not([class*="sub"]) {
  background: #16A34A !important;
}

/* Logo i tytuł witryny */
header .site-title a,
header .logo a,
header .brand a,
#header .site-title a,
#masthead .site-title a,
.site-header .site-title a,
header [class*="logo"] a,
header [class*="brand"] a { color: #fff !important; font-family: 'Syne', Georgia, serif !important; }

header .site-description,
header .site-tagline { color: rgba(255,255,255,0.70) !important; }

/* Linki nawigacji w nagłówku */
header a,
#header a,
#masthead a,
.site-header a,
header .nav-link,
header li a,
header .menu-item > a,
#main-menu a,
#primary-menu a,
.main-menu a {
  color: rgba(255,255,255,0.90) !important;
  font-size: 14px;
  font-weight: 500;
}
header a:hover,
#header a:hover,
#masthead a:hover,
.site-header a:hover,
header li a:hover,
header .menu-item > a:hover { color: #fff !important; }

/* Sub-menus */
header ul ul,
#header ul ul,
.site-header ul ul,
.sub-menu { background: #12873E !important; }

/* Mobilny przełącznik menu */
.menu-toggle,
.nav-toggle,
[class*="menu-toggle"],
[class*="hamburger"] { color: rgba(255,255,255,0.90) !important; border-color: rgba(255,255,255,0.30) !important; }

/* Pasek górny (jeśli istnieje) */
#top-bar, .top-bar, .header-topbar,
[class*="top-bar"], [class*="topbar"] { background: #12873E !important; }