/* @font-face {
    font-family: 'Skyline';
    src: url('ścieżka/do/skyline.woff2') format('woff2'),
        url('ścieżka/do/skyline.woff') format('woff');
    font-weight: normal;
    font-style: normal;
} */

/* @import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700&family=Boldonse&family=Cherry+Bomb+One&family=Lavishly+Yours&family=Mea+Culpa&family=Monoton&family=Outfit:wght@400;700&display=swap'); */


.plus-icon {
    background-image: url("../assets/images/plus.svg");
    background-size: cover;
    background-repeat: no-repeat;
    display: block;
    width: 30px;
    height: 30px;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.collapsed .plus-icon {
    transform: rotate(0deg);
}

.mobile-tab-content {
    padding: 12px 12px;
}

.controls-panel {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    display: flex;
}

.controls-panel-hidden {
    transform: translateY(50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.controls-panel .btn-close {
    position: absolute;
    top: 15px;
    right: 20px;
}


.clear-button {
    border: none;
    background-color: transparent;
}

.menu-button {
    padding: 8px 0px;
    font-size: 18px;
    font-weight: 600;
}

.menu-button.collapsed {
    font-weight: 300;
}


.bg-black {
    background-color: #000;
}

.bg-white {
    background-color: white !important;
}

body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f0f0f0;
    /* overflow-y: hidden; */
}

.clear-button {
    background-color: transparent;
    border: none;
}

.h-100vh {
    height: 100vh;
}

.source-box {
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    background-color: #2b3035 !important;
}

.source-box:hover {
    background-color: #f8f8f8 !important;
    color: #000 !important;
    cursor: pointer;
}

.border-white {
    border: 1px solid white;
}

.black-button {
    transition: all 0.4s ease;
}

.black-button-2{
    transition: all 0.4s ease;
     border: 1px solid black !important;
}

.black-button-2:hover {
    background-color: white !important;
    border: 1px solid black !important;
    color: #000 !important;
}

.black-button:hover {
    background-color: white !important;
    color: #000 !important;
}

.navigation-buttons button {
    margin-left: 2.5rem;
    margin-right: 2.5rem;
    text-wrap: nowrap;
}

.navigation-buttons {
    overflow-x: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    /* min-width:0 — bez tego flex item z overflow-x rozpycha strone (poziomy scroll na mobile). */
    min-width: 0;
    flex: 1 1 0;
}

/* === Mobile: twarda blokada poziomego scrolla =======================
   Glowny kontener kreatora jest position:fixed i przyklejony do krawedzi
   widocznego ekranu, z overflow:hidden. Dzieki temu zaden element w
   srodku nie moze rozepchnac dokumentu w poziomie. */
@media (max-width: 991.98px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    body {
        position: relative;
    }
    /* Kreator zablokowany dokladnie do widocznego obszaru ekranu. */
    .h-100vh {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        overflow: hidden;
        overflow: clip;
    }
    /* Konva — canvas nie moze wystawac poza ekran (clip nie wymusza scrolla w pionie). */
    #kanvaWrapper, #konva-container {
        max-width: 100%;
        overflow-x: clip;
    }
    /* Slidery (Obrot/Skala) — responsywne zamiast stalych 300px. */
    .custom-slider {
        width: 100%;
        max-width: 260px;
    }
    /* Popup wyboru modelu (position: fixed) — nie szerszy niz ekran. */
    #modelsListPopup {
        max-width: 100%;
        left: 0;
        right: 0;
    }
}

.navigation-buttons .clear-button.active {
    /* border-bottom-color: black; */
    font-weight: bold;
    outline: none;
}

.mobile-tab-content.hidden {
    display: none;
}

.cursor-pointer {
    cursor: pointer;
}

.type-background {
    background-size: contain;
    height: 60px;
    background-position: center;
    background-repeat: no-repeat;
}

.phone-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #eee;
}

.grey-hover {
    transition: all 0.4s ease;
}

.grey-hover:hover {
    background-color: #1f1f1f !important;
}

.clear-link {
    text-decoration: none !important;
    color: black !important;
}

.fs-10 {
    font-size: 11px;
}

.active {
    outline: 1px solid black;
    outline-offset: 1px;
}

.selected {
    border: 1px solid black !important;
}

.fs-18 {
    font-size: 18px;
}

.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 300px;
    height: 10px;
    background-color: #0e0e0e;
    background: linear-gradient(to right, #0e0e0e 0%, #0e0e0e var(--value-percent, 0%), #e0e0e0 var(--value-percent, 0%), #e0e0e0 100%);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}


.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: #0e0e0e;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    margin-top: -2px;
}

