/*
Theme Name: MIROMAX Professional
Theme URI: https://miromax.pl/
Author: MIROMAX
Author URI: https://miromax.pl/
Description: Profesjonalny motyw MIROMAX dla doradztwa, sklepu WooCommerce, projektow AI i realizacji Inteligentnego Domu. Motyw klasyczny, kompatybilny z panelem WordPress, menu, widgetami, WooCommerce i wtyczkami MIROMAX.
Version: 1.0.0
Requires at least: 6.1
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: miromax-professional
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-logo, custom-menu, e-commerce, one-column, two-columns, footer-widgets, block-styles, wide-blocks
*/

:root {
  --miromax-bg: #f5faf7;
  --miromax-surface: #ffffff;
  --miromax-cream: #fbf4e8;
  --miromax-mint: #e8fbf4;
  --miromax-primary: #008763;
  --miromax-primary-dark: #005f49;
  --miromax-secondary: #06142e;
  --miromax-text: #13233b;
  --miromax-muted: #5a6b82;
  --miromax-border: rgba(0, 135, 99, .16);
  --miromax-shadow: 0 20px 50px rgba(6, 20, 46, .08);
  --miromax-radius: 28px;
  --miromax-container: 1180px;
  --miromax-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f7fbf9 0%, #eef8f4 100%);
  color: var(--miromax-text);
  font-family: var(--miromax-font);
  line-height: 1.65;
  font-size: 16px;
}
body.admin-bar .miromax-header { top: 32px; }
a { color: var(--miromax-primary); }
a:hover { color: var(--miromax-primary-dark); }
img { max-width: 100%; height: auto; }
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.miromax-container,
.miromax-main .entry-content > *:not(.alignfull):not(.alignwide),
.miromax-main .woocommerce,
.miromax-main .wp-block-query,
.miromax-main .wp-block-group:not(.alignfull) {
  max-width: var(--miromax-container);
  margin-left: auto;
  margin-right: auto;
}
.miromax-main .alignwide { max-width: calc(var(--miromax-container) + 120px); margin-left: auto; margin-right: auto; }
.miromax-main .alignfull { max-width: none; width: 100%; }

