html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 2.3;
    color: #333;
    margin: 0;
    padding: 0;
}

.fs-6 {
    font-size: 1rem !important;
    line-height: 14px !important;
    margin-bottom: 10px !important;
}

.a4-page {
    width: 100%;
    max-width: 21cm;
    margin: 0 auto;
    background: white;
}

.header-section {
    border-bottom: 3px solid #0d6efd;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.header-top {
    padding-top: 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-bottom: 15px; */
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 180px;
    height: 70px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    /* box-shadow: 0 2px 4px #0000001a; */
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-info {
    text-align: center;
    flex: 1;
    /* margin: 0 20px; */
}

.blue {
    color: #0d6efd;
}

.blue2 {
    color: #003f9d;
}

.green {
    color: #198754;
}

.company-subtitle {
    color: #dc3545;
    font-size: 14px;
    margin: 5px 0;
    font-weight: 500;
}

.invoice-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 200px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: #198754;
}

.info-value {
    color: #000;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
}

.main-content {
    margin: 10px 0;
}

.description-section {
    padding: 15px;
}

.description-title {
    color: #0d6efd;
    font-weight: bold;
    /* margin-bottom: 10px; */
}

.description-text {
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
}

/* Footer section */
.footer-section {
    border-top: 3px solid #0d6efd;
    padding-top: 15px;
    margin-top: 20px;
}

.address {
    text-align: center;
    color: #dc3545;
    font-size: 12px;
}

.contact-info {
    justify-content: space-between;
}

.contact-item {
    color: #0d6efd;
    font-size: 12px;
    text-align: center;
}

.english-address {
    text-align: center;
    color: #dc3545;
    font-size: 11px;
}

.website-info {
    text-align: center;
    color: #0d6efd;
    font-size: 12px;
}

/* Utility classes */
.ltr-text {
    direction: ltr;
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

.titile-technical {
    font-size: 15px;
    font-weight: bold;
    padding-right: 10px;
    margin: 16px 0;
}

.specs-container {
    display: flex;
    align-items: center;
    /* gap: 20px; */
}

.specs-grid1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    direction: rtl;
    text-align: right;
    /* gap: 5px; */
    flex: 1;
}

.specs-grid1 img {
    max-width: 100%;
    height: auto;
    display: block;
    /* margin: 0 70% 10% 0; */
    margin: 0 20% 10% 0;
}

.title {
    margin: 0;
}

.product_name {
    width: 23rem;
    font-size: 1.5rem !important;
    margin: 0;
    padding: 0 15px 0 0;
}

.product_code {
    width: 23rem;
    font-size: 1.2rem !important;
    margin: 4px 0 0 0;
    padding: 0 20px 0 0;
}

.text-box1 {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    font-family: sans-serif;
}

.row {
    display: flex;
    padding: 8px 12px;
}

.border {
    border-bottom: none;
}

.my-table {
    background-color: #ffffff !important;
    flex: 0 0 200px;
    font-weight: bold;
    padding: 6px 10px;
    border-left: 1px solid #ddd;
}

.biarast {
    flex: 1;
    padding: 6px 10px;
}

.price {
    padding: 0 5%;
    font-size: 1.1rem !important;

}


img {
    max-width: 100%;
    width: 18rem !important;
    height: auto !important;
    /* width: 58rem !important; */
    height: 18rem !important;
}

.shop-details {
    padding: 0px 0px 0px;
}


.image-container img {
    width: 100%;
    max-width: 1100px;
    /* هرچقدر خواستی بزرگ‌تر */
    height: auto;
}


@media(max-width:768px) {
    .header-top {
        display: block;
        justify-content: space-between;
        align-items: center;
        /* margin-bottom: 15px; */
    }

    .tank-image img {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 180px;
        height: 145px;
        transform: translate(-50%, -50%);
        transition: all 0.3s ease;
    }

    img {
        max-width: 100%;
        width: 10rem !important;
        height: auto !important;
        display: block;
    }

    .specs-grid1 img {
        max-width: 100%;

        height: auto;
        display: block;
        margin: 0 0% 0% 0;
    }

    .specs-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .specs-grid1 {
        flex: 1 1 45%;
        min-width: 200px;
    }

    .shop-details__content {
        padding: 10px;
    }

    .image-container img {
        width: 100rem !important;
        height: auto;
        display: block;
    }

    .title {
        margin: 0 0 0% 0;
    }

    .shop-details {
        padding: 0 0px 20px;
    }

    .shop-details__content {
        margin-top: 0px;
        max-width: 750px;
        width: 100%;
        margin-left: 0;
    }

    .product_name {
        margin: 0 9px 0 0;
    }

    .product_code {
        margin: 4px 15px 0 0;
    }

    .row {
        display: flex;
        padding: 0px 0px;
    }

    .my-table {
        flex: 0 0 40%;
        padding: 6px 20px;
    }

    .biarast {
        flex: 1 1 60%;
    }

    .image-container {
        margin: 0px 15px 20px 0;
    }

    .price {
        padding: 0 2%;
        font-size: 1rem !important;
        font-weight: 700;
    }

    .a4-page {
        width: 100%;
        max-width: 21cm;
        margin: 0;
        background: white;
    }
}

@media print {

    html,
    body {
        margin: 0;
        padding: 0;
        background: white;
    }

    body * {
        visibility: hidden;
    }

    /* فقط محتوای PDF دیده شود */
    #pdf-content,
    #pdf-content * {
        visibility: visible;
    }

    /* خود صفحه A4 مثل نسخه دسکتاپ */
    .a4-page {
        width: 21cm !important;
        background: white !important;
        margin: auto !important;
        box-shadow: none !important;
        font-family: 'IRANSans', sans-serif;
        direction: rtl;
    }

    /* مطمئن شو وسط صفحه پرینت قرار بگیره */
    #pdf-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 21cm;
    }

    .specs-container {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .specs-grid1 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        direction: rtl;
        text-align: right;
        /* gap: 5px; */
        flex: 1;
    }

    .specs-grid1 img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 0 80% 10% 0;
    }

    .header-top {
        padding-top: 1%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .titile-technical {
        font-size: 15px;
        font-weight: bold;
        padding-right: 10px;
        margin: 10px 0;
    }

    .description-text {
        font-size: 14px;
        line-height: 1.8;
        text-align: justify;
    }

    /* ثابت کردن هدر */
    .header-top {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: white;
        z-index: 1000;
        border-bottom: 2px solid #0d6efd;
    }

    /* ثابت کردن فوتر */
    .footer-section {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        z-index: 1000;
        border-top: 2px solid #0d6efd;
        padding: 10px 0;
    }

    /* فضای خالی برای اینکه متن وسط نیفته زیر هدر یا فوتر */
    .main-content {
        margin-top: 100px !important;
        margin-bottom: -2px !important;
        margin-bottom: 2000px !important;
    }

    .main-content {
        margin-top: 90px !important;
        margin-bottom: 10px !important;
    }

    .description-section {
        padding: 170px 0 0 0;
    }

    .shop-details__content-text1 {
        position: relative;
        display: block;
        margin: 0;
    }

    .title {
        margin: 0;
    }

    .product_name {
        width: 30rem;
        font-size: 1.5rem !important;
        margin: 0;
        padding: 0;
    }

    .product_code {
        width: 30rem;
        font-size: 1.2rem !important;
        margin: 0;
        padding: 0;
    }
}