/* Agent Single Page Menu - CSS */
::-webkit-scrollbar { display: none !important; }
* { -ms-overflow-style: none !important; scrollbar-width: none !important; }
html { scroll-behavior: smooth; }

.agent-catalog-container { 
    font-family: Arial, sans-serif; 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 60px; 
    background: #f8fafc; 
    min-height: 100vh; 
}

@media (max-width: 768px) {
    .agent-catalog-container {
        padding: 0 30px; 
    }
}

/* КАРУСЕЛЬ КАТЕГОРИЙ */
.agent-sticky-nav { 
    position: sticky; /* ВОЗВРАЩАЕМ STICKY ДЛЯ СТАБИЛЬНОСТИ */
    top: 61px; /* Прилипает под хедером */
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(10px); 
    z-index: 10000; 
    padding: 12px 0; 
    display: flex; 
    overflow-x: auto; 
    border-bottom: 1px solid #e2e8f0; 
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.agent-sticky-nav a { 
    padding: 8px 18px; 
    margin: 0 4px; 
    background: #f1f5f9; 
    border-radius: 20px; 
    text-decoration: none; 
    font-size: 13px; 
    color: #475569; 
    white-space: nowrap; 
    transition: 0.2s; 
    scroll-snap-align: center;
}

.agent-sticky-nav a.active { 
    background: #fcd34d; 
    color: #000; 
    font-weight: 600; 
}

.agent-category-section { 
    padding-top: 40px; 
    margin-top: 0; 
    margin-bottom: 40px; 
    min-height: 200px; 
}

.agent-category-title { 
    font-size: 20px; 
    font-weight: 800; 
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.agent-category-title::after { 
    content: ""; 
    flex-grow: 1; 
    height: 1px; 
    background: #eee; 
}

.agent-products-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
    gap: 30px 12px; 
    justify-content: center; 
    width: 100%;
}

.agent-product-card { 
    position: relative;
    z-index: 2;
    border: 1px solid #e2e8f0; 
    border-radius: 12px; 
    padding: 10px; 
    background: #fff; 
    display: flex; 
    flex-direction: column; 
    height: 100%;
}

.agent-product-image { 
    height: 130px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 10px; 
}

.agent-product-image img { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

.agent-product-title { 
    font-size: 13px; 
    font-weight: 600; 
    height: 2.6em; 
    overflow: hidden; 
    line-height: 1.3; 
    margin-bottom: 5px; 
}

.agent-product-desc { 
    font-size: 11px; 
    color: #64748b; 
    height: 3.9em; 
    overflow: hidden; 
    margin-bottom: 10px; 
}

.agent-product-price { 
    font-weight: 800; 
    font-size: 15px; 
    margin-bottom: 8px; 
}

.agent-action-row { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    width: 100%; 
    justify-content: flex-start;
    flex-wrap: nowrap; 
}

.agent-qty-input { 
    width: 60px !important; 
    height: 34px !important; 
    min-width: 60px !important; 
    text-align: center; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    font-weight: 600;
    padding: 0;
    flex-shrink: 0;
}

.agent-add-btn { 
    background: #fcd34d !important; 
    color: #000 !important; 
    border: none !important; 
    border-radius: 8px !important; 
    width: 34px !important; 
    height: 34px !important; 
    min-width: 34px !important;
    font-size: 22px !important; 
    font-weight: 700 !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    text-decoration: none !important;
    padding: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0;
    position: relative !important; /* УДЕРЖИВАЕМ АНИМАЦИЮ ВНУТРИ */
}

/* ФИКС АНИМАЦИЙ WOOCOMMERCE */
.agent-add-btn.loading,
.agent-add-btn.added {
    color: transparent !important; /* Скрываем плюс */
}

.agent-add-btn.loading::after {
    font-family: "WooCommerce" !important;
    content: "\e01c" !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    animation: agent-spin 2s linear infinite;
    font-size: 16px;
    color: #000 !important;
}

.agent-add-btn.added::after {
    font-family: "WooCommerce" !important;
    content: "\e017" !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    font-size: 16px;
    color: #000 !important;
}

@keyframes agent-spin {
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Восстанавливаем зеленую кнопку корзины */
a.added_to_cart.wc-forward { 
    background: #10b981 !important; 
    color: transparent !important; 
    border-radius: 8px !important; 
    width: 34px !important; 
    height: 34px !important; 
    min-width: 34px !important;
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    text-decoration: none !important; 
    font-size: 0 !important; 
    margin: 0 !important;
    position: relative !important;
    flex-shrink: 0;
}

a.added_to_cart.wc-forward::after { 
    content: "" !important; 
    display: block !important; 
    width: 20px !important; 
    height: 20px !important; 
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48Y2lyY2xlIGN4PSI5IiBjeT0iMjEiIHI9IjEiPjwvY2lyY2xlPjxjaXJjbGUgY3g9IjIwIiBjeT0iMjEiIHI9IjEiPjwvY2lyY2xlPjxwYXRoIGQ9Ik0xIDxoNGwyLjY4IDEzLjM5YTIgMiAwIDAgMCAyIDEuNjFoOS43MmEyIDIgMCAwIDAgMi0xLjYxTDIzIDZINiI+PC9wYXRoPjwvc3ZnPg==") center no-repeat !important;
    background-size: contain !important;
}

/* ПОДСКАЗКИ АВТОЗАПОЛНЕНИЯ */
.agent-suggest-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
}

.agent-suggest-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    line-height: 1.4;
}

.agent-suggest-item:hover {
    background: #f8fafc;
}

.agent-suggest-item strong {
    color: #0f172a;
    display: block;
}

.agent-suggest-item small {
    color: #64748b;
}

.agent-suggest-item:last-child {
    border-bottom: none;
}


/* НОВАЯ СТРАНИЦА ЧЕКАУТА */
.agent-checkout-page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    background: #f8fafc;
    min-height: 80vh;
}

