/*
 * SH Product Description Builder
 * Frontend layout test: desktop media/text proportion 62/38.
 * Intentionally limited to the two mixed media blocks only.
 */
@media (min-width: 1001px) {
    .sh-desc-media-left,
    .sh-desc-media-right {
        display: grid;
        gap: 40px;
        align-items: center;
    }

    /* Fotka | Tekst */
    .sh-desc-media-left {
        grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    }

    /* Tekst | Fotka */
    .sh-desc-media-right {
        grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
    }

    .sh-desc-media-left .sh-desc-media,
    .sh-desc-media-right .sh-desc-media,
    .sh-desc-media-left .sh-desc-content,
    .sh-desc-media-right .sh-desc-content {
        min-width: 0;
    }

    .sh-desc-media-left .sh-desc-media img,
    .sh-desc-media-right .sh-desc-media img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}


/* Tablet / mobile: niezaleznie od wariantu desktopowego, zdjecie jest zawsze pierwsze. */
@media (max-width: 1000px) {
    .product-description .sh-desc-media-left,
    .product-description .sh-desc-media-right {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 22px !important;
        align-items: start !important;
    }

    .product-description .sh-desc-media-left > .sh-desc-media,
    .product-description .sh-desc-media-right > .sh-desc-media {
        order: -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 auto !important;
    }

    .product-description .sh-desc-media-left > .sh-desc-media > img,
    .product-description .sh-desc-media-right > .sh-desc-media > img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
}

