
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
    text-align: right;
    direction: rtl;
    margin: 0;
}

h1, h2 {
    color: #2c3e50;
    text-align: center;
}

.filters {
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    text-align: center;
    min-width: 700px;
}

th {
    background-color: #2babab;
    color: white;
    padding: 10px;
    border: 1px solid #1e4a48;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}

tr:nth-child(even) {
    font-weight: bold;
    background-color: #e9ecef;
}

tr:nth-child(odd) {
    font-weight: bold;
    background-color: #ffffff;
}

td {
    padding: 10px;
    border: 1px solid #1e4a48;
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
}

.back-btn {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 15px;
    background-color: #95a5a6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.back-btn:hover {
    background-color: #7f8c8d;
}

.no-result {
    color: #e74c3c;
    text-align: center;
    font-weight: bold;
    margin: 30px 0;
    font-size: 18px;
}



@media (max-width: 768px) {

    body {
        padding: 10px;
    }

    .table-container {
        width: 100%;
        overflow: visible;
    }

    table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    thead {
        display: none;
    }

    tbody {
        display: block;
        width: 100%;
    }

    tr.product {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        background: #fff !important;
        border: 1px solid #2babab;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0,0,0,0.07);
    }

    /* عنوان جدول */
    tr.product::before {
        content: "مشخصه";
        display: block;
        background: #2babab;
        color: white;
        font-weight: bold;
        padding: 11px;
        text-align: center;
        width: 42%;
        float: right;
        box-sizing: border-box;
    }

    

    /* سلول های جدول */
    tr.product td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        position: relative;
        padding: 10px 58% 10px 5px;
        min-height: 40px;
        border: none;
        border-bottom: 1px solid #e1e7e7;
        font-size: 12px;
        text-align: right;
        white-space: normal;
        direction: rtl;
        color: #333;
        background: #fff;
    }

    /* ستون مشخصه */
    tr.product td:nth-child(1)::before {
        content: "توان (کیلووات)";
    }

    tr.product td:nth-child(2)::before {
        content: "ولتاژ ورودی";
    }

    tr.product td:nth-child(3)::before {
        content: "نوع محصول";
    }

    tr.product td:nth-child(4)::before {
        content: "جریان نامی (آمپر)";
    }

    tr.product td:nth-child(5)::before {
        content: "ضریب اضافه بار";
    }

    tr.product td:nth-child(6)::before {
        content: "ابعاد (میلی‌متر)";
    }

    tr.product td:nth-child(7)::before {
        content: "قیمت (تومان)";
    }

    tr.product td::before {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 42%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 5px;
        box-sizing: border-box;
        background: #e9f5f5;
        color: #287f7f;
        font-weight: bold;
        text-align: center;
        font-size: 11px;
        border-left: 1px solid #ddd;
    }

    tr.product td:last-child {
        border-bottom: none;
    }
}