.custom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #0e0e0e;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.custom-slider::-moz-range-track {
    height: 8px;
    border-radius: 5px;
    background-color: gray;
    border-radius: 5px;
    border: 1px solid white;
}

.custom-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(0, 117, 255, 0.4);
}

.custom-slider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(0, 117, 255, 0.4);
}

.custom-slider::-moz-range-progress {
    background-color: #090909;
    height: 8px;
    border-radius: 5px;
}


/* menu */


.device-select-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 350px;
    padding: 12px 18px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 99px;
    text-align: left;
    font-size: 1rem;
    color: #212529;
    transition: box-shadow 0.2s;
}

.device-select-trigger:hover {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.device-select-trigger .separator {
    margin: 0 10px;
    color: #ced4da;
}

.device-select-trigger .dropdown-arrow {
    margin-left: auto;
}

@media (max-width: 772px) {
    .mobile-p-60px {
        padding: 60px;
    }

    body {
        overflow-y: hidden;
    }
}

@media (min-width: 772px) {
    .full-p-60px {
        padding: 60px;
    }
}

.modal-content {
    border-radius: 1rem;
}

#konva-container {
    width: 100%;
}

.brand-pills {
    overflow-x: auto;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.border-black-2 {
    border: 2px solid black !important;
}

.border-white-2 {
    border: 2px solid white !important;
}

.brand-pill {
    padding: 8px 20px;
    border: 1px solid #ced4da;
    border-radius: 99px;
    background-color: #fff;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s;
}

.brand-pill.active,
.brand-pill:hover {
    background-color: #000;
    outline: none;
    color: #fff;
    border-color: #000;
}

.model-list .model-list-item {
    padding: 12px 20px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #212529;
    font-weight: 500;
    transition: all 0.2s;
}

.model-list .model-list-item:hover {
    border-color: #000;
    background-color: #f8f9fa;
}


#modelsListPopup {
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}


#modelsListPopup.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}


.controls-range-panel{
    width: 95%;
    max-width: 1000px;
    left: 50%;
     transform: translateX(-50%);
     bottom: 5%;;
}


.custom-slider-wrapper {
    position: relative;
    width: 300px;
    height: 20px;
    display: flex;
    align-items: center;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    /* border: 1px solid white; */
    border-radius: 5px;
    cursor: pointer;
}

.slider-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #0e0e0e;
    border-radius: 5px;
    width: 0;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background-color: #0e0e0e;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    cursor: grab;
    transform: translate(-50%, -50%);
    left: 0;
}

.slider-thumb:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
}

.real-slider-input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.slider-thumb,
.slider-track {
    touch-action: none;
}


.modal-body-scrollable {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
}


.border-black{
    border: 1px solid black !important;
}

#konva-container{
    transition: transform 0.3s ease-in-out;
}

.truncate-2-lines {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    min-height: 2.5em;
}


#konva-container {
    transition: filter 0.3s ease-in-out, opacity 0.3s ease-in-out;
    filter: blur(0px);
    opacity: 1;
}

#konva-container.blurred {
    filter: blur(10px);
    opacity: 0;
}

.scroll-box{
    overflow-y: scroll;
    min-height: 0;
     scrollbar-width: none;
      -ms-overflow-style: none;
}

.scroll-box::-webkit-scrollbar {
  display: none;
}

/* === Device type picker (Typ urządzenia: etui / ładowarka / powerbank) === */
.device-type-option {
    display: block;
    padding: 4px 0;
    border: none;
    border-radius: 12px;
    outline: none;
    background-color: transparent;
    transition: background-color 0.2s ease;
}
.device-type-option:hover {
    background-color: rgba(0, 0, 0, 0.03);
}
.device-type-option:focus,
.device-type-option:active,
.device-type-option.active {
    outline: none;
    box-shadow: none;
    background-color: transparent;
}
.device-type-thumb-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    background-color: #fff;
}
.device-type-thumb {
    width: 56px;
    height: 56px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.device-type-thumb-case {
    background-image: url("../assets/images/device-case.png");
}
.device-type-thumb-charger {
    background-image: url("../assets/images/device-charger.png");
}
.device-type-thumb-powerbank {
    background-image: url("../assets/images/device-powerbank.png");
}
.device-type-radio {
    width: 18px;
    height: 18px;
    border: 1px solid #c4c4c4;
    border-radius: 50%;
    background-color: #fff;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.device-type-option.active .device-type-radio {
    background-color: #1f1f1f;
    border-color: #1f1f1f;
}
.device-type-option.active .device-type-radio::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: #fff;
    border-radius: 50%;
}
.device-type-option.active .device-type-thumb-wrapper {
    border-width: 2px;
    border-color: #1f1f1f;
}
.fs-10 { font-size: 10px; }
.fs-12 { font-size: 12px; }

