/*
Theme Name: MIROMAX Professional Theme
Theme URI: https://miromax.pl/
Author: MIROMAX
Author URI: https://miromax.pl/
Description: Profesjonalny motyw WordPress dla MIROMAX: doradztwo AI, inteligentny dom, sklep WooCommerce, aukcje i uslugi. Czysta stopka, poprawne menu WP, responsywny uklad i kontrolowane style CSS.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
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
*/

:root {
    --mx-green: #008763;
    --mx-green-dark: #006f52;
    --mx-green-soft: #e8fbf4;
    --mx-green-line: #bdebdc;
    --mx-ink: #06142e;
    --mx-text: #40506a;
    --mx-muted: #6b7890;
    --mx-bg: #f4fbf8;
    --mx-cream: #fbf5ea;
    --mx-white: #ffffff;
    --mx-border: rgba(0, 135, 99, 0.16);
    --mx-shadow: 0 22px 58px rgba(6, 20, 46, 0.09);
    --mx-radius: 28px;
    --mx-radius-sm: 16px;
    --mx-container: 1180px;
    --mx-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mx-serif: Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--mx-ink);
    background: linear-gradient(180deg, #f7fcfa 0%, #ffffff 42%, #f5fbf8 100%);
    font-family: var(--mx-font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.admin-bar .miromax-header {
    top: 32px;
}

a {
    color: var(--mx-green);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover,
a:focus {
    color: var(--mx-green-dark);
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

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

.miromax-container {
    width: min(var(--mx-container), calc(100% - 40px));
    margin: 0 auto;
}

/* Header */
.miromax-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(251, 245, 234, 0.94);
    border-bottom: 1px solid var(--mx-border);
    backdrop-filter: blur(16px);
}

.miromax-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
}

.miromax-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--mx-green);
    text-decoration: none;
    min-width: 190px;
}

.miromax-brand img,
.miromax-custom-logo img,
.custom-logo {
    max-height: 58px;
    width: auto;
}

.miromax-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.miromax-brand-name {
    color: var(--mx-green);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.miromax-brand-tagline {
    color: var(--mx-green);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.miromax-main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.miromax-main-nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.miromax-main-nav li {
    margin: 0;
    padding: 0;
}

.miromax-main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    color: var(--mx-ink);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.miromax-main-nav .current-menu-item > a,
.miromax-main-nav .current_page_item > a,
.miromax-main-nav a:hover,
.miromax-main-nav a:focus {
    background: var(--mx-green-soft);
    color: var(--mx-green-dark);
    text-decoration: none;
}

.miromax-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.miromax-pill,
.miromax-button,
.wp-block-button__link,
.wp-element-button,
button[type="submit"],
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--mx-green);
    color: #fff !important;
    font-size: 15px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(0, 135, 99, 0.16);
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.miromax-pill:hover,
.miromax-pill:focus,
.miromax-button:hover,
.miromax-button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.wp-element-button:hover,
.wp-element-button:focus,
button[type="submit"]:hover,
button[type="submit"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
    background: var(--mx-green-dark);
    color: #fff !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.miromax-pill-secondary {
    background: #fff;
    color: var(--mx-green-dark) !important;
    border: 1px solid var(--mx-border);
    box-shadow: 0 10px 24px rgba(6, 20, 46, 0.05);
}

.miromax-pill-secondary:hover,
.miromax-pill-secondary:focus {
    background: var(--mx-green-soft);
    color: var(--mx-green-dark) !important;
}

.miromax-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--mx-green);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
}

/* Search bar */
.miromax-search-wrap {
    padding: 0 0 22px;
}

.miromax-search-form {
    width: min(760px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--mx-green-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 52px rgba(6, 20, 46, 0.08);
}

.miromax-search-form label {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.miromax-search-icon {
    margin-left: 14px;
    color: var(--mx-green);
    font-weight: 900;
}

.miromax-search-form input[type="search"] {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    padding: 0 12px;
    background: transparent;
    color: var(--mx-ink);
    font-size: 16px;
}

.miromax-search-form input::placeholder {
    color: #8290a5;
}

.miromax-search-chip {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--mx-green-line);
    border-radius: 999px;
    background: #effdf8;
    color: var(--mx-green-dark) !important;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.miromax-search-submit {
    min-height: 44px !important;
    padding: 0 25px !important;
    box-shadow: none !important;
}

/* Layout */
.miromax-main {
    min-height: 48vh;
}

.miromax-section {
    padding: 80px 0;
}

.miromax-hero {
    padding: 70px 0 52px;
}

.miromax-hero-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 42px;
    align-items: center;
    padding: 58px;
    border: 1px solid var(--mx-border);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--mx-shadow);
}

