        /* ================= CORE VARIABLES & THEME ================= */
        :root {
            --primary: #1D1D1F;
            --primary-hover: #434343;
            --primary-grad: linear-gradient(135deg, #434350 0%, #1D1D1F 100%);
            --body-bg: #F5F5F7;
            --card-bg: rgba(255, 255, 255, 0.85);
            --header-bg: rgba(255, 255, 255, 0.85);
            --input-bg: #E8E8ED;
            --text-main: #1D1D1F;
            --text-muted: #86868B;
            --border-color: rgba(0, 0, 0, 0.08);
            --shadow-light: 0 8px 24px rgba(0, 0, 0, 0.04);
            --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.08);
            --danger: #FF3B30;
            --success: #34C759;
            --warning: #FF9F0A;
            --sidebar-width: 260px;
            --mobile-nav-height: 75px;
            --mobile-header-height: 65px;
            --radius-main: 24px;
            --radius-btn: 16px;
        }

        body.dark-theme {
            --primary: #FFFFFF;
            --primary-hover: #E5E5EA;
            --primary-grad: linear-gradient(135deg, #E5E5EA 0%, #FFFFFF 100%);
            --body-bg: #000000;
            --card-bg: rgba(28, 28, 30, 0.75);
            --header-bg: rgba(28, 28, 30, 0.85);
            --input-bg: rgba(44, 44, 46, 0.9);
            --text-main: #F5F5F7;
            --text-muted: #A1A1A6;
            --border-color: rgba(255, 255, 255, 0.1);
            --shadow-light: 0 8px 30px rgba(0, 0, 0, 0.5);
            --shadow-hover: 0 16px 50px rgba(255, 255, 255, 0.08);
        }

        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            font-family: 'Nunito', -apple-system, sans-serif;
            background: var(--body-bg);
            color: var(--text-main);
            margin: 0;
            padding: 0;
            transition: background-color 0.4s ease;
            overflow-x: hidden;
            position: relative;
        }

        ::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--text-muted);
            border-radius: 10px;
        }

        a {
            text-decoration: none !important;
        }

        /* ================= AMBIENT BACKGROUND ================= */
        .ambient-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
        }

        .ambient-blob {
            position: absolute;
            border-radius: 50%;
            filter: blur(120px);
            opacity: 0.5;
            animation: float 15s infinite ease-in-out alternate;
        }

        .blob-1 {
            width: 50vw;
            height: 50vw;
            max-width: 600px;
            max-height: 600px;
            background: rgba(134, 134, 139, 0.3);
            top: -10vh;
            left: -10vw;
        }

        .blob-2 {
            width: 40vw;
            height: 40vw;
            max-width: 500px;
            max-height: 500px;
            background: rgba(0, 0, 0, 0.08);
            bottom: -5vh;
            right: -5vw;
            animation-delay: -5s;
        }

        @keyframes float {
            0% {
                transform: translateY(0px) scale(1);
            }

            100% {
                transform: translateY(40px) scale(1.05);
            }
        }

        body.dark-theme .blob-1 {
            background: rgba(255, 255, 255, 0.08);
        }

        body.dark-theme .blob-2 {
            background: rgba(134, 134, 139, 0.15);
        }

        /* ================= GLOBAL BANNER ================= */
        #global-top-banner {
            background: var(--primary);
            color: var(--body-bg);
            text-align: center;
            padding: 12px 20px;
            font-weight: 800;
            font-size: 13px;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 9999;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            display: none;
            align-items: center;
            justify-content: center;
            gap: 15px;
            backdrop-filter: blur(15px);
        }

        .body-with-banner .sidebar {
            top: 40px;
            height: calc(100vh - 40px);
        }

        .body-with-banner .main-content {
            padding-top: 80px;
        }

        /* ================= MOBILE HEADER ================= */
        .mobile-header {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: var(--mobile-header-height);
            background: var(--header-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border-bottom: 1px solid var(--border-color);
            z-index: 1000;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            transition: 0.3s;
        }

        .mobile-logo {
            font-size: 22px;
            font-weight: 900;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .mobile-profile-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--text-main);
            color: var(--body-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 900;
            font-size: 16px;
            cursor: pointer;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .mobile-profile-btn img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* ================= SIDEBAR ================= */
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--header-bg);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border-right: 1px solid var(--border-color);
            padding: 35px 20px;
            display: flex;
            flex-direction: column;
            z-index: 1000;
            box-shadow: 2px 0 20px rgba(0, 0, 0, 0.02);
            transition: 0.3s;
        }

        .brand-logo {
            font-size: 26px;
            font-weight: 900;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 40px;
            letter-spacing: -0.5px;
        }

        .nav-menu {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 18px;
            border-radius: 16px;
            color: var(--text-muted);
            font-weight: 800;
            font-size: 15px;
            cursor: pointer;
            transition: 0.2s;
            position: relative;
        }

        .nav-item:hover {
            background: rgba(0, 0, 0, 0.04);
            color: var(--text-main);
            transform: translateX(4px);
        }

        body.dark-theme .nav-item:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .nav-item.active {
            background: var(--text-main);
            color: var(--body-bg) !important;
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
            transform: translateX(6px);
        }

        body.dark-theme .nav-item.active {
            background: #fff;
            color: #000 !important;
        }

        .nav-item i {
            font-size: 22px;
            transition: 0.3s;
        }

        .nav-item.active i {
            transform: scale(1.1);
        }

        .apple-badge {
            background: var(--danger);
            color: white;
            border-radius: 20px;
            padding: 2px 6px;
            font-size: 10px;
            font-weight: 900;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 20px;
            line-height: 1;
            box-shadow: 0 3px 8px rgba(255, 59, 48, 0.4);
            border: 2px solid var(--card-bg);
            animation: pulseBadge 2s infinite;
        }

        @keyframes pulseBadge {
            0% {
                box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
            }

            70% {
                box-shadow: 0 0 0 5px rgba(255, 59, 48, 0);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
            }
        }

        .nav-badge {
            position: absolute;
            right: 12px;
            border-color: var(--body-bg);
        }

        .auth-block {
            margin-top: auto;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
        }

        .auth-user-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px;
            background: var(--card-bg);
            border-radius: 18px;
            cursor: pointer;
            transition: 0.2s;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
        }

        .auth-user-card:hover {
            transform: translateY(-2px);
            border-color: var(--text-main);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
        }

        /* ================= MAIN CONTENT ================= */
        .main-content {
            margin-left: var(--sidebar-width);
            padding: 40px;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            transition: 0.3s;
            position: relative;
            z-index: 1;
        }

        .page {
            display: none;
            animation: fadeUpSpring 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            opacity: 0;
            transform: translateY(20px);
            width: 100%;
            flex-grow: 1;
            max-width: 1400px;
            margin: 0 auto;
        }

        .page.active {
            display: block;
        }

        @keyframes fadeUpSpring {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .apple-card {
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-main);
            padding: 30px;
            box-shadow: var(--shadow-light);
            margin-bottom: 25px;
            transition: 0.3s;
        }

        .apple-card:hover {
            box-shadow: var(--shadow-hover);
        }

        /* Premium Forms */
        .form-control {
            background-color: var(--input-bg);
            border: 1.5px solid transparent;
            border-radius: 16px;
            padding: 14px 18px;
            color: var(--text-main);
            font-weight: 700;
            font-size: 15px;
            transition: 0.3s;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
            outline: none;
            width: 100%;
        }

        .form-control:focus {
            background-color: var(--card-bg);
            border-color: var(--text-main);
            box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
            transform: translateY(-1px);
        }

        body.dark-theme .form-control:focus {
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
        }

        .error-text {
            color: var(--danger);
            font-size: 12px;
            font-weight: 800;
            margin-top: 5px;
            margin-left: 5px;
            display: none;
        }

        .input-error {
            border-color: var(--danger) !important;
            background: rgba(255, 59, 48, 0.05) !important;
        }

        /* Premium Buttons */
        .btn-apple {
            background: var(--input-bg);
            color: var(--text-main);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-btn);
            padding: 14px 24px;
            font-weight: 800;
            font-size: 15px;
            transition: 0.2s;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            white-space: nowrap;
        }

        .btn-apple:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            background: var(--primary-hover);
            color: white;
            border-color: var(--primary-hover);
        }

        body.dark-theme .btn-apple:hover {
            background: var(--primary-hover);
            color: black;
        }

        .btn-apple:active {
            transform: scale(0.96);
        }

        .btn-apple-primary {
            background: var(--text-main);
            color: var(--body-bg);
            border-color: var(--text-main);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        .btn-apple-primary:hover {
            background: var(--primary-hover);
            color: white;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }

        body.dark-theme .btn-apple-primary:hover {
            color: black;
        }

        .ad-actions {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }

        .btn-offer {
            flex: 1;
            border-radius: 12px;
            background: linear-gradient(135deg, #111, #333);
            color: white;
            font-weight: 600;
            padding: 10px 16px;
            border: none;
            cursor: pointer;
            transition: 0.2s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .btn-offer:hover {
            transform: scale(1.03);
        }

        /* IOS Switch Toggle */
        .ios-switch-wrap {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 20px;
            background: var(--input-bg);
            border-radius: 16px;
            cursor: pointer;
            border: 1px solid transparent;
            transition: 0.3s;
        }

        .ios-switch-wrap:hover {
            border-color: var(--text-main);
            background: var(--card-bg);
        }

        .ios-switch {
            position: relative;
            display: inline-block;
            width: 46px;
            height: 26px;
            flex-shrink: 0;
            pointer-events: none;
        }

        .ios-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .ios-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--text-muted);
            transition: .3s;
            border-radius: 30px;
            opacity: 0.5;
        }

        .ios-slider:before {
            position: absolute;
            content: "";
            height: 22px;
            width: 22px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            border-radius: 50%;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        .ios-switch input:checked+.ios-slider {
            background-color: var(--success);
            opacity: 1;
        }

        .ios-switch input:checked+.ios-slider:before {
            transform: translateX(20px);
        }

        /* ИДЕАЛЬНЫЕ КАСТОМНЫЕ СЕЛЕКТЫ (ФИКС Z-INDEX) */
        .apple-select-wrapper {
            position: relative;
            width: 100%;
            user-select: none;
            z-index: 10;
        }

        .apple-select-wrapper.open {
            z-index: 1000;
        }

        .apple-select-trigger {
            background: var(--input-bg);
            border: 1.5px solid transparent;
            border-radius: 16px;
            padding: 14px 18px;
            color: var(--text-main);
            font-weight: 700;
            font-size: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            transition: 0.3s;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
        }

        .apple-select-trigger:hover {
            background: var(--card-bg);
            border-color: var(--border-color);
        }

        .apple-select-wrapper.open .apple-select-trigger {
            background: var(--card-bg);
            border-color: var(--text-main);
            box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
            transform: translateY(-1px);
            z-index: 101;
        }

        body.dark-theme .apple-select-wrapper.open .apple-select-trigger {
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
        }

        .apple-select-options {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            width: 100%;
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border-radius: 16px;
            border: 1px solid var(--border-color);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
            max-height: 250px;
            overflow-y: auto;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 1001;
        }

        .apple-select-wrapper.open .apple-select-options {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .apple-select-option {
            padding: 12px 18px;
            font-weight: 700;
            font-size: 15px;
            cursor: pointer;
            transition: 0.2s;
            border-bottom: 1px solid var(--border-color);
        }

        .apple-select-option:last-child {
            border-bottom: none;
        }

        .apple-select-option:hover {
            background: var(--text-main);
            color: var(--body-bg);
            padding-left: 24px;
        }

        /* ================= 3D CSS IPHONE ================= */
        .css-3d-iphone {
            width: 220px;
            height: 450px;
            background: #000;
            border-radius: 40px;
            border: 4px solid #333;
            box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.2), 0 20px 50px rgba(0, 0, 0, 0.3);
            position: relative;
            transform: rotate(-15deg) rotateX(15deg) scale(1.1);
            display: flex;
            align-items: center;
            justify-content: center;
            animation: floatPhone 6s ease-in-out infinite alternate;
        }

        @keyframes floatPhone {
            0% {
                transform: rotate(-15deg) rotateX(15deg) scale(1.1) translateY(0);
            }

            100% {
                transform: rotate(-15deg) rotateX(15deg) scale(1.1) translateY(-20px);
                box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.2), 0 40px 70px rgba(0, 0, 0, 0.4);
            }
        }

        .css-iphone-screen {
            width: 94%;
            height: 97%;
            background: linear-gradient(135deg, #1A1A1A, #434350);
            border-radius: 34px;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .css-iphone-island {
            position: absolute;
            top: 12px;
            width: 70px;
            height: 22px;
            background: #000;
            border-radius: 12px;
            z-index: 2;
        }

        .hero-premium {
            background: var(--card-bg);
            backdrop-filter: blur(30px);
            border-radius: 36px;
            padding: 60px 50px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative;
            margin-bottom: 40px;
            box-shadow: var(--shadow-light);
            border: 1px solid var(--border-color);
            overflow: hidden;
        }

        .hero-text {
            position: relative;
            z-index: 2;
            max-width: 500px;
        }

        .hero-text h1 {
            font-size: 52px;
            font-weight: 900;
            color: var(--text-main);
            line-height: 1.1;
            margin-bottom: 15px;
            letter-spacing: -1px;
        }

        /* ================= MARKET & CARDS ================= */
        #filters-panel {
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border-radius: 24px;
            padding: 24px;
            margin-bottom: 25px;
            border: 1px solid var(--border-color);
            display: none;
            animation: fadeUpSpring 0.3s forwards;
            position: relative;
            z-index: 100;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
        }

        #filters-panel .apple-select-trigger {
            padding: 16px 20px;
            font-size: 16px;
            border-radius: 18px;
        }

        .category-tabs {
            display: inline-flex;
            background: var(--input-bg);
            padding: 5px;
            border-radius: 18px;
            border: 1px solid var(--border-color);
            max-width: 100%;
            overflow-x: auto;
        }

        .category-tabs::-webkit-scrollbar {
            display: none;
        }

        .cat-tab {
            padding: 10px 24px;
            border-radius: 14px;
            font-weight: 800;
            font-size: 14px;
            cursor: pointer;
            transition: 0.2s;
            color: var(--text-muted);
            white-space: nowrap;
        }

        .cat-tab:hover {
            color: var(--text-main);
        }

        .cat-tab.active {
            background: var(--card-bg);
            color: var(--text-main);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            transform: scale(1.02);
        }

        .market-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
            gap: 24px;
            padding-bottom: 30px;
            position: relative;
            z-index: 1;
        }

        #seller-ads-container {
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
        }

        #detail-like-btn,
        #detail-share-btn {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 0 !important;
            line-height: 0;
        }

        #detail-share-btn:hover {
            background: var(--text-main) !important;
        }

        #detail-share-btn:hover i {
            color: var(--body-bg) !important;
        }

        .ad-card {
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-main);
            overflow: hidden;
            box-shadow: var(--shadow-light);
            cursor: pointer;
            transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            display: flex;
            flex-direction: column;
            height: 100%;
            position: relative;
            padding: 12px;
        }

        .ad-card:hover {
            transform: translateY(-6px);
            box-shadow: var(--shadow-hover);
            border-color: var(--text-main);
        }

        .ad-card:active {
            transform: scale(0.98);
        }

        .img-main-wrapper-card {
            width: 100%;
            aspect-ratio: 1/1;
            background: var(--input-bg);
            border-radius: 16px;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            margin-bottom: 12px;
            overflow: hidden;
        }

        .ad-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: 0.5s;
        }

        .ad-card:hover .ad-image {
            transform: scale(1.05);
        }

        .ad-content {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            padding: 0 8px 8px 8px;
        }

        .ad-title {
            font-weight: 900;
            font-size: 17px;
            margin-bottom: 6px;
            color: var(--text-main);
            line-height: 1.2;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .ad-price {
            font-weight: 900;
            font-size: 22px;
            color: var(--text-main);
            margin-top: auto;
            letter-spacing: -0.5px;
        }

        /* BADGES */
        .ad-badge-admin,
        .ad-badge-vip {
            position: absolute;
            top: 12px;
            padding: 6px 12px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 900;
            z-index: 2;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .ad-badge-admin {
            left: 12px;
            background: rgba(29, 29, 31, 0.85);
            color: white;
        }

        body.dark-theme .ad-badge-admin {
            background: rgba(255, 255, 255, 0.9);
            color: black;
            border-color: rgba(0, 0, 0, 0.1);
        }

        .ad-badge-vip {
            right: 12px;
            background: rgba(255, 159, 10, 0.9);
            color: black;
        }

        .ad-processing-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-main);
        }

        .ad-processing-overlay span {
            background: var(--card-bg);
            color: var(--text-main);
            padding: 8px 16px;
            border-radius: 14px;
            font-size: 13px;
            font-weight: 900;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        /* ================= CHAT SYSTEM (FULL PAGE OLX STYLE) ================= */
        #page-chat {
            display: none;
            flex-direction: column;
            height: 100vh;
            padding: 0;
        }

        #page-chat.active {
            display: flex;
            position: fixed;
            top: 0;
            left: var(--sidebar-width);
            width: calc(100vw - var(--sidebar-width));
            height: 100vh;
            margin: 0 !important;
            padding: 0 !important;
            max-width: none !important;
            z-index: 10;
        }

        #page-chat.page {
            max-width: none !important;
            margin: 0 !important;
        }

        #page-chat h2 {
            display: none;
        }

        #chat-ad-price {
            color: var(--text-main) !important;
        }

        @media(max-width: 991px) {
            #page-chat.active {
                left: 0;
                width: 100vw;
            }
        }

        .chat-container {
            display: flex;
            flex-grow: 1;
            background: var(--card-bg);
            border-radius: 0;
            /* было 24px */
            border: none;
            /* убираем рамку */
            overflow: hidden;
            box-shadow: none;
            /* убираем тень */
            margin-bottom: 0;
            height: 100%;
        }

        .chat-sidebar {
            width: 350px;
            background: var(--input-bg);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

        .chat-list-item {
            padding: 15px 20px;
            display: flex;
            align-items: center;
            gap: 15px;
            cursor: pointer;
            transition: 0.2s;
            border-bottom: 1px solid var(--border-color);
        }

        .chat-list-item:hover {
            background: var(--card-bg);
        }

        .chat-list-item.active {
            background: var(--card-bg);
            border-left: 4px solid var(--text-main);
        }

        .chat-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: var(--card-bg);
            color: var(--text-muted);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            flex-shrink: 0;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        }

        .chat-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
        }

        .chat-main {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            background: var(--card-bg);
            position: relative;
            min-width: 0;
        }

        .chat-header-panel {
            height: 75px;
            padding: 0 25px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }

        .chat-messages {
            flex-grow: 1;
            padding: 25px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .msg-bubble {
            max-width: 75%;
            min-width: 90px;
            padding: 16px 18px;
            border-radius: 24px;
            font-weight: 600;
            font-size: 15px;
            position: relative;
            line-height: 1.45;
            word-wrap: break-word;
            box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
        }

        .msg-bubble.me {
            align-self: flex-end;
            background: #1D1D1F;
            color: white;
            border-bottom-right-radius: 4px;
            border-bottom-left-radius: 24px;
            border-top-left-radius: 24px;
            border-top-right-radius: 24px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        body.dark-theme .msg-bubble.me {
            background: #2C2C2E;
        }

        .msg-bubble.them {
            align-self: flex-start;
            background: var(--input-bg);
            color: var(--text-main);
            border: none;
            border-bottom-left-radius: 4px;
            border-bottom-right-radius: 24px;
            border-top-left-radius: 24px;
            border-top-right-radius: 24px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
        }

        .msg-time {
            font-size: 12px;
            opacity: 0.75;
            margin-top: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 6px;
            width: 100%;
            font-weight: 700;
        }

        .tick-read {
            color: #86868B;
            font-size: 16px;
            font-weight: 900;
        }

        .tick-unread {
            color: rgba(255, 255, 255, 0.4);
            font-size: 16px;
        }

        .chat-photo-grid {
            display: grid;
            gap: 4px;
            margin-top: 8px;
            max-width: 250px;
        }

        .chat-photo-grid.count-1 {
            grid-template-columns: 1fr;
        }

        .chat-photo-grid.count-2 {
            grid-template-columns: 1fr 1fr;
        }

        .chat-photo-grid.count-3,
        .chat-photo-grid.count-4 {
            grid-template-columns: 1fr 1fr;
        }

        .chat-photo-grid.count-5,
        .chat-photo-grid.count-6 {
            grid-template-columns: 1fr 1fr 1fr;
        }

        .chat-photo-item {
            width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
            border-radius: 8px;
            cursor: pointer;
            border: 1px solid var(--border-color);
        }

        .chat-input-area {
            padding: 20px 25px;
            background: var(--input-bg);
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 12px;
            align-items: center;
            flex-shrink: 0;
        }

        /* ================= MODALS (PRODUCT & AUTH) ================= */
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            transition: opacity 0.3s;
            padding: 20px;
        }

        .overlay.show {
            display: flex;
            opacity: 1;
        }

        /* Окно авторизации всегда самое верхнее */
        #modal-auth {
            z-index: 9999999 !important;
        }

        #modal-ad-details {
            z-index: 2000;
        }

        #loading-overlay {
            z-index: 99999999 !important;
        }

        .modal-apple-product {
            background: var(--card-bg);
            border-radius: 36px;
            box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
            transform: scale(0.9) translateY(30px);
            opacity: 0;
            transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            max-height: 90vh;
            height: 90vh;
            max-width: 1100px;
            width: 100%;
            display: flex;
            flex-direction: row;
        }

        .overlay.show .modal-apple-product {
            transform: scale(1) translateY(0);
            opacity: 1;
        }

        .modal-product-left {
            width: 55%;
            background: var(--input-bg);
            padding: 40px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            border-right: 1px solid var(--border-color);
        }

        .modal-product-right {
            width: 45%;
            padding: 40px 50px;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .close-modal-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 44px;
            height: 44px;
            background: rgba(134, 134, 139, 0.15);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: var(--text-main);
            cursor: pointer;
            transition: 0.2s;
            z-index: 100;
            border: none;
            backdrop-filter: blur(10px);
        }

        .close-modal-btn:hover {
            background: var(--text-main);
            color: var(--body-bg);
            transform: rotate(90deg);
        }

        .modal-main-img {
            width: 100%;
            height: 100%;
            max-height: 650px;
            object-fit: contain;
            filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
            transition: 0.3s;
            cursor: pointer;
        }

        .modal-main-img:hover {
            transform: scale(1.03);
        }

        .nav-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 50px;
            height: 50px;
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(15px);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #000;
            font-size: 24px;
            cursor: pointer;
            z-index: 10;
            transition: 0.3s;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
            border: none;
        }

        body.dark-theme .nav-arrow {
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
        }

        .nav-arrow:hover {
            background: var(--text-main);
            color: var(--body-bg);
            transform: translateY(-50%) scale(1.1);
        }

        .nav-arrow.left {
            left: 20px;
        }

        .nav-arrow.right {
            right: 20px;
        }

        .modal-thumbs {
            display: flex;
            gap: 12px;
            margin-top: 20px;
            justify-content: center;
            overflow-x: auto;
            max-width: 100%;
            padding: 10px 5px 15px 5px;
        }

        .modal-thumbs::-webkit-scrollbar {
            display: none;
        }

        .modal-thumbs img {
            width: 70px;
            height: 70px;
            border-radius: 16px;
            object-fit: cover;
            cursor: pointer;
            border: 2px solid transparent;
            opacity: 0.5;
            transition: 0.2s;
        }

        .modal-thumbs img.active {
            opacity: 1;
            border-color: var(--text-main);
            transform: scale(1.05);
        }

        /* TOASTS & CART */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 999999;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .toast-apple {
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            color: var(--text-main);
            padding: 16px 24px;
            border-radius: 20px;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
            border: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 15px;
            font-weight: 800;
            font-size: 15px;
            animation: slideInSpring 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
            transform-origin: right center;
        }

        @keyframes slideInSpring {
            from {
                transform: translateX(120%) scale(0.9);
                opacity: 0;
            }

            to {
                transform: translateX(0) scale(1);
                opacity: 1;
            }
        }

        #floating-cart {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 65px;
            height: 65px;
            background: var(--text-main);
            color: var(--body-bg);
            border-radius: 50%;
            display: none;
            align-items: center;
            justify-content: center;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
            z-index: 1500;
            font-size: 26px;
            cursor: pointer;
            transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            border: none;
        }

        #floating-cart:hover {
            transform: scale(1.1) translateY(-8px);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
        }

        #floating-cart:active {
            transform: scale(0.9);
        }

        #cart-count {
            position: absolute;
            top: -4px;
            right: -4px;
            background: var(--danger);
            color: white;
            font-size: 11px;
            font-weight: 900;
            padding: 3px 8px;
            border-radius: 20px;
            border: 2px solid var(--body-bg);
        }

        /* ================= MOBILE RESPONSIVENESS ================= */
        @media (max-width: 991px) {
            :root {
                --sidebar-width: 0px;
            }

            .mobile-header {
                display: flex;
            }

            .body-with-banner .mobile-header {
                top: 40px;
            }

            .sidebar {
                top: auto;
                bottom: 0;
                left: 0;
                width: 100%;
                height: var(--mobile-nav-height);
                flex-direction: row;
                padding: 0 5px;
                border-right: none;
                border-top: 1px solid var(--border-color);
                align-items: center;
                justify-content: space-around;
                padding-bottom: env(safe-area-inset-bottom);
                box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
                z-index: 1001;
            }

            .brand-logo,
            .auth-block,
            .theme-toggle-wrap {
                display: none !important;
            }

            .nav-menu {
                flex-direction: row;
                width: 100%;
                justify-content: space-around;
                gap: 0;
            }

            .nav-item {
                flex-direction: column;
                gap: 4px;
                padding: 6px 0;
                border-radius: 12px;
                width: 60px;
                justify-content: center;
            }

            .nav-item:hover,
            .nav-item.active {
                transform: none;
                box-shadow: none;
                background: transparent !important;
                color: var(--text-main) !important;
            }

            .nav-item.active i {
                transform: scale(1.2);
                color: var(--text-main);
            }

            .nav-item span {
                font-size: 9px;
                opacity: 0.8;
                font-weight: 800;
            }

            .nav-item i {
                font-size: 22px;
                color: var(--text-muted);
            }

            .nav-badge {
                top: 2px;
                right: 10px;
                transform: none;
                min-width: 16px;
                height: 16px;
                font-size: 8px;
                padding: 0 4px;
            }

            .main-content {
                margin-left: 0;
                padding: calc(var(--mobile-header-height) + 20px) 15px calc(var(--mobile-nav-height) + 30px) 15px;
            }

            .body-with-banner .main-content {
                padding-top: calc(var(--mobile-header-height) + 60px);
            }

            .hero-premium {
                padding: 40px 25px;
                text-align: center;
                flex-direction: column;
                border-radius: 28px;
            }

            .hero-text h1 {
                font-size: 42px;
            }

            .hero-text .d-flex {
                flex-direction: column;
                width: 100%;
            }

            .hero-text .btn-apple {
                width: 100%;
                justify-content: center;
            }

            .market-3d-showcase {
                display: none !important;
            }

            .market-grid {
                grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
                gap: 15px;
            }

            .ad-card {
                border-radius: 20px;
                padding: 10px;
            }

            .img-main-wrapper-card {
                border-radius: 14px;
                padding: 10px;
            }

            .ad-title {
                font-size: 14px;
            }

            .ad-price {
                font-size: 18px;
            }

            .modal-apple-product {
                flex-direction: column;
                height: 95vh;
                max-height: 95vh;
                transform: scale(1) translateY(100%);
                border-radius: 28px 28px 0 0;
                margin-top: auto;
                max-width: 100%;
            }

            .overlay.show .modal-apple-product {
                transform: scale(1) translateY(0);
            }

            .modal-product-left {
                width: 100%;
                padding: 20px;
                border-right: none;
                border-bottom: 1px solid var(--border-color);
                height: 40vh;
            }

            .modal-product-right {
                width: 100%;
                padding: 25px;
                height: auto;
                flex-grow: 1;
            }

            .modal-main-img {
                max-height: 100%;
            }

            .nav-arrow {
                width: 40px;
                height: 40px;
                font-size: 18px;
            }

            .profile-hero {
                flex-direction: column;
                text-align: center;
                padding: 25px;
            }

            .profile-user-info {
                flex-direction: column;
            }

            .profile-stats-container {
                display: flex !important;
                width: 100%;
                justify-content: space-between;
                margin-top: 15px;
            }

            .profile-stat-box {
                flex: 1;
                padding: 10px;
                min-width: 0;
            }

            .profile-stat-box b {
                font-size: 20px;
            }

            #floating-cart {
                bottom: calc(var(--mobile-nav-height) + 20px);
                right: 20px;
                width: 55px;
                height: 55px;
                font-size: 22px;
            }

            #page-chat {
                height: calc(100vh - var(--mobile-header-height) - var(--mobile-nav-height) - 40px);
                padding: 0;
            }

            .chat-container {
                flex-direction: column;
                border-radius: 0;
            }

            .chat-sidebar {
                width: 100%;
                height: 100%;
                border-right: none;
            }

            .chat-main {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                z-index: 10;
                transform: translateX(100%);
                transition: 0.3s;
            }

            .chat-main.active {
                transform: translateX(0);
            }
        }

        /* Полноэкранная галерея поверх модалок */
        #fullscreen-gallery {
            z-index: 9999999 !important;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.95);
            display: none;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }

        .fs-close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 30px;
            color: white;
            cursor: pointer;
            padding: 10px;
            z-index: 9999999;
        }

        /* Фикс подсветки кнопок в Админке и Каталоге */
        .admin-tab-btn.active,
        .cat-tab.active {
            background: var(--text-main) !important;
            color: var(--body-bg) !important;
            border-color: var(--text-main) !important;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
        }

        .chat-context-banner:hover {
            border-color: var(--primary) !important;
            transform: translateY(-2px);
        }

        /* ================= ИДЕАЛЬНЫЙ ГЛАВНЫЙ ЭКРАН (ИСПРАВЛЕНО) ================= */
        #page-home.active {
            display: flex !important;
            flex-direction: column;
            justify-content: center;
            height: calc(100vh - 80px);
            overflow: hidden;
        }

        #page-home .hero-premium {
            flex: 1;
            display: flex;
            align-items: center;
            margin-bottom: 24px !important;
            min-height: 0;
        }

        #page-home .hero-text {
            flex: 1;
        }

        /* ЖЕСТКО ФИКСИРУЕМ КАРТОЧКИ В ГОРИЗОНТАЛЬНЫЙ РЯД */
        #page-home>.row {
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            /* Строго запрещаем перенос на новую строку */
            margin: 0 !important;
            gap: 24px;
            /* Идеальное расстояние между ними */
            flex-shrink: 0;
        }

        #page-home>.row>div {
            flex: 1 1 33.333% !important;
            /* Каждая занимает ровно 1/3 */
            padding: 0 !important;
            /* Убираем кривые бутстраповские отступы */
            max-width: 33.333%;
        }

        /* На мобилках они должны быть друг под другом */
        @media (max-width: 991px) {
            #page-home.active {
                height: auto;
                min-height: calc(100vh - var(--mobile-header-height) - var(--mobile-nav-height) - 40px);
                overflow: visible;
                justify-content: flex-start;
            }

            #page-home .hero-premium {
                flex: none;
                margin-bottom: 20px !important;
            }

            #page-home>.row {
                flex-direction: column !important;
            }

            #page-home>.row>div {
                max-width: 100%;
            }
        }

        /* Адаптация под небольшие ноутбуки (13-15 дюймов) */
        @media (max-height: 850px) {
            #page-home .hero-premium {
                padding: 30px 40px;
                margin-bottom: 20px !important;
            }

            .hero-text h1 {
                font-size: 42px !important;
            }

            .css-3d-iphone {
                transform: rotate(-15deg) rotateX(15deg) scale(0.85) !important;
            }

            /* Уменьшаем 3D iPhone */
        }

        @media (max-height: 700px) {
            .hero-text h1 {
                font-size: 34px !important;
            }

            .css-3d-iphone {
                transform: rotate(-15deg) rotateX(15deg) scale(0.7) !important;
            }
        }

        /* На мобилках (до 991px) возвращаем обычный скролл, т.к. 3 карточки там строятся в колонку */
        @media (max-width: 991px) {
            #page-home.active {
                height: auto;
                min-height: calc(100vh - var(--mobile-header-height) - var(--mobile-nav-height) - 40px);
                overflow: visible;
                justify-content: flex-start;
            }

            #page-home .hero-premium {
                flex: none;
            }
        }

        /* ================= ИДЕАЛЬНЫЙ ГЛАВНЫЙ ЭКРАН (ЖЕСТКИЙ ФИКС) ================= */
        #page-home.active {
            display: flex !important;
            flex-direction: column;
            justify-content: center;
            min-height: calc(100vh - 80px);
            /* Центрируем по вертикали, убираем скролл */
        }

        #page-home .hero-premium {
            margin-bottom: 24px !important;
        }

        /* Форсируем строгий горизонтальный ряд для 3 карточек */
        #page-home .row.g-4 {
            display: flex !important;
            flex-direction: row !important;
            flex-wrap: nowrap !important;
            /* ЖЕСТКО ЗАПРЕЩАЕМ перенос на новую строку */
            margin: 0 !important;
            gap: 20px !important;
            /* Идеальное расстояние между карточками */
            width: 100% !important;
        }

        /* Растягиваем карточки ровно на 3 части */
        #page-home .row.g-4>.col-md-4 {
            flex: 1 1 0 !important;
            width: 100% !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        /* На телефонах (до 991px) возвращаем вертикальную колонку */
        @media (max-width: 991px) {
            #page-home.active {
                justify-content: flex-start;
                min-height: calc(100vh - var(--mobile-header-height) - var(--mobile-nav-height) - 40px);
            }

            #page-home .row.g-4 {
                flex-direction: column !important;
            }
        }

        .user-avatar-wrapper {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            overflow: hidden;
            background: var(--input-bg);
            position: relative;
            border: 3px solid var(--card-bg);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .user-card-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .user-card-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: 900;
            color: var(--text-muted);
        }

        /* ================= COOKIE BANNER ================= */
        .cookie-banner {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 650px;
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--border-color);
            border-radius: 24px;
            padding: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            z-index: 99999;
            display: flex;
            flex-direction: column;
            gap: 15px;
            animation: slideUpCookie 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
        }

        .cookie-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            flex-wrap: wrap;
        }

        .cookie-text {
            flex: 1;
            min-width: 250px;
        }

        .cookie-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        /* ================= NOVA POSHTA & MODALS ================= */
        .np-dropdown {
            position: absolute;
            top: calc(100% + 5px);
            left: 0;
            width: 100%;
            background: var(--card-bg);
            backdrop-filter: blur(25px);
            -webkit-backdrop-filter: blur(25px);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            z-index: 1050;
            max-height: 220px;
            overflow-y: auto;
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        }

        .np-dropdown::-webkit-scrollbar {
            width: 4px;
        }

        .np-dropdown::-webkit-scrollbar-thumb {
            background: var(--text-muted);
            border-radius: 10px;
        }

        .np-item {
            padding: 12px 18px;
            cursor: pointer;
            border-bottom: 1px solid var(--border-color);
            font-size: 14px;
            font-weight: 700;
            transition: 0.2s;
            color: var(--text-main);
        }

        .np-item:last-child {
            border-bottom: none;
        }

        .np-item:hover {
            background: var(--text-main);
            color: var(--body-bg);
            padding-left: 22px;
        }

        /* Исправление размеров и скролла модалок */
        #success-screen .apple-card {
            max-width: 400px !important;
            width: 95% !important;
            border-radius: 28px;
        }

        #custom-modal-dialog {
            border-radius: 28px;
            transition: max-width 0.3s;
            max-height: 90vh;
            /* Не дает окну быть больше экрана */
            overflow-y: auto;
            /* Включает внутренний скролл для длинных накладных */
        }

        #custom-modal-dialog::-webkit-scrollbar {
            width: 5px;
        }

        #custom-modal-dialog::-webkit-scrollbar-thumb {
            background: var(--text-muted);
            border-radius: 10px;
        }

        @keyframes slideUpCookie {
            from {
                transform: translate(-50%, 100%);
                opacity: 0;
            }

            to {
                transform: translate(-50%, 0);
                opacity: 1;
            }
        }

        /* ================= ИСПРАВЛЕННАЯ СЕТКА ФОТО ================= */
        .modern-photo-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 15px;
            align-items: center;
            /* Выравниваем по центру, так как обложка больше */
        }

        .photo-thumbnail {
            width: 100px;
            height: 100px;
            border-radius: 14px;
            overflow: hidden;
            position: relative;
            border: 1px solid var(--border-color);
            background: var(--input-bg);
            cursor: grab;
            flex-shrink: 0;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        /* Делаем обложку чуть больше остальных */
        .photo-thumbnail.is-cover {
            width: 130px;
            height: 130px;
            border: 2px solid var(--primary);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .photo-thumbnail:active {
            cursor: grabbing;
            transform: scale(0.95);
        }

        .photo-thumbnail.dragging {
            opacity: 0.5;
        }

        .photo-thumbnail.drag-over {
            border-color: var(--primary);
            transform: scale(1.05);
        }

        .photo-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            pointer-events: none;
            /* Защита от багов при перетаскивании */
        }

        .photo-add-btn {
            width: 100px;
            height: 100px;
            border-radius: 14px;
            border: 2px dashed var(--text-muted);
            background: rgba(0, 0, 0, 0.01);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-muted);
            transition: 0.2s;
            flex-shrink: 0;
        }

        .photo-add-btn:hover {
            border-color: var(--text-main);
            color: var(--text-main);
            background: var(--card-bg);
        }
