:root { color-scheme: only light; }
html { -webkit-filter: none !important; filter: none !important; }

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: only light;
        --body: #f2f2f2;
        --primary: #131313;
        --white: #ffffff;
        --dis: #787878;
        --gray: #595959;
        --grayBG: #f2f2f2;
        --gray-100: #f8f9fa;
        --gray-200: #e9ecef;
        --gray-300: #dee2e6;
        --gray-400: #ced4da;
        --gray-500: #adb5bd;
        --gray-600: #6c757d;
        --gray-700: #495057;
        --gray-800: #343a40;
        --gray-900: #212529;
    }
    html {
        background-color: #f2f2f2 !important;
        filter: none !important;
        -webkit-filter: none !important;
    }
    body {
        background-color: #f2f2f2 !important;
        color: #131313 !important;
    }
}

body {
    margin: 0 24px;
    padding: 0;
    font-family: var(--font-family);
    background: var(--body);
    color: var(--primary);
    line-height: 1.6;
}

/* Шрифт Inter раньше подключался внешним @import с Google Fonts — это render-blocking
   CDN, который режется/виснет на RU/офисной сети (особенно iOS Safari → вечная загрузка).
   Убрано: используется системный стек шрифтов ниже. Если нужен Inter — самохостить в assets. */

:root {
    --body: #f2f2f2;
    --primary: #131313;
    --brand: #ff335f;
    --white: #ffffff;
    --dis: #787878;
    --brandHover: #ff4c73;
    --gray: #595959;
    --grayBG: #f2f2f2;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    --bs1: 0 0.1rem 38px rgb(73 113 208 / 13%);
    --bs2: 0 0.1rem 12px 2px rgb(73 113 208 / 13%);
    --bs3: 0px 20px 60px rgba(26, 26, 26, 0.05);
    --bs4: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bs5: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --br: 32px;
    --br-sm: 8px;
    --br-md: 16px;
    --br-lg: 24px;
    --br-xl: 32px;
    --br-full: 9999px;
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --fw400: 400;
    --fw600: 600;
    --fw700: 700;
    
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: calc(95vh - 80px);
    height: auto;
}
.sidebar {
    background: var(--white);
    color: var(--primary);
    padding: var(--spacing-xl);
    border-radius: var(--br);
    box-shadow: var(--bs3);
    border: 1px solid var(--gray-200);
}
.sidebar h3 {
    margin-bottom: var(--spacing-xl);
    text-align: center;
    font-weight: var(--fw600);
    color: var(--primary);
    font-size: var(--font-size-2xl);
}
.upload-section {
    margin-bottom: var(--spacing-xl);
}
.main-content .upload-section {
    margin-bottom: var(--spacing-md);
}
.main-content .upload-section .form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: var(--fw500);
    color: var(--primary);
    font-family: var(--font-family);
}
.card-login {
    border-radius: var(--br);
    box-shadow: var(--bs3);
    border: 1px solid var(--gray-200);
    text-align: center;
}
.card-login .btn.btn-primary {
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: var(--br);
    padding: 15px 25px;
    font-weight: var(--fw600);
}
.card-login .btn.btn-primary:hover {
    background: #ff4c73;
    border-color: #ff4c73;
}
.card-login input {
    border-radius: var(--br-sm);
    font-family: var(--font-family);
    border: 1px solid var(--gray-300);
    transition: var(--transition-base);
    padding: 10px;
}
.card-login input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(255, 51, 95, 0.25);
}
.card-login .form-label {
    margin-bottom: .5rem;
    font-size: 14px;
    font-weight: var(--fw600);
}
.card-login h1 {
    margin-bottom: 10px !important;
}
.color-picker h5 {
    margin-bottom: 1rem;
    font-weight: var(--fw500);
}
.color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}
.color-option {
    width: 40px;
    height: 40px;
    border-radius: var(--br-full);
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition-base);
    box-shadow: var(--bs4);
}
.color-option:hover {
    transform: scale(1.1);
    border-color: var(--brand);
    box-shadow: var(--bs2);
}
.color-option.selected {
    border-color: var(--brand);
    transform: scale(1.2);
    box-shadow: var(--bs2);
}
.opacity-control {
    margin-bottom: var(--spacing-xl);
}
.opacity-control label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: var(--fw500);
    color: var(--primary);
    font-family: var(--font-family);
}
.status {
    padding: var(--spacing-sm);
    border-radius: var(--br-sm);
    text-align: center;
    font-weight: var(--fw500);
    margin-top: var(--spacing-md);
    font-family: var(--font-family);
}
.status.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}
.status.processing {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}
.status.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}
.main-content {
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: var(--white);
    border-radius: var(--br);
}
#aiScanRecommendations .card-body {
    padding: 15px !important;
}
.grid-layout {
    overflow: visible;
}
.grid-layout > .sidebar,
.grid-layout > .main-content {
    min-height: 0;
    height: auto;
}
.sidebar {
    overflow: auto;
}
.main-content {
    overflow: visible;
}
#quizBot {
    max-height: 100%;
}
#quizBot .card-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#quizMessages,
#quizResult {
    min-height: 0;
}
#quizResult {
    overflow: visible;
}
.py-quiz {
    padding: 15px !important;
    border-radius: 20px;
}
.py-quiz.text-user {
    background: var(--white) !important;
    color: var(--primary) !important;
    border: 1px solid #ffc7d3;
}
#quizChoices.quiz-choices {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.allergy-wrap {
    width: 100%;
    flex-shrink: 0;
}
.btn.btn-quiz {
    min-width: 200px;
    padding: 15px;
    border-radius: 17px;
    border: 1px solid var(--brand);
    color: var(--white);
    background: var(--brand);
    font-weight: var(--fw600);
}
.quiz-allergy-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
    min-height: 1.5rem;
}
.quiz-allergy-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.75em;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--gray, #555);
    background: var(--grayBG, #f0f0f0);
    border-radius: 999px;
    white-space: nowrap;
}
.btn.btn-quiz.btn-quiz-allergy {
    min-width: 200px;
    padding: 15px;
    border-radius: 17px;
    border: 1px solid var(--brand);
    color: var(--white);
    background: var(--brand);
    font-weight: var(--fw600);
}
.btn.quiz-allergy-skip-btn {
    min-width: 200px;
    padding: 15px;
    border-radius: 17px;
    border: 1px solid var(--brand);
    color: var(--brand);
    background: var(--white);
    font-weight: var(--fw600);
    margin-left: 10px;
}
.quiz-allergy-skip-btn:hover {
    background: var(--brandHover);
    color: var(--white);
}
#quizChoices.quiz-choices .input-group {
    flex: 1 1 100%;
}
#quizChoices.quiz-choices > .btn {
    flex: 0 0 auto;
    min-width: 200px;
    padding: 15px;
    border-radius: 17px;
    border: 1px solid var(--brand);
    color: var(--white);
    background: var(--brand);
    font-weight: var(--fw600);
}
#quizChoices.quiz-choices > .btn:hover {
    background: #ff4c73;
    border: none;
    border: 1px solid #ff4c73;
}
#quizResult .quiz-prod-desc,
#quizResult .quiz-prod-comp {
    overflow: hidden;
    word-break: break-word;
}
#quizResult .quiz-product-card {
    overflow: hidden;
}
#quizResult .quiz-product-card .card-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
#quizResult .quiz-card-img {
    width: 100%;
    height: clamp(180px, 26vw, 280px);
    background: #fff;
    overflow: hidden;
    padding: 4px;
}