.miromax-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid var(--mx-green-line);
    border-radius: 999px;
    background: var(--mx-green-soft);
    color: var(--mx-green-dark);
    font-size: 13px;
    font-weight: 850;
}

.miromax-hero h1,
.miromax-page-title,
.entry-title {
    margin: 0 0 22px;
    color: var(--mx-ink);
    font-size: clamp(40px, 6vw, 76px);
    font-weight: 920;
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.miromax-hero p,
.miromax-lead {
    max-width: 760px;
    margin: 0 0 30px;
    color: var(--mx-text);
    font-size: 19px;
    line-height: 1.7;
}

.miromax-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.miromax-hero-visual {
    min-height: 290px;
    border-radius: 28px;
    background: radial-gradient(circle at 18% 18%, rgba(0, 135, 99, 0.55), transparent 28%), linear-gradient(145deg, #052c29 0%, #071a39 100%);
    position: relative;
    overflow: hidden;
}

.miromax-visual-card {
    position: absolute;
    width: 170px;
    min-height: 96px;
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    transform: rotate(-4deg);
}

.miromax-visual-card:nth-child(1) {
    left: 40px;
    top: 44px;
}

.miromax-visual-card:nth-child(2) {
    right: 34px;
    top: 86px;
    transform: rotate(5deg);
}

.miromax-visual-card:nth-child(3) {
    left: 86px;
    bottom: 42px;
    width: 230px;
    transform: rotate(0deg);
}

.miromax-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.miromax-card,
.miromax-content-card {
    border: 1px solid rgba(6, 20, 46, 0.08);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 40px rgba(6, 20, 46, 0.06);
}

.miromax-card {
    padding: 30px;
}

.miromax-card-number {
    color: var(--mx-green);
    font-size: 14px;
    font-weight: 900;
}

.miromax-card h2,
.miromax-card h3 {
    margin: 18px 0 12px;
    font-size: clamp(22px, 2.2vw, 32px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.miromax-card p {
    margin: 0;
    color: var(--mx-text);
}

.miromax-content-card {
    padding: clamp(28px, 5vw, 58px);
    margin: 48px auto;
    max-width: 980px;
}

.miromax-content-card h1,
.miromax-content-card h2,
.miromax-content-card h3,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
    color: var(--mx-ink);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.entry-content h2 {
    margin-top: 34px;
    font-size: clamp(28px, 3vw, 42px);
}

.entry-content p,
.entry-content li {
    color: var(--mx-text);
    font-size: 17px;
}

.entry-content a:not(.wp-block-button__link):not(.miromax-button) {
    font-weight: 700;
}

.miromax-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.miromax-post-card {
    padding: 28px;
    border: 1px solid rgba(6, 20, 46, 0.08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(6, 20, 46, 0.05);
}

.miromax-post-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.miromax-post-card p {
    color: var(--mx-text);
}

/* Auction and WooCommerce cards */
.miromax-auctions-grid,
.miromax-auctions-list,
.auction-grid,
.auction-list,
.woocommerce ul.products,
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 320px)) !important;
    gap: 24px !important;
    justify-content: start;
    align-items: stretch;
}

.miromax-auction-card,
.auction-card,
.woocommerce ul.products li.product,
ul.products li.product {
    width: auto !important;
    max-width: 320px;
    margin: 0 !important;
    padding: 18px !important;
    border: 1px solid rgba(6, 20, 46, 0.08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(6, 20, 46, 0.07);
    overflow: hidden;
}

.miromax-auction-card img,
.auction-card img,
.woocommerce ul.products li.product img,
ul.products li.product img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin: 0 0 16px !important;
}

.miromax-auction-card h2,
.miromax-auction-card h3,
.auction-card h2,
.auction-card h3,
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3,
.woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title {
    margin: 12px 0 12px !important;
    color: var(--mx-ink);
    font-size: clamp(18px, 1.4vw, 24px) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.035em;
    word-break: break-word;
}

.miromax-auction-card .price,
.auction-card .price,
.woocommerce ul.products li.product .price,
ul.products li.product .price {
    color: var(--mx-green-dark) !important;
    font-size: 15px !important;
    font-weight: 900 !important;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    border-radius: 999px !important;
    background: var(--mx-green) !important;
    color: #fff !important;
    font-weight: 850 !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: var(--mx-green-dark) !important;
    color: #fff !important;
}

/* Footer */
.miromax-footer {
    margin-top: 72px;
    padding: 58px 0 28px;
    border-top: 1px solid var(--mx-border);
    background: linear-gradient(135deg, #f5fbf8 0%, #fbf5ea 100%);
}

.miromax-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 68px;
    align-items: start;
}

.miromax-footer-logo {
    margin-bottom: 18px;
}

.miromax-footer-logo img {
    max-height: 64px;
    width: auto;
}

.miromax-footer-brand-name {
    color: var(--mx-green);
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.miromax-footer p {
    max-width: 360px;
    margin: 0 0 18px;
    color: var(--mx-text);
}

.miromax-footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.miromax-footer-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--mx-green-line);
    border-radius: 999px;
    background: var(--mx-green-soft);
    color: var(--mx-green-dark);
    font-size: 13px;
    font-weight: 850;
}

.miromax-footer h2,
.miromax-footer h3,
.miromax-footer .widget-title {
    margin: 0 0 16px;
    color: var(--mx-ink);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.miromax-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.miromax-footer li {
    margin: 0 0 10px;
    padding: 0;
}

.miromax-footer a,
.miromax-footer .menu a {
    display: inline !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--mx-green) !important;
    font-size: 15px !important;
    font-weight: 850;
    line-height: 1.45 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.miromax-footer a:hover,
.miromax-footer a:focus {
    color: var(--mx-green-dark) !important;
    text-decoration: underline !important;
}

.miromax-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid rgba(0, 135, 99, 0.18);
    color: var(--mx-muted);
    font-size: 14px;
    font-weight: 700;
}

/* Back to top */
.miromax-back-to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 9990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 116px;
    height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--mx-green);
    color: #fff !important;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 14px 34px rgba(0, 135, 99, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.miromax-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.miromax-back-to-top:hover,