/* === Device type picker — wersja mobilna (horizontal scroll z indykatorem) === */
.device-type-mobile-scroll {
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}
.device-type-mobile-scroll::-webkit-scrollbar { display: none; }

.device-type-mobile-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
}
.device-type-option-mobile {
    width: 100%;
    min-width: 0;
}
.device-type-thumb-wrapper-mobile {
    width: 76px;
    height: 76px;
}
.device-type-thumb-wrapper-mobile .device-type-thumb {
    width: 48px;
    height: 48px;
}

/* Indykator "scroluj" — pisany pionowo na lewej krawędzi (obrazek 13 z dokumentu).
   Tekst obrócony tak, aby litery układały się pionowo od dołu do góry, ze strzałką w górę. */
.device-type-scroll-hint {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    pointer-events: none;
    padding-left: 4px;
    /* Pionowy układ liter: writing-mode pozwala napis "scroluj" rozpisać w pionie. */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1px;
}
.device-type-scroll-hint i {
    font-size: 12px;
    /* Strzałka osobno, nie podlega writing-mode — obróć w kierunku pionowym. */
    writing-mode: horizontal-tb;
    transform: rotate(90deg);
    margin-top: 4px;
}

/* === Mobile: tło na dole, podniesione elementy (safe area dla pasków przeglądarki) === */
@media (max-width: 991.98px) {
    /* tło na dole canvasu (obrazek 14 z dokumentu) */
    #kanvaWrapper {
        position: relative;
    }
    #kanvaWrapper::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 80px;
        background: linear-gradient(to bottom, rgba(245, 245, 245, 0), rgba(225, 225, 225, 0.85));
        pointer-events: none;
        z-index: 1;
    }

    /* Padding pod bottom safe area, aby UI nie kolidowało z paskiem przeglądarki (obrazek 15) */
    .mobile-tab-content {
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    }
    /* Dodatkowy margines dolny calego panelu menu kreatora. */
    .navigation-buttons {
        margin-bottom: 4px;
    }
}


/* Podpowiedz scrollowania przy wyborze typu urzadzenia pozostaje ukryta. */
.device-type-scroll-hint { display: none !important; }