#quizResult .quiz-card-img-el {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
#quizResult .quiz-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .03);
}
#quizResult .quiz-card-price {
    font-weight: var(--fw600);
    color: var(--primary);
    font-size: 18px;
    background: var(--grayBG);
    padding: 6px;
    border-radius: 8px;
}
#quizResult .quiz-card-volume {
    color: var(--dis);
}
#quizResult .quiz-card-select {
    margin-top: auto;
    margin-top: auto;
    background: var(--brand);
    border: 1px solid var(--brand);
    font-size: 16px;
    font-weight: var(--fw600);
    padding: 15px;
    border-radius: 50px;
    color: var(--white);
}
#quizResult .quiz-card-select:hover {
    background: #ff4c73;
    border: none;
    border: 1px solid #ff4c73;
}
.scenario-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 15px;
    border-radius: 50px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: inherit;
    text-decoration: none;
    margin: 15px 0;
}
.scenario-btn:hover {
    background: rgba(0, 0, 0, .04);
    border-color: rgba(0, 0, 0, .12);
}
.scenario-btn.scenario-btn-active {
    background: var(--white);
    border: 1px solid var(--brand);
    color: var(--brand);
    font-weight: var(--fw600);
}
.scenario-btn.scenario-btn-active:hover {
    background: var(--brand);
    border: 1px solid var(--brand);
    color: var(--white);
    font-weight: var(--fw600);
}
.scenario-btn__ico {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
    display: block;
}
.scenario-btn__text {
    font-weight: var(--fw600);
    line-height: 1.2;
}
#pdmName {
    font-size: 1.7rem;
    font-weight: var(--fw600);
}
button#pdmOrder {
    background: var(--brand);
    border: 1px solid var(--brand);
    padding: 15px;
    font-size: 18px;
    font-weight: var(--fw600);
    border-radius: 50px;
}
button#pdmOrder:hover {
    background: #ff4c73;
    border: none;
    border: 1px solid #ff4c73;
}
button#pdmShare {
    font-size: 14px;
    border: 1px solid var(--brandHover);
    color: var(--brand);
    margin: 10px 0 25px 0 !important;
}
button#pdmShare:hover {
    background: var(--brandHover);
    color: var(--white);
}
#pdmDesc {
    color: #606060;
    font-size: 15px;
    margin-bottom: 25px !important;
}
.fw-custom-heading {
    color: var(--gray);
    font-size: 15px;
}
.menu-scenarious-h2 {
    font-size: 16px;
    font-weight: var(--fw600);
    margin-bottom: 20px;
}
.menu-scenarious-h2 span {
    color: var(--brand);
    text-transform: uppercase;
}
.menu-scenarios__disclaimer {
    color: var(--gray);
    font-size: 15px;
    margin-bottom: 25px;
    display: block;
}
.scenario-btn__ico.scenario-btn__ico--trends {
    border-radius: 50px;
    margin-right: 5px;
    height: 25px;
    width: 25px;
}
.sidebar-trends {
    display: block;
    margin-top: 1rem;
    min-height: 100px;
    max-height: 400px;
    aspect-ratio: 4 / 4;
    border-radius: var(--br);
    background: url('../../assets/images/trends.gif') center center / cover no-repeat;
    text-decoration: none;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.sidebar-trends::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(38 0 25 / 35%);
    border-radius: inherit;
}
.sidebar-trends__text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    height: 100%;
    font-weight: var(--fw600);
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.sidebar-trends--active .sidebar-trends__text {
    text-decoration: underline;
}
.ai-security-disclaimer {
    background: #f4fff4;
    border-radius: 17px;
    padding: 5px;
    border: 1px solid #d9f7dc;
    margin-bottom: 15px;
}

