.view-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: auto;
    padding: 15px 20px;
    background: white;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 15px;
}

.view-buttons {
    display: flex;
    gap: 5px;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 40px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: #334155;
    background: rgba(255,255,255,0.7);
}

.view-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59,130,246,0.2);
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

.results-info {
    font-size: 14px;
    color: #64748b;
}

.results-info span {
    font-weight: 700;
    color: #1e293b;
    margin-right: 5px;
}

.products-wrapper {
    transition: all 0.3s ease;
}

.product-item {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.product-item:hover {
    transform: translateY(-4px);
    /* box-shadow: 0 15px 30px rgba(59,130,246,0.15); */
    border-color: #3b82f6;
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: solid 1px #4d8df7;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.product-category {
    font-size: 11px;
    color: #3b82f6;
    text-transform: uppercase;
    font-weight: 600;
}

.product-title {
    font-weight: 700;
    color: #1e293b;
    /* line-height: 1.4; */
}

.product-sku {
    font-size: 12px;
    color: #64748b;
}

.product-price {
    font-weight: 700;
    color: #1e293b;
}

.product-price small {
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

.btn-add {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59,130,246,0.3);
}

.products-wrapper.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.grid-view .product-item {
    display: flex;
    flex-direction: column;
}

.grid-view .product-image {
    height: 200px;
    padding: 20px;
    position: relative;
}

.grid-view .product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grid-view .product-category {
    margin-bottom: 5px;
}

.grid-view .product-title {
    font-size: 16px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.grid-view .product-sku {
    margin-bottom: 12px;
}

.grid-view .product-price {
    font-size: 22px;
    margin-bottom: 15px;
    margin-top: 15px;
}

.grid-view .btn-add {
    width: 100%;
    padding: 12px;
    margin-top: auto;
}

.products-wrapper.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* position: relative; */
}

.list-view .product-item {
    display: flex;
    align-items: center;
    padding: 15px;
    position: relative;
}
.list-view .product-item .product-badge {
    opacity: 0;
}
.list-view .product-item:hover .product-badge {
    opacity: 1;
}
.list-view .product-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    flex-shrink: 0;
    margin-right: 20px;
}

.list-view .product-image img {
    width: 80px;
    height: 80px;
}

.list-view .product-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.list-view .product-details {
    min-width: 250px;
}

.list-view .product-category {
    margin-bottom: 4px;
}

.list-view .product-title {
    font-size: 16px;
    margin-bottom: 4px;
}

.list-view .product-sku {
    font-size: 12px;
}

.list-view .product-specs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.grid-view .product-specs .spec-item{
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
}
.grid-view .product-specs .spec-item:nth-child(odd) {--glitch-translate: 8px;background: #f5f8fb;}
.grid-view .product-specs .spec-item:nth-child(even) {--glitch-translate: -8px;background: #ffffff;}
.list-view .spec-item {
    text-align: center;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 70px;
}

.list-view .spec-label {
    font-size: 10px;
    color: #64748b;
}

.list-view .spec-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
}

.list-view .product-price {
    font-size: 20px;
    margin-left: auto;
    margin-right: 20px;
    white-space: nowrap;
}

.list-view .btn-add {
    padding: 10px 20px;
    white-space: nowrap;
}

.products-wrapper.compact-view {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.products-wrapper.compact-view .product-specs{
    display: none;
}
.compact-view .product-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
}

.compact-view .product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
}

.compact-view .product-image img {
    width: 40px;
    height: 40px;
}

.compact-view .product-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.compact-view .product-title {
    font-size: 14px;
    min-width: 200px;
    margin: 4px 0;
}

.compact-view .product-sku {
    font-size: 11px;
    color: #64748b;
    min-width: 100px;
}

.compact-view .product-price {
    font-size: 16px;
    min-width: 100px;
}

.compact-view .btn-add {
    padding: 6px 12px;
    font-size: 12px;
    margin-left: auto;
}

.products-wrapper.table-view {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    /* box-shadow: 0 5px 20px rgba(0,0,0,0.05); */
    /* gap: 0; */
    /* grid-template-columns: 1fr; */
}

