/*
Theme Name: Metalowy
Theme URI: https://metalowypanel.pl
Description: Autorski motyw sklepu metalowypanel.pl - klasyczne szablony PHP, WooCommerce, wizualizator ogrodzeń.
Author: Metalowy
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: metalowy
*/

/*
 * Te same tokeny kolorów/fontów co w widgecie wizualizatora
 * (frontend/new_visualization/src/embed.css) - jeden spójny system designu.
 */
:root {
    --mv-color-orange: #ffd460;
    --mv-color-black: #313144;
    --mv-color-black-secondary: #303030;
    --mv-color-text: #1e1e1e;
    --mv-font-display: "Bakbak One", sans-serif;
    --mv-font-heading: "Poppins", sans-serif;
    --mv-font-body: "Inter", sans-serif;
}

body {
    margin: 0;
    font-family: var(--mv-font-body);
    color: var(--mv-color-text);
    overflow-x: hidden;
}

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

/* Motyw nie korzysta z theme.json, więc linki w blokach (m.in. nazwy
   produktów WooCommerce) dostałyby domyślny styl przeglądarki - niebieski
   z podkreśleniem. Ustawiamy neutralny wygląd jak na produkcji; treść
   redakcyjna (.mv-prose a) nadpisuje to własnym, niebieskim stylem. */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------- Pływający przycisk do wizualizatora ---------- */
.mv-floating-cta {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--mv-color-orange);
    color: var(--mv-color-text);
    font-family: var(--mv-font-heading);
    font-weight: 700;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .mv-floating-cta span {
        display: none;
    }
}

/* ---------- Stopka ---------- */
.mv-footer {
    position: relative;
    border-top: 1px solid #e2e2e2;
    padding-top: 40px;
    padding-bottom: 40px;
    box-shadow: 0 -3px 18.6px rgba(0, 0, 0, 0.07);
    font-size: 14px;
    color: var(--mv-color-text);
    box-sizing: border-box;
}

.mv-footer__inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.mv-footer__bg {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
}

.mv-footer__bg svg {
    width: 100%;
    height: auto;
}

.mv-footer__columns {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    letter-spacing: 0.13em;
}

@media (min-width: 768px) {
    .mv-footer__columns {
        flex-direction: row;
        gap: 8px;
    }
}

.mv-footer__col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mv-footer__heading {
    margin: 0 0 24px;
    font-family: var(--mv-font-heading);
    font-size: 14px;
    font-weight: 700;
}

.mv-footer__nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mv-footer__nav li {
    margin-bottom: 12px;
}

.mv-footer__nav a {
    color: var(--mv-color-text);
    text-decoration: none;
}

.mv-footer__nav a:hover {
    text-decoration: underline;
}

.mv-footer__col--brand {
    font-size: 18px;
}

.mv-footer__brand-name {
    margin: 0 0 12px;
    font-weight: 700;
}

.mv-footer__brand-name-light {
    color: #696969;
}

.mv-footer__address {
    margin: 0 0 20px;
    font-size: 14px;
}

.mv-footer__contact {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
}

.mv-footer__eu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--mv-color-text);
    text-decoration: none;
}

.mv-footer__eu img {
    width: 33px;
    height: 22px;
}

.mv-footer__legal {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #444;
}

/* ---------- Strony treściowe (szablon page-tresc) ----------
 * Odtwarza typografię i szerokość kontenera z produkcji
 * (frontend/frontend/src/views/*): kontener max-w-4xl = 896px,
 * tekst bazowy 16px o normalnej grubości, wyjustowany.
 * Motyw nadrzędny (Twenty Twenty-Five) domyślnie daje 645px, 1.38rem
 * i font-weight 300 - stąd wszystkie nadpisania poniżej.
 */
.mv-content-page {
    padding-top: 40px;
    padding-bottom: 40px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: normal;
}