.agent-checkout-card {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.agent-checkout-card h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
}

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

.agent-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.agent-form-group input, 
.agent-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: 0.2s;
    outline: none;
    background: #f8fafc;
    box-sizing: border-box;
}

.agent-form-group input:focus, 
.agent-form-group textarea:focus {
    border-color: #fcd34d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.2);
}

.agent-submit-btn {
    width: 100%;
    padding: 18px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.agent-back-btn:hover {
    background: #1e293b;
    transform: translateX(-5px);
}

.agent-add-item-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #f1f5f9;
    color: #0f172a;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.agent-add-item-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.agent-search-dropdown {
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 5px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.agent-search-result-item:hover {
    background: #f8fafc;
}


.agent-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.agent-success-msg {
    color: #059669;
    background: #ecfdf5;
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #10b981;
    line-height: 1.5;
}

.agent-error-msg {
    color: #dc2626;
    background: #fef2f2;
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #f87171;
}

/* МОЙ АККАУНТ - ЛЕВЫЙ САЙДБАР */
.woocommerce-account .woocommerce-pagination,
.woocommerce-account .woocommerce-OrdersTable-pagination,
.woocommerce-pagination {
    display: none !important;
}

.woocommerce-account .woocommerce {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 20px 0;
}

.woocommerce-MyAccount-navigation {
    flex: 0 0 220px;
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    transition: 0.2s;
}

.woocommerce-MyAccount-navigation li a:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.woocommerce-MyAccount-navigation li.is-active a {
    background: #fcd34d;
    color: #000;
}

.woocommerce-MyAccount-content {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

/* ФОРМА ВХОДА - ЦЕНТРИРОВАНИЕ И СТИЛЬ */
.woocommerce-account .woocommerce-form-login {
    max-width: 400px;
    margin: 60px auto !important;
    padding: 40px !important;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0 !important;
    float: none !important;
}

.woocommerce-form-login h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 30px;
    color: #0f172a;
}

.woocommerce-form-login .form-row {
    margin-bottom: 20px !important;
    padding: 0 !important;
}

.woocommerce-form-login label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.woocommerce-form-login input.input-text {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    background: #f8fafc !important;
    outline: none !important;
    transition: 0.2s;
}

.woocommerce-form-login input.input-text:focus {
    border-color: #fcd34d !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.2) !important;
}

.woocommerce-form-login .woocommerce-button {
    width: 100% !important;
    padding: 16px !important;
    background: #0f172a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer;
    margin-top: 10px !important;
}

.woocommerce-form-login .woocommerce-button:hover {
    background: #1e293b !important;
    transform: translateY(-2px);
}

.woocommerce-form-login .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #64748b;
}

.woocommerce-form-login .lost_password {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
}

.woocommerce-form-login .lost_password a {
    color: #64748b;
    text-decoration: none;
}

.woocommerce-form-login .lost_password a:hover {
    color: #0f172a;
    text-decoration: underline;
}

/* СТРАНИЦА ПРОСМОТРА ЗАКАЗА (AGENT VIEW) - ULTRA COMPACT */
.agent-view-order.compact {
    color: #0f172a;
    font-size: 13px;
}

.agent-view-order.compact .agent-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.agent-view-order.compact h2 {
    font-size: 18px;
    margin: 0;
    font-weight: 800;
}

.agent-view-order.compact .agent-order-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.agent-compact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}

