/* ============================================================
   STUDIO FIGURA — strona pojedynczego urządzenia (Roll Shaper)
   Uzupełnia Bootstrap 5.3 — tylko styling specyficzny dla projektu
   ============================================================ */

:root {
    --sf-orange: #F39200;
    --sf-orange-hover: #d97f00;
    --sf-orange-light: #FFE7CC;
    --sf-orange-soft: #FDF1E2;
    --sf-text: #1a1a1a;
    --sf-text-soft: #4a4a4a;
    --sf-border: #ececec;
    --sf-shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
    --sf-shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body,
.device-page,
.device-page h1,
.device-page h2,
.device-page h3,
.device-page h4,
.device-page h5,
.device-page h6,
.device-page p,
.device-page a,
.device-page button,
.device-page input,
.device-page textarea,
.device-page select {
    font-family: 'Poppins', system-ui, Arial, sans-serif;
}

.device-page {
    padding: 0 0 80px;
    background: #F7F7F7;
}

/* --- Breadcrumb (Bootstrap override) --- */
.device-breadcrumb-wrap {
    padding: 68px 0 32px;
    background: #FFFFFF;
}

.device-breadcrumb-wrap .sf-breadcrumb {
    margin: 0;
}

.breadcrumb.device-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    color: #BEBEBE;
    font-family: Poppins, system-ui, Arial, sans-serif;
    font-size: 1rem; /* 16px */
    font-weight: 400;
    line-height: 150%;
}

.breadcrumb.device-breadcrumb .breadcrumb-item,
.breadcrumb.device-breadcrumb .breadcrumb-item a {
    color: #BEBEBE;
    text-decoration: none;
}

.breadcrumb.device-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    padding-left: 0;
}

.breadcrumb.device-breadcrumb .breadcrumb-item a:hover {
    color: var(--sf-orange);
}

.breadcrumb.device-breadcrumb .breadcrumb-item.active {
    color: #BEBEBE;
    font-weight: 400;
}

.breadcrumb.device-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: ">";
    padding: 0 12px;
    color: #BEBEBE;
}

/* --- Back button --- */
.device-back-wrap {
    padding: 0 0 48px;
    background: #FFFFFF;
}

.device-back {
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: fit-content;
    padding: 6px 12px;
    border: 1px solid #E3E3E3;
}

.device-back span {
    color: #BEBEBE;

    /* Tekst/text-small */
    font-family: Poppins;
    font-size: 0.8125rem; /* 13px */
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

/* --- Gallery mosaic (desktop) --- */
.device-gallery-section {
    padding-bottom: 0;
    background: linear-gradient(to bottom, #FFFFFF 0, #FFFFFF 64%, #F7F7F7 64%, #F7F7F7 100%);
}

.device-gallery {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    height: min(34vw, 460px);
    min-height: 280px;
}

.device-gallery .gal {
    overflow: hidden;
    border-radius: 10px;
    background: #f5f5f5;
    box-shadow: 0 8px 22px rgba(16, 7, 7, 0.14), 0 2px 6px rgba(16, 7, 7, 0.08);
}

.device-gallery .gal img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.device-gallery .gal:hover img {
    transform: scale(1.03);
}

.device-gallery--count-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: min(45vw, 520px);
}

.device-gallery--count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    height: min(32vw, 380px);
}

.device-gallery--count-3 {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1.1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    height: min(34vw, 430px);
}

.device-gallery--count-3 .gal-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.device-gallery--count-3 .gal-2 {
    grid-column: 2;
    grid-row: 1;
}

.device-gallery--count-3 .gal-3 {
    grid-column: 2;
    grid-row: 2;
}

