/**
 * Archive Products Widget Styles
 * Version: 1.0.0
 */

/* ============================================
   WOOCOMMERCE OVERRIDES
============================================= */
.woocommerce .woocommerce-ordering {
    margin: 0 !important;
}

.content {
    padding-top: 0 !important;
}

.row,
.columns_wrap {
    margin-right: 0 !important;
}

.woocommerce .woocommerce-ordering .select_container {
    background-color: #1a1a1a;
}

.woocommerce .woocommerce-ordering .select_container:before {
    background-color: #1a1a1a;
}

option {
    background-color: #1a1a1a !important;
}

.product-card.is-sold .card-actions {
    pointer-events: none;
    opacity: 0.3;
}

.sidebar.widget_area.left.sidebar_float.sidebar_custom {
    display: none;
}

.body_style_fullwide.sidebar_left [class*="content_wrap"]>.content,
.body_style_fullscreen.sidebar_left [class*="content_wrap"]>.content {
    padding: 0 !important;
}

.woocommerce nav.woocommerce-pagination {
    text-align: center !important;
}

span.page-numbers.current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 45px;
    padding: 16px 30px;
    color: #000 !important;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: linear-gradient(45deg, #999 5%, #fff 10%, #ccc 30%, #ddd 50%, #ccc 70%, #fff 80%, #999 95%) !important;
}

/* ============================================
   ARCHIVE PRODUCTS SECTION
============================================= */
.archive-products-section {
    background-color: #111;
    color: #fff;
}

.archive-products-section .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* ============================================
   ARCHIVE HEADER
============================================= */
.archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.archive-header[style*="display: block"] {
    display: block !important;
}

.archive-title {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.archive-title span {
    color: #ea0a0b;
}

.archive-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.archive-description p {
    margin: 0;
}

/* ============================================
   ARCHIVE TOOLBAR
============================================= */
.archive-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 15px 20px;
    background-color: #1a1a1a;
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 15px;
}

.result-count-wrapper {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.result-count-wrapper .woocommerce-result-count {
    margin: 0;
}

.catalog-ordering-wrapper .woocommerce-ordering {
    margin: 0;
}

.catalog-ordering-wrapper select {
    background-color: #2a2a2a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5L6 8L9 5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    min-width: 200px;
}

.catalog-ordering-wrapper select:focus {
    outline: none;
    border-color: #ea0a0b;
    box-shadow: 0 0 0 3px rgba(234, 10, 11, 0.2);
}

/* ============================================
   PRODUCTS GRID
============================================= */
.products-grid {
    margin: 0;
}

/* ============================================
   PRODUCT CARDS
============================================= */
.related-card.is-sold::before {
    content: "";
    background-image: url('https://dev.thriftdeals.in/wp-content/uploads/2026/01/booked.webp');
    z-index: 999;
    border-radius: 5px;
    position: absolute;
    top: 0px;
    left: -5px;
    width: 110px;
    background-size: contain;
    background-repeat: no-repeat;
    height: auto;
    color: #fff;
    padding: 23px 30px;
    font-weight: bold;
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.related-cars-section {
    background-color: #111;
    color: #fff;
}

.related-card {
    position: relative;
    background-color: #232323;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.related-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.related-card-link:hover {
    color: inherit;
}

.reg-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
}

/* ============================================
   CARD SLIDER
============================================= */
.card-slider {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.slider-images {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-images img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slider-images img.active {
    opacity: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.related-card:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.slider-btn.prev-btn {
    left: 10px;
}

.slider-btn.next-btn {
    right: 10px;
}

/* ============================================
   CARD HEADER INFO
============================================= */
.card-header-info {
    padding: 15px;
    background: #232323;
}

.card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

h3.car-name {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-transform: unset !important;
}

.btn-whatsapp {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    background: #25D366;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.1);
}

.btn-whatsapp svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.card-header-info .car-price {
    font-size: 20px;
    font-weight: 700;
    color: #ea0a0b;
    margin: 8px 0 0;
}

/* ============================================
   CARD SPECS
============================================= */
.card-specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-specs .spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: #232323;
    text-align: center;
}

.card-specs .spec svg {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
    opacity: 0.7;
    color: #fff;
}

.card-specs .spec .label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.card-specs .spec .value {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

/* ============================================
   NO PRODUCTS FOUND
============================================= */
.no-products-found {
    text-align: center;
    padding: 80px 20px;
    color: #fff;
}

.no-products-icon {
    margin-bottom: 30px;
    opacity: 0.5;
}

.no-products-icon svg {
    color: #fff;
}

.no-products-found h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.no-products-found p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 40px;
    background: linear-gradient(45deg, #999 5%, #fff 10%, #ccc 30%, #ddd 50%, #ccc 70%, #fff 80%, #999 95%);
    color: #000;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
    color: #000;
}

/* ============================================
   PAGINATION
============================================= */
.archive-pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 45px;
    height: 45px;
    padding: 0 15px;
    margin: 0 5px;
    background-color: #2a2a2a;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.archive-pagination .page-numbers:hover {
    background-color: #3a3a3a;
}

.archive-pagination .page-numbers.current {
    background: linear-gradient(45deg, #999 5%, #fff 10%, #ccc 30%, #ddd 50%, #ccc 70%, #fff 80%, #999 95%);
    color: #000;
}

/* ============================================
   MODAL STYLES
============================================= */
.modal-content {
    background-color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
}

.modal-title {
    color: #fff;
    font-weight: 700;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 5px 0 0;
}

.modal-body {
    padding: 20px;
}

.btn-close {
    filter: invert(1);
}

/* ============================================
   TOAST NOTIFICATION
============================================= */
.apw-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 90%;
    color: #fff;
}

.apw-toast.show {
    transform: translateX(-50%) translateY(0);
}

.apw-toast.success {
    background: #28a745;
}

.apw-toast.error {
    background: #dc3545;
}

.apw-toast.info {
    background: #007bff;
}

/* ============================================
   RESPONSIVE STYLES
============================================= */
@media (max-width: 991px) {
    .archive-title {
        font-size: 32px;
    }

    .card-specs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .archive-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog-ordering-wrapper select {
        width: 100%;
        min-width: auto;
    }

    .archive-title {
        font-size: 26px;
    }

    h3.car-name {
        font-size: 20px;
    }

    .card-header-info .car-price {
        font-size: 18px;
    }
}

/* ============================================
   ELEMENTOR EDITOR PREVIEW
============================================= */
.elementor-editor-preview .related-card {
    pointer-events: none;
}

.elementor-editor-preview .slider-btn {
    opacity: 1;
}