.trends-grid {
    column-count: 1;
    column-gap: 1rem;
}
.trends-grid__item {
    break-inside: avoid;
    margin-bottom: 1rem;
}
.trends-card {
    background: var(--white);
    border-radius: var(--br);
    overflow: hidden;
    box-shadow: var(--bs1);
}
.trends-card__embed {
    padding: 1rem;
    min-height: 120px;
}
.trends-card--tall .trends-card__embed {
    min-height: 220px;
}
.trends-tiktok-iframe {
    display: block;
    width: 100%;
    min-height: 360px;
    border: none;
    border-radius: 25px;
}
.trends-card--tall .trends-tiktok-iframe {
    min-height: 520px;
}
.chat-avatar {
    height: 32px;
    width: auto;
    display: inline-block;
    margin-top: -5px;
}
.trends-btn-want {
    padding: 15px;
    background: var(--brand);
    border: none;
    font-size: 16px;
    font-weight: var(--fw600);
    border-radius: 50px;
}
.trends-btn-want:hover {
    background: var(--brandHover);
    border: none;
}
#productDetailsModal .pdm-dialog {
    width: min(96vw, 1040px) !important;
    max-width: 1040px !important;
}
#faceScanModal .pdm-dialog {
    width: min(96vw, 800px) !important;
    max-width: 800px !important;
}
#productDetailsModal .pdm-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#faceScanModal .pdm-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#faceScanModal .pdm-grid:not(.face-scan-has-preview) .pdm-left {
    display: none;
}
#productDetailsModal .order-step-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
#productDetailsModal .order-step-left {
    order: 1;
}
#productDetailsModal .order-step-right {
    order: 2;
}
#productDetailsModal .order-product-top {
    flex-wrap: nowrap;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 9px;
}
#productDetailsModal .order-product-img-wrap {
    aspect-ratio: 1;
    width: 120px;
    max-width: 160px;
    background: var(--gray-100, #f5f5f5);
    box-shadow: var(--bs1);
    border-radius: 15px !important;
    border: none;
}
#productDetailsModal .order-product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#orderForm label {
    font-size: 12px;
    color: var(--bs-gray-600);
    font-weight: var(--fw400);
}
button#orderSubmitBtn {
    padding: 15px;
    background: var(--brand);
    border: none;
    font-size: 16px;
    font-weight: var(--fw600);
    border-radius: 50px;
}
button#orderSubmitBtn:hover {
    background: var(--brandHover);
    border: none;
}
button#orderSubmitBtn:focus, button#orderSubmitBtn:active {
    background: var(--brandHover) !important;
}
#orderForm input, #orderForm textarea {
    padding: 15px;
}
#pdmStepOrder h5 {
    margin-bottom: 15px !important;
}
.order-product-info .badge {
    background: #cdff62;
    color: var(--primary);
    font-weight: var(--fw600);
    font-size: 16px !important;
}
.order-step-summary .badge.badge-result {
    background: var(--white);
    color: var(--bs-gray);
    font-weight: var(--fw400);
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 50px;
    box-shadow: var(--bs1);
}
#orderBackBtn {
    font-size: 12px;
    padding: 12px;
    border: 1px solid #eee;
}
#orderBackBtn:hover {
    background: var(--body);
    border: 1px solid var(--body);
}
#productDetailsModal .pdm-step-order .order-step-summary #orderQuizSummaryBlock .gap-2 {
    gap: .7rem !important;
}
#orderUpsellSection {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 9px;
}
#orderUpsellSection .card {
    padding: 0 !important;
}
#orderProductTitle {
    font-size: 20px;
}
#orderUpsellSummaryBlock .badge.badge-result {
    background: var(--white);
    color: var(--bs-gray);
    font-weight: var(--fw400);
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 50px;
    box-shadow: var(--bs1);
}
#productDetailsModal .order-product-info {
    padding-top: 0.125rem;
}
#productDetailsModal .order-product-info #orderProductPrice {
    font-size: 1rem;
}
#productDetailsModal .order-upsell-section .small {
    margin-bottom: 0;
}
#productDetailsModal .pdm-step-order .order-step-summary #orderQuizSummaryBlock {
    margin-top: 0.25rem;
}
#productDetailsModal .pdm-step-thankyou {
    text-align: center;
}
#productDetailsModal .pdm-step-thankyou .pdm-thankyou-close {
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.9);
    background-image: var(--bs-btn-close-bg);
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
}
#productDetailsModal .pdm-step-thankyou .pdm-thankyou-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 1);
}
#productDetailsModal .pdm-step-thankyou .thank-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 28px;
    background-color: #e7fff4;
    color: rgb(0 224 120) !important;
}
#orderThankCabinetBtn {
    padding: 15px 35px;
    background: var(--brand);
    border: none;
    font-size: 16px;
    font-weight: var(--fw600);
    border-radius: 50px;
}
#orderThankCabinetBtn:hover {
    background: var(--brandHover);
    border: none;
}
#orderThankCabinetBtn:focus, #orderThankCabinetBtn:active {
    background: var(--brandHover) !important;
}
#productDetailsModal .pdm-step-thankyou .thank-code {
    display: inline-block;
    padding: 15px 25px;
    margin-bottom: 25px;
    border: 1px solid #eee;
    border-radius: 15px;
}
.thank-code__title {
    font-size: 14px;
    color: var(--bs-dark-text-emphasis);
}
.thank-code__phone {
    font-size: 14px;
    color: var(--bs-dark-text-emphasis);
    font-weight: var(--fw600);
}
#orderThankCode {
    letter-spacing: 10px;
    color: var(--brand);
}