/* Header */
.miromax-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 244, 232, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--miromax-border);
}
.miromax-topbar {
  max-width: var(--miromax-container);
  margin: 0 auto;
  padding: 18px 22px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.miromax-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  color: var(--miromax-secondary);
  font-weight: 900;
  text-decoration: none;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.miromax-brand img { max-height: 58px; width: auto; }
.miromax-brand-text strong { display: block; font-size: 26px; color: var(--miromax-primary); }
.miromax-brand-text span { display: block; font-size: 11px; color: var(--miromax-primary); letter-spacing: .03em; }

.miromax-nav-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex: 1; }
.miromax-primary-menu,
.miromax-primary-menu ul { list-style: none; padding: 0; margin: 0; }
.miromax-primary-menu { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.miromax-primary-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--miromax-secondary);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}
.miromax-primary-menu .current-menu-item > a,
.miromax-primary-menu a:hover,
.miromax-primary-menu a:focus {
  background: rgba(0, 135, 99, .10);
  color: var(--miromax-primary-dark);
}
.miromax-header-actions { display: flex; align-items: center; gap: 10px; }
.miromax-cart-link,
.miromax-audit-link,
.miromax-mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  line-height: 1;
}
.miromax-cart-link { color: var(--miromax-primary-dark); background: #fff; box-shadow: 0 10px 24px rgba(6, 20, 46, .06); }
.miromax-audit-link, .miromax-mobile-toggle { color: #fff; background: var(--miromax-primary); border: 0; }
.miromax-cart-link:hover, .miromax-audit-link:hover, .miromax-mobile-toggle:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(0, 135, 99, .16); }
.miromax-mobile-toggle { display: none; cursor: pointer; font-size: 22px; }

.miromax-searchbar {
  max-width: var(--miromax-container);
  margin: 0 auto;
  padding: 0 22px 16px;
}
.miromax-search-inner {
  background: #fff;
  border: 1px solid rgba(0, 135, 99, .22);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 16px 50px rgba(0, 135, 99, .08);
}
.miromax-search-inner form { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; }
.miromax-search-input {
  flex: 1;
  min-width: 120px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--miromax-text);
  font-size: 15px;
}
.miromax-search-input::placeholder { color: #7c8da3; }
.miromax-search-button,
.miromax-media-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 44px;
  font-weight: 900;
  cursor: pointer;
}
.miromax-search-button { background: var(--miromax-primary); color: #fff; min-width: 110px; }
.miromax-media-button { background: #ecfff8; color: var(--miromax-primary-dark); border: 1px solid rgba(0, 135, 99, .18); }

/* Layout */
.miromax-main { min-height: 58vh; }
.miromax-page-header {
  max-width: var(--miromax-container);
  margin: 0 auto;
  padding: 64px 22px 28px;
}
.miromax-page-title {
  margin: 0 0 12px;
  color: var(--miromax-secondary);
  font-size: clamp(36px, 5vw, 72px);
  line-height: .95;
  letter-spacing: -.055em;
}
.entry-content { padding: 22px; }
.entry-content h1,
.entry-content h2,
.entry-content h3 { color: var(--miromax-secondary); line-height: 1.12; letter-spacing: -.035em; }
.entry-content h2 { margin-top: 48px; font-size: clamp(28px, 3vw, 44px); }
.entry-content h3 { margin-top: 32px; font-size: clamp(22px, 2.1vw, 28px); }
.entry-content p { color: var(--miromax-muted); }
.entry-content table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--miromax-shadow); }
.entry-content th,
.entry-content td { padding: 14px 16px; border-bottom: 1px solid #e8f2ee; text-align: left; }
.entry-content th { color: var(--miromax-secondary); background: #f1fbf7; }
.entry-content .wp-block-button__link,
.miromax-button,
button,
input[type="submit"] {
  border-radius: 999px;
  border: 0;
  background: var(--miromax-primary);
  color: #fff !important;
  padding: 13px 22px;
  font-weight: 900;
  text-decoration: none;
  line-height: 1.2;
}
.entry-content .wp-block-button__link:hover,
.miromax-button:hover,
button:hover,
input[type="submit"]:hover { background: var(--miromax-primary-dark); color: #fff !important; }

.miromax-card,
.miromax-main .wp-block-group.is-style-default,
.miromax-main .wp-block-column {
  border-radius: var(--miromax-radius);
}

/* Front page fallback hero */
.miromax-hero {
  max-width: var(--miromax-container);
  margin: 46px auto 32px;
  padding: 0 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 34px;
  align-items: center;
}
.miromax-hero-copy {
  background: var(--miromax-surface);
  border: 1px solid var(--miromax-border);
  border-radius: 34px;
  padding: clamp(34px, 5vw, 68px);
  box-shadow: var(--miromax-shadow);
}
.miromax-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--miromax-primary); font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.miromax-hero h1 { margin: 14px 0 18px; font-size: clamp(46px, 7vw, 86px); line-height: .93; letter-spacing: -.07em; color: var(--miromax-secondary); }
.miromax-hero p { color: var(--miromax-muted); font-size: 18px; max-width: 620px; }
.miromax-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.miromax-hero-visual {
  background: radial-gradient(circle at 30% 20%, #0d7d61, #06142e 68%);
  min-height: 360px;
  border-radius: 34px;
  padding: 36px;
  box-shadow: var(--miromax-shadow);
  position: relative;
  overflow: hidden;
}
.miromax-hero-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  min-height: 84px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 900;
  transform: rotate(-4deg);
}
.miromax-hero-pill:nth-child(1) { top: 60px; left: 54px; }
.miromax-hero-pill:nth-child(2) { top: 92px; right: 36px; transform: rotate(5deg); }
.miromax-hero-pill:nth-child(3) { left: 92px; bottom: 60px; width: 240px; transform: rotate(0deg); }

.miromax-section { max-width: var(--miromax-container); margin: 0 auto; padding: 44px 22px; }
.miromax-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.miromax-feature { background: #fff; border: 1px solid var(--miromax-border); border-radius: 26px; padding: 28px; box-shadow: 0 14px 38px rgba(6, 20, 46, .05); }
.miromax-feature strong { color: var(--miromax-primary); font-weight: 900; }
.miromax-feature h3 { color: var(--miromax-secondary); margin: 16px 0 10px; font-size: 24px; }
.miromax-feature p { color: var(--miromax-muted); margin: 0; }

/* Footer */
.miromax-site-footer {
  margin-top: 70px;
  background: linear-gradient(135deg, #f5fbf8 0%, #fbf4e8 100%);
  border-top: 1px solid var(--miromax-border);
  padding: 56px 22px 28px;
}
.miromax-footer-grid {
  max-width: var(--miromax-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: clamp(30px, 6vw, 84px);
  align-items: start;
}
.miromax-footer-brand img { max-width: 190px; height: auto; margin-bottom: 16px; }
.miromax-footer-brand-title { font-size: 28px; color: var(--miromax-primary); font-weight: 950; letter-spacing: -.035em; }
.miromax-footer-brand p { margin: 12px 0 18px; color: var(--miromax-muted); max-width: 340px; }
.miromax-footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.miromax-footer-tags span {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ecfff8;
  border: 1px solid rgba(0, 135, 99, .18);
  color: var(--miromax-primary-dark);
  font-size: 13px;
  font-weight: 850;
}
.miromax-footer-column h2,
.miromax-footer-column h3 { margin: 0 0 16px; color: var(--miromax-secondary); font-size: 18px; line-height: 1.2; }
.miromax-footer-menu,
.miromax-footer-menu ul,
.miromax-footer-column ul { list-style: none; padding: 0; margin: 0; }
.miromax-footer-menu li,
.miromax-footer-column li { margin: 0 0 10px; }
.miromax-site-footer a,
.miromax-footer-menu a,
.miromax-footer-column a {
  color: var(--miromax-primary);
  font-weight: 850;
  text-decoration: none;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: inline !important;
}
.miromax-site-footer a:hover,
.miromax-footer-menu a:hover,
.miromax-footer-column a:hover { color: var(--miromax-primary-dark); text-decoration: underline; }
.miromax-footer-bottom {
  max-width: var(--miromax-container);
  margin: 34px auto 0;
  border-top: 1px solid rgba(0, 135, 99, .18);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--miromax-muted);
  font-size: 14px;
  font-weight: 650;
}
.miromax-back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  background: var(--miromax-primary);
  color: #fff !important;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(0, 135, 99, .18);
}

/* Legacy injected footer cleanup: theme-controlled fallback for old MIROMAX Doradca AI output */
.miromax-legacy-hidden { display: none !important; }

/* WooCommerce */
.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--miromax-primary) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
  padding: 13px 20px !important;
}
.woocommerce ul.products li.product {
  background: #fff;
  border: 1px solid var(--miromax-border);
  border-radius: 24px;
  padding: 18px !important;
  box-shadow: 0 14px 38px rgba(6, 20, 46, .05);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--miromax-secondary); font-weight: 900; }

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--miromax-border);
  border-radius: 18px;
  padding: 13px 15px;
  background: #fff;
  color: var(--miromax-text);
  font: inherit;
}
textarea { min-height: 120px; }