.miromax-back-to-top:focus {
    background: var(--mx-green-dark);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
}

/* Avoid overlapping known notes/feedback widgets by keeping our button above left if needed */
body .miromax-back-to-top {
    bottom: 30px;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    border: 1px solid rgba(6, 20, 46, 0.14);
    border-radius: 14px;
    background: #fff;
    color: var(--mx-ink);
    padding: 13px 14px;
    font-size: 16px;
}

textarea {
    min-height: 140px;
}

/* Admin-bar / external notes plugin: do not style its widgets as MIROMAX buttons */
#wpadminbar a,
#wpadminbar button,
.notes-panel a,
.notes-panel button,
[class*="notes"] a,
[class*="notes"] button,
[class*="atarim"] a,
[class*="atarim"] button {
    box-shadow: none;
}

/* Utility */
.miromax-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1080px) {
    .miromax-topbar {
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .miromax-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .miromax-main-nav {
        order: 4;
        width: 100%;
        display: none;
    }

    .miromax-main-nav.is-open {
        display: block;
    }

    .miromax-main-nav ul {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 0 4px;
    }

    .miromax-main-nav a {
        justify-content: flex-start;
        width: 100%;
        min-height: 44px;
        padding: 0 14px;
    }

    .miromax-header-actions {
        margin-left: auto;
    }

    .miromax-hero-card {
        grid-template-columns: 1fr;
        padding: 38px;
    }

    .miromax-grid {
        grid-template-columns: 1fr;
    }
}

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

@media (max-width: 720px) {
    .miromax-container {
        width: min(100% - 28px, var(--mx-container));
    }

    .miromax-topbar {
        gap: 12px;
    }

    .miromax-brand {
        min-width: 0;
    }

    .miromax-brand-name {
        font-size: 23px;
    }

    .miromax-header-actions .miromax-pill-secondary,
    .miromax-header-actions .miromax-pill {
        display: none;
    }

    .miromax-search-form {
        border-radius: 24px;
        flex-wrap: wrap;
    }

    .miromax-search-form label {
        flex-basis: 100%;
    }

    .miromax-search-chip {
        flex: 1;
    }

    .miromax-search-submit {
        flex: 1;
    }

    .miromax-hero {
        padding: 44px 0 34px;
    }

    .miromax-hero-card {
        padding: 26px;
        border-radius: 26px;
    }

    .miromax-hero h1,
    .miromax-page-title,
    .entry-title {
        font-size: clamp(34px, 12vw, 52px);
        letter-spacing: -0.055em;
    }

    .miromax-hero p,
    .miromax-lead {
        font-size: 17px;
    }

    .miromax-hero-visual {
        min-height: 220px;
    }

    .miromax-visual-card {
        width: 138px;
        min-height: 76px;
        padding: 14px;
        font-size: 14px;
    }

    .miromax-visual-card:nth-child(3) {
        width: 178px;
        left: 40px;
    }

    .miromax-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .miromax-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .miromax-back-to-top {
        right: 16px;
        bottom: 18px;
        min-width: 98px;
        height: 44px;
        padding: 0 16px;
        font-size: 14px;
    }

    .miromax-auctions-grid,
    .miromax-auctions-list,
    .auction-grid,
    .auction-list,
    .woocommerce ul.products,
    ul.products {
        grid-template-columns: 1fr !important;
    }

    .miromax-auction-card,
    .auction-card,
    .woocommerce ul.products li.product,
    ul.products li.product {
        max-width: 100%;
    }
}