/* AI scan page */
.ai-scan-hints {
    margin-bottom: 1rem;
}
.ai-scan-hint__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e7fff4;
    color: rgb(0 224 120);
    font-size: 18px;
    flex-shrink: 0;
    margin-bottom: 15px;
    font-weight: var(--fw600);
    margin-right: 7px;
}
.ai-scan-hint__text {
    font-size: 15px;
    color: var(--bs-gray-800);
}
.ai-scan-photo-wrap {
    max-width: 440px;
    width: 100%;
}
.ai-scan-photo-wrap img {
    width: 100%;
    height: auto;
    border-radius: 25px;
}
.ai-scan-placeholder {
    font-size: 12px;
}
.ai-scan-main {
    align-items: stretch;
    flex-wrap: nowrap;
}

.ai-scan-security-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ai-scan-security {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--bs1);
    max-width: 500px;
}
.ai-scan-security__icon-wrap {
    flex-shrink: 0;
}
.ai-scan-security__icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
}
.ai-scan-security__title {
    font-size: 0.95rem;
    font-weight: var(--fw600);
    margin-bottom: 0.15rem;
}
.ai-scan-security__text {
    font-size: 0.85rem;
    color: var(--gray, #6c757d);
}

.ai-scan-step2-title {
    font-weight: var(--fw600);
    font-size: 1rem;
}
.ai-scan-question-label {
    font-size: 0.9rem;
    font-weight: 500;
}
.ai-scan-gender-btn {
    flex: 1 1 0;
    border-radius: 999px;
    border: 1px solid var(--gray-400);
    background: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--primary);
    padding: 15px;
    border-radius: 7px;
}
.ai-scan-gender-btn:hover {
    border-color: #ffdbe3;
    background: #ffdbe3;
    color: var(--primary);
}
.ai-scan-gender-btn--active {
    border-color: #ffdbe3;
    background: #ffdbe3;
    color: var(--primary);
}
.ai-scan-age-input {
    padding: 15px;
    max-width: 120px;
}
.ai-scan-name-input {
    padding: 15px;
    font-size: 14px;
}
.ai-scan-btn-loading {
    cursor: wait;
}
.ai-scan-step3-title {
    font-weight: var(--fw600);
    font-size: 1rem;
}
.btn.ai-scan-allergy-toggle {
    margin: 25px 0 !important;
    background: #ffdbe3;
    padding: 15px !important;
    color: var(--primary);
    font-size: 14px;
    text-decoration: none;
}
.btn.ai-scan-allergy-toggle:hover {
    background: #ffe3e9;
}
.btn.ai-scan-allergy-toggle:focus, .btn.ai-scan-allergy-toggle:active {
    background: #ffdbe3 !important;
    color: var(--primary) !important;
}
#aiScanAllergyTags .quiz-allergy-tag {
    border: 1px solid #eee;
    background: var(--white);
}