@media (max-width: 980px) {
  body.admin-bar .miromax-header { top: 46px; }
  .miromax-topbar { align-items: flex-start; }
  .miromax-mobile-toggle { display: inline-flex; }
  .miromax-nav-wrap { position: relative; flex: 0; }
  .miromax-menu-panel {
    display: none;
    position: absolute;
    right: 0;
    top: 54px;
    width: min(88vw, 360px);
    background: #fff;
    border: 1px solid var(--miromax-border);
    border-radius: 22px;
    box-shadow: var(--miromax-shadow);
    padding: 16px;
  }
  .miromax-menu-panel.is-open { display: block; }
  .miromax-primary-menu { display: block; }
  .miromax-primary-menu li { margin: 2px 0; }
  .miromax-primary-menu a { width: 100%; justify-content: flex-start; }
  .miromax-header-actions { flex-wrap: wrap; }
  .miromax-search-inner { border-radius: 24px; align-items: stretch; }
  .miromax-search-inner form { flex-wrap: wrap; }
  .miromax-search-input { flex-basis: 100%; min-height: 38px; }
  .miromax-hero { grid-template-columns: 1fr; }
  .miromax-grid { grid-template-columns: 1fr; }
  .miromax-footer-grid { grid-template-columns: 1fr; }
  .miromax-footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .miromax-topbar { padding: 14px 16px 8px; }
  .miromax-brand { min-width: 0; }
  .miromax-brand-text strong { font-size: 22px; }
  .miromax-header-actions { display: none; }
  .miromax-searchbar { padding-left: 16px; padding-right: 16px; }
  .miromax-media-button { display: none; }
  .miromax-search-button { min-width: 96px; }
  .miromax-hero-copy { padding: 30px 24px; }
  .miromax-hero-visual { min-height: 260px; }
  .miromax-hero-pill { min-width: 120px; min-height: 64px; font-size: 13px; }
  .entry-content { padding: 16px; }
}

/* ===== AUKCJE - poprawa wielkości czcionek ===== */

body .miromax-auctions-grid,
body .miromax-auctions-list,
body .auction-grid,
body .auction-list,
body .products {
    align-items: start;
}

body .miromax-auction-card,
body .auction-card,
body .products .product {
    max-width: 320px;
}

/* Tytuł aukcji */
body .miromax-auction-card h2,
body .miromax-auction-card h3,
body .auction-card h2,
body .auction-card h3,
body .products .product h2,
body .products .product h3,
body .products .product .woocommerce-loop-product__title {
    font-size: clamp(18px, 1.5vw, 28px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    margin: 14px 0 14px !important;
    word-break: break-word;
}

/* Cena / aktualna oferta */
body .miromax-auction-card .price,
body .miromax-auction-card .amount,
body .auction-card .price,
body .auction-card .amount,
body .products .product .price {
    font-size: 16px !important;
    line-height: 1.3 !important;
    font-weight: 700;
}

/* Link / przycisk */
body .miromax-auction-card a,
body .auction-card a,
body .products .product a {
    font-size: 16px;
}

/* Etykieta statusu */
body .miromax-auction-card .status,
body .auction-card .status,
body .products .product .auction-status {
    font-size: 13px !important;
    line-height: 1.2 !important;
}