.device-gallery--count-4 {
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.device-gallery--count-4 .gal-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.device-gallery--count-4 .gal-2 {
    grid-column: 2;
    grid-row: 1;
}

.device-gallery--count-4 .gal-3 {
    grid-column: 3;
    grid-row: 1;
}

.device-gallery--count-4 .gal-4 {
    grid-column: 2 / span 2;
    grid-row: 2;
}

.device-gallery--count-5 {
    grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

.device-gallery--count-5 .gal-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.device-gallery--count-5 .gal-2 {
    grid-column: 2;
    grid-row: 1;
}

.device-gallery--count-5 .gal-3 {
    grid-column: 3;
    grid-row: 1;
}

.device-gallery--count-5 .gal-4 {
    grid-column: 4;
    grid-row: 1;
}

.device-gallery--count-5 .gal-5 {
    grid-column: 2 / span 3;
    grid-row: 2;
}

.device-gallery--count-6 {
    grid-template-columns: 1.55fr 1fr 1fr 1fr;
    grid-template-rows: minmax(0, 0.64fr) minmax(0, 0.36fr) minmax(0, 0.5fr) minmax(0, 0.5fr);
}

.device-gallery--count-6 .gal-1 {
    grid-column: 1;
    grid-row: 1 / span 4;
}

.device-gallery--count-6 .gal-2 {
    grid-column: 2;
    grid-row: 1;
}

.device-gallery--count-6 .gal-3 {
    grid-column: 3;
    grid-row: 1;
}

.device-gallery--count-6 .gal-4 {
    grid-column: 4;
    grid-row: 1 / span 2;
}

.device-gallery--count-6 .gal-5 {
    grid-column: 2 / span 2;
    grid-row: 2 / span 3;
}

.device-gallery--count-6 .gal-6 {
    grid-column: 4;
    grid-row: 3 / span 2;
}

/* Mobile/tablet carousel */
.device-hero-carousel {
    margin: 0 calc(50% - 50vw);
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.device-hero-carousel .carousel-inner,
.device-hero-carousel .carousel-item {
    height: 360px;
}

.device-hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Indicators (kropki) na dole */
.device-hero-carousel .carousel-indicators {
    right: auto;
    bottom: 35px;
    left: 50%;
    gap: 7px;
    align-items: center;
    width: auto;
    margin: 0;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(16, 7, 7, 0.42);
    transform: translateX(-50%);
}

.device-hero-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.52);
    background-clip: padding-box;
    opacity: 1;
    margin: 0;
    text-indent: -999px;
    transition: background .25s, transform .25s;
}

.device-hero-carousel .carousel-indicators .active {
    width: 8px;
    background: #FFFFFF;
}

/* Bez strzałek prev/next */
.device-hero-carousel .carousel-control-prev,
.device-hero-carousel .carousel-control-next {
    display: none;
}

/* --- Header section --- */
.device-header {
    padding: 14px 0 32px;
}

.device-header .container {
    padding-bottom: 28px;
    border-bottom: 1px solid #E3E3E3;
}

.device-tag {
    display: flex;
    padding: 2px 8px;
    margin-bottom: 18px;
    border-radius: 8px;
    border: 1px solid var(--Pole-Obrys-Jasny, #E3E3E3);
    background: var(--Pole-Jasne, rgba(255, 255, 255, 0.75));
    color: var(--Tekst-Akcent, #ACA8A8);
    width: fit-content;
    /* Tekst/text-small */
    font-family: Poppins;
    font-size: 0.8125rem; /* 13px */
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.device-title {
    color: var(--Tekst-Gwny, #100707);

    /* Nagłówki/H2 */
    font-family: Poppins;
    font-size: 2.5rem; /* 40px */
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}

.device-subtitle {
    color: var(--Kolor-Gwny, #FF9100);

    /* Nagłówki/Akcent/H6 */
    font-family: Poppins;
    font-size: 1.1875rem; /* 19px */
    font-style: italic;
    font-weight: 300;
    line-height: 140%;
    letter-spacing: -0.02375rem; /* -0.38px */
}

.device-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.device-cta-text {
    font-size: 0.8125rem; /* 13px */
    color: var(--Tekst-Akcent, #ACA8A8) !important;
    margin: 0;
    text-align: right;
    line-height: 1.45;
    max-width: 320px;
}

.device-header-actions {
    width: fit-content;
}

.device-header-button {
    width: fit-content;
}

.device-header-button:active {
    transform: translateY(1px);
    color: #fff;
}

/* Mobile lead */
.device-mobile-lead {
    padding-bottom: 18px;
}

.device-mobile-lead p {
    margin: 0;
    color: var(--sf-text-soft);
    font-size: 0.875rem; /* 14px */
    line-height: 1.65;
}

/* --- Tabs (Bootstrap nav override) --- */
.device-tabs-wrap {
    padding: 32px 0 28px;
}

.device-tabs {
    align-items: stretch;
    min-height: 84px;
    margin-bottom: 34px;
    border: 1px solid #E3E3E3;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    overflow: hidden;
    flex-wrap: nowrap;
}

.device-tabs .nav-item {
    display: flex;
    min-width: 0;
}

.device-tabs .device-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    padding: 0 10px;
    background: transparent;
    border: 0;
    font-family: inherit;
    font-size: 1.4375rem; /* 23px */
    font-weight: 600;
    letter-spacing: 0;
    color: #4C4545;
    width: 100%;
    border-radius: 0;
}

.device-tabs .device-tab:hover {
    color: var(--sf-text);
    border-color: transparent;
}

.device-tabs .device-tab.active {
    color: var(--sf-text);
    background: transparent;
    border-color: transparent;
}

.device-tabs .device-tab.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 5px;
    background: var(--sf-orange);
}

/* --- Main content --- */
.device-content {
    padding: 0 0 50px;
}

.device-section {
    margin-bottom: 40px;
}

.device-section:last-child {
    margin-bottom: 0;
}

.device-lead p {
    margin: 0;
    color: var(--sf-text-soft);
    line-height: 1.65;
}

.device-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.device-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--sf-orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.device-section-title {
    color: var(--Tekst-Gwny, #100707);

    /* Nagłówki/H4 */
    font-family: Poppins;
    font-size: 1.75rem; /* 28px */
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}

.device-results-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 18px;
}

.device-results-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    color: var(--sf-orange);
}

.device-results-icon__svg {
    display: block;
    width: 28px;
    height: 36px;
}

.device-results-title {
    margin: 0;
    color: var(--Tekst-Gwny, #100707);
    font-family: Poppins;
    font-size: 1.75rem; /* 28px */
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}

.device-section-body p {
    color: var(--Tekst-Dodatkowy, #4C4545);

    /* Tekst/text-regular */
    font-family: Poppins;
    font-size: 1rem; /* 16px */
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.device-section-body p:last-child {
    margin-bottom: 0;
}

.device-faq-item {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-faq-item:last-child {
    margin-bottom: 0;
}

.faq-q {
    color: var(--Tekst-Gwny, #100707);

    /* Nagłówki/H6 */
    font-family: Poppins;
    font-size: 1.1875rem; /* 19px */
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
    letter-spacing: -0.02375rem; /* -0.38px */
}

.device-faq-item p {
    margin: 0;
    color: var(--sf-text-soft);
    font-size: 0.9375rem; /* 15px */
    line-height: 1.65;
}

/* --- Sidebar Efekty --- */
.device-sidebar {
    position: sticky;
    top: 20px;
}

.efekty-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.efekty-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--sf-orange);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.efekty-title {
    font-size: 1.5rem; /* 24px */
    font-weight: 600;
    margin: 0;
}

.efekty-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.efekty-list li {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid var(--Pole-Obrys-Jasny, #E3E3E3);
    background: var(--Pole-Jasne, rgba(255, 255, 255, 0.75));
    backdrop-filter: blur(16px);
}

.efekty-list li .efekty-text {
    flex: 1;
    min-width: 0;
}

.efekty-num {
    display: flex;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    justify-content: center;
    border-radius: 64px;
    border: 1px solid var(--Kolor-Gwny, #FF9100);
    color: var(--Tekst-Dodatkowy, #4C4545);

    /* Tekst/text-small */
    font-family: Poppins;
    font-size: 0.8125rem; /* 13px */
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.efekty-text {
    color: var(--Tekst-Dodatkowy, #4C4545);

    /* Tekst/text-small */
    font-family: Poppins;
    font-size: 1rem; /* 16px */
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.efekty-text::first-letter {
    text-transform: uppercase;
}

/* --- Related devices --- */
.device-related {
    padding-top: 24px;
}

.device-related-title {
    font-size: 1.375rem; /* 22px */
    font-weight: 600;
    margin-bottom: 32px !important;
}

.related-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-card__media {
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #f5f5f5;
}

.related-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.related-card:hover .related-card__media img {
    transform: scale(1.04);
}

.related-card__body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 24px;
}

.related-card__title {
    color: var(--Tekst-Gwny, #100707);
    font-family: Poppins;
    font-size: 1.1875rem; /* 19px */
    font-style: normal;
    font-weight: 600;
    line-height: 150%;
    text-transform: uppercase;
}

.related-card__subtitle {
    color: var(--Kolor-Gwny, #FF9100);

    /* Tekst/text-medium */
    font-family: Poppins;
    font-size: 1.125rem; /* 18px */
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.related-card__desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    color: var(--Tekst-Dodatkowy, #4C4545);

    /* Tekst/text-regular */
    font-family: Poppins;
    font-size: 1rem; /* 16px */
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.related-card__link {
    color: var(--Tekst-Gwny, #100707);
    font-family: Poppins;
    font-size: 1rem; /* 16px */
    font-style: normal;
    font-weight: 600;
    line-height: 150%;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.related-card__link:hover {
    color: var(--sf-orange);
}

/* Mobile/tablet horizontal scroller for related cards */
.related-scroller {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    padding-left: max(24px, calc(50vw - 50% + 24px));
    padding-right: max(24px, calc(50vw - 50% + 24px));
    scrollbar-width: none;
}

.related-scroller::-webkit-scrollbar {
    display: none;
}

.related-scroller .related-card {
    flex: 0 0 calc(50% - 9px);
    scroll-snap-align: start;
}

/* ============================================================
   Bootstrap-aligned responsive tweaks
   ============================================================ */

/* Tablet — Bootstrap <lg (<992px) */
@media (max-width: 992px) {
    .device-cta-text{
        text-align:left;
    }
    .device-page {
        padding: 0px 0 60px;
    }

    .device-header {
        padding: 22px 0 8px;
    }

    .device-title {
        font-size: 2.125rem; /* 34px */
    }

    .device-subtitle {
        font-size: 1rem; /* 16px */
    }

    .device-header-right {
        align-items: stretch;
    }

    .device-header-actions,
    .device-header-button {
        width: 100%;
    }

    .device-header-button {
        padding: 15px 24px;
        text-align: center;
        justify-content: center;
    }
}

/* Tablet layout */
@media (min-width: 768px) and (max-width: 991.98px) {
    .device-gallery-section {
        padding-bottom: 0;
        background: #F7F7F7;
    }

    .device-hero-carousel {
        margin: 0 calc(50% - 50vw);
    }

    .device-hero-carousel .carousel-inner,
    .device-hero-carousel .carousel-item {
        height: 300px;
    }

    .device-hero-carousel .carousel-indicators {
        bottom: 40px;
    }

    .device-header {
        position: relative;
        z-index: 2;
        margin-top: -28px;
        padding: 0;
    }

    .device-header .container {
        padding: 18px 28px 18px;
        border-bottom: 1px solid #E3E3E3;
        border-radius: 12px 12px 0 0;
        background: #F7F7F7;
    }

    .device-header .row {
        align-items: center !important;
        --bs-gutter-x: 24px;
        --bs-gutter-y: 0;
    }

    .device-tag {
        margin-bottom: 8px;
        padding: 3px 8px;
        font-size: 0.625rem; /* 10px */
    }

    .device-title {
        font-size: 1.4375rem; /* 23px */
        line-height: 1.22;
    }

    .device-subtitle {
        font-size: 0.8125rem; /* 13px */
        line-height: 1.35;
    }

    .device-header-right {
        align-items: flex-end;
        gap: 10px;
    }

    .device-header-actions {
        width: fit-content;
    }

    .device-header-button {
        width: fit-content;
        min-width: 150px;
        padding: 10px 24px;
        font-size: 0.625rem; /* 10px */
        white-space: nowrap;
    }

    .device-mobile-lead {
        padding: 18px 0 22px;
    }

    .device-mobile-lead .container,
    .device-tabs-wrap .container,
    .device-content>.container {
        padding-right: 28px;
        padding-left: 28px;
    }

    .device-mobile-lead p,
    .tab-content.d-lg-none .device-section-body p,
    .tab-content.d-lg-none .device-faq-item p {
        font-size: 0.6875rem; /* 11px */
        line-height: 1.6;
    }

    .device-results-heading {
        gap: 10px;
        margin: 20px 0 14px;
    }

    .device-results-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .device-results-icon__svg {
        width: 22px;
        height: 28px;
    }

    .device-results-title {
        font-size: 1rem; /* 16px */
    }

    .device-tabs-wrap {
        padding: 22px 0 26px;
    }

    .device-tabs {
        min-height: 55px;
        margin-bottom: 28px;
        border-radius: 6px;
    }

    .device-tabs .device-tab {
        min-height: 55px;
        padding: 0 8px;
        font-size: 0.625rem; /* 10px */
        letter-spacing: 0;
    }

    .device-tabs .device-tab.active::after {
        height: 3px;
    }

    .tab-content.d-lg-none .faq-q {
        font-size: 1.125rem; /* 18px */
        line-height: 1.25;
    }
}

/* Mobile layout */
@media (max-width: 767.98px) {
    body {
        font-size: 0.875rem; /* 14px */
    }

    .device-hero-carousel .carousel-inner,
    .device-hero-carousel .carousel-item {
        height: 280px;
    }

    .device-header {
        position: relative;
        z-index: 2;
        margin-top: -24px;
        padding: 0 0 8px;
    }

    .device-header .container {
        padding: 14px 24px 20px;
        border-bottom: 1px solid #E3E3E3;
        border-radius: 12px 12px 0 0;
        background: #F7F7F7;
    }

    .device-title {
        font-size: 1.75rem; /* 28px */
    }

    .device-subtitle {
        font-size: 0.9375rem; /* 15px */
    }

    .device-tag {
        font-size: 0.625rem; /* 10px */
        padding: 5px 12px;
    }

    .device-section-title {
        font-size: 1.125rem; /* 18px */
    }

    .device-results-heading {
        gap: 10px;
        margin: 22px 0 14px;
    }

    .device-results-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .device-results-icon__svg {
        width: 22px;
        height: 28px;
    }

    .device-results-title {
        font-size: 1.125rem; /* 18px */
    }

    .efekty-title {
        font-size: 1.25rem; /* 20px */
    }

    .device-related-title {
        font-size: 1.125rem; /* 18px */
    }

    .device-tabs-wrap {
        padding: 28px 0 24px;
    }

    .device-tabs {
        min-height: 56px;
        margin-bottom: 28px;
        border-radius: 8px;
    }

    .device-tabs .device-tab {
        min-height: 56px;
        padding: 0 6px;
        font-size: 1rem; /* 16px */
        letter-spacing: 0;
    }

    .related-scroller .related-card {
        flex: 0 0 100%;
    }

    .related-card__body {
        padding: 18px 18px 20px;
    }
}

/* Smallest screens */
@media (max-width: 399.98px) {
    .device-tabs .device-tab {
        font-size: 0.875rem; /* 14px */
    }

    .related-scroller .related-card {
        flex: 0 0 100%;
    }
}