/* Fotka wide: na desktopie ograniczona i wycentrowana, na mniejszych ekranach pelna szerokosc. */
.sh-desc-media-wide,
.sh-desc-media-wide .sh-desc-media {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (min-width: 1001px) {
    .product-description .sh-desc-media-wide .sh-desc-media img {
        display: block;
        width: auto !important;
        max-width: 55% !important;
        height: auto !important;
        margin: 0 auto !important;
        box-sizing: border-box;
    }
}

@media (max-width: 1000px) {
    .product-description .sh-desc-media-wide .sh-desc-media img {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        box-sizing: border-box;
    }
}

/* Frontend typography / spacing test. Scoped only to builder output. */
.sh-desc-block {
    box-sizing: border-box;
    font-size: 18px;
    line-height: 1.32;
    color: #000;
}

/* Czytelny odstep pomiedzy kolejnymi blokami opisu. */
.sh-desc-block + .sh-desc-block {
    margin-top: 44px;
}

/* Zwykla tresc opisu. */
.sh-desc-block p,
.sh-desc-block li {
    color: #000;
    font-size: 18px;
    line-height: 1.32;
}

.sh-desc-block p {
    margin-top: 0;
    margin-bottom: 8px;
}

.sh-desc-block ul {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 28px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.sh-desc-block ol {
    list-style-type: decimal;
    list-style-position: outside;
    padding-left: 28px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.sh-desc-block li {
    display: list-item;
}

/* Hierarchia naglowkow opisu. */
.sh-desc-block h1 {
    margin: 0 0 12px;
    color: #000;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.sh-desc-block h2 {
    margin: 26px 0 8px;
    color: #cf0000;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.sh-desc-block h3 {
    margin: 18px 0 6px;
    color: #000;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
}

/* Przy dluzszym tekscie zdjecie nie wedruje na srodek wysokiego bloku. */
@media (min-width: 1001px) {
    .sh-desc-media-left,
    .sh-desc-media-right {
        align-items: start;
    }
}

/* Fotka / Fotka: izolowany grid w obrebie opisu produktu. */
.product-description .sh-desc-media-double {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 44px 0 !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

.product-description .sh-desc-media-double > .sh-desc-media {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

.product-description .sh-desc-media-double > .sh-desc-media > img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
    object-fit: contain;
}

@media (max-width: 1000px) {
    .product-description .sh-desc-media-double {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 22px !important;
    }

    .product-description .sh-desc-media-double > .sh-desc-media {
        width: 100% !important;
        max-width: 100% !important;
    }

    .product-description .sh-desc-media-double > .sh-desc-media > img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
}

/* Tabela wielokolumnowa: spójny wygląd na froncie + poziomy scroll na mobile. */
.product-description .sh-desc-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.product-description .content-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 1.1em;
    line-height: 1.35;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.product-description .content-table thead th {
    background: #cf0000;
    color: #fff;
    padding: 14px 16px;
    text-align: center;
    vertical-align: middle;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.65);
}

.product-description .content-table tbody th {
    padding: 11px 15px;
    background: #e7e7e7;
    color: #222;
    text-align: left;
    vertical-align: middle;
    font-weight: 700;
    border-bottom: 1px solid #cfcfcf;
}

.product-description .content-table tbody td {
    padding: 11px 15px;
    color: #222;
    vertical-align: middle;
    border-bottom: 1px solid #d5d5d5;
}

.product-description .content-table tbody tr:nth-of-type(even) td {
    background: #f2f2f2;
}

.product-description .content-table tbody tr:hover td {
    background: #ffe5e5;
}

.product-description .content-table tbody tr:last-child td,
.product-description .content-table tbody tr:last-child th {
    border-bottom: 2px solid #cf0000;
}

@media (max-width: 768px) {
    .product-description .sh-desc-table {
        overflow-x: auto;
    }

    .product-description .content-table {
        min-width: 650px;
    }
}

/* ===== Dane techniczne / accordion ===== */
.sh-desc-specs {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    margin: 42px 0 !important;
    color: #000;
}

.sh-desc-specs .sh-desc-specs-title {
    display: block;
    margin: 0 0 18px !important;
    padding: 0 !important;
    color: #cf0000 !important;
    font-size: 28px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
}

.sh-desc-specs .sh-desc-specs-list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #dedede;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}

.sh-desc-specs .sh-spec-section {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #dedede !important;
    background: #fff;
    color: #000;
    font-size: 16px;
    line-height: 1.35;
}

.sh-desc-specs .sh-spec-section:last-child {
    border-bottom: 0 !important;
}

.sh-desc-specs .sh-spec-section > summary {
    position: relative;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 15px 50px 15px 18px !important;
    border: 0 !important;
    background: #f7f7f7 !important;
    color: #1f1f1f !important;
    font-size: 17px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    text-align: left;
    cursor: pointer;
    list-style: none !important;
    user-select: none;
}

.sh-desc-specs .sh-spec-section > summary::-webkit-details-marker { display: none; }
.sh-desc-specs .sh-spec-section > summary::marker { content: ''; }

.sh-desc-specs .sh-spec-section > summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 19px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #cf0000;
    border-bottom: 2px solid #cf0000;
    transform: translateY(-65%) rotate(45deg);
    transform-origin: center;
    transition: transform .18s ease;
}

.sh-desc-specs .sh-spec-section[open] > summary {
    background: #fff !important;
    color: #cf0000 !important;
    box-shadow: inset 3px 0 0 #cf0000;
}

.sh-desc-specs .sh-spec-section[open] > summary::after {
    transform: translateY(-35%) rotate(225deg);
}

.sh-desc-specs .sh-spec-rows {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff;
}

.sh-desc-specs .sh-spec-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(180px, .55fr) !important;
    gap: 24px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
    margin: 0 !important;
    padding: 11px 18px !important;
    border: 0 !important;
    background: #fff;
    color: #000 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
}

.sh-desc-specs .sh-spec-row:nth-child(even) { background: #f2f2f2 !important; }

.sh-desc-specs .sh-spec-name,
.sh-desc-specs .sh-spec-value {
    display: block !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    color: #000 !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

.sh-desc-specs .sh-spec-name {
    font-weight: 400 !important;
    text-align: left !important;
}

.sh-desc-specs .sh-spec-value {
    font-weight: 600 !important;
    text-align: right !important;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .sh-desc-specs { margin: 30px 0 !important; }
    .sh-desc-specs .sh-desc-specs-title {
        font-size: 24px !important;
        margin-bottom: 14px !important;
    }
    .sh-desc-specs .sh-spec-section > summary {
        padding: 14px 46px 14px 14px !important;
        font-size: 16px !important;
    }
    .sh-desc-specs .sh-spec-row {
        grid-template-columns: 1fr !important;
        gap: 4px !important;
        padding: 10px 14px !important;
    }
    .sh-desc-specs .sh-spec-value { text-align: left !important; }
}

