*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#101010;color:#f5f5f5;font-family:Inter,Arial,sans-serif;min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.site-watermark{position:fixed;left:50%;top:50%;width:min(620px,68vw);height:min(390px,44vw);transform:translate(-50%,-50%);background-image:url("../images/logo-watermark.png");background-repeat:no-repeat;background-position:center;background-size:contain;opacity:.105;pointer-events:none;z-index:0;font-size:0;line-height:0;filter:grayscale(1) brightness(1.25);mix-blend-mode:screen}header{position:sticky;top:0;z-index:20;background:rgba(16,16,16,.72);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.08)}.header-inner{max-width:1500px;margin:auto;min-height:84px;padding:0 28px;display:flex;align-items:center;gap:24px}.brand{font-size:28px;font-weight:900;letter-spacing:.05em;color:#dcb22e;white-space:nowrap}.nav{margin-left:auto;display:flex;align-items:center;gap:6px;flex-wrap:wrap}.nav a,.user-menu-btn{padding:11px 14px;border-radius:10px;color:#eee;border:1px solid transparent;background:transparent}.nav a:hover,.nav a.active,.user-menu-btn:hover{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.08)}.nav .staff{display:none}.nav.staff-visible .staff{display:inline-flex}.user-area{position:relative;margin-left:12px}.user-menu-btn{display:flex;align-items:center;gap:9px}.user-role{font-size:11px;color:#aaa;display:block}.user-menu{position:absolute;right:0;top:calc(100% + 10px);width:230px;padding:10px;border-radius:16px;background:rgba(24,24,24,.97);border:1px solid rgba(255,255,255,.1);box-shadow:0 20px 60px rgba(0,0,0,.45);display:none}.user-area.open .user-menu{display:block}.user-menu a,.user-menu button{width:100%;display:block;text-align:left;padding:11px 12px;border-radius:10px;background:transparent;border:0;color:#eee}.user-menu a:hover,.user-menu button:hover{background:rgba(255,255,255,.07)}.user-menu .logout{color:#e4bd39}.container{position:relative;z-index:1;max-width:1450px;margin:auto;padding:56px 28px 90px}.hero{min-height:400px;display:flex;align-items:center;padding:65px;margin-bottom:26px}.glass{position:relative;background:rgba(255,255,255,.012);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.10);border-radius:24px;box-shadow:0 18px 60px rgba(0,0,0,.16);overflow:hidden}.glass:after{content:"НЕО ФЕНИКС";position:absolute;right:26px;bottom:18px;font-weight:900;letter-spacing:.12em;color:#dcb22e;opacity:.045;pointer-events:none}.eyebrow{font-size:12px;letter-spacing:.18em;color:#dcb22e;font-weight:800}.hero h1{font-size:clamp(44px,6vw,82px);line-height:1.02;margin:16px 0}.hero h1 span{color:#dcb22e}.hero p{font-size:19px;color:#bbb;max-width:720px}.section-head{margin-bottom:25px}.section-head h2,.page-title h1{margin:8px 0;font-size:36px}.section-head p,.muted{color:#aaa}.fitment{padding:34px;margin-bottom:26px}.fitment-grid{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:14px;align-items:end}.fitment label,.auth-card label,.form-grid label{display:flex;flex-direction:column;gap:8px;color:#bbb;font-size:14px}.fitment select,.auth-card input,.form-grid input,.form-grid select,.form-grid textarea,.auth-card select,.manager-table select,.order-panel select,.order-panel textarea{width:100%;padding:13px 14px;border-radius:11px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.05);color:#fff;outline:none}.fitment select:focus,.auth-card input:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:#dcb22e}.fitment select option,.form-grid select option,.manager-table select option,.order-panel select option{background:#222;color:#fff}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 18px;border-radius:11px;border:1px solid transparent;font-weight:800;transition:.18s}.btn.gold{background:#dcb22e;color:#111}.btn.gold:hover{background:#efc43b;transform:translateY(-1px)}.btn.outline{border-color:rgba(255,255,255,.18);background:transparent}.btn.outline:hover{background:rgba(255,255,255,.06)}.btn.danger{background:#8d2d2d;color:#fff}.btn.small{padding:9px 12px;font-size:13px}.fit-result{margin-top:18px;padding:15px;border-radius:12px;background:rgba(220,178,46,.08);border:1px solid rgba(220,178,46,.25)}.hidden{display:none!important}.loyalty-preview{padding:30px;display:flex;align-items:center;justify-content:space-between;gap:25px}.page-title{display:flex;align-items:end;justify-content:space-between;margin-bottom:28px}.priority{padding:20px;margin-bottom:24px}.priority h2{margin:0 0 10px}.car-chip-list{display:flex;gap:10px;flex-wrap:wrap}.car-chip{padding:10px 12px;border:1px solid rgba(220,178,46,.3);border-radius:12px;background:rgba(220,178,46,.06)}.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.product-card{overflow:hidden;border-radius:22px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.012);backdrop-filter:blur(7px);display:flex;flex-direction:column}.product-card.priority-card{border-color:rgba(220,178,46,.45)}.product-image{height:310px;background:rgba(255,255,255,.04);display:flex;align-items:center;justify-content:center;overflow:hidden}.product-image img{width:100%;height:100%;object-fit:cover}.product-body{padding:20px;display:flex;flex-direction:column;gap:10px;flex:1}.product-body h3{margin:0;font-size:24px}.product-body p{margin:0;color:#bbb;min-height:44px}.specs{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 0;border-top:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08);font-size:13px}.specs b{color:#eee}.price{font-size:24px;color:#dcb22e;font-weight:900}.product-actions{display:flex;gap:8px;margin-top:auto}.product-actions .btn{flex:1}.auth-wrap{position:relative;z-index:1;min-height:calc(100vh - 85px);display:grid;place-items:center;padding:50px 20px}.auth-card{width:min(520px,100%);padding:34px}.auth-card h1{font-size:38px;margin:8px 0 22px}.auth-card form{display:grid;gap:16px}.auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:18px;color:#dcb22e}.form-msg{min-height:22px;color:#dcb22e}.demo-box{margin-top:18px;color:#aaa}.account-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:22px}.panel{padding:26px;background:rgba(255,255,255,.012);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.08);border-radius:20px}.panel h2{margin-top:0}.bonus-number{font-size:48px;font-weight:900;color:#dcb22e}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.saved-cars{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.saved-car{padding:18px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:rgba(255,255,255,.012);backdrop-filter:blur(7px)}.saved-car h3{margin:0 0 7px}.saved-car button{margin-top:12px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{padding:14px 12px;border-bottom:1px solid rgba(255,255,255,.08);text-align:left;white-space:nowrap}.status{display:inline-flex;padding:7px 10px;border-radius:999px;background:rgba(220,178,46,.18);color:#f2ca43;font-size:13px}.status.done{background:rgba(70,180,110,.14);color:#78d69c}.status.cancel{background:rgba(200,60,60,.14);color:#ff8d8d}.order-modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.76);backdrop-filter:blur(10px);padding:20px}.order-modal.open{display:flex}.order-panel{width:min(760px,100%);max-height:90vh;overflow:auto;padding:28px;border-radius:22px;background:#1b1b1b;border:1px solid rgba(255,255,255,.12);box-shadow:0 30px 100px rgba(0,0,0,.6)}.order-head{display:flex;justify-content:space-between;gap:15px;align-items:start}.close{border:0;background:rgba(255,255,255,.07);color:#fff;border-radius:10px;padding:8px 11px}.order-info{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.order-info div{padding:13px;border-radius:12px;background:rgba(255,255,255,.04)}.tasks{display:grid;gap:10px}.tasks label{display:flex;gap:10px;align-items:center;padding:10px;border-radius:10px;background:rgba(255,255,255,.03)}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.info-grid{padding:30px;display:grid;grid-template-columns:1fr 1fr;gap:30px}.notice{padding:13px 15px;border-radius:12px;background:rgba(220,178,46,.08);border:1px solid rgba(220,178,46,.18);color:#ddd}.empty{padding:45px;text-align:center;color:#999}.mobile-menu{display:none}.toast{position:fixed;right:22px;bottom:22px;z-index:200;background:#222;border:1px solid rgba(255,255,255,.12);padding:14px 16px;border-radius:12px;box-shadow:0 15px 50px rgba(0,0,0,.4)}
@media(max-width:1100px){.fitment-grid{grid-template-columns:1fr 1fr}.fitment-grid .btn{grid-column:1/-1}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.account-grid,.admin-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.header-inner{padding:10px 15px;align-items:flex-start;flex-wrap:wrap}.brand{font-size:22px}.nav{width:100%;margin-left:0;overflow:auto;flex-wrap:nowrap}.nav a,.user-menu-btn{white-space:nowrap;padding:9px}.user-area{margin-left:auto}.user-menu{right:0}.hero{padding:35px;min-height:330px}.container{padding:35px 15px 60px}.product-grid{grid-template-columns:1fr}.fitment-grid,.form-grid,.saved-cars,.info-grid{grid-template-columns:1fr}.loyalty-preview{align-items:flex-start;flex-direction:column}.page-title{align-items:flex-start;flex-direction:column}.order-info{grid-template-columns:1fr}.site-watermark{width:300px;height:190px;opacity:.09}}

