/**
 * Vue Product Filter & Search Component Styles
 * Phase 2 of Vue Migration
 */

/* ========== Product Filter Container ========== */
.vue-product-filter {
    width: 100%;
}

/* ========== Filter Pills ========== */
.vue-product-filter .filter-pills {
    display: flex;
    gap: 12px;
    padding: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
}

.vue-product-filter .filter-pills::-webkit-scrollbar {
    display: none;
}

.vue-product-filter .filter-pills-centered {
    justify-content: center;
    flex-wrap: wrap;
}

.vue-product-filter .pill {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    color: #666;
}

.vue-product-filter .pill:hover {
    border-color: #000;
    color: #000;
}

.vue-product-filter .pill.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* ========== Products Grid ========== */
.vue-product-filter .products-grid-container {
    width: 100%;
}

.vue-product-filter .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 240px));
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
    justify-content: center;
}

.vue-product-filter .products-horizontal {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
}

.vue-product-filter .products-horizontal::-webkit-scrollbar {
    height: 4px;
}

.vue-product-filter .products-horizontal::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.vue-product-filter .products-horizontal::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* ========== Product Card ========== */
.vue-product-filter .product-card {
    position: relative;
    width: 100%;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* Hover effect - only for devices with hover capability */
@media (hover: hover) and (pointer: fine) {
    .vue-product-filter .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
}

/* Enhanced touch feedback for Vue product cards */
.vue-product-filter .product-card:active {
    transform: scale(0.96) !important;
    opacity: 0.85;
    transition: transform 0.08s ease, opacity 0.08s ease !important;
}

/* Ensure active state works on touch devices */
@media (hover: none) and (pointer: coarse) {
    .vue-product-filter .product-card:active {
        transform: scale(0.95) !important;
        opacity: 0.8;
    }

    .vue-product-filter .pill:active {
        transform: scale(0.95) !important;
        opacity: 0.8;
    }
}

.vue-product-filter .products-horizontal .product-card {
    width: 240px;
    min-width: 240px;
}

.vue-product-filter .product-image-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.vue-product-filter .product-image {
    width: 100%;
    height: 310px;
    object-fit: cover;
    border-radius: 6px;
    background: #f5f5f5;
    display: block;
    transition: transform 0.3s ease;
}

.vue-product-filter .product-card:hover .product-image {
    transform: scale(1.02);
}

.vue-product-filter .product-card-content {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vue-product-filter .product-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    line-height: 1.3;
}

.vue-product-filter .product-card-price {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

/* ========== Loading State ========== */
.vue-product-filter .products-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

/* ========== No Results State ========== */
.vue-product-filter .products-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.vue-product-filter .products-no-results h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.vue-product-filter .products-no-results p {
    color: #666;
    font-size: 16px;
}

/* ========== Search Box Component ========== */
.vue-search-box-wrapper {
    position: relative;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
    .vue-product-filter .filter-pills {
        padding: 15px;
        gap: 8px;
    }

    .vue-product-filter .pill {
        padding: 8px 16px;
        font-size: 13px;
    }

    .vue-product-filter .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 1rem !important;
    }

    .vue-product-filter .products-horizontal {
        padding: 0.5rem 0;
        gap: 1rem;
    }

    .vue-product-filter .products-horizontal .product-card {
        width: 180px;
        min-width: 180px;
    }

    .vue-product-filter .product-card {
        min-width: unset;
        max-width: unset;
        width: 100%;
    }

    .vue-product-filter .product-image {
        height: 227px;
    }

    .vue-product-filter .products-horizontal .product-image {
        height: 240px;
    }

    .vue-product-filter .product-card-title {
        font-size: 14px;
        margin: 4px 6px 3px;
        line-height: 1.2;
    }

    .vue-product-filter .product-card-price {
        font-size: 12px;
        margin: 0 6px 4px;
    }
}

/* ========== Small Mobile ========== */
@media (max-width: 480px) {
    .vue-product-filter .filter-pills-centered {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .vue-product-filter .pill {
        padding: 6px 14px;
        font-size: 12px;
    }

    .vue-product-filter .product-image {
        height: 200px;
    }
}