/* ==========================================================
   ModuleWorld – Custom Product Page (Pixelki-style)
   ========================================================== */

/* ── BREADCRUMBS ─────────────────────────────────────── */
.woocommerce-breadcrumb { display: none !important; }

/* ── FONT ─────────────────────────────────────────────── */
.mw-product-page,
.mw-product-page * {
    font-family: 'Poppins', sans-serif !important;
}

/* ── ANNOUNCEMENT BAR ─────────────────────────────────── */
.mw-topbar {
    background: linear-gradient(to right, #000000 0%, #0f2d5e 60%, #1a3a72 100%);
    color: #fff;
    text-align: center;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-radius: 40px;
    margin: 0 0 28px;
    letter-spacing: 0.1px;
}
.mw-topbar strong { font-weight: 800; }
.mw-topbar-logos {
    display: flex;
    align-items: center;
    gap: 16px;
}
.mw-topbar-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.mw-topbar-sep {
    opacity: 0.35;
    font-size: 16px;
}

/* InPost SVG logo */
.mw-inpost-svg { display: inline-flex; align-items: center; }
.mw-inpost-svg svg { width: auto; height: 50px; display: block; }

/* ── 3-COLUMN GRID ────────────────────────────────────── */
.mw-product-grid {
    display: grid;
    grid-template-columns: 36% 40% 24%;
    gap: 24px;
    align-items: start;
}

/* ── GALLERY WRAP + PROMO BADGE ───────────────────────── */
.mw-gallery-wrap {
    position: relative;
}

/* Ukryj WooCommerce zoom trigger — koliduje z badgem */
.mw-col-gallery .woocommerce-product-gallery__trigger {
    display: none !important;
}

.mw-main-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(160deg, #d4822a 0%, #b86018 100%);
    color: #fff;
    padding: 10px 14px 12px;
    border-radius: 0 0 0 12px;
    text-align: center;
    line-height: 1.2;
    z-index: 30;
    pointer-events: none;
}
.mw-main-badge-top {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.mw-main-badge-pct {
    display: block;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.05;
}
.mw-main-badge-sub {
    display: block;
    font-size: 9px;
    font-weight: 600;
    opacity: 0.92;
    letter-spacing: 0.3px;
}

/* ── COLUMN 2: PRODUCT INFO ───────────────────────────── */
.mw-product-title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    line-height: 1.25 !important;
    margin: 0 0 14px !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Dynamic price for variable products */
.mw-dyn-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.mw-dyn-price del {
    color: #aaa;
    font-size: 17px;
    font-weight: 400;
    text-decoration: line-through;
}
.mw-dyn-price strong {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
}
.mw-vat {
    font-size: 14px;
    color: #888;
    font-weight: 400;
}

/* Prices */
.mw-price-wrap { margin-bottom: 6px; }
.mw-price-wrap .price {
    display: flex !important;
    align-items: baseline !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
.mw-price-wrap del {
    color: #aaa !important;
    font-size: 17px !important;
}
.mw-price-wrap del .woocommerce-Price-amount { font-size: 17px !important; color: #aaa !important; }
.mw-price-wrap ins { text-decoration: none !important; }
.mw-price-wrap ins .woocommerce-Price-amount {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #1a2a4a !important;
}
.mw-price-wrap .woocommerce-Price-suffix {
    font-size: 14px !important;
    color: #888 !important;
    font-weight: 400 !important;
}
.mw-omnibus {
    font-size: 12px;
    color: #999;
    margin: 3px 0 0;
}

/* ── VARIATION BOXES ──────────────────────────────────── */
.mw-var-boxes { margin: 14px 0 6px; }

.mw-var-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid #dde0e8;
    border-radius: 10px;
    padding: 11px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.mw-var-box:last-child { margin-bottom: 0; }
.mw-var-box:hover { border-color: #1a1a2e; }
.mw-var-box.mw-selected {
    border: 2px solid #1a1a2e;
    background: #f5f7ff;
}

.mw-var-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color .15s;
}
.mw-var-box.mw-selected .mw-var-radio { border-color: #1a1a2e; }
.mw-var-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1a1a2e;
    display: none;
}
.mw-var-box.mw-selected .mw-var-dot { display: block; }

.mw-var-details { flex: 1; min-width: 0; }
.mw-var-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mw-var-savings {
    display: block;
    font-size: 12px;
    color: #d06010;
    font-weight: 500;
    margin-top: 1px;
}
.mw-var-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    white-space: nowrap;
}
.mw-var-price del {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
    text-decoration: line-through;
    line-height: 1.3;
}
.mw-var-price strong {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

/* Hide original WooCommerce variation select */
.mw-hidden-select {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
/* Hide WooCommerce default variation labels row */
.mw-col-info .variations td.label,
.mw-col-info table.variations { display: none !important; }

/* ── FREE SHIPPING BADGE ─────────────────────────────── */
.mw-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #1a1a2e;
    border-radius: 24px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(26,26,46,.18);
}

/* ── QUANTITY + ADD TO CART (jeden rząd jak pixelki) ─── */
.mw-cart-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 20px 0 0 !important;
}
.mw-cart-row .quantity {
    flex-shrink: 0 !important;
    margin: 0 !important;
}
.mw-cart-row .single_add_to_cart_button,
.mw-cart-row input[type="submit"].button {
    flex: 1 !important;
    width: auto !important;
    margin: 0 !important;
}

.mw-col-info .quantity {
    display: inline-flex !important;
    align-items: center !important;
    border: 1.5px solid #dde0e8 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    height: 52px !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    background: #fff !important;
}
.mw-col-info .quantity input.qty {
    width: 44px !important;
    text-align: center !important;
    border: none !important;
    height: 100% !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: transparent !important;
    -moz-appearance: textfield !important;
}
.mw-col-info .quantity input.qty::-webkit-inner-spin-button,
.mw-col-info .quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; }

.mw-col-info .single_add_to_cart_button,
.mw-col-info input[type="submit"].button,
.mw-col-info .button.alt,
.woocommerce div.product .mw-col-info .cart .button,
.woocommerce div.product .mw-col-info form.cart .single_add_to_cart_button {
    display: block !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    background: #1a1a2e !important;
    background-color: #1a1a2e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 40px !important;
    -webkit-border-radius: 40px !important;
    padding: 15px 20px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: background .2s !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    height: 52px !important;
}
.mw-col-info .single_add_to_cart_button:hover,
.woocommerce div.product .mw-col-info form.cart .single_add_to_cart_button:hover {
    background: #2d2d50 !important;
    background-color: #2d2d50 !important;
    color: #fff !important;
}

/* Hide WooCommerce variation description, reset link & duplicate price below boxes */
.mw-col-info .woocommerce-variation-description,
.mw-col-info .reset_variations,
.mw-col-info .woocommerce-variation-price { display: none !important; }

/* WooCommerce stock / availability */
.mw-col-info .stock { font-size: 13px; color: #3a9a3a; margin: 6px 0; }

/* ── COLUMN 3: TRUST BOX ─────────────────────────────── */
.mw-trust-box {
    background: #fff;
    border: 1.5px solid #e4e7ee;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.mw-trust-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
}
.mw-trust-icon {
    width: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mw-trust-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}
.mw-trust-link {
    font-size: 13px;
    color: #2a6ae0;
    text-decoration: none;
    white-space: nowrap;
}
.mw-trust-link:hover { text-decoration: underline; }
.mw-trust-divider { height: 1px; background: #f0f2f5; }

/* ── RELATED MINI CARDS ─────────────────────────────── */
.mw-related-mini { display: flex; flex-direction: column; gap: 12px; }

.mw-related-card {
    display: flex;
    align-items: stretch;
    text-decoration: none !important;
    border: 1.5px solid #e4e7ee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s;
    position: relative;
}
.mw-related-card:hover { border-color: #1a2a4a; }

.mw-related-img-wrap {
    width: 90px;
    flex-shrink: 0;
    position: relative;
    background: #f7f8fb;
}
.mw-related-img-wrap img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
}
.mw-related-badge {
    position: absolute;
    top: 0; left: 0;
    background: #c93030;
    color: #fff;
    padding: 3px 7px 4px;
    border-radius: 0 0 6px 0;
    text-align: center;
    line-height: 1.1;
}
.mw-related-badge-top { font-size: 8px; font-weight: 600; display: block; }
.mw-related-badge-pct { font-size: 14px; font-weight: 800; display: block; }
.mw-related-badge-sub { font-size: 7px; display: block; opacity: .9; }

.mw-related-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mw-related-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a2a4a;
    margin: 0 0 2px;
    line-height: 1.3;
}
.mw-related-cat {
    font-size: 11px;
    color: #999;
    margin: 0 0 5px;
}
.mw-related-price { font-size: 13px; color: #1a2a4a; margin: 0; }
.mw-related-price del { color: #bbb; font-size: 11px; margin-right: 4px; }
.mw-related-price strong { font-weight: 700; }

/* ── PRODUCT TABS (below grid) ───────────────────────── */
.mw-product-tabs {
    margin-top: 40px;
    border-top: 1.5px solid #e4e7ee;
    padding-top: 30px;
}

/* ── RESPONSIVE ─────────────────────────────────────── */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    .mw-product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .mw-col-sidebar {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .mw-related-mini { flex-direction: row; }
    .mw-topbar { gap: 12px; padding: 10px 20px; font-size: 13px; }
    .mw-topbar-logos { gap: 10px; }
    .mw-inpost-svg svg { height: 32px; }
}

/* Duży telefon (≤768px) */
@media (max-width: 768px) {
    .mw-product-grid { grid-template-columns: 1fr !important; gap: 16px; }
    .mw-product-page { overflow-x: hidden; }
    .mw-col-info { max-width: 100%; overflow: hidden; }
    .mw-col-sidebar {
        grid-column: 1 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .mw-trust-box { padding: 10px 14px; }
    .mw-trust-icon { width: 22px; flex-shrink: 0; }
    .mw-trust-row { gap: 8px; }
    .mw-trust-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
    .mw-trust-link { flex-shrink: 0; white-space: nowrap; font-size: 12px; }
    .mw-var-box { gap: 8px; padding: 10px 12px; box-sizing: border-box; max-width: 100%; }
    .mw-var-details { flex: 1; min-width: 0; overflow: hidden; }
    .mw-var-label { font-size: 13px; }
    .mw-var-price { flex-shrink: 0; min-width: 70px; text-align: right; }
    .mw-var-price strong { font-size: 14px; }
    .mw-var-price del { font-size: 11px; }
    .mw-topbar { flex-direction: column; gap: 8px; padding: 10px 16px; font-size: 13px; border-radius: 12px; margin: 0 0 20px; text-align: center; }
    .mw-topbar-logos { gap: 10px; flex-wrap: wrap; justify-content: center; }
    .mw-inpost-svg svg { height: 26px; }
    .mw-product-title { font-size: 22px !important; }
    .mw-dyn-price strong { font-size: 26px; }
    .mw-main-badge { padding: 7px 10px 9px; }
    .mw-main-badge-pct { font-size: 22px; }
    .mw-related-mini { flex-direction: row; }
}

@media (max-width: 480px) {
    /* Topbar */
    .mw-topbar {
        border-radius: 8px;
        padding: 9px 12px;
        font-size: 12px;
        gap: 6px;
    }
    .mw-topbar > span { font-size: 12px; }
    .mw-topbar-logo { font-size: 11px; gap: 4px; }
    .mw-topbar-sep { display: none; }
    .mw-inpost-svg svg { height: 22px; }

    /* Tytuł i cena */
    .mw-product-title { font-size: 19px !important; }
    .mw-dyn-price strong { font-size: 24px; }
    .mw-vat { font-size: 12px; }

    /* Boxy wariantów */
    .mw-var-label { font-size: 13px; }
    .mw-var-box { padding: 9px 12px; }

    /* Cart row — qty mniejszy */
    .mw-col-info .quantity { height: 46px !important; }
    .mw-cart-row .single_add_to_cart_button,
    .woocommerce div.product .mw-col-info form.cart .single_add_to_cart_button {
        font-size: 15px !important;
        height: 46px !important;
        padding: 12px 16px !important;
    }

    /* Badge darmowa dostawa */
    .mw-free-badge { font-size: 12px; padding: 7px 14px; }

    /* Trust box */
    .mw-trust-box { padding: 12px 14px; }
    .mw-trust-row { gap: 8px; }
    .mw-trust-label { font-size: 13px; }
    .mw-trust-link { font-size: 11px; white-space: normal; }

    /* Related cards */
    .mw-related-mini { flex-direction: column; }
    .mw-related-img-wrap { width: 70px; }
    .mw-related-img-wrap img { width: 70px; height: 70px; }

    /* Promo badge na zdjęciu */
    .mw-main-badge { padding: 6px 9px 8px; }
    .mw-main-badge-pct { font-size: 18px; }
    .mw-main-badge-top { font-size: 8px; }
    .mw-main-badge-sub { font-size: 7px; }
}