/* Kontener treści: max-w-4xl (896px) z produkcji zamiast 645px z motywu
   nadrzędnego. Szerokość ustawiona tutaj, a nie w układzie bloku, bo
   szablon jest klasycznym plikiem PHP (page-tresc.php). */
.mv-content-page__inner {
    max-width: 896px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

.mv-prose p,
.mv-prose li {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: normal;
    text-align: justify;
}

/* FAQ na produkcji jest wyrównane do lewej, nie justowane. */
.mv-prose .mv-align-left p,
.mv-prose .mv-align-left li {
    text-align: left;
}

.mv-prose h1 {
    /* text-3xl = 1.875rem, wyśrodkowany, jak na produkcji */
    font-size: 1.875rem;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
    letter-spacing: normal;
    margin-bottom: 32px;
}

.mv-prose h2 {
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: normal;
    margin-top: 40px;
    margin-bottom: 16px;
}

.mv-prose h3 {
    /* text-lg = 1.125rem, font-semibold */
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: normal;
    margin-top: 28px;
    margin-bottom: 12px;
}

/* Fragmenty nazwy marki pisane cienką czcionką ("metalowy" + bold "panel.pl"),
   tak jak className="font-light" w komponentach produkcyjnych. */
.mv-prose .mv-light {
    font-weight: 400;
}

.mv-prose ul,
.mv-prose ol {
    padding-left: 2.5rem;
    margin-top: 8px;
    margin-bottom: 8px;
}

.mv-prose ul {
    list-style: disc;
}

.mv-prose ol {
    list-style: decimal;
}

.mv-prose ul ul {
    list-style: circle;
}

.mv-prose li {
    margin-bottom: 8px;
}

.mv-prose p {
    margin-top: 0;
    margin-bottom: 12px;
}

.mv-prose a {
    color: #2563eb;
    text-decoration: underline;
}

/* Harmonijka FAQ - wygląd pytań jak na produkcji (szare pole, kursor,
   rozwijane po kliknięciu). */
.mv-prose .mv-faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.mv-prose .mv-faq-item > summary {
    cursor: pointer;
    background: #f9fafb;
    padding: 16px 24px;
    font-size: 1.125rem;
    font-weight: 600;
    list-style: none;
    transition: background-color 0.2s ease;
}

.mv-prose .mv-faq-item > summary::-webkit-details-marker {
    display: none;
}

.mv-prose .mv-faq-item > summary::after {
    content: "+";
    float: right;
    font-size: 1.5rem;
    line-height: 1;
    color: #4b5563;
}

.mv-prose .mv-faq-item[open] > summary::after {
    content: "−";
}

.mv-prose .mv-faq-item > summary:hover {
    background: #f3f4f6;
}

.mv-prose .mv-faq-item > :not(summary) {
    padding: 0 24px;
}

.mv-prose .mv-faq-item > p {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    padding-bottom: 16px;
    margin-bottom: 0;
}

/* =========================================================================
   Nagłówek
   ========================================================================= */

.mv-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 12px 20px;
    background: #fff;
    color: var(--mv-color-text);
}

.mv-skip-link:focus {
    left: 0;
}

.mv-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mv-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    box-sizing: border-box;
}

.mv-header__logo {
    flex: none;
    display: block;
    line-height: 0;
    text-decoration: none;
}

.mv-header__logo svg {
    display: block;
    width: 186px;
    max-width: 100%;
    height: auto;
}

/* ---------- Menu główne ---------- */
.mv-header__nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.mv-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mv-menu > li {
    position: relative;
    margin: 0;
}

.mv-menu a {
    font-family: var(--mv-font-heading);
    font-size: 15px;
    color: var(--mv-color-text);
    text-decoration: none;
    white-space: nowrap;
}

.mv-menu > li > a:hover {
    text-decoration: underline;
}

/* Przycisk rozwijania podmenu (dokładany przez navigation.js) */
.mv-menu__toggle {
    border: 0;
    background: transparent;
    padding: 0 0 0 4px;
    font-size: 12px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}