.agent-compact-info strong { color: #64748b; margin-right: 3px; }

.agent-view-order.compact .agent-order-section {
    margin-bottom: 10px;
    background: #fff;
    padding: 0;
    border: none;
    box-shadow: none;
}

.agent-view-order.compact .agent-order-table th {
    padding: 6px 8px;
    font-size: 11px;
    background: #f1f5f9;
}

.agent-view-order.compact .agent-order-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
}

.agent-view-order.compact .agent-order-table td:nth-child(3),
.agent-view-order.compact .agent-order-table td:nth-child(4) {
    white-space: nowrap !important;
}

.agent-view-order.compact .agent-order-table tfoot th {
    font-size: 13px;
    padding-top: 10px;
    text-align: right;
}

.agent-view-order.compact .agent-order-table tfoot td {
    font-size: 14px;
    padding-top: 10px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap !important;
}

.agent-note {
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #fffbeb;
    border-left: 3px solid #fcd34d;
    font-size: 12px;
}

.agent-back-btn {
    padding: 8px 16px;
    font-size: 13px;
    background: #0f172a;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
}




@media (max-width: 768px) {


    .woocommerce-account .woocommerce {
        flex-direction: column;
    }
    .woocommerce-MyAccount-navigation {
        flex: 1 0 auto;
        width: 100%;
    }
}

/* КЛАССИЧЕСКАЯ КОРЗИНА - ЧИСТКА И СТИЛЬ */
.woocommerce-cart-form__contents {
    border-radius: 16px !important;
    overflow: hidden;
    border: 1px solid #e2e8f0 !important;
}

.woocommerce-cart-form__contents thead th {
    background: #f1f5f9;
    padding: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 12px;
    color: #475569;
}

.woocommerce-cart-form__contents td {
    padding: 15px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Убираем купоны */
.actions .coupon, .actions label[for="coupon_code"] { display: none !important; }

/* Стилизуем итоги корзины */
.cart_totals {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cart_totals h2 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
}

/* Скрываем доставку и подытог в финальной таблице */
.cart_totals .cart-subtotal, 
.cart_totals .shipping { 
    display: none !important; 
}

/* Делаем ИТОГО крупным и важным */
.cart_totals .order-total th, 
.cart_totals .order-total td {
    border: none !important;
    padding: 20px 0 !important;
}

.cart_totals .order-total td strong {
    font-size: 24px;
    color: #0f172a;
}

.wc-proceed-to-checkout .checkout-button {
    background: #0f172a !important;
    border-radius: 14px !important;
    padding: 18px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center;
    display: block;
    color: #fff !important;
}

/* Гарантируем видимость корзины */
/* ГАРАНТИРОВАННОЕ СКРЫТИЕ СТАНДАРТНОГО МАГАЗИНА НА ГЛАВНОЙ */
.home .products, 
.home section.products,
.home ul.products,
.home div.products,
.home .woocommerce-pagination, 
.home .woocommerce-result-count,
.home .woocommerce-ordering,
.home .archive-description { 
    display: none !important; 
}

.woocommerce-cart-form, .cart_totals {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.woocommerce-cart .woocommerce-cart-form__contents {
    width: 100% !important;
}

/* ПУСТАЯ КОРЗИНА - ЦЕНТРИРОВАНИЕ */
.woocommerce-cart .cart-empty, 
.woocommerce-cart .return-to-shop {
    text-align: center !important;
    margin: 40px auto !important;
}

.woocommerce-cart .cart-empty {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.5;
}

.woocommerce-cart .cart-empty small {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    margin-top: 10px;
}

.woocommerce-cart .return-to-shop .button {
    background: #0f172a !important;
    color: #fff !important;
    padding: 16px 30px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    display: inline-block !important;
    margin-top: 20px !important;
    text-decoration: none !important;
}

/* Плавающая кнопка ИТОГО */
.cart-pill {
    position: fixed;
    top: 135px; /* Регулируй этот отступ, чтобы кнопка была ровно под хедером */
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    background: #fde047; /* Твой желтый */
    color: #854d0e; /* Твой коричневый */
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 999;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    font-size: 1.1rem;
}

/* Состояние, когда в корзине что-то есть */
.cart-pill.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.pill-divider { opacity: 0.3; }

/* Анимация пульсации при обновлении */
.cart-pill.pulse {
    animation: pill-pulse 0.5s ease-in-out;
}

@keyframes pill-pulse {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.15); background: #fff; }
    100% { transform: translateX(-50%) scale(1); }
}

/* Стиль карточки товара, который уже в корзине */
.agent-product-card.is-in-cart {
    background-color: #f0fdf4 !important; /* Мягкий зеленый фон */
    border-color: #22c55e !important;    /* Зеленая рамка */
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.agent-product-card.is-in-cart .agent-qty-input {
    background-color: #fff;
    border-color: #22c55e;
    color: #166534;
}

.agent-product-card.is-in-cart .agent-product-title {
    color: #166534;
}






