/*
Theme Name: MIROMAX Professional Theme
Theme URI: https://miromax.pl/
Author: MIROMAX
Author URI: https://miromax.pl/
Description: Profesjonalny motyw MIROMAX dla doradztwa, sklepu WooCommerce, aukcji i projektow AI. Wersja 1.3.3 dodaje niezalezny slider produktu MIROMAX: duze zdjecie glowne, miniatury w poziomie oraz awaryjne wyswietlanie galerii bez FlexSlider WooCommerce.
Version: 1.3.3
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: miromax-professional
License: GPL-2.0-or-later
*/

:root {
    --miro-bg: #f4fbf8;
    --miro-bg-soft: #fbf6eb;
    --miro-card: #ffffff;
    --miro-ink: #07142f;
    --miro-muted: #55677f;
    --miro-green: #008763;
    --miro-green-dark: #006f52;
    --miro-green-soft: #e4fbf2;
    --miro-border: #d6eee6;
    --miro-shadow: 0 22px 55px rgba(7, 20, 47, 0.08);
    --miro-radius: 24px;
    --miro-radius-sm: 16px;
    --miro-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--miro-ink);
    background: linear-gradient(180deg, #ffffff 0%, var(--miro-bg) 45%, #fff9ed 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}
body.admin-bar .miromax-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: var(--miro-green); text-decoration: none; }
a:hover { color: var(--miro-green-dark); }

