/* Mebstyle Fabric Configurator - styling karty produktu */

/* ===== UKRYJ natywne WC variations + Variation Swatches plugin (duplikat z naszymi swatchami) ===== */
.single-product table.variations,
.single-product form.variations_form > table.variations,
.single-product .variations_form table.variations,
.single-product .reset_variations,
.single-product .woocommerce-variation-add-to-cart .reset_variations,
.single-product .variations_form .label,
.single-product .variable-items-wrapper,
.woo-variation-swatches .variations,
.wvs-archive-swatches,
.single_variation_wrap .single_variation .price { /* zostawiamy cene wariantu wewnatrz wrappera, ale ukrywamy duplikat */ }

.single-product table.variations,
.single-product form.variations_form > table.variations,
.single-product .variations_form table.variations,
.single-product .woocommerce-variation-add-to-cart .reset_variations,
.single-product .reset_variations {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

.mfc-configurator {
    --mfc-line: #e6e6e6;
    --mfc-text: #1a1a1a;
    --mfc-muted: #6b6b6b;
    --mfc-bg-soft: #f7f4ee;
    margin: 18px 0;
    font-size: 14px;
}

.mfc-section {
    margin: 18px 0;
    padding-top: 18px;
    border-top: 1px solid var(--mfc-line);
}

.mfc-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--mfc-muted);
    font-weight: 600;
    margin-bottom: 10px;
}
.mfc-label .mfc-req { color: #d04848; margin-left: 2px; }

/* === STRONA L/P === */
.mfc-side-toggle {
    display: flex;
    gap: 8px;
}
.mfc-side-toggle label { flex: 1; cursor: pointer; }
.mfc-side-toggle input { display: none; }
.mfc-side-opt {
    border: 2px solid var(--mfc-line);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    background: #fff;
    transition: all .15s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.mfc-side-toggle input:checked + .mfc-side-opt {
    border-color: var(--mfc-text);
    background: #fafafa;
}
.mfc-side-opt svg { width: 28px; height: 18px; }

/* === TKANINY === */
.mfc-fabric-display {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px;
    padding: 10px;
    background: var(--mfc-bg-soft);
    border-radius: 6px;
}
.mfc-fabric-display img {
    width: 48px; height: 48px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--mfc-line);
}
.mfc-fabric-info { flex: 1; }
.mfc-fabric-name { font-weight: 600; font-size: 14px; }
.mfc-fabric-hint { font-size: 12px; color: var(--mfc-muted); }

.mfc-collection { margin-bottom: 18px; }
.mfc-collection h4 {
    font-size: 14px; font-weight: 600;
    margin: 0 0 8px 0 !important;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mfc-collection h4 .mfc-count { font-size: 11px; color: var(--mfc-muted); font-weight: 400; }
.mfc-collection h4 .mfc-vendor-tag {
    font-size: 10px; background: #eee; padding: 2px 6px;
    border-radius: 3px; color: #555;
    text-transform: uppercase; letter-spacing: .5px; font-weight: 500;
}

.mfc-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 6px;
}
.mfc-swatch {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    transition: transform .12s ease;
    background: #f0f0f0;
}
.mfc-swatch:hover { transform: scale(1.04); }
.mfc-swatch.mfc-selected {
    border-color: var(--mfc-text);
    box-shadow: 0 0 0 1px #fff inset;
}
.mfc-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mfc-swatch .mfc-num {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    padding: 2px 0;
    text-align: center;
    font-weight: 500;
}
.mfc-swatch.mfc-selected::after {
    content: "â";
    position: absolute; top: 4px; right: 4px;
    background: var(--mfc-text); color: #fff;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}

/* === ROZWIJANIE === */
.mfc-extra-toggle {
    width: 100%; padding: 12px 14px;
    background: #f0f0f0;
    border: 1px solid var(--mfc-line);
    border-radius: 6px;
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px; font-weight: 600;
    margin-top: 14px;
    transition: background .15s;
    color: var(--mfc-text);
}
.mfc-extra-toggle:hover { background: #e8e8e8; }
.mfc-extra-toggle .mfc-arrow { transition: transform .25s ease; }
.mfc-extra-toggle.mfc-open .mfc-arrow { transform: rotate(180deg); }

.mfc-extra-panel { display: none; margin-top: 12px; }
.mfc-extra-panel.mfc-open { display: block; animation: mfc-slide-in .25s ease; }
@keyframes mfc-slide-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

/* === MIRROR L/P galerii === */

/* === MFC v1.0.7 hotfix: mirror L/P + badge styling === */
.mfc-gallery-mirror.mfc-mirror .woocommerce-product-gallery__image img,
.mfc-gallery-mirror.mfc-mirror img.wp-post-image,
.mfc-gallery-mirror.mfc-mirror .flex-viewport img,
.mfc-gallery-mirror.mfc-mirror .product-gallery img {
    transform: scaleX(-1) !important;
    transition: transform .25s ease;
}
.mfc-gallery-mirror .woocommerce-product-gallery__image img,
.mfc-gallery-mirror img.wp-post-image,
.mfc-gallery-mirror .flex-viewport img,
.mfc-gallery-mirror .product-gallery img {
    transition: transform .25s ease;
}
.mfc-mirror-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(23, 33, 44, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .3px;
    pointer-events: none;
    z-index: 5;
    display: none;
}
.mfc-gallery-mirror.mfc-mirror .mfc-mirror-badge {
    display: inline-block;
}


/* ================================================================ */
/* MFC v1.0.8 â sekcja Wymiary doklejana do opisu produktu          */
/* ================================================================ */
.mfc-dimensions {
    margin: 32px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--mfc-line, #e6e6e6);
}
.mfc-dimensions-heading {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--mfc-text, #1a1a1a);
    margin: 0 0 16px 0 !important;
}
.mfc-dimensions-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    align-items: start;
}
.mfc-dimension-link {
    display: block;
    background: var(--mfc-bg-soft, #f7f4ee);
    border: 1px solid var(--mfc-line, #e6e6e6);
    border-radius: 6px;
    padding: 12px;
    transition: border-color .15s ease, transform .15s ease;
    text-decoration: none;
}
.mfc-dimension-link:hover {
    border-color: var(--mfc-text, #1a1a1a);
    transform: translateY(-1px);
}
.mfc-dimension-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    border-radius: 4px;
}
@media (max-width: 640px) {
    .mfc-dimensions-images { grid-template-columns: 1fr; }
}
