/* =========================================================
   КАРТОЧКИ ЗАКАЗОВ (SHOP-SERVICE) — АРХИВ
   ========================================================= */

.public-orders-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Хедер с кнопками переключения */
.public-orders-list .orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.public-orders-list .orders-header h2 {
    margin: 0;
    color: var(--titles);
    text-shadow: 0px 0px 3px #000000, 0px 0px 3px #000000;
    font-size: 28px;
    display: none;
}

.public-orders-list .orders-view-toggle {
    display: flex;
    gap: 5px;
}

.public-orders-list .orders-view-toggle .view-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 5px;
    color: #aaa;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}

.public-orders-list .orders-view-toggle .view-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.public-orders-list .orders-view-toggle .view-btn.active {
    background: var(--links);
    border-color: var(--links);
    color: #fff;
}

.public-orders-list .orders-view-toggle .view-btn i {
    margin-right: 5px;
}

/* СЕТКИ */
.orders-grid-vertical {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.orders-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* ОБЩИЕ СТИЛИ ДЛЯ КАРТОЧЕК */
.public-orders-list .order-card {
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
    background: var(--secondarybg);
    box-shadow: inset 0 0 3px #ffffff, 0 0 5px #000000, 0 0 2px #000000;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.public-orders-list .order-card:hover {
    box-shadow: inset 0 0 3px #ffffff, 0 0 10px rgba(0,0,0,0.8);
}

.public-orders-list .order-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ВЕРХНЯЯ СТРОКА: Название слева, цена справа */
.public-orders-list .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.08);
}

.public-orders-list .order-title {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    min-width: 150px;
}

.public-orders-list .order-title a {
    color: var(--titles);
    text-decoration: none;
    text-shadow: 0px 0px 3px #000000;
    transition: color 0.2s;
}

.public-orders-list .order-title a:hover {
    color: var(--links);
}

.public-orders-list .order-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--links);
    text-shadow: 0px 0px 3px #000000, 0px 0px 3px #000000;
    filter: hue-rotate(var(--hue-rotate));
    white-space: nowrap;
    flex-shrink: 0;
}

/* СОДЕРЖИМОЕ */
.public-orders-list .order-content {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
}

/* ЛЕВЫЙ БЛОК (опции) */
.public-orders-list .order-left {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.public-orders-list .order-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    flex-direction: column;
}

.public-orders-list .order-meta-item {
    display: flex;
    padding: 2px 0;
    font-size: 13px;
    line-height: 1.6;
    gap: 4px;
}

.public-orders-list .order-meta-item .meta-label {
    color: #aaa;
    text-shadow: 0px 0px 2px #000;
}

.public-orders-list .order-meta-item .meta-value {
    color: var(--maintext);
    font-weight: 500;
    text-shadow: 0px 0px 2px #000;
}