.miromax-container,
.site-main,
.woocommerce.miromax-shop-page,
.miromax-product-container {
    width: min(var(--miro-container), calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

.miromax-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(253, 247, 235, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--miro-border);
}
.miromax-header-inner {
    width: min(var(--miro-container), calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
}
.miromax-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--miro-ink); font-weight: 900; letter-spacing: -0.03em; }
.miromax-brand img { max-height: 58px; width: auto; }
.miromax-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.miromax-brand-name { color: var(--miro-green); font-size: 25px; }
.miromax-brand-tagline { font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }
.miromax-nav { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.miromax-nav ul { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.miromax-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border-radius: 999px; color: var(--miro-ink); font-weight: 800; font-size: 14px; white-space: nowrap; }
.miromax-nav .current-menu-item > a,
.miromax-nav a:hover { background: var(--miro-green-soft); color: var(--miro-green); }
.miromax-cart-link,
.miromax-audit-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; font-weight: 900; white-space: nowrap; }
.miromax-cart-link { padding: 0 22px; background: #fff; color: var(--miro-green); box-shadow: 0 10px 28px rgba(7,20,47,.06); }
.miromax-audit-link { padding: 0 26px; background: var(--miro-green); color: #fff !important; box-shadow: 0 14px 34px rgba(0,135,99,.24); }
.miromax-audit-link:hover { background: var(--miro-green-dark); color:#fff !important; transform: translateY(-1px); }
.miromax-searchbar { width: min(var(--miro-container), calc(100% - 40px)); margin: 0 auto 14px; display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid #bdeade; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 18px 44px rgba(0,135,99,.10); }
.miromax-searchbar input[type="search"] { flex: 1; border: 0; background: transparent; padding: 0 16px; min-height: 42px; outline: none; color: var(--miro-ink); }
.miromax-searchbar button { border: 0; border-radius: 999px; background: var(--miro-green); color: #fff; padding: 0 25px; min-height: 42px; font-weight: 900; cursor: pointer; }
.miromax-searchbar button:hover { background: var(--miro-green-dark); }

.site-main { padding: 56px 0; min-height: 45vh; }
.miromax-page-card { background: rgba(255,255,255,.86); border: 1px solid var(--miro-border); border-radius: var(--miro-radius); box-shadow: var(--miro-shadow); padding: clamp(28px, 5vw, 56px); }
h1, h2, h3, h4 { color: var(--miro-ink); letter-spacing: -0.04em; line-height: 1.08; }
h1 { font-size: clamp(36px, 5vw, 72px); }
h2 { font-size: clamp(28px, 3vw, 46px); }
h3 { font-size: clamp(22px, 2vw, 30px); }

.button,
button,
input[type="submit"],
.wp-element-button,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    border-radius: 999px !important;
    background: var(--miro-green) !important;
    color: #fff !important;
    border: 0 !important;
    font-weight: 900 !important;
    min-height: 44px;
    padding: 12px 24px !important;
    text-decoration: none !important;
    line-height: 1.1 !important;
    box-shadow: 0 12px 28px rgba(0,135,99,.20);
}
.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-element-button:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: var(--miro-green-dark) !important;
    color: #fff !important;
}

/* ================= WooCommerce shop archive ================= */
.woocommerce.miromax-shop-page { padding: 42px 0 72px; }
.miromax-shop-hero {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid var(--miro-border);
    background: radial-gradient(circle at 85% 20%, rgba(0,135,99,.16), transparent 28%), linear-gradient(135deg, #ffffff 0%, #ecfbf5 62%, #fff6e8 100%);
    box-shadow: var(--miro-shadow);
    padding: clamp(30px, 5vw, 64px);
    margin-bottom: 28px;
}
.miromax-shop-eyebrow,
.miromax-single-eyebrow { display: inline-flex; align-items:center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--miro-green-soft); color: var(--miro-green); font-size: 13px; font-weight: 900; margin-bottom: 14px; }
.miromax-shop-hero h1 { max-width: 820px; margin: 0 0 16px; }
.miromax-shop-hero p { max-width: 760px; color: var(--miro-muted); font-size: 18px; margin: 0; }
.miromax-shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 22px 0 24px; padding: 16px 18px; background: rgba(255,255,255,.78); border: 1px solid var(--miro-border); border-radius: 22px; }
.miromax-shop-toolbar .woocommerce-result-count { margin: 0; color: var(--miro-muted); font-weight: 700; }
.miromax-shop-toolbar select { min-height: 42px; border: 1px solid var(--miro-border); border-radius: 999px; padding: 0 14px; background:#fff; color: var(--miro-ink); font-weight: 700; }
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 !important; padding: 0 !important; }
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; clear: none !important; }
.miromax-product-card { position: relative; height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--miro-border); border-radius: 24px; overflow: hidden; box-shadow: 0 18px 44px rgba(7,20,47,.06); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.miromax-product-card:hover { transform: translateY(-4px); box-shadow: 0 26px 62px rgba(7,20,47,.12); border-color: #a4e4d3; }
.miromax-product-card-media { position: relative; aspect-ratio: 1 / 0.82; background: #f0f8f5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.miromax-product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.miromax-product-card:hover .miromax-product-card-media img { transform: scale(1.04); }
.miromax-sale-badge,
.woocommerce span.onsale { position: absolute !important; left: 14px !important; top: 14px !important; right: auto !important; min-height: 0 !important; min-width: 0 !important; padding: 7px 11px !important; border-radius: 999px !important; background: var(--miro-green) !important; color: #fff !important; font-size: 12px !important; font-weight: 900 !important; line-height: 1 !important; z-index: 2; }
.miromax-product-card-body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.miromax-product-category { color: var(--miro-green); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.miromax-product-card h2.woocommerce-loop-product__title { font-size: 19px !important; line-height: 1.18 !important; letter-spacing: -0.03em; margin: 0 0 10px !important; padding: 0 !important; color: var(--miro-ink); }
.miromax-product-card h2.woocommerce-loop-product__title a { color: inherit; }
.miromax-product-card .price { display: block !important; color: var(--miro-green) !important; font-weight: 900 !important; font-size: 18px !important; margin: 8px 0 14px !important; }
.miromax-product-card .price del { opacity: .45; font-weight: 700; }
.miromax-product-card .price ins { text-decoration: none; }
.miromax-product-card-actions { margin-top: auto; display: flex; gap: 10px; align-items: center; }
.miromax-product-card-actions .button { width: 100%; text-align: center; font-size: 14px !important; padding: 12px 15px !important; }
.miromax-empty-shop { background:#fff; border:1px solid var(--miro-border); border-radius:24px; padding:34px; text-align:center; color:var(--miro-muted); box-shadow: var(--miro-shadow); }

/* ================= Single product ================= */
.miromax-single-product { width: min(var(--miro-container), calc(100% - 40px)); margin: 0 auto; padding: 44px 0 74px; }
.miromax-product-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 36px; align-items: start; }
.miromax-product-gallery { background:#fff; border:1px solid var(--miro-border); border-radius: 28px; padding: 18px; box-shadow: var(--miro-shadow); }
.woocommerce div.product div.images { width: 100% !important; float: none !important; margin-bottom: 0 !important; }
.woocommerce div.product div.images img { border-radius: 18px; }
.woocommerce div.product div.images .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-top: 12px !important; }
.woocommerce div.product div.images .flex-control-thumbs li { width: auto !important; float: none !important; }
.woocommerce div.product div.images .flex-control-thumbs img { border: 1px solid var(--miro-border); border-radius: 12px; opacity: .72; }
.woocommerce div.product div.images .flex-control-thumbs img.flex-active,
.woocommerce div.product div.images .flex-control-thumbs img:hover { opacity: 1; border-color: var(--miro-green); }
.miromax-product-summary { background: rgba(255,255,255,.9); border: 1px solid var(--miro-border); border-radius: 28px; padding: clamp(24px, 4vw, 38px); box-shadow: var(--miro-shadow); }
.woocommerce div.product div.summary { width: 100% !important; float: none !important; margin-bottom: 0 !important; }
.miromax-product-summary h1.product_title { font-size: clamp(32px, 4vw, 56px); margin: 0 0 14px; letter-spacing: -0.05em; }
.miromax-product-summary .price { color: var(--miro-green) !important; font-size: clamp(26px, 3vw, 38px) !important; font-weight: 900 !important; margin: 12px 0 18px !important; }
.miromax-product-summary .woocommerce-product-details__short-description { color: var(--miro-muted); font-size: 17px; margin: 18px 0 22px; }
.miromax-product-summary form.cart { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 24px 0 !important; }
.woocommerce .quantity .qty { min-height: 48px; border: 1px solid var(--miro-border); border-radius: 999px; width: 86px; padding: 0 12px; font-weight: 900; text-align: center; }
.miromax-product-summary .single_add_to_cart_button { min-height: 50px; padding: 14px 28px !important; }
.miromax-product-trust { display: grid; gap: 10px; margin-top: 22px; }
.miromax-product-trust span { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 16px; background: var(--miro-green-soft); color: var(--miro-green-dark); font-weight: 800; font-size: 14px; }
.miromax-product-meta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--miro-border); color: var(--miro-muted); font-size: 14px; }
.miromax-product-meta a { font-weight: 800; }
.miromax-product-details { margin-top: 34px; background:#fff; border:1px solid var(--miro-border); border-radius: 28px; box-shadow: var(--miro-shadow); padding: clamp(22px, 4vw, 36px); }
.woocommerce div.product .woocommerce-tabs ul.tabs { display:flex; flex-wrap: wrap; gap: 8px; padding: 0 !important; margin: 0 0 24px !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display:none !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border:0 !important; background: var(--miro-green-soft) !important; border-radius: 999px !important; padding: 0 !important; margin: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display:none !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 12px 18px !important; color: var(--miro-green-dark) !important; font-weight: 900 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--miro-green) !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color:#fff !important; }
.woocommerce-Tabs-panel h2 { font-size: 30px; }
.woocommerce table.shop_attributes { border: 1px solid var(--miro-border); border-radius: 18px; overflow: hidden; }
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td { padding: 12px 16px !important; border-color: var(--miro-border) !important; }
.miromax-related-products { margin-top: 44px; }
.miromax-related-products h2 { margin-bottom: 22px; }

/* Notices, forms */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error { border-top: 0 !important; border-radius: 18px; background: #fff !important; border: 1px solid var(--miro-border); box-shadow: 0 12px 28px rgba(7,20,47,.06); }
.woocommerce-message::before,
.woocommerce-info::before { color: var(--miro-green) !important; }
.woocommerce .woocommerce-breadcrumb { color: var(--miro-muted); font-weight: 700; margin-bottom: 18px; }
.woocommerce .woocommerce-breadcrumb a { color: var(--miro-green); }

/* Footer */
.miromax-footer { background: linear-gradient(135deg, #f4fbf8 0%, #fff7e9 100%); border-top: 1px solid var(--miro-border); padding: 54px 0 26px; }
.miromax-footer-inner { width: min(var(--miro-container), calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 68px; }
.miromax-footer-brand strong { color: var(--miro-green); font-size: 26px; font-weight: 950; letter-spacing:-.04em; }
.miromax-footer-brand p { max-width: 350px; color: var(--miro-muted); }
.miromax-footer-tags { display:flex; flex-wrap: wrap; gap: 8px; }
.miromax-footer-tags span { border:1px solid #bdeade; background: var(--miro-green-soft); color: var(--miro-green); padding: 7px 13px; border-radius: 999px; font-weight: 900; font-size: 13px; }
.miromax-footer h3 { font-size: 18px; margin: 0 0 14px; }
.miromax-footer ul { list-style:none; margin:0; padding:0; }
.miromax-footer li { margin: 0 0 9px; }
.miromax-footer a { color: var(--miro-green); font-weight: 900; background: transparent !important; padding: 0 !important; min-height: 0 !important; box-shadow: none !important; }
.miromax-footer a:hover { color: var(--miro-green-dark); text-decoration: underline; }
.miromax-footer-copy { width: min(var(--miro-container), calc(100% - 40px)); margin: 34px auto 0; border-top:1px solid var(--miro-border); padding-top: 18px; display:flex; justify-content:space-between; gap: 16px; color: var(--miro-muted); font-size: 14px; font-weight: 700; }
.miromax-back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 9990; display:inline-flex; align-items:center; justify-content:center; min-width:112px; height:48px; padding:0 18px; border-radius:999px; background:var(--miro-green); color:#fff !important; font-weight:900; box-shadow: 0 14px 34px rgba(0,135,99,.26); }
.miromax-back-to-top:hover { background: var(--miro-green-dark); color:#fff !important; transform: translateY(-2px); }

/* Hide old accidental footer blocks from legacy MIROMAX plugins if they appear */
.miromax-legacy-footer,
.miromax-footer-old,
.miromax-global-footer,
.miro-old-footer { display: none !important; }

@media (max-width: 1024px) {
    .miromax-header-inner { grid-template-columns: 1fr; justify-items: center; }
    .miromax-nav ul { flex-wrap: wrap; justify-content: center; }
    .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .miromax-product-hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    body.admin-bar .miromax-header { top: 46px; }
    .miromax-container, .site-main, .woocommerce.miromax-shop-page, .miromax-product-container, .miromax-single-product { width: min(100% - 24px, var(--miro-container)); }
    .miromax-searchbar { width: calc(100% - 24px); border-radius: 22px; flex-wrap: wrap; }
    .miromax-searchbar input[type="search"] { flex-basis: 100%; }
    .miromax-searchbar button { flex: 1; }
    .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .miromax-product-card-body { padding: 14px; }
    .miromax-product-card h2.woocommerce-loop-product__title { font-size: 16px !important; }
    .miromax-shop-toolbar { align-items: stretch; }
    .miromax-shop-toolbar form { width: 100%; }
    .miromax-shop-toolbar select { width: 100%; }
    .miromax-footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .miromax-footer-copy { flex-direction: column; }
    .miromax-back-to-top { right: 14px; bottom: 16px; min-width: 96px; height: 44px; font-size: 14px; }
}
@media (max-width: 460px) {
    .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* =========================================================
   MIROMAX 1.3.0 - pelna responsywnosc sklepu i produktu
   ========================================================= */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.miromax-header,
.miromax-searchbar,
.miromax-single-product,
.miromax-shop-page,
.miromax-product-layout,
.miromax-product-hero,
.miromax-product-gallery,
.miromax-product-summary,
.miromax-product-details,
.miromax-related-products {
    min-width: 0;
}

.miromax-header-inner,
.miromax-footer-inner,
.miromax-footer-copy,
.miromax-searchbar,
.miromax-single-product,
.woocommerce.miromax-shop-page,
.site-main {
    max-width: var(--miro-container);
}

/* Produkt: stabilny layout desktopowy, bez pelnoekranowego zdjecia */
.miromax-single-product {
    width: min(var(--miro-container), calc(100% - 40px)) !important;
    max-width: var(--miro-container) !important;
    margin-inline: auto !important;
}

.miromax-product-layout {
    width: 100%;
    max-width: 100%;
}

.miromax-product-hero {
    grid-template-columns: minmax(320px, 520px) minmax(0, 1fr) !important;
    gap: clamp(20px, 3vw, 38px) !important;
    width: 100%;
    max-width: 100%;
}

.miromax-product-gallery {
    width: 100%;
    max-width: 520px;
    align-self: start;
    position: relative;
    overflow: hidden;
}

.woocommerce div.product .miromax-product-gallery div.images,
.woocommerce-page div.product .miromax-product-gallery div.images,
.miromax-product-gallery .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    display: block !important;
}

.miromax-product-gallery .woocommerce-product-gallery__wrapper,
.miromax-product-gallery .woocommerce-product-gallery__image,
.miromax-product-gallery .woocommerce-product-gallery__image a {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    overflow: hidden;
    border-radius: 18px;
}

.miromax-product-gallery .woocommerce-product-gallery__image img,
.woocommerce div.product .miromax-product-gallery div.images img,
.woocommerce-page div.product .miromax-product-gallery div.images img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 560px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    background: #f3faf7;
}

.miromax-product-gallery .flex-viewport {
    max-width: 100% !important;
    border-radius: 18px;
}

.miromax-product-gallery .flex-control-nav,
.woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs {
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce div.product .miromax-product-gallery div.images .woocommerce-product-gallery__trigger {
    top: 16px !important;
    right: 16px !important;
    z-index: 5 !important;
}

.miromax-product-summary {
    width: 100%;
    max-width: 100%;
}

.miromax-product-summary h1.product_title,
.woocommerce div.product .miromax-product-summary .product_title {
    font-size: clamp(28px, 3.2vw, 48px) !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere;
}

.miromax-product-summary .price {
    font-size: clamp(24px, 2.6vw, 34px) !important;
}

/* Karty produktow: rowna siatka i bez rozpychania tytulami */
.woocommerce ul.products {
    width: 100%;
    max-width: 100%;
}

.miromax-product-card h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: clamp(16px, 1.25vw, 20px) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere;
}

/* WooCommerce: tabele i formularze nie moga wychodzic poza ekran */
.woocommerce table,
.woocommerce table.shop_attributes,
.woocommerce-cart-form,
.woocommerce-checkout,
.woocommerce form,
.woocommerce .cart-collaterals,
.woocommerce .woocommerce-tabs {
    max-width: 100%;
}

.woocommerce table.shop_attributes {
    display: block;
    overflow-x: auto;
}

/* Tablet */
@media (max-width: 1100px) {
    .miromax-header-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
    }

    .miromax-header-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .miromax-product-hero {
        grid-template-columns: 1fr !important;
    }

    .miromax-product-gallery {
        max-width: 720px;
        margin-inline: auto;
    }

    .miromax-product-gallery .woocommerce-product-gallery__image img,
    .woocommerce div.product .miromax-product-gallery div.images img,
    .woocommerce-page div.product .miromax-product-gallery div.images img {
        max-height: 520px !important;
    }
}

/* Telefon */
@media (max-width: 760px) {
    .miromax-header {
        position: relative;
        top: auto;
    }

    .miromax-header-inner,
    .miromax-searchbar,
    .miromax-single-product,
    .woocommerce.miromax-shop-page,
    .site-main,
    .miromax-footer-inner,
    .miromax-footer-copy {
        width: calc(100% - 24px) !important;
    }

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

    .miromax-nav,
    .miromax-nav ul {
        width: 100%;
    }

    .miromax-nav ul {
        gap: 6px;
        justify-content: center;
    }

    .miromax-nav a {
        min-height: 38px;
        padding: 0 11px;
        font-size: 13px;
    }

    .miromax-cart-link,
    .miromax-audit-link {
        min-height: 42px;
        padding-inline: 18px;
        font-size: 14px;
    }

    .miromax-searchbar {
        margin-bottom: 10px;
        padding: 8px;
        border-radius: 20px;
    }

    .miromax-searchbar input[type="search"] {
        min-height: 40px;
        padding-inline: 12px;
    }

    .miromax-searchbar button {
        min-height: 40px;
        padding-inline: 18px;
    }

    .miromax-single-product {
        padding: 24px 0 48px;
    }

    .miromax-product-gallery,
    .miromax-product-summary,
    .miromax-product-details {
        border-radius: 20px;
        padding: 14px;
    }

    .miromax-product-gallery .woocommerce-product-gallery__image img,
    .woocommerce div.product .miromax-product-gallery div.images img,
    .woocommerce-page div.product .miromax-product-gallery div.images img {
        max-height: 360px !important;
    }

    .woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .miromax-product-summary h1.product_title,
    .woocommerce div.product .miromax-product-summary .product_title {
        font-size: clamp(24px, 8vw, 34px) !important;
    }

    .miromax-product-summary form.cart {
        flex-direction: column;
        align-items: stretch;
    }

    .miromax-product-summary form.cart .quantity,
    .miromax-product-summary form.cart .single_add_to_cart_button,
    .woocommerce .quantity .qty {
        width: 100% !important;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        width: 100%;
        text-align: center;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .miromax-product-card-media {
        aspect-ratio: 1 / 0.85;
    }
}

/* Male telefony */
@media (max-width: 520px) {
    .miromax-nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .miromax-nav a {
        width: 100%;
    }

    .miromax-header-actions {
        width: 100%;
    }

    .miromax-cart-link,
    .miromax-audit-link {
        flex: 1 1 100%;
    }

    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }

    .miromax-product-gallery .woocommerce-product-gallery__image img,
    .woocommerce div.product .miromax-product-gallery div.images img,
    .woocommerce-page div.product .miromax-product-gallery div.images img {
        max-height: 300px !important;
    }

    .miromax-back-to-top {
        right: 12px;
        bottom: 12px;
        min-width: 88px;
        height: 42px;
        font-size: 13px;
    }
}


/* =========================================================
   MIROMAX 1.3.1 - galeria produktu jako poziomy suwak miniaturek
   ========================================================= */
.miromax-product-gallery .woocommerce-product-gallery {
    position: relative;
}

.miromax-product-gallery .woocommerce-product-gallery__wrapper {
    margin: 0 !important;
}

/* Glowne zdjecie produktu */
.miromax-product-gallery .woocommerce-product-gallery__image:first-child,
.miromax-product-gallery .woocommerce-product-gallery__image:first-child a {
    border-radius: 18px;
    overflow: hidden;
    background: #f3faf7;
}

/* Suwak miniaturek pod zdjeciem glownym */
.miromax-thumbs-slider {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    width: 100%;
    max-width: 100%;
}

.miromax-thumb-arrow {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0 !important;
    border-radius: 999px !important;
    border: 1px solid var(--miro-border) !important;
    background: #ffffff !important;
    color: var(--miro-green) !important;
    box-shadow: 0 8px 22px rgba(7, 20, 47, .08) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

.miromax-thumb-arrow:hover,
.miromax-thumb-arrow:focus {
    background: var(--miro-green) !important;
    color: #ffffff !important;
}

/* Nadpisanie domyslnej listy WooCommerce, ktora robila pionowe miniatury z numerami */
.miromax-product-gallery .flex-control-nav.flex-control-thumbs,
.woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs,
.woocommerce-page div.product .miromax-product-gallery div.images .flex-control-thumbs {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 10px !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 4px 2px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.miromax-product-gallery .flex-control-nav.flex-control-thumbs li,
.woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs li,
.woocommerce-page div.product .miromax-product-gallery div.images .flex-control-thumbs li {
    list-style: none !important;
    flex: 0 0 82px !important;
    width: 82px !important;
    max-width: 82px !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    scroll-snap-align: start;
}

.miromax-product-gallery .flex-control-nav.flex-control-thumbs li::marker,
.woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs li::marker,
.woocommerce-page div.product .miromax-product-gallery div.images .flex-control-thumbs li::marker {
    content: '' !important;
    font-size: 0 !important;
}

.miromax-product-gallery .flex-control-nav.flex-control-thumbs img,
.woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs img,
.woocommerce-page div.product .miromax-product-gallery div.images .flex-control-thumbs img {
    width: 82px !important;
    height: 82px !important;
    max-width: 82px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 14px !important;
    border: 2px solid var(--miro-border) !important;
    background: #f3faf7 !important;
    opacity: .72 !important;
    transition: opacity .18s ease, border-color .18s ease, transform .18s ease;
}

.miromax-product-gallery .flex-control-nav.flex-control-thumbs img.flex-active,
.miromax-product-gallery .flex-control-nav.flex-control-thumbs img:hover,
.woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs img.flex-active,
.woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs img:hover {
    opacity: 1 !important;
    border-color: var(--miro-green) !important;
    transform: translateY(-1px);
}

@media (max-width: 760px) {
    .miromax-thumbs-slider {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 8px;
        margin-top: 12px;
    }

    .miromax-thumb-arrow {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        font-size: 20px !important;
    }

    .miromax-product-gallery .flex-control-nav.flex-control-thumbs li,
    .woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs li,
    .woocommerce-page div.product .miromax-product-gallery div.images .flex-control-thumbs li {
        flex-basis: 68px !important;
        width: 68px !important;
        max-width: 68px !important;
    }

    .miromax-product-gallery .flex-control-nav.flex-control-thumbs img,
    .woocommerce div.product .miromax-product-gallery div.images .flex-control-thumbs img,
    .woocommerce-page div.product .miromax-product-gallery div.images .flex-control-thumbs img {
        width: 68px !important;
        height: 68px !important;
        max-width: 68px !important;
        border-radius: 12px !important;
    }
}

/* =========================================================
   MIROMAX 1.3.2 - wlasna galeria produktu, zdjecie glowne zawsze widoczne u gory
   ========================================================= */
.miromax-custom-gallery {
    width: 100%;
    max-width: 100%;
}

.miromax-main-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 360px;
    max-height: 560px;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #f4fbf8 0%, #fff9ee 100%);
    border: 1px solid var(--miro-border);
    text-decoration: none !important;
}

.miromax-main-product-image,
.miromax-main-image-wrap img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 560px !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 18px !important;
}

.miromax-gallery-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.92);
    color: var(--miro-ink);
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(7, 20, 47, .12);
}

.miromax-custom-thumbs-slider {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.miromax-custom-thumbs {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.miromax-custom-thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    min-width: 84px;
    min-height: 84px;
    padding: 0 !important;
    border: 2px solid var(--miro-border) !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    opacity: .78;
    transition: opacity .18s ease, border-color .18s ease, transform .18s ease;
}

.miromax-custom-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 11px !important;
}

.miromax-custom-thumb.is-active,
.miromax-custom-thumb:hover,
.miromax-custom-thumb:focus {
    opacity: 1;
    border-color: var(--miro-green) !important;
    transform: translateY(-1px);
    outline: none;
}

.miromax-custom-thumb-arrow {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0 !important;
    border-radius: 999px !important;
    border: 1px solid var(--miro-border) !important;
    background: #ffffff !important;
    color: var(--miro-green) !important;
    box-shadow: 0 8px 22px rgba(7, 20, 47, .08) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

.miromax-custom-thumb-arrow:hover,
.miromax-custom-thumb-arrow:focus {
    background: var(--miro-green) !important;
    color: #ffffff !important;
}

/* Ukrycie domyslnych kontrolek WooCommerce, gdy uzywamy galerii MIROMAX */
.miromax-product-gallery .woocommerce-product-gallery,
.miromax-product-gallery .flex-control-nav,
.miromax-product-gallery .woocommerce-product-gallery__trigger {
    max-width: 100%;
}

@media (max-width: 860px) {
    .miromax-main-image-wrap {
        min-height: 300px;
        max-height: 460px;
    }

    .miromax-main-product-image,
    .miromax-main-image-wrap img {
        max-height: 460px !important;
    }
}

@media (max-width: 560px) {
    .miromax-main-image-wrap {
        min-height: 240px;
        max-height: 360px;
        border-radius: 16px;
    }

    .miromax-main-product-image,
    .miromax-main-image-wrap img {
        max-height: 360px !important;
    }

    .miromax-custom-thumbs-slider {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 8px;
    }

    .miromax-custom-thumb-arrow {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        font-size: 20px !important;
    }

    .miromax-custom-thumb {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
        min-width: 68px;
        min-height: 68px;
        border-radius: 12px !important;
    }
}


/* =========================================================
   MIROMAX 1.3.3 - niezalezny slider produktu, bez FlexSlider WooCommerce
   ========================================================= */
.miromax-product-gallery {
    overflow: hidden !important;
}
.miromax-custom-gallery {
    display: block !important;
    width: 100% !important;
}
.miromax-main-image-wrap {
    width: 100% !important;
    min-height: 420px !important;
    height: min(52vw, 520px) !important;
    max-height: 520px !important;
    background: #f6fbf8 !important;
    border: 1px solid var(--miro-border) !important;
    border-radius: 22px !important;
    overflow: hidden !important;
}
.miromax-main-product-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #f6fbf8 !important;
}
.miromax-custom-thumbs-slider {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 14px !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px !important;
    align-items: center !important;
    gap: 10px !important;
}
.miromax-custom-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 4px 2px 12px !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: thin !important;
    max-width: 100% !important;
}
.miromax-custom-thumb {
    flex: 0 0 86px !important;
    width: 86px !important;
    height: 86px !important;
    min-width: 86px !important;
    min-height: 86px !important;
    max-width: 86px !important;
    max-height: 86px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid var(--miro-border) !important;
    border-radius: 15px !important;
    background: #fff !important;
    overflow: hidden !important;
    cursor: pointer !important;
}
.miromax-custom-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
}
.miromax-custom-thumb.is-active {
    border-color: var(--miro-green) !important;
    box-shadow: 0 0 0 3px rgba(0,135,99,.12) !important;
}
.miromax-custom-thumb-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: var(--miro-green) !important;
    border: 1px solid var(--miro-border) !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}
.miromax-custom-thumb-arrow:hover,
.miromax-custom-thumb-arrow:focus {
    background: var(--miro-green) !important;
    color: #ffffff !important;
}
.woocommerce div.product .miromax-product-gallery div.images,
.miromax-product-gallery .woocommerce-product-gallery,
.miromax-product-gallery .flex-viewport,
.miromax-product-gallery .flex-control-nav,
.miromax-product-gallery .woocommerce-product-gallery__wrapper {
    display: none !important;
}

@media (max-width: 900px) {
    .miromax-main-image-wrap {
        min-height: 340px !important;
        height: 56vw !important;
        max-height: 460px !important;
    }
}
@media (max-width: 560px) {
    .miromax-main-image-wrap {
        min-height: 260px !important;
        height: 68vw !important;
        max-height: 340px !important;
        border-radius: 18px !important;
    }
    .miromax-custom-thumbs-slider {
        grid-template-columns: 36px minmax(0, 1fr) 36px !important;
        gap: 8px !important;
    }
    .miromax-custom-thumb-arrow {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        font-size: 20px !important;
    }
    .miromax-custom-thumb {
        flex-basis: 70px !important;
        width: 70px !important;
        height: 70px !important;
        min-width: 70px !important;
        min-height: 70px !important;
    }
}