.mv-menu .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 60;
    min-width: 230px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(48, 48, 48, 0.15);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
}

/* Podmenu odsunięte jest od pozycji menu o 10 px, a ta przerwa nie należy do
   żadnego elementu - zjeżdżając przez nią myszą traciło się :hover na <li>
   i lista znikała, zanim dało się w nią wejść. Przezroczysty mostek wewnątrz
   podmenu domyka obszar najechania i nie zmienia wyglądu. */
.mv-menu .sub-menu::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 10px;
}

.mv-menu > li:hover > .sub-menu,
.mv-menu > li:focus-within > .sub-menu,
.mv-menu > li.is-open > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.mv-menu .sub-menu a {
    display: block;
    padding: 9px 16px;
    white-space: normal;
}

.mv-menu .sub-menu a:hover {
    background: #f9fafb;
}

/* ---------- Ikony konta i koszyka ---------- */
.mv-header__actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 14px;
}

.mv-header__action {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--mv-color-text);
    text-decoration: none;
}

.mv-header__action svg {
    width: 24px;
    height: 24px;
}

.mv-header__cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--mv-color-orange);
    font-family: var(--mv-font-heading);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

.mv-header__cart-count.is-empty {
    display: none;
}

/* ---------- Przełącznik menu (mobile) ---------- */
.mv-header__toggle {
    display: none;
    flex: none;
    margin-left: auto;
    padding: 8px;
    border: 1px solid rgba(48, 48, 48, 0.25);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.mv-header__toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px 0;
    background: var(--mv-color-text);
}

@media (max-width: 900px) {
    .mv-header__inner {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .mv-header__toggle {
        display: block;
        order: 2;
    }

    .mv-header__actions {
        order: 3;
        margin-left: 12px;
    }

    .mv-header__nav {
        order: 4;
        flex-basis: 100%;
        display: none;
        padding-top: 12px;
    }

    .mv-header--open .mv-header__nav {
        display: block;
    }

    .mv-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .mv-menu > li > a {
        display: inline-block;
        padding: 8px 0;
    }

    .mv-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        border: 0;
        box-shadow: none;
        padding: 0 0 6px 16px;
        display: none;
    }

    .mv-menu > li.is-open > .sub-menu {
        display: block;
    }
}

/* =========================================================================
   Szkielet treści
   ========================================================================= */

.mv-main {
    display: block;
    min-height: 45vh;
}

.mv-page-title {
    margin: 0 0 24px;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.25;
}

.mv-entry {
    margin-bottom: 40px;
}

.mv-entry__title {
    font-size: 1.35rem;
    margin: 0 0 8px;
}

.mv-content-page__inner--wide {
    max-width: 1200px;
}

.mv-btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: var(--mv-color-orange);
    font-family: var(--mv-font-heading);
    font-weight: 700;
    color: var(--mv-color-text);
    text-decoration: none;
}

.mv-404 {
    text-align: center;
}

/* WooCommerce renderuje własne szablony wewnątrz tego kontenera. */
.mv-shop {
    display: block;
}

/* =========================================================================
   Strona główna
   Wartości (rozmiary, gradienty, kolory) przeniesione 1:1 z komponentów
   produkcyjnych: views/home/* oraz layouts/GradientOverlay.tsx
   ========================================================================= */