/* ПРАВЫЙ БЛОК (описание) */
.public-orders-list .order-right {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.public-orders-list .order-description {
    flex: 1 1 auto;
    height: 80px;
    overflow: hidden;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--maintext);
    text-shadow: 0px 0px 2px #000;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* КНОПКИ */
.public-orders-list .order-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.public-orders-list .order-btn {
    padding: 8px 22px;
    background: linear-gradient(0deg, #4d4d4d 95%, #afafaf 100%) !important;
    border: 1px solid #000 !important;
    border-radius: 5px !important;
    box-shadow: inset 0 0 3px #ffffff, 0 0 5px #000000 !important;
    color: var(--links) !important;
    text-shadow: 0px 0px 2px #000 !important;
    text-decoration: none;
    transition: 0.3s;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: inline-block;
}

.public-orders-list .order-btn:hover {
    color: var(--links-hover) !important;
    filter: brightness(1.1);
}

.public-orders-list .bid-btn {
    background: linear-gradient(0deg, #2e7d32 95%, #4caf50 100%) !important;
    color: #fff !important;
}

.public-orders-list .bid-btn:hover {
    background: linear-gradient(0deg, #1b5e20 95%, #388e3c 100%) !important;
    color: #fff !important;
}

.public-orders-list .order-action-message {
    font-size: 13px;
    color: #aaa;
    text-shadow: 0px 0px 2px #000;
}

.public-orders-list .order-action-message a {
    color: var(--links);
    text-decoration: none;
}

.public-orders-list .order-action-message a:hover {
    color: var(--links-hover);
    text-decoration: underline;
}

/* РАЗЛИЧИЯ МЕЖДУ ВИДАМИ */
.orders-grid-vertical .order-left {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 30px;
}

.orders-grid-vertical .order-right {
    flex: 1;
}

.orders-grid-horizontal .order-left {
    flex: 0 0 260px;
    border-right: 2px solid #333;
    border-bottom: none;
    flex-direction: column;
    gap: 10px;
}

.orders-grid-horizontal .order-meta-list {
    flex-direction: column;
    gap: 0;
}

.orders-grid-horizontal .order-meta-item {
    border-bottom: 1px dotted rgba(255,255,255,0.05);
    padding: 4px 0;
}

.orders-grid-horizontal .order-meta-item:last-child {
    border-bottom: none;
}

.orders-grid-horizontal .order-meta-item .meta-label {
    min-width: 85px;
}

/* ===== ЦВЕТА СТАТУСОВ ===== */
.public-orders-list .status-1 { color: #f39c12; }
.public-orders-list .status-2 { color: #3498db; }
.public-orders-list .status-3 { color: #9b59b6; }
.public-orders-list .status-4 { color: #2ecc71; }
.public-orders-list .status-5 { color: #e67e22; }
.public-orders-list .status-9 { color: #27ae60; }
.public-orders-list .status--3 { color: #e74c3c; }
.public-orders-list .status--4 { color: #c0392b; }

/* ===== ПАГИНАЦИЯ ===== */
.orders-pagination {
    margin-top: 30px;
    text-align: center;
}

.orders-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    border-radius: 4px;
    color: var(--links);
    text-decoration: none;
    transition: 0.3s;
}

.orders-pagination .page-numbers:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--links-hover);
}

.orders-pagination .page-numbers.current {
    background: var(--links);
    border-color: var(--links);
    color: #fff;
}

/* ===== СКРЫВАЕМ СТАНДАРТНЫЕ КАСТОМНЫЕ ПОЛЯ ===== */
.rcl-custom-fields {
    display: none !important;
}

/* =========================================================
   АДАПТИВНОСТЬ КАРТОЧЕК ЗАКАЗОВ
   ========================================================= */

@media screen and (min-width: 1201px) {
    .public-orders-list {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .orders-grid-horizontal .order-left {
        flex: 0 0 280px;
    }
}

@media screen and (max-width: 1200px) and (min-width: 769px) {
    .public-orders-list {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .orders-grid-horizontal .order-left {
        flex: 0 0 240px;
    }
}

@media screen and (max-width: 768px) {
    .public-orders-list .orders-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .public-orders-list .orders-header h2 {
        text-align: center;
        font-size: 22px;
    }
    
    .public-orders-list .orders-view-toggle {
        justify-content: center;
    }
    
    .orders-grid-horizontal {
        grid-template-columns: 1fr;
    }
    
    .orders-grid-horizontal .order-left,
    .orders-grid-vertical .order-left {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 30px;
    }
    
    .orders-grid-horizontal .order-meta-list,
    .orders-grid-vertical .order-meta-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 20px;
    }
    
    .orders-grid-horizontal .order-meta-item,
    .orders-grid-vertical .order-meta-item {
        border-bottom: none;
        padding: 2px 0;
    }
    
    .orders-grid-horizontal .order-meta-item .meta-label,
    .orders-grid-vertical .order-meta-item .meta-label {
        min-width: auto;
    }
    
    .public-orders-list .order-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .public-orders-list .order-btn {
        text-align: center;
    }
    
    .public-orders-list .order-action-message {
        text-align: center;
    }
    
    .public-orders-list .order-header {
        padding: 12px 16px;
    }
    
    .public-orders-list .order-title {
        font-size: 16px;
    }
    
    .public-orders-list .order-price {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .public-orders-list .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 14px;
    }
    
    .public-orders-list .order-title {
        font-size: 15px;
        min-width: auto;
    }
    
    .public-orders-list .order-price {
        font-size: 18px;
    }
    
    .public-orders-list .order-left,
    .orders-grid-vertical .order-left,
    .orders-grid-horizontal .order-left {
        padding: 10px 14px;
    }
    
    .public-orders-list .order-meta-item,
    .orders-grid-vertical .order-meta-item,
    .orders-grid-horizontal .order-meta-item {
        font-size: 12px;
        flex-wrap: wrap;
    }
    
    .public-orders-list .order-meta-item .meta-label,
    .orders-grid-vertical .order-meta-item .meta-label,
    .orders-grid-horizontal .order-meta-item .meta-label {
        min-width: 60px;
    }
    
    .public-orders-list .order-right,
    .orders-grid-vertical .order-right,
    .orders-grid-horizontal .order-right {
        padding: 10px 14px;
    }
    
    .public-orders-list .order-description,
    .orders-grid-vertical .order-description,
    .orders-grid-horizontal .order-description {
        height: 60px;
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
}