/* Przydatne dodatki: trzy produkty w rzędzie na desktopie, przewijana lista na telefonie. */
.kreator-addons-panel { max-height: min(50vh, 520px); overflow-y: auto; }
.kreator-useful-addons-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 8px; row-gap: 18px; padding: 8px 2px 14px; }
.kreator-addon-card { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: center; }
.kreator-addon-card[hidden], .kreator-addon-empty[hidden] { display: none !important; }
.kreator-addon-image { display: block; width: 100%; height: 98px; object-fit: contain; margin-bottom: 10px; }
.kreator-addon-price { min-height: 18px; color: #4d4d4d; font-size: 11px; font-weight: 400; line-height: 1.25; white-space: nowrap; }
.kreator-addon-price .woocommerce-Price-currencySymbol { font-size: inherit; }
.kreator-addon-add { position: relative; display: block; width: 36px; height: 36px; margin-top: 2px; }
.kreator-addon-toggle { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.kreator-addon-add-icon { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #111; font-size: 29px; font-weight: 300; line-height: 1; }
.kreator-addon-check { display: none; }
.kreator-addon-toggle:checked + .kreator-addon-add-icon { color: #00c764; }
.kreator-addon-toggle:checked + .kreator-addon-add-icon .kreator-addon-plus { display: none; }
.kreator-addon-toggle:checked + .kreator-addon-add-icon .kreator-addon-check { display: block; font-size: 25px; }
.kreator-addon-toggle:focus-visible + .kreator-addon-add-icon { outline: 2px solid #198754; outline-offset: 1px; border-radius: 50%; }
.kreator-addon-empty { margin: 12px 4px; font-size: 13px; color: #666; }

@media (max-width: 991.98px) {
    #mobileUsefulAddons { padding-right: 0; }
    #mobileUsefulAddons .kreator-useful-addons-list { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 8px 12px 8px 0; scrollbar-width: none; }
    #mobileUsefulAddons .kreator-useful-addons-list::-webkit-scrollbar { display: none; }
    #mobileUsefulAddons .kreator-addon-card { flex: 0 0 102px; scroll-snap-align: start; }
    #mobileUsefulAddons .kreator-addon-image { height: 96px; }
    #mobileUsefulAddons .kreator-addon-add { width: 44px; height: 44px; }
}

/* Zakladka "Kolor etui" gdy dla wybranego modelu+typu nie ma alternatywnych kolorow.
   Niezalezna od .d-none, ktore refreshTabsVisibility (deviceTypeSelector.js) usuwa,
   gdy etui jest aktywne — przez co przycisk pojawial sie z pusta zawartoscia. */
.kreator-empty-tab { display: none !important; }

/* === Case type picker (Typ Etui) — spojny z device type picker (okragle miniaturki). === */
.case-type-selected-label {
    margin: 0 4px 8px;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.case-type-option {
    display: inline-block;
    width: 92px;
    margin: 0 4px 12px 4px;
    padding: 4px 0;
    text-align: center;
    border: none;
    border-radius: 12px;
    outline: none;
    background-color: transparent;
    transition: background-color 0.2s ease;
    color: inherit;
}
.case-type-option:hover {
    background-color: rgba(0, 0, 0, 0.03);
}
.case-type-option:focus,
.case-type-option:active,
.case-type-option.active {
    outline: none;
    box-shadow: none;
    background-color: transparent;
}
.case-type-thumb-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    background-color: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease;
}
.case-type-option.active .case-type-thumb-wrapper {
    border-width: 2px;
    border-color: #1f1f1f;
}
.case-type-thumb {
    width: 56px;
    height: 56px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.case-type-label {
    font-size: 12px;
    line-height: 1.2;
    margin: 6px 0 2px;
    color: #1f1f1f;
}
.case-type-price {
    font-size: 11px;
    color: #777;
    margin: 0;
}

/* Przycisk zakupu w obu wersjach kreatora. */
.addToCartButton,
.addToCartButton.bg-black {
    background: #00c764 !important;
    border: 1px solid #00c764 !important;
    color: #fff !important;
}
.addToCartButton:hover,
.addToCartButton:focus-visible {
    background: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}
.addToCartButton i,
.addToCartButton span { color: inherit !important; }

@media (max-width: 991.98px) {
    #productPreviewArea,
    #kanvaWrapper { min-height: 0; }
    #productPreviewArea { position: relative; }
    .mobile-preview-controls {
        position: absolute;
        top: 12px;
        bottom: 12px;
        left: 8px;
        z-index: 1000;
        width: 36px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        pointer-events: none;
    }
    .mobile-vertical-control {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 9px;
        margin: 0;
        color: #000;
        font-size: 14px;
        font-weight: 400;
        pointer-events: auto;
    }
    .mobile-vertical-control > span:first-child {
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }
    .mobile-rotation-control { --range-length: clamp(80px, 15dvh, 125px); }
    .mobile-scale-control { --range-length: clamp(100px, 20dvh, 165px); }
    .mobile-vertical-range {
        display: block;
        position: relative;
        width: 28px;
        height: var(--range-length);
    }
    .mobile-preview-controls .custom-slider {
        position: absolute;
        top: 50%;
        left: 50%;
        width: var(--range-length);
        max-width: none;
        height: 8px;
        margin: 0;
        transform: translate(-50%, -50%) rotate(90deg);
    }
    .mobile-remove-selection {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border: 0;
        background: transparent;
        padding: 0;
        color: #111;
        font-size: 24px;
        pointer-events: auto;
    }
    .mobile-device-navigation {
        position: absolute;
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        z-index: 60;
        width: 38px;
        height: min(60%, 400px);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    .mobile-device-thumbnails {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 7px;
    }
    .mobile-device-thumbnail {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 2px;
        border: 1px solid #d0d0d0;
        background: rgba(255, 255, 255, .8);
        cursor: pointer;
    }
    .mobile-device-thumbnail.is-current { border-color: #111; }
    .mobile-device-thumbnail img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    .mobile-device-scroll-control {
        position: relative;
        flex: 1 1 auto;
        width: 32px;
        min-height: 90px;
        border: 0;
        background: transparent;
        padding: 0;
        touch-action: none;
        cursor: ns-resize;
    }
    .mobile-device-scroll-track {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 8px;
        transform: translateX(-50%);
        border-radius: 6px;
        background: linear-gradient(to bottom, #0e0e0e 0%, #0e0e0e var(--scroll-progress, 0%), #e0e0e0 var(--scroll-progress, 0%), #e0e0e0 100%);
    }
    .mobile-device-scroll-thumb {
        position: absolute;
        top: 0;
        left: 50%;
        width: 22px;
        height: 22px;
        transform: translate(-50%, -50%);
        border: 2px solid #fff;
        border-radius: 50%;
        background: #0e0e0e;
        box-shadow: 0 0 5px rgba(0, 0, 0, .2);
        pointer-events: none;
    }
    .mobile-device-scroll-control:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
    .mobile-cart-bar { flex: 1 1 0; min-width: 0; gap: 4px; min-height: 82px; }
    .mobile-cart-back { flex: 0 0 auto; margin-right: 0; }
    .mobile-cart-actions {
        flex: 0 0 auto;
        align-self: stretch;
        display: flex;
        align-items: center;
        padding-left: 0;
    }
    .mobile-cart-actions .addToCartButton { white-space: nowrap; padding: 9px 12px; font-size: 16px; }
    .mobile-cart-actions .addToCartButton i { margin-right: 4px !important; }
    .mobile-cart-bar .cartProductsSummary {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: calc((100% - 40px) / 4);
        gap: 4px;
        align-items: center;
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        line-height: 1.2;
        text-align: center;
    }
    .mobile-cart-bar .cartProductsSummary::-webkit-scrollbar { display: none; }
    .mobile-cart-bar .cartProductsSummary.fits-content { justify-content: center; }
    .mobile-cart-bar .cartProductsSummary.has-more-right {
        -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), rgba(0, 0, 0, .4) 100%);
        mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), rgba(0, 0, 0, .4) 100%);
    }
    .mobile-cart-bar .cartProductsSummary[data-visible-count="1"] { grid-auto-columns: 100%; }
    .mobile-cart-bar .cartProductsSummary[data-visible-count="2"] { grid-auto-columns: calc((100% - 4px) / 2); }
    .cart-summary-item { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; scroll-snap-align: start; }
    .cart-summary-image { position: relative; display: flex; align-items: center; justify-content: center; width: min(48px, 100%); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #f2f2f2; }
    .cart-summary-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
    .cart-summary-image .cart-summary-overlay { position: absolute; inset: 0; }
    .cart-summary-image .cart-summary-overlay[hidden] { display: none; }
    .cart-summary-price { white-space: nowrap; font-size: clamp(9.5px, 2.7vw, 11px); font-weight: 400; letter-spacing: -.15px; }

    #mobileEditorPanel { flex: 0 0 auto; min-height: 0; }
    #mobileEditorContent { max-height: min(55dvh, 460px); overflow-y: auto; overscroll-behavior: contain; }
    #mobileEditorPanel.is-collapsed #mobileEditorContent { display: none; }
    .mobile-panel-toggle {
        width: 100%;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: #fff;
        color: #333;
        border-radius: 16px 16px 0 0;
    }
    .mobile-panel-toggle i { font-size: 12px; }
    #mobileEditorPanel.is-collapsed .mobile-panel-toggle i { transform: rotate(180deg); }
    .mobile-tab-navigation { align-items: center; }
    .mobile-tab-navigation .clear-button,
    .mobile-panel-toggle { color: #000 !important; }
    .mobile-tab-arrow { flex: 0 0 32px; padding: 4px; }
    .mobile-tab-arrow.is-hidden { visibility: hidden; pointer-events: none; }
    .navigation-buttons { padding-left: 0; padding-right: 0; scrollbar-width: none; }
    .navigation-buttons::-webkit-scrollbar { display: none; }
    .navigation-buttons button { margin-left: 14px; margin-right: 14px; }
    #mobileDeviceType { padding-top: 6px; }
    #mobileDeviceType .device-type-option-mobile { font-size: 11px; }
    #mobileDeviceType > p { margin-top: 4px !important; }
    #mobileDeviceModel #phoneColors,
    #mobileCaseType #caseType,
    #mobileTemplate #template { margin-bottom: 0 !important; padding-bottom: 0 !important; }
    #mobileCaseType .case-type-option { margin-bottom: 2px; }
    #mobileTemplate #template { padding-top: 0 !important; }
}

@media (max-width: 991.98px) and (max-height: 650px) {
    .mobile-preview-controls { top: 6px; bottom: 6px; gap: 4px; }
    .mobile-remove-selection { width: 26px; height: 26px; font-size: 19px; }
    .mobile-vertical-control { gap: 2px; font-size: 10px; }
    .mobile-rotation-control { --range-length: 35px; }
    .mobile-scale-control { --range-length: 42px; }
    .mobile-device-navigation { height: calc(100% - 16px); gap: 5px; }
    .mobile-device-thumbnails { gap: 3px; }
    .mobile-device-thumbnail { width: 28px; height: 28px; }
    .mobile-device-scroll-control { min-height: 40px; }
}
