.product-card {
    position: relative;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 100%; /* برای کارت‌های هم‌اندازه در گرید */
    display: flex;
    flex-direction: column;
}

.product-card .uk-card-title, .card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.product-description {
    min-height: 80px; /* برای یکپارچگی ارتفاع در صورت کم بودن توضیحات */
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1; /* برای کشیده شدن به پایین و هم‌ارتفاع شدن */
}

.highlight-icon {
    vertical-align: middle;
    margin-right: 5px; /* برای زبان فارسی */
    color: orange;
}

/* UIkit specific overrides */
.uk-card hr {
    border-top: 1px solid #eee;
}

.uk-button-secondary {
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
}
.uk-button-secondary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Bootstrap specific overrides */
.card {
    border: 1px solid rgba(0,0,0,.125);
    border-radius: .25rem;
}
.card-body {
    padding: 1.25rem;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Bulma specific overrides */
.box {
    box-shadow: 0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02);
}
.button.is-primary {
    background-color: #00d1b2;
}
.button.is-primary:hover {
    background-color: #00c4a7;
}


/* Styling for out of stock badge */
.out-of-stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #dc3545; /* Red */
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    z-index: 10;
}

.uk-opacity-50 {
    opacity: 0.5;
    pointer-events: none; /* برای UIkit */
}

/* For Bootstrap */
.opacity-50 {
    opacity: 0.5;
    pointer-events: none;
}

/* Custom CSS for WHMCS Products Table List Display */

.product-description li {
    list-style-type: disc;
}

.plan-title {
    width: 30% !important;
}

.whmcs-products-table-list {
    margin-top: 20px;
    border: 1px solid #e5e5e5; /* Add a subtle border around the table */
    border-radius: 5px; /* Rounded corners for the table container */
}

.whmcs-products-table-list table {
    margin-bottom: 0; /* Remove default table bottom margin */
}

.whmcs-products-table-list th,
.whmcs-products-table-list td {
    padding: 12px 10px; /* Adjust padding for cells */
    vertical-align: middle; /* Align content vertically in the middle */
}

.whmcs-products-table-list thead th {
    background-color: #f8f8f8; /* Light background for table header */
    font-weight: bold;
    color: #333;
    text-transform: none; /* Prevent uppercase from UIkit */
}

.whmcs-products-table-list tbody tr:last-child td {
    border-bottom: none; /* No border for the last row */
}

.whmcs-products-table-list .product-description {
    line-height: 1.6;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.whmcs-products-table-list .uk-text-muted span {
    display: inline-block; /* Make pricing options display nicely in a row */
    margin-left: 10px; /* Space between pricing options */
}

.whmcs-products-table-list .uk-text-muted span:last-child {
    margin-left: 0;
}

/* Adjust button size for table view */
.whmcs-products-table-list .uk-button {
    min-width: 80px; /* Ensure buttons have a minimum width */
}

/* Style for out of stock badge in table list */
.whmcs-products-table-list .out-of-stock-badge {
    display: inline-block;
    background-color: #f05060; /* UIkit danger color */
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap; /* Prevent breaking into multiple lines */
}

/* Hide the button when out of stock and btn_hidden class is applied */
.whmcs-products-table-list .btn_hidden {
    display: none;
}

/* Highlight icon in table list */
.whmcs-products-table-list .highlight-icon {
    margin-right: 5px;
    vertical-align: middle;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 959px) { /* UIkit breakpoint for medium screens */
    .whmcs-products-table-list thead {
        display: none; /* Hide table header on small screens */
    }

    .whmcs-products-table-list table,
    .whmcs-products-table-list tbody,
    .whmcs-products-table-list tr,
    .whmcs-products-table-list td {
        display: block; /* Make table elements act as block elements */
        width: 100%; /* Take full width */
    }

    .whmcs-products-table-list tr {
        margin-bottom: 15px; /* Space between product rows */
        border: 1px solid #e5e5e5;
        border-radius: 5px;
        box-shadow: 0 0 5px rgba(0,0,0,0.05); /* Subtle shadow */
    }

    .whmcs-products-table-list td {
        border: none !important; /* Remove cell borders */
        text-align: right !important; /* Align text right for better readability in stacked view */
        padding-bottom: 5px;
        padding-top: 5px;
        position: relative; /* For pseudo-elements */
        padding-right: 120px; /* Space for labels */
    }

    .whmcs-products-table-list td:before {
        content: attr(data-label); /* Use data-label for content */
        position: absolute;
        right: 10px;
        font-weight: bold;
        color: #777;
        width: 100px; /* Width for the label */
        text-align: left; /* Align label text to the left */
    }

    /* Assign data-label to each cell for responsive table headings */
    .whmcs-products-table-list td:nth-of-type(1):before { content: "پلن:"; }
    .whmcs-products-table-list td:nth-of-type(2):before { content: "توضیحات:"; }
    .whmcs-products-table-list td:nth-of-type(3):before { content: "قیمت:"; text-align: right; } /* Adjust alignment for price label */
    .whmcs-products-table-list td:nth-of-type(4):before { content: ""; } /* No label for button column */
    .whmcs-products-table-list td:nth-of-type(4) {
        text-align: center !important; /* Center button */
        padding-right: 10px; /* Reset padding for button column */
    }
}