/* Автомобильный подбор — компактный блок в кабинете */
.saved-car-selector .form-grid{max-width:980px;grid-template-columns:repeat(3,minmax(0,1fr));}
.saved-car-selector{background:rgba(255,255,255,.018);}
.priority-card{box-shadow:0 0 0 1px rgba(220,178,46,.08),0 16px 55px rgba(220,178,46,.05);}

/* Управление пользователями */
.panel-head-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:8px}
.panel-head-row h2{margin:7px 0 0}
.admin-count,.owner-badge,.role-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:6px 10px;font-size:12px;white-space:nowrap}
.admin-count{min-width:32px;background:rgba(220,178,46,.13);border:1px solid rgba(220,178,46,.25);color:#e5c45a}
.owner-badge{background:rgba(220,178,46,.12);border:1px solid rgba(220,178,46,.24);color:#e5c45a}
.role-badge{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.05);color:#eee}
.role-owner{color:#f1ce55;border-color:rgba(220,178,46,.35);background:rgba(220,178,46,.10)}
.role-admin{color:#bfa8ff;border-color:rgba(160,130,255,.28);background:rgba(160,130,255,.09)}
.role-manager{color:#78c7ff;border-color:rgba(90,180,255,.28);background:rgba(90,180,255,.08)}
.role-buyer{color:#9de0ad;border-color:rgba(100,200,120,.25);background:rgba(100,200,120,.08)}
.manual-user-panel{min-width:0}
.manual-user-form{grid-template-columns:1fr 1.25fr 1fr}
.manual-user-form .password-field{grid-column:1 / 3}
.password-actions{display:flex;gap:8px;align-items:end;align-self:end}
.password-actions .btn{flex:1;white-space:nowrap}
.manual-user-form>.btn{grid-column:3;align-self:end}
.manual-user-result{margin-top:16px}
.credential-card{padding:16px;border-radius:15px;border:1px solid rgba(220,178,46,.25);background:rgba(220,178,46,.055);display:grid;gap:10px}
.credential-card>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:10px}
.credential-role{font-size:12px;color:#dcb22e}
.credential-row{display:flex;justify-content:space-between;gap:15px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.credential-row:last-of-type{border-bottom:0}
.credential-row span{color:#aaa}
.credential-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:5px}
@media(max-width:1100px){.manual-user-form{grid-template-columns:1fr 1fr}.manual-user-form .password-field{grid-column:1/-1}.manual-user-form>.btn{grid-column:1/-1}.password-actions{align-self:stretch}}
@media(max-width:760px){.panel-head-row{align-items:flex-start}.password-actions{flex-direction:column}.password-actions .btn{width:100%}.credential-row{flex-direction:column;gap:4px}}

/* Панель владельца: каталог, автомобили, редактор сайта */
.admin-control-bar{position:sticky;top:12px;z-index:20;margin-bottom:22px;background:rgba(18,18,18,.62);backdrop-filter:blur(18px)}
.admin-tabs{display:flex;gap:9px;flex-wrap:wrap;padding-top:6px}
.admin-tab{border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.035);color:#ddd;border-radius:12px;padding:11px 15px;font-weight:800;cursor:pointer;transition:.18s}
.admin-tab:hover{background:rgba(255,255,255,.07);transform:translateY(-1px)}
.admin-tab.active{background:#dcb22e;color:#111;border-color:#dcb22e}
.admin-section-block{scroll-margin-top:105px;margin-top:22px}
.admin-products-table td{vertical-align:middle}
.admin-thumb{width:62px;height:52px;border-radius:9px;background:rgba(255,255,255,.05);overflow:hidden;display:flex;align-items:center;justify-content:center}
.admin-thumb img{width:100%;height:100%;object-fit:cover}
.product-editor-panel{background:rgba(255,255,255,.018)}
.product-editor-form,.site-editor-form{grid-template-columns:repeat(2,minmax(0,1fr))}
.product-editor-form label.full-field,.site-editor-form label.full-field,.form-actions.full-field,.image-editor.full-field{grid-column:1/-1}
.product-editor-form select[multiple]{min-height:190px}
.image-editor{display:grid;grid-template-columns:160px 1fr;gap:14px;align-items:start}
.admin-preview{height:145px;border-radius:14px;border:1px dashed rgba(255,255,255,.15);background:rgba(255,255,255,.04);display:flex;align-items:center;justify-content:center;overflow:hidden}
.admin-preview img{width:100%;height:100%;object-fit:contain}
.form-actions{display:flex;gap:10px;flex-wrap:wrap}
.category-manager{padding-top:15px;border-top:1px solid rgba(255,255,255,.08)}
.category-chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}
.category-chip{display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border-radius:999px;background:rgba(220,178,46,.08);border:1px solid rgba(220,178,46,.2);color:#e8d07a}
.category-chip button{border:0;background:transparent;color:#fff;cursor:pointer;font-size:17px;line-height:1}
.inline-form{display:flex;gap:8px}
.inline-form input{flex:1;padding:11px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#fff;outline:none}
@media(max-width:1100px){.admin-control-bar{position:static}.product-editor-form,.site-editor-form{grid-template-columns:1fr}.product-editor-form label.full-field,.site-editor-form label.full-field,.form-actions.full-field,.image-editor.full-field{grid-column:1}.image-editor{grid-template-columns:1fr}.admin-tabs{overflow:auto;flex-wrap:nowrap}.admin-tab{white-space:nowrap}}
@media(max-width:760px){.inline-form{flex-direction:column}.admin-tabs{padding-bottom:2px}.admin-section-block{scroll-margin-top:20px}}
.owner-only-disabled{opacity:.68;position:relative}
.owner-only-disabled:before{content:'Редактирование доступно только владельцу сайта';display:block;padding:10px 13px;margin-bottom:14px;border-radius:10px;background:rgba(220,178,46,.07);border:1px solid rgba(220,178,46,.18);color:#dcb22e;font-weight:700}
.admin-tab.disabled{opacity:.4;cursor:not-allowed}
.image-gallery-preview{display:flex;gap:10px;flex-wrap:wrap;padding:10px;border-radius:12px;background:rgba(255,255,255,.03);min-height:20px}
.image-gallery-preview:empty{display:none}
.image-gallery-preview img{width:92px;height:72px;object-fit:cover;border-radius:9px;border:1px solid rgba(255,255,255,.1)}


/* =========================================================
   Улучшенная панель управления и редактор товаров
   ========================================================= */
body.modal-lock{overflow:hidden}
.btn.outline,.btn.secondary-btn,.edit-btn{background:rgba(255,255,255,.09);color:#fff;border:1px solid rgba(255,255,255,.18);text-shadow:0 1px 1px rgba(0,0,0,.35)}
.btn.outline:hover,.btn.secondary-btn:hover,.edit-btn:hover{background:rgba(255,255,255,.15);border-color:rgba(220,178,46,.55);color:#f3ca45}
.edit-btn{background:rgba(220,178,46,.12);border-color:rgba(220,178,46,.28);color:#f0cd58}
.btn.danger{background:rgba(182,54,54,.22);border:1px solid rgba(230,88,88,.38);color:#ffb6b6}
.btn.danger:hover{background:rgba(188,57,57,.36);border-color:rgba(255,120,120,.62);color:#fff}
.btn.gold{color:#111;box-shadow:0 7px 20px rgba(220,178,46,.13)}
.admin-primary-btn{min-height:44px}
.admin-control-bar{position:sticky;top:96px;z-index:18;margin:0 0 22px;padding:10px 12px;border:1px solid rgba(255,255,255,.09);border-radius:16px;background:rgba(19,19,19,.78);backdrop-filter:blur(20px);box-shadow:0 14px 45px rgba(0,0,0,.20)}
.admin-control-row{display:flex;align-items:center;gap:18px}.admin-control-title{min-width:155px;display:flex;flex-direction:column;gap:3px;padding:0 6px}.admin-control-title strong{font-size:17px}.admin-control-title .eyebrow{font-size:9px;letter-spacing:.14em}
.admin-tabs{padding:0;gap:5px;flex:1;display:flex;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.admin-tabs::-webkit-scrollbar{display:none}.admin-tab{min-height:38px;padding:9px 13px;border-radius:9px;border:1px solid transparent;background:transparent;color:#cfcfcf;font-size:13px;font-weight:750;white-space:nowrap}.admin-tab:hover{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.09);transform:none;color:#fff}.admin-tab.active{background:rgba(220,178,46,.16);border-color:rgba(220,178,46,.32);color:#f0ca4b;box-shadow:none}
.admin-catalog-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.admin-catalog-summary>div{padding:13px 15px;border-radius:12px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.075)}.admin-catalog-summary span{display:block;font-size:12px}.admin-catalog-summary strong{display:block;font-size:20px;margin-top:4px}
.admin-product-table-wrap{border:1px solid rgba(255,255,255,.07);border-radius:14px;overflow:auto;background:rgba(0,0,0,.08)}.admin-products-table thead th{position:sticky;top:0;z-index:2;background:rgba(24,24,24,.96)}.admin-products-table td{padding-top:12px;padding-bottom:12px}.admin-price{color:#e5c452}.compat-count{display:inline-flex;padding:6px 9px;border-radius:999px;background:rgba(110,180,255,.09);border:1px solid rgba(110,180,255,.18);color:#a8d6ff;font-size:12px}.admin-row-actions{display:flex;gap:7px;align-items:center}.compact-head{margin-bottom:4px}
.admin-modal{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;overflow:hidden;background:rgba(0,0,0,.78);backdrop-filter:blur(12px)}.admin-modal.hidden{display:none!important}.admin-modal-card{width:min(1040px,calc(100vw - 48px));max-height:calc(100dvh - 48px);margin:0;padding:0;border-radius:22px;background:rgba(24,24,24,.985);border:1px solid rgba(255,255,255,.14);box-shadow:0 35px 110px rgba(0,0,0,.72);overflow:hidden;display:flex;flex-direction:column}.admin-modal-head{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:24px 26px 18px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.018)}.admin-modal-head h2{margin:6px 0 5px;font-size:28px}.admin-modal-head p{margin:0}.admin-modal-close{width:40px;height:40px;flex:0 0 40px;border-radius:10px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.075);color:#fff;font-size:26px;line-height:1}.admin-modal-close:hover{background:rgba(255,255,255,.14);color:#f0ca4b}
.product-editor-form-v2{min-height:0;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:22px 26px 0;display:grid;gap:16px;scrollbar-gutter:stable}.editor-section{padding:18px;border-radius:16px;background:rgba(255,255,255,.022);border:1px solid rgba(255,255,255,.075)}.editor-section-title{margin-bottom:14px;font-size:13px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#e2bf4f}.product-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-editor-grid.three-cols{grid-template-columns:repeat(3,minmax(0,1fr))}
.product-editor-form-v2 label{display:flex;flex-direction:column;gap:8px;color:#c9c9c9;font-size:13px}.product-editor-form-v2 input,.product-editor-form-v2 select,.product-editor-form-v2 textarea{width:100%;padding:12px 13px;border-radius:10px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.055);color:#fff;outline:none}.product-editor-form-v2 input:focus,.product-editor-form-v2 select:focus,.product-editor-form-v2 textarea:focus{border-color:rgba(220,178,46,.72);box-shadow:0 0 0 3px rgba(220,178,46,.08)}.product-editor-form-v2 select option{background:#252525;color:#fff}.product-editor-form-v2 select[multiple]{min-height:240px}
.image-editor-v2{display:grid;grid-template-columns:270px 1fr;gap:18px;align-items:start}.large-preview{height:220px;width:100%}.image-editor-controls{display:grid;gap:11px}.gallery-upload-label{margin-top:15px}.image-gallery-preview{margin-top:10px;max-height:180px;overflow:auto}.admin-modal-footer{position:sticky;bottom:0;z-index:3;display:flex;justify-content:flex-end;gap:10px;margin:0 -26px;padding:16px 26px;background:rgba(22,22,22,.985);border-top:1px solid rgba(255,255,255,.09);backdrop-filter:blur(16px)}.save-product-btn{min-width:190px}
@media(max-width:900px){.admin-control-bar{top:142px}.admin-control-title{display:none}.admin-catalog-summary{grid-template-columns:1fr 1fr 1fr}.product-editor-grid,.product-editor-grid.three-cols{grid-template-columns:1fr}.image-editor-v2{grid-template-columns:1fr}.admin-row-actions{flex-direction:column;align-items:stretch}}
@media(max-width:650px){.admin-modal{padding:10px;place-items:center}.admin-modal-card{width:100%;max-height:calc(100dvh - 20px);border-radius:16px}.admin-modal-head{padding:18px}.product-editor-form-v2{padding:16px 16px 0}.editor-section{padding:14px}.admin-modal-footer{margin:0 -16px;padding:13px 16px;flex-wrap:wrap}.admin-modal-footer .btn{flex:1;min-width:130px}.admin-catalog-summary{grid-template-columns:1fr}}

/* =========================================================
   FIX 2026-10-03 — надёжная прокрутка редактора товара
   ========================================================= */
html.product-modal-open,
body.product-modal-open,
body.modal-lock{
  overflow:hidden !important;
}

/* Сам overlay всегда относительно окна браузера, а не панели управления */
#productEditorModal.admin-modal{
  position:fixed !important;
  inset:0 !important;
  width:100vw !important;
  height:100dvh !important;
  z-index:2147483000 !important;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px !important;
  margin:0 !important;
  overflow:hidden !important;
  background:rgba(0,0,0,.82) !important;
  backdrop-filter:blur(10px);
  transform:none !important;
  contain:none !important;
}

#productEditorModal.admin-modal.hidden{
  display:none !important;
}

/* Фиксированная рабочая высота карточки — это даёт внутреннему блоку место для скролла */
#productEditorModal .admin-modal-card{
  position:relative !important;
  width:min(1080px, calc(100vw - 32px)) !important;
  height:min(860px, calc(100dvh - 32px)) !important;
  max-height:calc(100dvh - 32px) !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  border-radius:20px !important;
  background:rgba(24,24,24,.985) !important;
  border:1px solid rgba(220,178,46,.28) !important;
  box-shadow:0 30px 100px rgba(0,0,0,.78) !important;
  transform:none !important;
}

#productEditorModal .admin-modal-head{
  position:relative !important;
  flex:0 0 auto !important;
  z-index:5 !important;
  padding:18px 22px !important;
  background:rgba(22,22,22,.99) !important;
  border-bottom:1px solid rgba(255,255,255,.09) !important;
}

/* Именно форма прокручивается. Шапка остаётся сверху. */
#productEditorModal .product-editor-form-v2{
  position:relative !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  padding:18px 22px 0 !important;
  display:grid !important;
  gap:16px !important;
}

#productEditorModal .product-editor-form-v2::-webkit-scrollbar{
  width:10px;
}
#productEditorModal .product-editor-form-v2::-webkit-scrollbar-track{
  background:rgba(255,255,255,.025);
  border-radius:10px;
}
#productEditorModal .product-editor-form-v2::-webkit-scrollbar-thumb{
  background:rgba(220,178,46,.34);
  border-radius:10px;
}

/* Нижние кнопки всегда доступны */
#productEditorModal .admin-modal-footer{
  position:sticky !important;
  bottom:0 !important;
  z-index:8 !important;
  flex:0 0 auto !important;
  margin:0 -22px !important;
  padding:14px 22px !important;
  background:rgba(20,20,20,.99) !important;
  border-top:1px solid rgba(255,255,255,.10) !important;
  box-shadow:0 -12px 28px rgba(0,0,0,.28);
}

#productEditorModal .editor-section{
  flex:0 0 auto;
}

@media (max-height:760px){
  #productEditorModal.admin-modal{padding:10px !important;align-items:center !important;}
  #productEditorModal .admin-modal-card{
    height:calc(100dvh - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
  }
  #productEditorModal .admin-modal-head{padding:12px 18px !important;}
  #productEditorModal .admin-modal-head h2{font-size:22px !important;}
  #productEditorModal .product-editor-form-v2{padding:14px 18px 0 !important;}
  #productEditorModal .admin-modal-footer{margin:0 -18px !important;padding:11px 18px !important;}
  #productEditorModal .editor-section{padding:14px !important;}
}

@media (max-width:700px){
  #productEditorModal.admin-modal{padding:8px !important;}
  #productEditorModal .admin-modal-card{
    width:100% !important;
    height:calc(100dvh - 16px) !important;
    max-height:calc(100dvh - 16px) !important;
    border-radius:14px !important;
  }
  #productEditorModal .product-editor-grid,
  #productEditorModal .product-editor-grid.three-cols,
  #productEditorModal .image-editor-v2{
    grid-template-columns:1fr !important;
  }
}

/* =========================================================
   FIX 2026-10-03 — фотографии каталога и заглушки
   ========================================================= */
.product-card{
  min-height:100%;
}
.product-image{
  position:relative;
  height:310px;
  min-height:310px;
  background:rgba(255,255,255,.025);
}
.product-image>img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
.np-image-placeholder{
  width:100%;
  height:100%;
  min-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:15px;
  padding:28px;
  text-align:center;
  color:#aaa;
  background:
    radial-gradient(circle at 50% 42%, rgba(220,178,46,.09), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
}
.np-image-placeholder img{
  width:min(190px,56%);
  height:auto;
  max-height:140px;
  object-fit:contain;
  opacity:.20;
  filter:grayscale(1) brightness(1.5);
}
.np-image-placeholder span{
  font-size:12px;
  font-weight:800;
  letter-spacing:.10em;
  text-transform:uppercase;
  color:rgba(255,255,255,.42);
}
.admin-thumb .np-image-placeholder{
  padding:4px;
  gap:0;
}
.admin-thumb .np-image-placeholder img{
  width:34px;
  max-height:28px;
  opacity:.18;
}
.admin-thumb .np-image-placeholder span{
  display:none;
}
.admin-preview .np-image-placeholder{
  padding:18px;
}
.admin-preview .np-image-placeholder img{
  width:110px;
  max-height:95px;
}
.image-gallery-preview .gallery-preview-item{
  width:92px;
  height:72px;
  overflow:hidden;
  border-radius:9px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.025);
}
.image-gallery-preview .gallery-preview-item>img{
  width:100%;
  height:100%;
  object-fit:cover;
  border:0;
  border-radius:0;
}
.image-gallery-preview .gallery-preview-item .np-image-placeholder{
  padding:5px;
}
.image-gallery-preview .gallery-preview-item .np-image-placeholder img{
  width:40px;
  max-height:35px;
}
.image-gallery-preview .gallery-preview-item .np-image-placeholder span{
  display:none;
}


/* =========================================================
   PRODUCT PAGE 2026-10-03
   ========================================================= */
.product-card-link{display:flex;flex-direction:column;flex:1;color:inherit;text-decoration:none}.catalog-actions{padding:0 20px 20px;display:grid;grid-template-columns:auto 1fr 1.25fr;gap:8px}.catalog-actions .btn{min-width:0}.product-page{padding-top:40px}.product-detail-top{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(360px,.88fr);gap:24px;align-items:stretch}.product-gallery-card,.product-info-card{padding:24px}.product-main-image{height:560px;border-radius:18px;overflow:hidden;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.08)}.product-main-image>img{width:100%;height:100%;object-fit:contain;background:rgba(0,0,0,.16)}.product-main-image .np-image-placeholder{height:100%}.product-thumbs{display:flex;gap:10px;overflow-x:auto;padding-top:14px}.product-thumb{width:90px;height:76px;padding:0;border-radius:11px;overflow:hidden;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.025);flex:0 0 90px}.product-thumb.active{border-color:#dcb22e;box-shadow:0 0 0 2px rgba(220,178,46,.12)}.product-thumb img{width:100%;height:100%;object-fit:cover}.product-thumb .np-image-placeholder{padding:5px}.product-thumb .np-image-placeholder span{display:none}.product-info-card{display:flex;flex-direction:column;align-items:flex-start}.product-back{color:#aaa;margin-bottom:30px}.product-back:hover{color:#dcb22e}.product-info-card h1{font-size:clamp(34px,4vw,54px);line-height:1.06;margin:10px 0 14px}.product-lead{font-size:18px;line-height:1.6;color:#bbb}.product-detail-price{font-size:38px;color:#dcb22e;font-weight:900;margin:20px 0 8px}.product-stock{display:inline-flex;padding:8px 12px;border-radius:999px;font-size:13px;font-weight:800}.product-stock.in{background:rgba(64,190,110,.13);color:#7dde9f}.product-stock.out{background:rgba(220,178,46,.11);color:#f1c94c}.product-buy-row{display:grid;grid-template-columns:120px 1fr;gap:10px;width:100%;margin-top:28px}.product-buy-row label{display:flex;flex-direction:column;gap:6px;color:#aaa;font-size:12px}.product-buy-row input{width:100%;padding:13px;border-radius:11px;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.05);color:#fff}.favorite-btn{width:100%;margin-top:10px;background:transparent;border-color:rgba(255,255,255,.18);color:#fff}.favorite-btn:hover,.favorite-btn.active{border-color:rgba(220,178,46,.55);background:rgba(220,178,46,.08);color:#f1c94c}.product-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:22px}.detail-spec-table{display:grid;margin-top:18px}.detail-spec-table>div{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:13px 0;border-bottom:1px solid rgba(255,255,255,.08)}.detail-spec-table span{color:#999}.detail-spec-table b{text-align:right}.compat-list{display:grid;gap:9px;margin-top:18px}.compat-row{display:flex;justify-content:space-between;gap:15px;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.028);border:1px solid rgba(255,255,255,.06)}.compat-row span{color:#999;text-align:right}.product-description-full{margin-top:22px}.product-description-full p{font-size:17px;color:#bbb;line-height:1.7;white-space:pre-line}.related-section{margin-top:42px}.related-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.related-card .product-image{height:210px}.related-card .product-body h3{font-size:18px}.related-card .product-body p{min-height:42px;font-size:14px}.related-actions{padding:0 20px 20px}.related-actions .btn{width:100%}.account-favorites{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.favorite-mini-card{display:grid;grid-template-columns:82px 1fr;gap:12px;align-items:center;padding:10px;border-radius:13px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.02)}.favorite-mini-card:hover{border-color:rgba(220,178,46,.35)}.favorite-mini-image{height:68px;border-radius:9px;overflow:hidden;background:rgba(255,255,255,.025)}.favorite-mini-image>img{width:100%;height:100%;object-fit:cover}.favorite-mini-image .np-image-placeholder{padding:4px}.favorite-mini-image .np-image-placeholder span{display:none}.favorite-mini-card b{display:block;margin-bottom:7px}.favorite-mini-card span{color:#dcb22e;font-weight:800}
@media(max-width:1100px){.product-detail-top{grid-template-columns:1fr}.product-main-image{height:min(560px,60vw)}.related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.catalog-actions{grid-template-columns:auto 1fr}.catalog-actions [data-add]{grid-column:1/-1}.product-gallery-card,.product-info-card{padding:16px}.product-main-image{height:380px}.product-detail-grid{grid-template-columns:1fr}.product-buy-row{grid-template-columns:100px 1fr}.related-grid,.account-favorites{grid-template-columns:1fr}.compat-row{flex-direction:column}.compat-row span{text-align:left}}

/* =========================================================
   FAVORITES + GOLD PRODUCT ACTIONS 2026-10-03
   ========================================================= */
.favorite-count,.cart-count{color:#f0c83e;font-weight:900}
.nav a[data-page="favorites"].active{color:#16120a;background:linear-gradient(135deg,#f0ce55,#c99b1f);border-color:rgba(255,223,102,.55);box-shadow:0 8px 24px rgba(220,178,46,.16)}

/* Кнопки товара: фирменный золотой стиль, визуально ближе к логотипу */
.np-action-btn{
  min-height:43px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:11px 14px;
  border-radius:11px;
  border:1px solid rgba(236,196,60,.72);
  font-family:Impact,"Arial Black","Arial Narrow",Arial,sans-serif;
  font-weight:900;
  font-size:13px;
  line-height:1;
  letter-spacing:.055em;
  text-transform:uppercase;
  white-space:nowrap;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease,color .16s ease;
}
.np-action-btn:hover{transform:translateY(-1px);box-shadow:0 9px 24px rgba(220,178,46,.18)}
.np-cart-btn{
  color:#17130a;
  background:linear-gradient(135deg,#f4d45f 0%,#d4af37 55%,#b98b15 100%);
  border-color:#e6bf3f;
  text-shadow:0 1px 0 rgba(255,255,255,.22);
}
.np-cart-btn:hover{color:#0f0d08;background:linear-gradient(135deg,#ffe176,#dfb83d 55%,#c6991c 100%)}
.np-details-btn{
  color:#f6d65e;
  background:linear-gradient(180deg,rgba(220,178,46,.15),rgba(220,178,46,.07));
  border-color:rgba(230,192,61,.48);
}
.np-details-btn:hover{color:#fff0a4;background:rgba(220,178,46,.19);border-color:#dcb22e}
.np-fav-btn{
  color:#f2cb4b;
  background:rgba(220,178,46,.07);
  border-color:rgba(220,178,46,.38);
}
.np-fav-btn:hover,.np-fav-btn.is-favorite,.np-fav-btn.active{
  color:#17130a;
  background:linear-gradient(135deg,#f4d45f,#c99a1e);
  border-color:#efca4c;
  text-shadow:0 1px 0 rgba(255,255,255,.2);
}
.catalog-actions{grid-template-columns:1fr 1fr 1fr;gap:8px}
.catalog-actions .np-action-btn{width:100%;min-width:0;padding-left:8px;padding-right:8px}
.product-buy-row .np-action-btn{width:100%;font-size:14px}
.favorite-btn.np-action-btn{margin-top:10px}

/* Страница избранного */
.favorites-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:25px}
.favorites-head h1{margin:7px 0 5px;font-size:clamp(34px,4vw,54px)}
.favorites-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.favorite-card{display:flex;flex-direction:column}
.favorite-page-actions{padding:0 20px 20px;display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:auto}
.favorite-page-actions .np-action-btn{width:100%;min-width:0;padding-left:8px;padding-right:8px}
.favorites-empty{max-width:720px;margin:50px auto;text-align:center;padding:54px 28px}
.favorites-empty-icon{width:82px;height:82px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;font-size:42px;color:#e9c340;border:1px solid rgba(220,178,46,.35);background:rgba(220,178,46,.07)}
.favorites-empty h2{font-size:30px;margin:0 0 10px}
.favorites-empty p{color:#aaa;margin:0 0 24px}

@media(max-width:1100px){
  .favorites-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .catalog-actions,.favorite-page-actions{grid-template-columns:1fr 1fr}
  .catalog-actions [data-add],.favorite-page-actions [data-favorite-cart]{grid-column:1/-1}
}
@media(max-width:760px){
  .favorites-grid{grid-template-columns:1fr}
  .catalog-actions,.favorite-page-actions{grid-template-columns:1fr}
  .catalog-actions [data-add],.favorite-page-actions [data-favorite-cart]{grid-column:auto}
  .np-action-btn{font-size:12px}
}

/* =========================================
   CATEGORY-AWARE PRODUCT MANAGEMENT
========================================= */
.admin-category-workspace{
  display:grid;
  grid-template-columns:minmax(260px,.75fr) minmax(360px,1.25fr);
  gap:16px;
  margin:18px 0;
  padding:18px;
  border:1px solid rgba(212,175,55,.24);
  border-radius:16px;
  background:rgba(18,18,18,.62);
}
.admin-category-select-block,
.admin-category-info{
  min-width:0;
}
.admin-category-select-block label{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:7px;
  font-weight:700;
}
.admin-category-select-block select{
  width:100%;
  min-height:46px;
  padding:0 13px;
  color:#fff;
  background:#242424;
  border:1px solid #494949;
  border-radius:10px;
  outline:none;
}
.admin-category-select-block select:focus{
  border-color:#d4af37;
  box-shadow:0 0 0 3px rgba(212,175,55,.1);
}
.category-schema-preview{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:9px;
}
.category-schema-preview span,
.category-mini-badge,
.category-current-badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 9px;
  border-radius:999px;
  color:#e5c755;
  border:1px solid rgba(212,175,55,.28);
  background:rgba(212,175,55,.08);
  font-size:12px;
  line-height:1.2;
}
.category-mini-badge{margin-top:7px}
.admin-spec-summary{
  display:grid;
  gap:4px;
  min-width:180px;
}
.admin-spec-summary span{
  display:block;
  font-size:12px;
  line-height:1.35;
  color:#ccc;
}
.admin-spec-summary b{color:#fff}
.editor-section-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.editor-section-title-row .editor-section-title{margin-bottom:4px}
.category-characteristics-section{
  border-color:rgba(212,175,55,.20)!important;
}
#productCategorySpecs label{
  animation:npFieldIn .16s ease both;
}
@keyframes npFieldIn{
  from{opacity:0;transform:translateY(3px)}
  to{opacity:1;transform:none}
}
#productsAdminBody tr[hidden]{display:none!important}

@media(max-width:900px){
  .admin-category-workspace{grid-template-columns:1fr}
}