.table-view .products-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 1fr 0.5fr;
    background: #f8fafc;
    padding: 15px 20px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
}

.table-view .product-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 1fr 0.5fr;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
    box-shadow: none;
    border-radius: 0;
}

.table-view .product-item:hover {
    background: #f8fafc;
    transform: none;
    box-shadow: none;
}

.table-view .product-image {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-view .product-image .thumb {
    width: 50px;
    height: 50px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-view .product-image .thumb img {
    width: 40px;
    height: 40px;
}

.table-view .product-title {
    font-size: 14px;
    font-weight: 600;
}

.table-view .btn-add {
    padding: 6px 12px;
    font-size: 12px;
    width: fit-content;
}

.products-wrapper.gallery-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 15px;
}
.products-wrapper.gallery-view .product-specs,.gallery-view .btn-add,.gallery-view .product-price{
    display: none;
}

.gallery-view .product-item {
    text-align: center;
}

.gallery-view .product-image {
    height: 150px;
    padding: 15px;
    position: relative;
}

.gallery-view .product-info {
    padding: 12px;
}

.gallery-view .product-title {
    font-size: 13px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-view .product-price {
    font-size: 16px;
    margin-bottom: 8px;
}

.gallery-view .btn-add {
    width: 100%;
    padding: 8px;
    font-size: 12px;
}

.gallery-view .product-badge {
    font-size: 10px;
    padding: 3px 8px;
}

@media (max-width: 1024px) {
    .list-view .product-info {
        flex-wrap: wrap;
    }

    .list-view .product-specs {
        margin-left: 0;
        width: 100%;
    }

    .table-view .products-header,
    .table-view .product-item {
        grid-template-columns: 2fr 1fr 1fr 1fr 1fr 0.5fr;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .list-view .product-price{
        margin: 0;
    }
    .list-view .product-specs {
        justify-content: center;
    }
    .view-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .view-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .view-btn {
        padding: 8px 15px;
    }

    .view-btn span {
        display: none;
    }

    .list-view .product-item {
        flex-direction: column;
        text-align: center;
    }

    .list-view .product-image {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .list-view .product-info {
        /*flex-direction: column;*/
        justify-content: center;
    }

    .compact-view .product-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .compact-view .btn-add {
        margin-left: 0;
    }

    .table-view .products-header,
    .table-view .product-item {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}



.products-wrapper.table-view {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.products-wrapper.table-view .product-item {
    display: flex;
    width: 100%;
    background: #fff;
    text-decoration: none;
    color: #333;
    border: 1px solid #e0e0e0;
    justify-content: space-around;
}

.products-wrapper.table-view .product-item:hover {
    background: #f8fafc;
}

.products-wrapper.table-view .product-badge,
.products-wrapper.table-view .product-image,
.products-wrapper.table-view .product-info,
.products-wrapper.table-view .btn-add {
    display: table-cell;
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
}

.products-wrapper.table-view .product-badge {
    width: 60px;
    position: static;
    box-shadow: none;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.products-wrapper.table-view .product-image {
    width: 100px;
    height: auto;
    background: transparent;
    border-bottom: none;
}

.products-wrapper.table-view .product-image img {
    max-width: 80px;
    max-height: 80px;
}

.products-wrapper.table-view .product-info {
    display: flex;
    justify-content: space-between;
    border-bottom: unset;
    align-items: center;
    gap: 19px;
}

.products-wrapper.table-view .product-category {
    margin-bottom: 5px;
}

.products-wrapper.table-view .product-title {
    font-size: 16px;
    min-height: auto;
    margin-bottom: 5px;
}

.products-wrapper.table-view .product-sku {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.products-wrapper.table-view .product-specs {
    display: inline-block;
    margin-bottom: 0;
}

.products-wrapper.table-view .spec-item {
    display: inline-block;
    margin-right: 15px;
    font-size: 13px;
}

.products-wrapper.table-view .product-price {
    width: 141px;
    border: none;
    margin: 0;
    padding: 15px;
    font-size: 18px;
}

.products-wrapper.table-view .btn-add {
    padding: 13px 20px;
}

.products-wrapper.table-view .product-specs {
    display: flex;
}



.products-wrapper.table-view .product-item:first-child {
}