.mv-wrap {
    max-width: 1200px;   /* --breakpoint-lg */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ---------- Hero ---------- */
.mv-hero {
    position: relative;
    height: 500px;
    width: 100%;
    overflow: hidden;
    background-size: cover;
    background-position: bottom center;
}

.mv-hero__overlay {
    position: absolute;
    inset: 0;
    display: block;
}

.mv-hero__overlay--primary {
    background: radial-gradient(circle at 80%, #CABBA600 0%, #4C79ACA1 100%);
}

.mv-hero__overlay--secondary {
    background: radial-gradient(circle at 90%, #FFA82D 0%, #003363 100%);
    opacity: 0.14;
}

/* Boczny panel: 60% wysokości sekcji, wyśrodkowany w pionie, wysunięty
   od lewej krawędzi ekranu. */
.mv-hero__panel {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 60%;
    width: 90%;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 8px;
    text-decoration: none;
    transition: width 0.3s ease-in-out;
}

.mv-hero__panel-bg {
    position: absolute;
    inset: 0;
    display: block;
    background: linear-gradient(to right, #3D444A24 0%, #7A8594CF 33%);
}

.mv-hero__content {
    position: absolute;
    top: 0;
    right: 20px;
    bottom: 10px;
    left: 20px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: #fff;
    letter-spacing: 0.03em;
    transition: letter-spacing 0.3s ease-in-out;
}

.mv-hero__title {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding-right: 20px;
    font-family: var(--mv-font-display);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.15;
}

.mv-hero__title-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.mv-hero__icon {
    flex: none;
    width: 40px;
    height: 40px;
}

/* Ikona linijki z ołówkiem jest na produkcji przemalowana na żółto. */
.mv-hero__icon path {
    fill: #FFDE84 !important;
}

.mv-hero__cta {
    flex: 1;
    max-width: 240px;
    padding: 10px 20px;
    border: 1px solid #FFEFCE;
    border-radius: 8px;
    background: var(--mv-color-orange);
    font-family: var(--mv-font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    color: #363636;
    transition: transform 0.3s ease-in-out;
}

.mv-hero__panel:hover .mv-hero__cta {
    transform: scale(1.05);
}

.mv-hero__subtitle {
    width: 100%;
    margin: 16px 0 0;
    padding-right: 20px;
    font-family: var(--mv-font-body);
    font-size: 16px;
    text-align: justify;
    letter-spacing: 0.03em;
    color: #fff;
}

.mv-hero__bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 10px;
    display: block;
    background: linear-gradient(to left, #FFD460 0%, #FFD46000 51%);
}

.mv-hero__panel:hover .mv-hero__bar {
    background: linear-gradient(to left, #FFD460 63%, #FFD46000 100%);
}

@media (min-width: 768px) {
    .mv-hero__panel {
        width: 80%;
    }

    .mv-hero__panel:hover {
        width: 81%;
    }

    .mv-hero__title {
        font-size: 50px;
    }

    .mv-hero__icon {
        width: 56px;
        height: 56px;
    }

    .mv-hero__cta {
        font-size: 14px;
    }

    .mv-hero__subtitle {
        font-size: 20px;
    }
}

@media (min-width: 1200px) {
    .mv-hero__panel {
        width: 50%;
    }

    .mv-hero__panel:hover {
        width: 51%;
    }

    /* Treść wyrównana do lewej krawędzi kontenera 1200px, a nie do panelu. */
    .mv-hero__content {
        left: calc((100vw - 1200px) / 2);
    }
}

/* ---------- Tło sekcji poniżej hero ---------- */
.mv-home {
    position: relative;
    background: radial-gradient(circle at 50% 0%, #F6F6F6 0%, #F6F6F6 70%, #C5CACD 100%);
}

.mv-home__spacer {
    height: 40px;
}

/* ---------- Kategorie ---------- */
.mv-categories__head {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 75px;
    padding-bottom: 59px;
}

.mv-section__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--mv-color-black-secondary);
}

.mv-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .mv-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.mv-cards li {
    margin: 0;
}

.mv-card {
    position: relative;
    display: block;
    width: 318px;
    height: 281px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s ease-in-out;
}

.mv-card:hover {
    transform: scale(1.05);
}

.mv-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mv-card__shade {
    position: absolute;
    inset: 0;
    display: block;
    background: #00000033;
}

.mv-card__title {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 49px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-bottom: 1px solid #FFFFFF3A;
    background: #8B96ACD6;
    box-sizing: border-box;
    font-family: var(--mv-font-heading);
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #fff;
}

.mv-card__button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 45%;
    padding: 4px 12px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #4A4A4A80;
    box-sizing: border-box;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.mv-card:hover .mv-card__button {
    width: 50%;
    background: #FFFFFF66;
}

.mv-card__button-label {
    font-family: var(--mv-font-heading);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.mv-card__arrow {
    flex: none;
    transition: transform 0.3s ease-in-out;
}

.mv-card:hover .mv-card__arrow {
    transform: translateX(12px);
}

/* ---------- Zaufaj naszemu doświadczeniu ---------- */
.mv-trust .mv-wrap {
    padding-bottom: 80px;
}

.mv-trust__head {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 60px 0;
}

.mv-trust__tag {
    flex: none;
}

.mv-trust__headings {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mv-trust__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.mv-trust__subtitle {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 300;
    text-align: center;
}

.mv-trust__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 4px 16px;
    border: 1px solid rgba(48, 48, 48, 0.35);
    border-radius: 8px;
    background: var(--mv-color-orange);
    font-family: var(--mv-font-heading);
    font-size: 13px;
    letter-spacing: 0.03em;
    color: var(--mv-color-text);
    text-decoration: none;
    transition: background-color 0.3s ease-in-out;
}

.mv-trust__phone:hover {
    background: #FFE9AE;
    text-decoration: none;
}

.mv-trust__phone-icon {
    height: 18px;
    width: auto;
}

@media (max-width: 700px) {
    .mv-trust__tag {
        display: none;
    }
}

/* ---------- Karuzela wyróżników ---------- */
.mv-features {
    border: 1px solid #0000002E;
    border-radius: 8px;
}

.mv-features__inner {
    margin: 2px;
    border-radius: 6px;
    background: #fff;
    padding: 30px 0;
}

.mv-features__viewport {
    overflow: hidden;
}

.mv-features__track {
    display: flex;
    will-change: transform;
}

.mv-feature {
    display: flex;
    gap: 20px;
    padding: 0 16px;
    box-sizing: border-box;
    flex: 0 0 100%;
    min-width: 100%;
}

@media (min-width: 760px) {
    .mv-feature {
        flex-basis: 50%;
        min-width: 50%;
    }
}

@media (min-width: 1000px) {
    .mv-feature {
        flex-basis: 33.3333%;
        min-width: 33.3333%;
    }
}

.mv-feature__icon {
    flex: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    background: var(--mv-color-orange);
    box-sizing: border-box;
}

.mv-feature__icon svg {
    max-width: 100%;
    max-height: 100%;
}

.mv-feature__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mv-feature__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.mv-feature__desc {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.45;
}

@media (min-width: 1024px) {
    .mv-feature__title {
        font-size: 1.25rem;
    }

    .mv-feature__desc {
        font-size: 1.125rem;
    }
}

/* =========================================================================
   Karta produktu
   ========================================================================= */

/* Szczegóły wymiarowe w ramce nad przyciskiem - układ jak na produkcji. */
.mv-specs {
    list-style: none;
    margin: 20px 0;
    padding: 18px 22px;
    border: 1px solid rgba(48, 48, 48, 0.25);
    border-radius: 10px;
    background: #fff;
}

.mv-specs__row {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.5;
}

.mv-specs__row:last-child {
    margin-bottom: 0;
}

.mv-specs__value {
    font-weight: 700;
}

.mv-price__per-meter {
    font-size: 0.8em;
    color: #4b5563;
}

.mv-price__unit {
    font-size: 0.8em;
}

.mv-delivery-note {
    margin: 18px 0 0;
    font-weight: 700;
    text-align: center;
}

/* Przyciski WooCommerce w kolorystyce marki - domyślny fiolet motywu
   sklepu odstaje od reszty serwisu. */
.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt {
    background: var(--mv-color-orange);
    color: var(--mv-color-text);
    border: 1px solid #303030;
    border-radius: 8px;
    font-family: var(--mv-font-heading);
    font-weight: 700;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce input.button.alt:hover {
    background: #FFE9AE;
    color: var(--mv-color-text);
}

/* =========================================================================
   Kategoria jako rozdzielnik (taxonomy-product_cat.php)
   ========================================================================= */

.mv-cat-hero {
    /* Baner idzie na całą szerokość okna, poza kontener treści. */
    width: 100%;
    max-height: 360px;
    overflow: hidden;
    line-height: 0;
}

.mv-cat-hero__image {
    width: 100%;
    height: 360px;
    object-fit: cover;
}

.mv-cat-hub {
    padding: 56px 0 72px;
    background: #F7F7F7;
}

.mv-cat-hub__section + .mv-cat-hub__section {
    margin-top: 64px;
}

.mv-cat-hub__title {
    margin: 0 0 10px;
    font-family: var(--mv-font-heading);
    font-size: 34px;
    font-weight: 700;
    text-align: center;
}

.mv-cat-hub__subtitle {
    margin: 0 0 40px;
    font-size: 20px;
    text-align: center;
}

.mv-cat-hub__heading {
    margin: 0 0 32px;
    font-family: var(--mv-font-heading);
    font-size: 30px;
    font-weight: 700;
    text-align: center;
}

.mv-cat-hub__heading--left {
    text-align: left;
}

.mv-wrap--narrow {
    max-width: 960px;
    margin: 0 auto;
}

/* Zalety: dwie kolumny na desktopie, jedna na mobile - jak na produkcji. */
.mv-cat-hub__benefits {
    columns: 2;
    column-gap: 48px;
    margin: 0;
    padding-left: 22px;
    font-size: 18px;
    line-height: 1.7;
}

.mv-cat-hub__benefits li {
    break-inside: avoid;
    margin-bottom: 6px;
}

.mv-cat-hub__cta-wrap {
    margin: 32px 0 0;
}

.mv-cat-hub__cta {
    display: inline-block;
    padding: 12px 26px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: var(--mv-color-orange);
    color: var(--mv-color-text);
    font-family: var(--mv-font-heading);
    font-weight: 700;
    text-decoration: none;
}

.mv-cat-hub__cta:hover {
    background: #FFE9AE;
}

@media (max-width: 768px) {
    .mv-cat-hub__benefits {
        columns: 1;
    }

    .mv-cat-hero__image {
        height: 220px;
    }
}

/* Kafle rozdzielnika są węższe niż na stronie głównej - dzięki temu cztery
   motywy mieszczą się w jednym rzędzie, tak jak na produkcji. */
.mv-cat-hub__cards .mv-card {
    width: 240px;
    height: 256px;
}

/* =========================================================================
   Kategoria bez produktów - zaproszenie do kontaktu
   ========================================================================= */

.mv-cat-landing {
    padding: 90px 0 130px;
    text-align: center;
}

.mv-cat-landing__title {
    margin: 0 0 28px;
    font-family: var(--mv-font-heading);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.35;
}

.mv-cat-landing__text {
    margin: 0;
    font-size: 20px;
    line-height: 1.6;
}

.mv-cat-landing__contact {
    margin-top: 90px;
}

.mv-cat-landing__intro {
    margin: 0 0 18px;
    font-size: 18px;
}

.mv-cat-landing__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 18px;
}

.mv-cat-landing__row a {
    text-decoration: underline;
}

.mv-cat-landing__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .mv-cat-landing {
        padding: 56px 0 80px;
    }

    .mv-cat-landing__contact {
        margin-top: 56px;
    }

    .mv-cat-landing__title {
        font-size: 24px;
    }
}

/* =========================================================================
   Kafel wzoru panelu w listingu kategorii
   ========================================================================= */

/* Treść wyłącznie dla czytników ekranu - kafel wzoru nie ma widocznej nazwy,
   więc bez tego odnośnik byłby dla nich pusty. */
.mv-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.woocommerce ul.products li.product.mv-pattern-tile {
    text-align: center;
}

.woocommerce ul.products li.product.mv-pattern-tile a {
    display: block;
    text-decoration: none;
}

/* Wzór stoi na jasnym tle z delikatnym odbiciem - jak na produkcji. */
.woocommerce ul.products li.product.mv-pattern-tile img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin: 0;
    padding: 26px;
    border-radius: 10px;
    background: linear-gradient(
        180deg,
        #DCDCDC 0%,
        #EDEDED 44%,
        #FFFFFF 51%,
        #E2E2E2 58%,
        #D6D6D6 100%
    );
    box-sizing: border-box;
    transition: transform 0.25s ease-in-out;
}

.woocommerce ul.products li.product.mv-pattern-tile:hover img {
    transform: scale(1.03);
}

/* =========================================================================
   Karta produktu - galeria i nagłówek
   ========================================================================= */

.mv-gallery__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border: 1px solid rgba(48, 48, 48, 0.18);
    border-radius: 12px;
    background: #fff;
}

.mv-gallery__image {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
}

.mv-gallery__strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
}

.mv-gallery__thumbs {
    display: flex;
    flex: 1;
    gap: 10px;
    margin: 0;
    padding: 2px;
    list-style: none;
    overflow-x: auto;
    scroll-behavior: smooth;
    /* Pasek przewijamy strzałkami - własny scrollbar tylko by rozpraszał. */
    scrollbar-width: none;
}

.mv-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.mv-gallery__thumbs li {
    flex: 0 0 auto;
    margin: 0;
}

.mv-gallery__thumb {
    display: block;
    width: 84px;
    height: 84px;
    padding: 5px;
    border: 1px solid rgba(48, 48, 48, 0.18);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.mv-gallery__thumb.is-active {
    border-color: #303030;
}

.mv-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mv-gallery__nav {
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(48, 48, 48, 0.25);
    border-radius: 50%;
    background: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.mv-gallery__nav:disabled {
    opacity: 0.35;
    cursor: default;
}

/* ---------- Nagłówek karty ---------- */

.woocommerce div.product .product_title {
    font-size: 26px;
    line-height: 1.3;
}

.mv-product__sku {
    margin: 8px 0 14px;
    font-size: 16px;
}

.mv-product__sku-value {
    font-weight: 700;
}

/* ---------- Ilość i przycisk ---------- */

/* Domyślne pole ilości WooCommerce jest niższe od przycisku - zrównujemy
   wysokości i dokładamy widoczną etykietę. */
.woocommerce div.product form.cart {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.mv-qty-label {
    font-size: 17px;
}

.woocommerce div.product form.cart .quantity {
    float: none;
    margin: 0;
}

.woocommerce div.product form.cart .quantity .qty {
    width: 74px;
    height: 44px;
    padding: 0 8px;
    border: 1px solid rgba(48, 48, 48, 0.3);
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    box-sizing: border-box;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
    height: 44px;
    margin: 0;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Domyślny układ karty produktu opiera się na floatach i klasie .images,
   której nasza galeria nie ma. Zamiast doklejać obce klasy, układamy kartę
   siatką: galeria i podsumowanie obok siebie, reszta na pełną szerokość. */
.woocommerce div.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 44px;
    align-items: start;
}

.woocommerce div.product > * {
    grid-column: 1 / -1;
}

.woocommerce div.product > .mv-gallery {
    grid-column: 1 / 2;
    grid-row: 1;
}

/* Selektor musi być co najmniej tak specyficzny jak wooc'owy
   ".woocommerce div.product div.summary { width: 48% }" - inaczej kolumna
   dostaje 48% połowy siatki i formularz zawija się do dwóch wierszy. */
.woocommerce div.product div.summary {
    grid-column: 2 / 3;
    grid-row: 1;
    float: none;
    width: auto;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .woocommerce div.product {
        grid-template-columns: minmax(0, 1fr);
    }

    .woocommerce div.product > .mv-gallery,
    .woocommerce div.product div.summary {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}