.ai-scan-result {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ai-scan-result-item {
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    background: #f8f9fb;
}
.ai-scan-result-item__row {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
#aiScanRescanBtn.btn.btn-primary.btn-face-scan {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    border-bottom: 1px dashed var(--gray-500);
    border-radius: 0;
}
.ai-scan-result-item__row-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.ai-scan-step4 #aiScanSummary {
    width: 100%;
}
.ai-scan-step4 #aiScanSummary .badge.badge-result {
    white-space: nowrap;
}
.ai-scan-result-item__label {
    font-weight: var(--fw600);
    color: var(--bs-body-color);
    margin-right: 4px;
}
.ai-scan-result-item__value {
    font-weight: var(--fw600);
    color: #00b04e;
}
.ai-scan-result-item__desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--gray, #6c757d);
}
.ai-scan-result-feature-name {
    font-weight: var(--fw600);
}
.ai-scan-result-feature {
    margin-bottom: 10px;
}
.ai-scan-result-feature:last-child {
    margin-bottom: 0;
}
.ai-scan-result-manual {
    margin-top: 0.5rem;
}
.ai-scan-result-manual__title {
    font-size: 0.8rem;
    color: var(--gray, #6c757d);
    margin-bottom: 0.25rem;
}
.ai-scan-result-manual__choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.ai-scan-result-choice {
    border-radius: 999px;
    border: 1px solid var(--gray-300, #dee2e6);
    background: #fff;
    padding: 4px 10px;
    font-size: 0.8rem;
    line-height: 1.2;
    cursor: pointer;
}
.ai-scan-result-choice--active,
.ai-scan-result-choice:hover {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.ai-scan-result-edit {
    border: none;
    background: transparent;
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: var(--fw600);
    padding: 2px 0;
    cursor: pointer;
    white-space: nowrap;
}
.ai-scan-result-edit:hover {
    text-decoration: underline;
}
.card-ai-scan {
    padding: 0 !important;
    box-sizing: none;
}
.card-ai-scan .card-body {
    padding: 0 !important;
}

.ai-scan-reco-card {
    border-radius: 16px;
    border: 1px solid var(--gray-200, #e9ecef);
    padding: 0.9rem 1rem;
    background: #fff;
    box-shadow: var(--bs1);
    height: 100%;
}
.ai-scan-reco-title {
    font-size: 0.95rem;
    font-weight: var(--fw600);
    margin-bottom: 0.3rem;
}
.ai-scan-reco-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f3f5;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}
.ai-scan-reco-text {
    font-size: 0.85rem;
    color: var(--gray, #6c757d);
}

/* ── Scan Results v2 ───────────────────────────────────────────────────── */
.scan-results-v2 { display:flex; flex-direction:column; gap:1rem; margin-top:.5rem; }

.scan-results-header {
    display:flex; align-items:center; gap:.75rem;
    background:linear-gradient(135deg,#fff0f5,#f5f0ff);
    border-radius:16px; padding:1rem 1.25rem;
    border:1px solid #ede9fe;
}
.scan-results-header__sparkle { font-size:1.6rem; line-height:1; }
.scan-results-header__title { font-weight:700; font-size:1rem; color:#1a1a2e; }
.scan-results-header__sub { font-size:.75rem; color:#999; margin-top:2px; }

.scan-cards-row {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:.75rem;
}
@media(max-width:600px) { .scan-cards-row { grid-template-columns:1fr; } }

.scan-card {
    background:#fff;
    border-radius:16px;
    padding:1.1rem 1.15rem;
    box-shadow:0 2px 12px rgba(0,0,0,.06);
    border:1px solid #f0f0f4;
    display:flex; flex-direction:column; gap:.65rem;
}
.scan-card.ai-scan-result-item--age   { border-top:3px solid #ff335f; }
.scan-card.ai-scan-result-item--type  { border-top:3px solid #3b82f6; }
.scan-card.ai-scan-result-item--features { border-top:3px solid #8b5cf6; }

.scan-card__header { display:flex; align-items:center; justify-content:space-between; }
.scan-card__header-left { display:flex; align-items:center; gap:.4rem; }
.scan-card__emoji { font-size:1.1rem; line-height:1; }
.scan-card__cat {
    font-size:.65rem; font-weight:700; text-transform:uppercase;
    letter-spacing:.06em; color:#aaa;
}
.scan-card__edit-link {
    background:none; border:none; cursor:pointer;
    font-size:.7rem; color:#bbb; padding:0; transition:color .15s;
}
.scan-card__edit-link:hover { color:#ff335f; }

.scan-card__value-wrap { display:flex; align-items:baseline; flex-wrap:wrap; gap:.4rem; }
.scan-card__value-main {
    font-size:1.35rem; font-weight:700; color:#1a1a2e; line-height:1.2;
}
.scan-card__match-ok  { font-size:.7rem; font-weight:600; color:#22c55e; }
.scan-card__match-fail { font-size:.7rem; font-weight:600; color:#ef4444; }

.scan-card__desc {
    font-size:.78rem; line-height:1.55; color:#666;
}

/* Skin type spectrum */
.skin-spectrum { display:flex; flex-direction:column; gap:.3rem; }
.skin-spectrum__track {
    position:relative; height:5px; background:#e9ecef; border-radius:3px;
}
.skin-spectrum__dot {
    position:absolute; top:50%; transform:translate(-50%,-50%);
    width:13px; height:13px; border-radius:50%;
    background:#3b82f6; border:2px solid #fff;
    box-shadow:0 1px 5px rgba(59,130,246,.45);
    transition:left .3s;
}
.skin-spectrum__labels {
    display:flex; justify-content:space-between;
    font-size:.62rem; color:#bbb;
}

/* Feature chips */
.scan-card__chips { display:flex; flex-wrap:wrap; gap:.35rem; }
.scan-chip {
    display:inline-flex; align-items:center;
    padding:.2rem .6rem; border-radius:20px;
    font-size:.75rem; font-weight:600; white-space:nowrap;
}
.scan-card__no-feat { font-size:.8rem; color:#bbb; font-style:italic; }

@media (min-width: 768px) {
    .ai-scan-security-row {
        flex-direction: row;
    }
    .ai-scan-security-row > * {
        flex: 1 1 0;
    }
}

@media (min-width: 768px) {
    .ai-scan-controls {
        flex: 0 0 60%;
        max-width: 60%;
    }
    .ai-scan-photo {
        flex: 0 0 40%;
        max-width: 40%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .ai-scan-step4-active .ai-scan-controls {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .ai-scan-step3-active .ai-scan-security-row,
    .ai-scan-step4-active .ai-scan-security-row {
        display: none;
    }
}
@media (min-width: 768px) {
    #productDetailsModal .order-step-grid {
        flex-direction: row;
        align-items: flex-start;
    }
    #productDetailsModal .order-step-left,
    #productDetailsModal .order-step-right {
        flex: 1 1 0;
        min-width: 0;
    }
}
#faceScanResult {
    display: inline-block;
    margin: 10px 0 30px 0;
    border-radius: 17px;
    width: 100%;
}
#productDetailsModal .modal-content,
#faceScanModal .modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
#productDetailsModal .modal-body {
    padding: 1rem;
}
#faceScanModal .modal-body {
    padding: 2rem;
}
.face-scan-intro {
    font-size: 15px;
    color: var(--bs-gray-800);
    font-weight: var(--fw600);
    margin-bottom: 25px;
}
.btn-face-scan,
.btn.btn-primary.btn-face-scan {
    padding: 15px 45px;
    background: var(--brand);
    border: none;
    font-size: 16px;
    font-weight: var(--fw600);
    border-radius: 50px;
    margin-bottom: 25px;
}
.btn-face-scan:hover,
.btn.btn-primary.btn-face-scan:hover {
    background: var(--brandHover);
    border: none;
}

.btn.btn-primary.btn-face-scan {
    padding: 15px 45px;
    background: var(--brand);
    border: none;
    font-size: 16px;
    font-weight: var(--fw600);
    border-radius: 50px;
    margin-bottom: 25px;
}
.btn.btn-primary.btn-face-scan:hover {
    background: var(--brandHover);
    border: none;
}

#productDetailsModal .pdm-img-wrap,
#faceScanModal .pdm-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    display: block;
    border: none !important;
    box-shadow: var(--bs1);
    border-radius: 15px !important;
}
#productDetailsModal .pdm-img-wrap img,
#faceScanModal .pdm-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#productDetailsModal .pdm-close-mobile,
#faceScanModal .pdm-close-mobile {
    display: none;
}
#faceScanModal .face-scan-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1055;
    background-color: rgba(255, 255, 255, 0.9);
    background-image: var(--bs-btn-close-bg);
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
#faceScanModal .face-scan-close-btn:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 1);
}
#faceScanModal .face-scan-title {
    font-size: 1.5rem;
    font-weight: var(--fw600);
    color: var(--primary);
    margin: 0;
}
#faceScanModal .face-scan-label {
    font-weight: var(--fw600);
    color: var(--bs-body-color);
}
#faceScanModal .face-scan-value {
    color: #00b04e;
    font-weight: var(--fw500);
}
#pdmShelf {
    font-size: 15px;
    margin-bottom: 25px !important;
}
#productDetailsModal .pdm-comp {
    word-break: break-word;
    white-space: normal;
    font-size: 15px;
    margin-bottom: 25px !important;
}
#productDetailsModal .pdm-upsell {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    padding: 12px;
    margin-top: 15px;
}
#productDetailsModal .pdm-upsell-desktop {
    display: none;
}
#productDetailsModal .pdm-upsell-mobile {
    display: block;
}
.face-scan-title p {
    color: var(--primary);
}

