* { box-sizing: border-box; margin: 0px; padding: 0px; }
html, body { height: 100%; margin: 0px; padding: 0px; display: flex; flex-direction: column; }
body { min-height: 100vh; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; background-color: rgb(248, 249, 250); color: rgb(51, 51, 51); overflow-x: hidden; }
.container { width: 100%; max-width: 1200px; margin: 0px auto; padding: 10px; }
.header { background: linear-gradient(135deg, rgb(56, 161, 105) 0%, rgb(47, 133, 90) 100%); color: white; padding: 10px 0px; box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 12px; position: sticky; top: 0px; z-index: 100; backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255, 255, 255, 0.15); max-width: 1180px; margin: 0px auto; width: 100%; border-radius: 0px 0px 10px 10px; }
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 0px 12px; gap: 12px; }
.header .container { padding: 0px !important; max-width: 100% !important; }
@media (min-width: 1200px) {
  .header { width: 1200px; }
}
@media (max-width: 768px) {
  .header { width: calc(100% - 20px); border-radius: 0px 0px 10px 10px; }
  .header-content { padding: 0px 10px; }
}
@media (max-width: 480px) {
  .header { width: 100%; border-radius: 0px; }
}
.header .logo { margin: 0px; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.menu-button { background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; padding: 6px; border-radius: 6px; transition: background 0.2s; display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; }
.menu-button:hover { background: rgba(255, 255, 255, 0.15); }
.auth-icons { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.auth-icon { position: relative; color: white; font-size: 1.25rem; text-decoration: none; transition: transform 0.15s, background 0.15s; display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 8px; }
.auth-icon:hover { transform: scale(1.08); background: rgba(255, 255, 255, 0.12); }
.notification-badge, .cart-count { position: absolute; top: 2px; right: 2px; background: rgb(244, 67, 54); color: white; border-radius: 50%; width: 18px; height: 18px; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; font-weight: bold; box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 2px; pointer-events: none; }
.maintenance-indicator { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgb(255, 152, 0); color: white; font-size: 0.85rem; margin: 0px; animation: 2s ease 0s infinite normal none running pulse; }
@keyframes pulse { 
  0% { box-shadow: rgba(255, 152, 0, 0.6) 0px 0px 0px 0px; }
  70% { box-shadow: rgba(255, 152, 0, 0) 0px 0px 0px 8px; }
  100% { box-shadow: rgba(255, 152, 0, 0) 0px 0px 0px 0px; }
}
.form-container { background: white; padding: 25px; border-radius: 12px; box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 10px; margin: 5px auto; }
.form-container h2 { margin-bottom: 20px; text-align: center; color: rgb(51, 51, 51); display: flex; align-items: center; justify-content: center; gap: 10px; }
.form-group { margin-bottom: 20px; }
.form-group label { margin-bottom: 8px; font-weight: 500; color: rgb(85, 85, 85); display: flex; align-items: center; gap: 5px; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 2px solid rgb(225, 229, 233); border-radius: 8px; font-size: 1rem; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: rgb(56, 161, 105); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 500; transition: transform 0.2s; text-decoration: none; }
.btn:hover { transform: translateY(-2px); }
.btn.block { display: block; width: 100%; }
.btn.compact { padding: 8px 12px; font-size: 0.85em; border-radius: 6px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, rgb(56, 161, 105) 0%, rgb(47, 133, 90) 100%); }
.btn-secondary { background: linear-gradient(135deg, rgb(108, 117, 125) 0%, rgb(84, 91, 98) 100%); }
.btn-success { background: linear-gradient(135deg, rgb(40, 167, 69) 0%, rgb(33, 136, 56) 100%); }
.btn-info { background: linear-gradient(135deg, rgb(23, 162, 184) 0%, rgb(19, 132, 150) 100%); }
.btn-warning { background: linear-gradient(135deg, rgb(255, 193, 7) 0%, rgb(224, 168, 0) 100%); color: rgb(33, 37, 41); }
.btn-danger { background: linear-gradient(135deg, rgb(244, 67, 54) 0%, rgb(218, 25, 11) 100%); }
.btn-small { padding: 8px 12px; font-size: 0.9rem; }
.message-success { background: rgb(212, 237, 218); color: rgb(21, 87, 36); padding: 12px; border-radius: 5px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.message-error { background: rgb(255, 235, 238); color: rgb(198, 40, 40); padding: 12px; border-radius: 5px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.notifications-dropdown { position: fixed; top: 50px; left: 50%; transform: translateX(-50%); z-index: 1000; background-color: white; border: 1px solid rgb(221, 221, 221); border-radius: 8px; box-shadow: rgba(0, 0, 0, 0.15) 0px 4px 12px; width: 400px; max-height: 400px; overflow-y: auto; display: none; }
.notifications-dropdown.show { display: block; }
.notifications-header { padding: 20px; border-bottom: 1px solid rgb(238, 238, 238); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.notifications-header h3 { margin: 0px; color: rgb(51, 51, 51); font-size: 1.1rem; }
.mark-all-read { background: rgb(76, 175, 80); color: white; border: none; border-radius: 20px; padding: 5px 12px; font-size: 0.8rem; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.mark-all-read:hover { background: rgb(69, 160, 73); }
.notifications-list { flex: 1 1 0%; overflow-y: auto; max-height: 350px; }
.notification-item { display: flex; gap: 12px; padding: 15px 20px; border-bottom: 1px solid rgb(240, 240, 240); transition: background 0.2s; }
.notification-item:hover { background: rgb(245, 245, 245); }
.notification-item:last-child { border-bottom: none; }
.notification-icon i { font-size: 1.2rem; }
.notification-content { flex: 1 1 0%; min-width: 0px; }
.notification-title { font-weight: 600; margin-bottom: 5px; color: rgb(51, 51, 51); }
.notification-message { font-size: 0.9rem; color: rgb(102, 102, 102); margin-bottom: 8px; line-height: 1.4; }
.notification-time { font-size: 0.75rem; color: rgb(153, 153, 153); }
.notification-close { background: none; border: none; color: rgb(204, 204, 204); cursor: pointer; padding: 5px; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notification-close:hover { background: rgb(240, 240, 240); color: rgb(102, 102, 102); }
.no-notifications { text-align: center; padding: 30px 20px; color: rgb(153, 153, 153); }
.no-notifications i { font-size: 2rem; margin-bottom: 10px; }
.notifications-footer { padding: 15px 20px; border-top: 1px solid rgb(238, 238, 238); text-align: center; }
.notifications-footer a { color: rgb(56, 161, 105); text-decoration: none; font-weight: 500; }
.notifications-footer a:hover { text-decoration: underline; }
.notification-info { border-left: 4px solid rgb(33, 150, 243); }
.notification-success { border-left: 4px solid rgb(56, 161, 105); }
.notification-warning { border-left: 4px solid rgb(255, 152, 0); }
.notification-error { border-left: 4px solid rgb(244, 67, 54); }
.notification-info .notification-icon i { color: rgb(33, 150, 243); }
.notification-success .notification-icon i { color: rgb(56, 161, 105); }
.notification-warning .notification-icon i { color: rgb(255, 152, 0); }
.notification-error .notification-icon i { color: rgb(244, 67, 54); }
.notification-icon { cursor: pointer; color: white; display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border-radius: 8px; padding: 0px; transition: transform 0.15s, background 0.15s; background: none !important; border: none !important; font: inherit !important; }
.notification-icon:hover { transform: scale(1.08); background: rgba(255, 255, 255, 0.12) !important; }
.tree-indicator { position: absolute; top: 4px; right: 2px; width: 10px; height: 10px; background: rgb(239, 68, 68); border-radius: 50%; box-shadow: rgba(239, 68, 68, 0.8) 0px 0px 4px, rgba(0, 0, 0, 0.3) 0px 1px 2px; border: 1px solid rgb(255, 255, 255); pointer-events: none; z-index: 2; }
.sidebar { position: fixed; top: 0px; left: 0px; width: 280px; max-width: calc(-32px + 100vw); height: 100%; background: white; box-shadow: rgba(0, 0, 0, 0.1) 2px 0px 12px; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); z-index: 1001; display: flex; flex-direction: column; font-size: 0.92rem; }
.sidebar.active { transform: translateX(0px); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgb(238, 238, 238); background: rgb(249, 249, 249); position: sticky; top: 0px; z-index: 10; }
.sidebar-header h2 { margin: 0px; font-size: 1.15em; color: rgb(73, 80, 87); display: flex; align-items: center; gap: 8px; }
.close-sidebar { background: none; border: none; font-size: 1.2em; color: rgb(119, 119, 119); cursor: pointer; padding: 5px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.close-sidebar:hover { background: rgb(238, 238, 238); }
.sidebar-content { flex: 1 1 0%; overflow-y: auto; padding: 0px; }
.sidebar-user { padding: 14px 18px; border-bottom: 1px solid rgb(238, 238, 238); }
.sidebar-profile-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; transition: opacity 0.2s; }
.sidebar-user-avatar { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgb(76, 175, 80); color: white; font-size: 1rem; }
.sidebar-user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.sidebar-username { font-weight: 600; font-size: 1rem; color: rgb(51, 51, 51); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-role { font-size: 0.78rem; color: rgb(136, 136, 136); margin-top: 1px; }
.sidebar-balance-section { padding: 12px 18px; margin: 12px 18px 10px; background: linear-gradient(135deg, rgb(240, 249, 244) 0%, rgb(227, 242, 236) 100%); border-radius: 10px; border: 1px solid rgb(214, 233, 221); }
.sidebar-balance-info { display: flex; align-items: center; gap: 10px; }
.sidebar-balance-label { color: rgb(46, 125, 50); font-weight: 600; display: flex; align-items: center; gap: 5px; font-size: 0.95rem; }
.sidebar-balance-amount { font-weight: 700; color: rgb(27, 94, 32); font-size: 1.05rem; margin-right: auto; }
.balance-plus-button { width: 26px; height: 26px; border-radius: 50%; background-color: rgb(56, 161, 105); color: white; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 0.85rem; transition: background-color 0.2s, transform 0.15s; flex-shrink: 0; }
.balance-plus-button:hover { background-color: rgb(47, 133, 90); transform: scale(1.1); }
.sidebar-nav { padding: 0px 8px; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: rgb(73, 80, 87); text-decoration: none; border-radius: 6px; margin: 0px 8px 4px; font-size: 0.92rem; position: relative; transition: background-color 0.15s; }
.sidebar-link:hover { background: rgb(245, 249, 255); color: rgb(25, 118, 210); }
.sidebar-link.active { background: rgb(232, 244, 252); color: rgb(13, 71, 161); font-weight: 600; }
.sidebar-link i { width: 18px; text-align: center; font-size: 1rem; color: rgb(102, 102, 102); }
.sidebar-link:hover i, .sidebar-link.active i { color: rgb(25, 118, 210); }
.sidebar-link .cart-count { position: absolute; top: 50%; right: 22px; transform: translateY(-50%); background: rgb(244, 67, 54); color: white; border-radius: 50%; font-size: 0.62rem; min-width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 2px; }
.sidebar-divider { height: 1px; background: rgb(238, 238, 238); margin: 10px 16px; }
.sidebar-overlay { position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s; z-index: 1000; }
.sidebar-overlay.active { opacity: 1; visibility: visible; }
@media (max-width: 360px) {
  .sidebar { width: calc(-32px + 100vw); max-width: 260px; }
}
.home-ad-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
}

.home-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid #4CAF50;
}

.home-ad-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-ad-count {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.home-ad-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.home-ad-link {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    position: relative;
}

.home-ad-link:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    transform: translateX(3px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
}

.home-ad-link-icon {
    font-size: 0.7rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.home-ad-link-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-ad-clicks {
    font-size: 0.75rem;
    color: #6c757d;
    background: white;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin-left: auto;
}

.home-ad-link:hover .home-ad-clicks {
    background: #f1f3f4;
    color: #495057;
    border-color: #2196F3;
}

.home-ad-clicks i {
    font-size: 0.7rem;
}

/* Бейдж для горячей рекламы */
.ad-hot-badge {
    color: #ff9800;
    font-size: 0.8rem;
    animation: fire-pulse 1.5s infinite;
}

/* Стили для горячей рекламы */
.ad-hot {
    border-color: #ff9800 !important;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
}

.ad-hot:hover {
    background: linear-gradient(135deg, #ffecb3 0%, #ffe082 100%) !important;
    border-color: #f57c00 !important;
}

.clicks-hot {
    background: #ff9800 !important;
    color: white !important;
    border-color: #f57c00 !important;
    font-weight: 600;
}

.ad-hot:hover .clicks-hot {
    background: #f57c00 !important;
}

@keyframes fire-pulse {
    0% { opacity: 0.7; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.7; transform: scale(0.95); }
}

.home-ad-empty {
    text-align: center;
    padding: 20px 15px;
    color: #999;
}

.home-ad-empty i {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #ddd;
}

.home-ad-empty p {
    margin: 0 0 4px 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.home-ad-empty small {
    font-size: 0.75rem;
}

.home-ad-full {
    background: #fff3e0;
    color: #e65100;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid #ff9800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.home-ad-action {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.home-ad-action-link {
    color: #38a169;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.home-ad-action-link:hover {
    color: #45a049;
}

/* Новости */
.home-news-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
}

.home-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.home-news-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-news-all-link {
    color: #38a169;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.home-news-all-link:hover {
    color: #45a049;
}

.home-news-item {
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.home-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.home-news-item-header {
    margin-bottom: 8px;
}

.home-news-item-title {
    margin: 0 0 8px 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-news-item-icon {
    color: #38a169;
    font-size: 0.8rem;
}

.home-news-item-link {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.home-news-item-link:hover {
    color: #38a169;
}

.home-news-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.75rem;
    color: #666;
}

.home-news-item-date, .home-news-item-author, .home-news-item-views {
    display: flex;
    align-items: center;
    gap: 3px;
}

.home-news-item-content {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

.home-news-empty {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Товары */
.home-products-section {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
}

.home-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #38a169;
}

.home-products-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-products-all-link {
    color: #38a169;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.home-products-all-link:hover {
    color: #45a049;
}

.home-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.home-product-card {
    display: block;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e9ecef;
    position: relative;
}

.home-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-color: #38a169;
}

.home-product-image {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-product-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.5rem;
}

/* СТИЛИ ДЛЯ СКИДОК */
.home-product-discount {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 20;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: discount-pulse 2s infinite;
}

.home-product-screenshots {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 10;
}

.home-product-new {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: #FF6347;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.home-product-info {
    padding: 10px;
}

.home-product-title {
    font-weight: 500;
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
    min-height: 2.1em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* СТИЛИ ДЛЯ КОЛИЧЕСТВА КОПИЙ (внизу справа изображения) */
.home-product-copies {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 15;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.home-product-copies-soldout {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    animation: soldout-pulse 2s infinite;
}

@keyframes soldout-pulse {
    0% { opacity: 0.9; }
    50% { opacity: 0.7; }
    100% { opacity: 0.9; }
}

.home-product-copies i {
    font-size: 0.6rem;
}


.home-product-stats {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 8px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 3px;
}

.home-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.home-product-brand {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.home-product-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-product-price {
    font-weight: 600;
    color: #38a169;
    font-size: 0.9rem;
    text-align: right;
}

/* Стили для цен со скидкой */
.home-product-price-discount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.home-product-price-final {
    color: #38a169;
    font-weight: 600;
    font-size: 0.95rem;
}

.home-product-price-original {
    color: #9ca3af;
    font-size: 0.75rem;
    text-decoration: line-through;
}

.home-products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 20px;
    color: #999;
}

.home-products-empty i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #ddd;
}

.home-products-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Адаптивность - ИСПРАВЛЕНА */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .home-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .home-product-image {
        height: 100px;
    }
    
    .home-ad-link {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .home-ad-clicks {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .ad-hot-badge {
        font-size: 0.6rem;
    }
    
    /* ИСПРАВЛЕНИЕ: Запрещаем перенос на мобильных */
    .home-ad-header, .home-news-header, .home-products-header {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    /* Уменьшаем шрифты для компактности */
    .home-ad-header h3, .home-news-header h3, .home-products-header h2 {
        font-size: 1rem;
        white-space: nowrap;
    }
    
    .home-ad-count, .home-news-all-link, .home-products-all-link {
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .home-products-all-link {
        align-self: center;
    }
    
    /* Адаптация скидок */
    .home-product-discount {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
    
    .home-product-price-final {
        font-size: 0.85rem;
    }
    
    .home-product-price-original {
        font-size: 0.7rem;
    }
    

}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    .home-ad-section, .home-news-section, .home-products-section {
        padding: 12px;
    }
    
    .home-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .home-product-image {
        height: 90px;
    }
    
    .home-product-info {
        padding: 8px;
    }
    
    .home-product-title {
        font-size: 0.75rem;
    }
    
    .home-product-price-final {
        font-size: 0.8rem;
    }
    
    .home-product-price-original {
        font-size: 0.65rem;
    }
    
    .home-ad-link {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .home-ad-clicks {
        font-size: 0.65rem;
        padding: 1px 5px;
    }
    
    .ad-hot-badge {
        font-size: 0.65rem;
    }
    
    /* Адаптация информации о копиях */
    .home-product-copies {
        font-size: 0.6rem;
        padding: 2px 6px;
        border-radius: 3px;
        bottom: 6px;
        right: 6px;
    }
    
    .home-product-copies i {
        font-size: 0.6rem;
    }
    
    /* ИСПРАВЛЕНИЕ: Еще компактнее на очень маленьких экранах */
    .home-ad-header, .home-news-header, .home-products-header {
        gap: 8px;
    }
    
    .home-ad-header h3, .home-news-header h3, .home-products-header h2 {
        font-size: 0.95rem;
    }
    
    .home-ad-count, .home-news-all-link, .home-products-all-link {
        font-size: 0.75rem;
    }
    
    /* Если все равно не помещается, скрываем текст счетчика */
    @media (max-width: 360px) {
        .home-ad-count {
            display: none;
        }
        
        .home-news-all-link span, .home-products-all-link span {
            display: none;
        }
        
        .home-news-all-link, .home-products-all-link {
            padding: 4px;
            border-radius: 50%;
            background: #f8f9fa;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .home-ad-clicks span {
            display: none;
        }
        
        .home-ad-clicks {
            padding: 2px;
            width: 20px;
            height: 20px;
            justify-content: center;
        }
        
        .home-product-discount {
            font-size: 0.55rem;
            padding: 1px 3px;
        }
        
        .home-product-new {
            font-size: 0.55rem;
            padding: 1px 3px;
        }
        
        .home-product-copies {
            font-size: 0.45rem;
            padding: 1px 2px;
        }
        
        .home-product-copies i {
            font-size: 0.4rem;
        }
    }
}

/* ОБЩИЕ СТИЛИ ДЛЯ ФУТЕРА */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    margin-top: 0px;
    border-top: 1px solid #333;
    
    /* Ограничение ширины */
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ПОЛНЫЙ ФУТЕР (главная страница) */
.footer-full {
    padding: 25px 0 20px;
    border-radius: 12px 12px 0 0;
}

.footer-full .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 95px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    min-width: 60px;
    padding: 8px 5px;
    border-radius: 6px;
}

.footer-nav-item:hover {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: translateY(-2px);
}

.footer-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.footer-nav-item span {
    font-size: 0.8rem;
}

.footer-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px 40px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-email,
.contact-support {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 0.95rem;
}

.contact-email i,
.contact-support i {
    color: #4CAF50;
    font-size: 1rem;
}

.contact-email a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: #4CAF50;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.copyright {
    color: #999;
    font-size: 0.9rem;
    text-align: center;
}

.copyright strong {
    color: #fff;
    font-weight: 600;
}

.copyright-sep {
    color: #4CAF50;
    margin: 0 8px;
}

.copyright-text {
    color: #aaa;
}

.footer-extra {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    color: #888;
    font-size: 0.85rem;
}

.payment-info,
.ssl-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.payment-info i,
.ssl-info i {
    color: #4CAF50;
    font-size: 0.9rem;
}

.footer-separator {
    color: #555;
}

/* КОМПАКТНЫЙ ФУТЕР (все остальные страницы) */
.footer-compact {
    padding: 15px 0 10px;
    border-radius: 8px 8px 0 0;
}

.footer-compact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-nav-compact {
    display: flex;
    justify-content: center;
    gap: 95px;
    flex-wrap: wrap;
}

.footer-nav-compact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.footer-nav-compact-item:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
}

.footer-info-compact {
    text-align: center;
}

.copyright-compact {
    color: #999;
    font-size: 0.8rem;
}

.copyright-compact strong {
    color: #fff;
    font-weight: 600;
}

/* АДАПТИВНОСТЬ */

/* Для мобильных устройств */
@media (max-width: 768px) {
    .site-footer {
        width: calc(100% - 0px);
        margin-top: 10px;
    }
    
    .footer-container {
        padding: 0 15px;
    }
    
    /* Полный футер на мобильных */
    .footer-full {
        padding: 20px 0 15px;
        border-radius: 1px 1px 0 0;
    }
    
    .footer-full .footer-nav {
        gap: 10px 15px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .footer-nav-item {
        min-width: 50px;
        padding: 6px 4px;
        font-size: 0.8rem;
    }
    
    .footer-nav-item i {
        font-size: 1rem;
    }
    
    .footer-nav-item span {
        font-size: 0.75rem;
    }
    
    .footer-contact {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .contact-email,
    .contact-support {
        font-size: 0.9rem;
    }
    
    .copyright {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .footer-extra {
        flex-direction: column;
        gap: 10px;
        font-size: 0.8rem;
    }
    
    .footer-separator {
        display: none;
    }
    
    /* Компактный футер на мобильных */
    .footer-compact {
        padding: 12px 0 8px;
        border-radius: 6px 6px 0 0;
    }
    
    .footer-nav-compact {
        gap: 15px;
    }
    
    .footer-nav-compact-item {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .copyright-compact {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .site-footer {
        width: calc(100% - 0px);
    }
    
    .footer-container {
        padding: 0 10px;
    }
    
    .footer-full .footer-nav {
        gap: 8px 12px;
    }
    
    .footer-nav-item {
        min-width: 45px;
    }
    
    .copyright {
        font-size: 0.8rem;
    }
    
    .footer-extra {
        font-size: 0.75rem;
    }
    
    .footer-nav-compact {
        gap: 12px;
    }
    
    .footer-nav-compact-item {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .copyright-compact {
        font-size: 0.7rem;
    }
}

/* Для очень больших экранов (больше 1200px) */
@media (min-width: 1200px) {
    .site-footer {
        width: 1200px;
    }
}

.sp-page {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* КАРТОЧКА ТОВАРА */
.sp-card {
    background: white;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

/* ЗАГОЛОВОК */
.sp-title {
    margin: 0 0 12px 0;
    color: #111827;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
    line-height: 1.3;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

/* ИЗОБРАЖЕНИЯ */
.sp-image-box {
    position: relative;
    width: 100%;
    height: 160px;
    margin: 0 auto 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    cursor: pointer;
}

.sp-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sp-zoom {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sp-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-bottom: 12px;
}

.sp-thumb {
    width: 50px;
    height: 38px;
    object-fit: cover;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    cursor: pointer;
}

.sp-thumb.active {
    border-color: #10b981;
    border-width: 2px;
}

/* ОПИСАНИЕ */
.sp-desc-toggle {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    background: #f9fafb;
    margin-bottom: 12px;
}

.sp-desc-header {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #374151;
    font-size: 12px;
}

.sp-desc-header span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-desc-content {
    padding: 10px;
    background: white;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.4;
    border-top: 1px solid #e5e7eb;
}

/* МЕТА-ИНФО */
.sp-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.sp-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    font-size: 11px;
}

.sp-meta-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 4px;
    color: #10b981;
    font-size: 11px;
    border: 1px solid #d1d5db;
    flex-shrink: 0;
}

.sp-meta-text {
    flex: 1;
    min-width: 0;
}

.sp-meta-label {
    color: #6b7280;
    margin-bottom: 1px;
}

.sp-meta-value {
    color: #111827;
    font-weight: 500;
    line-height: 1.2;
}

/* СТИЛИ ДЛЯ СКИДОК И КОЛИЧЕСТВА */
.discount-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.availability-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-top: 2px;
    display: inline-block;
}

.availability-good {
    background: #d1fae5;
    color: #065f46;
}

.availability-warning {
    background: #fef3c7;
    color: #92400e;
}

.availability-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ДЕТАЛИ */
.sp-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.sp-detail-item {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    background: #f9fafb;
}

.sp-detail-header {
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #374151;
}

.sp-detail-header span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sp-detail-content {
    padding: 8px;
    background: white;
    font-size: 11px;
    color: #4b5563;
    line-height: 1.4;
    border-top: 1px solid #e5e7eb;
}

/* СТАТИСТИКА */
.sp-stats {
    margin: 12px 0;
    padding: 10px;
    background: #f0fdf4;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
}

.sp-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.sp-stat {
    padding: 6px;
    background: white;
    border-radius: 4px;
    border: 1px solid #d1fae5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: all 0.15s;
}

.sp-stat.clickable:hover {
    background: #f0fdf4;
    cursor: pointer;
    transform: translateY(-1px);
}

.sp-stat-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 4px;
    color: white;
    font-size: 10px;
}

.sp-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.sp-stat-label {
    font-size: 9px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1;
}

/* ИНФОРМАЦИЯ О ПРОДАВЦЕ */
.sp-seller-info {
    margin: 12px 0;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 4px;
    border: 1px solid #bae6fd;
}

.seller-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dbeafe;
}

.seller-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.seller-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.seller-content {
    flex: 1;
    min-width: 0;
}

.seller-label {
    font-size: 9px;
    color: #6b7280;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.seller-value {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
}

.seller-username-link {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.seller-username-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.seller-stats {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.seller-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #6b7280;
}

.seller-stat i {
    color: #2563eb;
    font-size: 9px;
}

.seller-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.seller-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.15s;
}

.seller-action-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    color: white;
}

.seller-action-btn.secondary {
    background: #6b7280;
}

.seller-action-btn.secondary:hover {
    background: #4b5563;
}

/* СООБЩЕНИЯ */
.sp-message {
    padding: 8px 10px;
    border-radius: 4px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
}

.sp-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.sp-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.sp-message-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ДЕЙСТВИЯ */
.sp-actions {
    margin: 12px 0;
    padding: 10px;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.sp-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 10px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    text-align: center;
}

.sp-btn:hover {
    transform: translateY(-1px);
}

.sp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.sp-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.sp-btn-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.sp-btn-success {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
}

.sp-btn-success:hover {
    background: linear-gradient(135deg, #10b981, #059669);
}

.sp-btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.sp-btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
}

.sp-btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.sp-btn-info:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.sp-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.sp-btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* ФОРМЫ */
.sp-form {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* КНОПКА НАЗАД */
.sp-back {
    text-align: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.sp-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 12px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 11px;
    transition: all 0.15s;
}

.sp-back-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* МОДАЛЬНОЕ ОКНО */
.sp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.sp-modal-img {
    display: block;
    margin: 0 auto;
    max-width: 95%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
}

.sp-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 360px) {
    .sp-page {
        font-size: 12px;
    }
    
    .sp-card {
        padding: 10px;
    }
    
    .sp-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .sp-image-box {
        height: 140px;
        margin-bottom: 6px;
    }
    
    .sp-thumb {
        width: 45px;
        height: 34px;
    }
    
    .sp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sp-actions-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .sp-meta-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-stat-value {
        font-size: 12px;
    }
    
    .sp-stat-label {
        font-size: 8px;
    }
    
    .sp-btn {
        padding: 7px 9px;
        font-size: 10px;
    }
    
    .seller-avatar,
    .seller-avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .seller-value {
        font-size: 11px;
    }
}

@media (min-width: 481px) {
    .sp-page {
        font-size: 14px;
    }
    
    .sp-card {
        padding: 10px;
        border-radius: 8px;
    }
    
    .sp-title {
        font-size: 18px;
    }
    
    .sp-image-box {
        height: 200px;
    }
    
    .sp-thumb {
        width: 60px;
        height: 45px;
    }
    
    .sp-stats-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
    }
    
    .sp-stat {
        padding: 8px;
    }
    
    .sp-stat-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
    
    .sp-stat-value {
        font-size: 14px;
    }
    
    .sp-stat-label {
        font-size: 10px;
    }
    
    .seller-avatar,
    .seller-avatar-placeholder {
        width: 42px;
        height: 42px;
    }
}

@media (min-width: 769px) {
    .sp-image-box {
        height: 250px;
    }
    
    .sp-thumb {
        width: 70px;
        height: 52px;
    }
    
    .sp-stats-grid {
        gap: 10px;
    }
    
    .sp-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* УТИЛИТЫ */
.sp-clickable {
    cursor: pointer;
}

.sp-hidden {
    display: none;
}

/* СТИЛИ ДЛЯ ЦЕН СО СКИДКОЙ */
.original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 10px;
}

.discount-price {
    color: #16a34a;
    font-weight: 600;
    font-size: 14px;
}

.discount-percent {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 9px;
    margin-left: 4px;
}

.err {
    background: #ffe0e0;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #ff0000;
}

.ok {
    background: #e5ffe0;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #318c5e;
}

.container {
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.form-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Стили для поля пароля с глазком */
.password-container {
    position: relative;
}

.password-wrapper {
    position: relative;
}

.password-input {
    padding-right: 45px; /* Место для кнопки глазка */
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.3s;
    z-index: 2;
}

.password-toggle:hover {
    color: #4CAF50;
}

/* Чекбокс "Запомнить меня" */
.checkbox-group {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.checkbox-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    position: absolute;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s;
}

.checkbox-label:hover input ~ .checkbox-custom {
    border-color: #4CAF50;
}

.checkbox-label input:checked ~ .checkbox-custom {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.check-icon {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.checkbox-label input:checked ~ .check-icon {
    opacity: 1;
}

.checkbox-text {
    margin-left: 10px;
    font-size: 14px;
    color: #333;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Сообщения */
.message-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.message-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #2e7d32;
}

/* Примечание о безопасности */
.security-note {
    margin-top: 15px;
    font-size: 12px;
    color: #666;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Ссылки под формой */
.form-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.form-links p {
    margin: 8px 0;
}

.form-links a {
    color: #4CAF50;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Стили для 2FA */
.twofactor-container {
    text-align: center;
}

.twofactor-input {
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    padding: 15px;
    width: 200px;
    max-width: 100%;
    transition: all 0.3s;
}

.twofactor-input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.backup-input {
    font-size: 18px;
    text-align: center;
    padding: 10px;
    width: 200px;
    max-width: 100%;
}

.divider {
    margin: 25px 0;
    border: none;
    border-top: 1px solid #eee;
}

.help-section {
    margin-top: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.help-link {
    margin-bottom: 5px;
}

.help-link a {
    color: #4CAF50;
    text-decoration: none;
}

.help-link a:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 480px) {
    .form-container {
        padding: 20px;
        margin: 20px auto;
    }
    
    .twofactor-input {
        font-size: 20px;
        letter-spacing: 6px;
        padding: 12px;
        width: 180px;
    }
}

a.a_tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.15s;
    margin: 1px;
}

.block {
  padding: 6px 8px;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
}

.hc {
    background: #50a379;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: rgb(0 0 0 / 14%) 0 2px 3px;
    display: inline-block;
    text-decoration: none;
}

.title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-bottom: 2px solid #38a169;
    background: #ffffff;
    padding: 1em;
}

a.aload {
    text-decoration: none;
    color: #109954;
}

.input {
    width: 100%;
    padding: 0.5em;
    border-radius: 8px;
    border: 1px solid #c6c9c7;
    margin: 4px 0;
}
.button {
    background: #38a169;
    color: #fff;
    padding: 0.5em;
    border-radius: 8px;
    border: 0;
}