#productDetailsModal .pdm-upsell-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    cursor: pointer;
    margin: 0;
}
#productDetailsModal .pdm-upsell-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
#productDetailsModal .pdm-upsell-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.18);
    color: rgba(0,0,0,.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
#productDetailsModal .pdm-upsell-icon::before {
    content: '+';
    font-weight: 700;
    line-height: 1;
    font-size: 16px;
}
.text-result {
    margin-bottom: 25px !important;
    font-weight: var(--fw600);
}
#quizRestart {
    border-radius: 50px;
    border: 1px solid #eee;
}
#pdmUpsell {
    border: none !important;
    box-shadow: var(--bs1);
    border-radius: 15px !important;
}
#productDetailsModal .pdm-upsell-checkbox:checked + .pdm-upsell-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
#productDetailsModal .pdm-upsell-item:hover .pdm-upsell-icon {
    transform: scale(1.04);
}
#productDetailsModal .pdm-upsell-item + .pdm-upsell-item {
    margin-top: 10px;
}
#productDetailsModal .pdm-upsell-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    color: var(--primary);
}
#productDetailsModal .pdm-upsell-price {
    white-space: nowrap;
    font-weight: 600;
    color: var(--primary);
}
.placeholder {
    text-align: center;
    color: var(--gray-600);
    padding: var(--spacing-3xl);
    border: 2px dashed var(--gray-300);
    border-radius: var(--br-md);
    background-color: var(--white);
    box-shadow: var(--bs4);
}
.placeholder h4 {
    margin-bottom: var(--spacing-md);
    color: var(--primary);
    font-family: var(--font-family);
}
#canvas {
    border-radius: var(--br-md);
    box-shadow: var(--bs3);
    background-color: var(--white);
    max-height: 600px;
    width: auto;
    height: auto;
}
.main-header {
    background: var(--white);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom-left-radius: var(--br);
    border-bottom-right-radius: var(--br);
    gap: 33px;
    margin-bottom: 24px;
    margin-left: 10px;
    margin-right: 10px;
}
.brand-image {
    height: 24px;
    width: auto;
    display: block;
}
.header-bar {
    width: 100%;
    padding: 0 20px;
}
.header-search {
    max-width: 760px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.header-actions,
.logo {
    flex: 0 0 auto;
}

.header-search__group .input-group-text,
.header-search__group .form-control {
    border-radius: 999px;
}
.header-search__group .input-group-text {
    background: var(--grayBG);
    border: none;
    color: var(--gray-800);
    padding-left: 16px;
    padding-right: 0;
    font-weight: var(--fw600);
}
.header-search__group .form-control {
    background: var(--grayBG);
    border: none;
    border-left: 0;
    color: var(--gray-400);
    opacity: 1;
    font-size: 15px;
    padding: 15px;
    font-weight: var(--fw600);
}
.header-search__group .form-control:disabled {
    cursor: default;
}
.btn.logout-btn,
.btn.account-btn {
    background: var(--grayBG);
    border: none;
    padding: 15px 25px;
    font-weight: var(--fw600);
    font-size: 15px;
}
.btn.logout-btn:hover,
.btn.account-btn:hover {
    background: var(--brand);
    color: var(--white);
}

.logout-btn,
.account-btn {
    border-radius: 999px;
    padding: 10px 14px;
}
.hamburger {
    background: none;
    border: none;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.hamburger:hover {
    background: var(--gray-100);
    transform: scale(1.05);
}
.hamburger-inner {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hamburger .line {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}
.hamburger:hover .line {
    background: var(--brand);
}
.hamburger.active .line-1 {
    transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.active .line-2 {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active .line-3 {
    transform: rotate(-45deg) translate(6px, -6px);
}
.logo-img {
    height: 40px;
    width: auto;
}
.main-nav {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
}
.nav-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--fw500);
    transition: var(--transition-base);
    font-family: var(--font-family);
}
.nav-link:hover {
    color: var(--brand);
}
.nav-link.active {
    color: var(--brand);
    font-weight: var(--fw600);
}
.nav-link.active:hover {
    color: var(--primary);
}
.nav-link.disabled {
    color: var(--dis);
}
.badge.badge-result {
    background: var(--grayBG);
    color: var(--gray);
    font-weight: var(--fw600);
    font-size: 14px;
    padding: 12px;
    border-radius: 50px;
}

.form-control, .form-range {
    border-radius: var(--br-sm);
    font-family: var(--font-family);
    border: 1px solid var(--gray-300);
    transition: var(--transition-base);
}
.opacity-control .form-control, .opacity-control .form-range {
    border: none;
}
.form-control:focus, .form-range:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(255, 51, 95, 0.25);
}
.form-range::-webkit-slider-thumb {
    background: var(--brand);
    border: none;
    border-radius: var(--br-full);
    width: 20px;
    height: 20px;
    box-shadow: var(--bs4);
}
.form-range::-moz-range-thumb {
    background: var(--brand);
    border: none;
    border-radius: var(--br-full);
    width: 20px;
    height: 20px;
    box-shadow: var(--bs4);
}

.color-tabs {
    margin-bottom: 1.5rem;
}
.tab-buttons {
    display: flex;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    gap: 5px;
}
.tab-button {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--brand);
    background: var(--white);
    color: var(--brand);
    font-weight: var(--fw500);
    cursor: pointer;
    transition: var(--transition-base);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    border-radius: var(--br-sm);
}
.tab-button:hover {
    background: var(--gray-100);
    color: var(--primary);
    border-color: var(--brand);
}
.tab-button.active {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
    font-weight: var(--fw600);
}
.tab-content {
    display: none;
    min-height: 200px;
}
.tab-content.active {
    display: block;
}
.color-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.color-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}
.color-option:hover {
    transform: scale(1.1);
    border-color: var(--brand);
    box-shadow: var(--bs2);
}
.color-option.selected {
    border-color: white;
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* RESPONSIVE */

@media (min-width: 576px) {
    .trends-grid {
        column-count: 2;
    }
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: 400px 1fr;
        gap: 24px;
    }
}

@media (min-width: 992px) {
    .trends-grid {
        column-count: 3;
        column-gap: 1.25rem;
    }
    .trends-grid__item {
        margin-bottom: 1.25rem;
    }

    #productDetailsModal .pdm-grid,
    #faceScanModal .pdm-grid {
        flex-direction: row;
        align-items: stretch;
        gap: 1.25rem;
        justify-content: flex-start;
        padding: 15px;
    }

    #productDetailsModal .pdm-left {
        flex: 0 0 450px;
        max-width: 450px;
        width: 450px;
    }
    #productDetailsModal .pdm-right {
        flex: 0 0 520px;
        max-width: 520px;
        width: 520px;
        min-width: 0;
    }
    #faceScanModal .pdm-left {
        flex: 0 0 350px;
        max-width: 350px;
        width: 350px;
        transition: all 0.3s ease;
    }
    #faceScanModal .pdm-right {
        flex: 1 1 auto;
        min-width: 0;
        transition: all 0.3s ease;
    }
    #faceScanModal .pdm-grid:not(.face-scan-has-preview) {
        justify-content: center;
    }
    #faceScanModal .pdm-grid:not(.face-scan-has-preview) .pdm-right {
        max-width: 600px;
        width: 100%;
    }

    #productDetailsModal .pdm-img-wrap {
        width: 450px;
        height: 450px;
        max-width: 450px;
        max-height: 450px;
    }
    #faceScanModal .pdm-img-wrap {
        width: 350px;
        height: 350px;
        max-width: 350px;
        max-height: 350px;
    }

    #productDetailsModal .pdm-upsell-desktop {
        display: block;
    }
    #productDetailsModal .pdm-upsell-mobile {
        display: none;
    }
}

/* <=768px */

@media (max-width: 768px) {
    #faceScanGrid {
        padding: 15px;
    }
    .ai-scan-main {
        flex-wrap: wrap;
    }
    .ai-scan-photo-wrap {
        max-width: 350px;
    }
    .ai-scan-photo-wrap  {
        width: 100%;
    }
    .ai-scan-age-input, .btn.ai-scan-allergy-toggle {
        width: 100%;
        max-width: 100%;
    }
    .header-bar {
        justify-content: center;
        padding: 10px 20px;
    }
    .header-actions {
        display: none;
    }
    .main-header {
        padding: var(--spacing-sm) 0;
        margin-left: 0;
        margin-right: 0;
    }
    .card-header.card-header-ai {
        justify-content: center !important;
        padding: 15px;
    }
    #quizBot {
        border-radius: var(--br);
    }
    .card .card-header {
        border-top-left-radius: var(--br);
        border-top-right-radius: var(--br);
    }
    #quizRestart {
        border-radius: var(--br);
        border: 1px solid #eee;
        display: inline-block;
        font-size: 12px;
        display: none;
    }
    .menu-scenarious-h2 {
        text-align: center;
        padding: 10px 0;
    }
    .logo-img {
        height: 30px;
    }
    #productDetailsModal .pdm-dialog {
        width: calc(100vw - 30px) !important;
        max-width: calc(100vw - 30px) !important;
        margin-left: 15px !important;
        margin-right: 15px !important;
    }
    #productDetailsModal .modal-dialog-centered {
        padding-left: 15px;
        padding-right: 15px;
    }
    #productDetailsModal .pdm-close-desktop {
        display: none !important;
    }
    #productDetailsModal .pdm-close-mobile {
        display: block !important;
    }
    .btn.logout-btn,
    .btn.account-btn {
        display: none !important;
    }
    #quizChoices.quiz-choices > .btn {
        width: 100%;
    }
    .badge.badge-result {
        font-size: 12px;
        padding: 10px 12px;
    }
    #quizResult .quiz-product-card {
        box-shadow: var(--bs1) !important;
        border-radius: var(--br);
    }
    .col-result-card {
        margin-bottom: 25px;
    }
    .main-nav {
        gap: var(--spacing-md);
    }
    
    .nav-link {
        font-size: var(--font-size-sm);
    }
    .mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--bs4);
        border-radius: 0 0 var(--br) var(--br);
        z-index: var(--z-dropdown);
        gap: var(--spacing-md);
    }
    .mobile-menu .nav-link {
        padding: var(--spacing-md);
        border-radius: var(--br-sm);
        transition: var(--transition-base);
    }
    .mobile-menu .nav-link:hover {
        background: var(--gray-100);
    }
    .container-fluid {
        padding: 0;
    }
    .grid-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        gap: 0;
    }
    .sidebar {
        order: 2;
        background: var(--white);
        backdrop-filter: blur(10px);
        border-radius: var(--br-md) var(--br-md) 0 0;
        margin-top: calc(-1 * var(--spacing-md));
        position: relative;
        z-index: 10;
        padding: var(--spacing-md);
        box-shadow: var(--bs3);
        border-radius: var(--br);
    }
    .main-content {
        order: 1;
        width: 100%;
        max-width: 100%;
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
        height: auto;
        justify-content: normal;
        min-height: auto;
        border-radius: var(--br);
        margin-bottom: 35px;
        background: transparent;
    }
    .placeholder {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: var(--gray-100);
        border-radius: var(--br);
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;
    }
    #canvas {
        width: 100%;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        display: block;
        max-height: 100%;
        object-fit: cover;
        border-radius: var(--br);
    }
    .color-picker {
        margin-bottom: 0;
    }
    .color-tabs {
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
    }
    .tab-buttons {
        order: 2;
        margin-top: 1rem;
    }
    .tab-content {
        order: 1;
        min-height: 150px;
    }
    .sidebar h3 {
        display: none;
    }
}

/* Cabinet page */
.cabinet-page .cabinet-layout {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.cabinet-block {
    background: var(--white, #fff);
    border-radius: var(--br-md, 1rem);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.cabinet-block__header {
    padding: 1.5rem 1.5rem 0;
    text-align: center;
}
.cabinet-header-icon {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    object-fit: contain;
}
.cabinet-title {
    font-size: 1.5rem;
    font-weight: var(--fw600, 600);
    margin: 0 0 0.25rem;
    color: var(--primary, #333);
}
.cabinet-title--sm {
    font-size: 1.125rem;
}
.cabinet-block__body {
    padding: 1.25rem 1.5rem 1.5rem;
}
.cabinet-intro {
    margin-bottom: 1rem;
}
.cabinet-form-fields .form-label {
    font-weight: 500;
}
.cabinet-order-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200, #eee);
}
.cabinet-order-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.cabinet-order-item__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.cabinet-order-item__name {
    font-weight: 600;
    color: var(--primary, #333);
}
.cabinet-order-item__status {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
    border-radius: 999px;
    background: var(--grayBG, #f5f5f5);
    color: var(--gray, #666);
}
.cabinet-order-item__meta,
.cabinet-order-item__upsell,
.cabinet-order-item__date {
    margin-bottom: 0.25rem;
}
.cabinet-order-upsell-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-right: 4px;
    margin-bottom: 2px;
    border-radius: 999px;
    background: #f1f3f5;
    font-size: 0.75rem;
}
#aiScanBackToResultsBtn {
    border: none;
    width: auto !important;
    text-align: left;
    font-size: 12px;
    color: var(--primary);
    border-bottom: 1px dashed var(--gray-500);
    border-radius: 0;
    padding: 0;
    margin-top: 15px;
}
#aiScanBackToResultsBtn:hover {
    background: var(--white);
    border: none;
}
/* Dashboard */
.dashboard-section-nav {
    gap: 0.25rem;
}
.dashboard-section-link {
    border-radius: var(--br-sm, 0.375rem);
    font-weight: 500;
}
.dashboard-section-link.active {
    background: var(--brand) !important;
    color: var(--white);
}
.dashboard-section-link.active:hover {
    background: var(--brandHover);
    color: var(--white);
}
.dashboard-section-link.active:focus, .dashboard-section-link.active:active {
    background: var(--brandHover) !important;
}
.dashboard-products-subnav {
    gap: 0.25rem;
}
.dashboard-products-subnav-link {
    border-radius: var(--br-sm, 0.375rem);
    font-size: 12px;
}
.dashboard-products-subnav-link.active {
    background-color: var(--white) !important;
    color: var(--brand) !important;
}
.btn-db-edit {
    width: 100%;
    margin-bottom: 5px;
    font-size: 12px;
    background: var(--bs-gray-400);
    display: inline-block;
}
.btn-db-edit:hover {
    background: var(--bs-gray-500);
    color: var(--white);
    display: inline-block;
}
.btn-db-delete {
    width: 100%;
    font-size: 12px;
    background: var(--brandHover);
    color: var(--white);
    display: inline-block;
}
.btn-db-delete:hover {
    background: var(--brand);
    color: var(--white);
    display: inline-block;
}
.btn-db-update {
    width: 100%;
    background: var(--bs-success-border-subtle);
    font-size: 12px;
    margin-bottom: 5px;
}
.btn-db-update:hover {
    background: var(--bs-success-border-subtle);
    color: var(--white);
    display: inline-block;
}
.dashboard-card {
    background: var(--white, #fff);
    border: 0;
    border-radius: var(--br-md, 1rem);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.dashboard-card__body {
    padding: 1.25rem 1.5rem;
}
.dashboard-card__title {
    color: var(--primary, #333);
}
.dashboard-product-form .form-label {
    font-weight: 500;
}
.dashboard-table th,
.dashboard-table td {
    font-size: 12px;
}
.dashboard-table th {
    font-weight: 600;
    color: var(--gray, #555);
}
.dashboard-product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}
.cabinet-block__body button {
    padding: 15px;
    background: var(--brand);
    border: none;
    font-size: 16px;
    font-weight: var(--fw600);
    border-radius: 50px;
}
.cabinet-block__body button:hover {
    background: var(--brandHover);
    border: none;
}
.cabinet-block__body button:focus, .cabinet-block__body button:active {
    background: var(--brandHover) !important;
}