/**
 * Amazing Offers Widget Styles
 * Version: 8.0.3 (Correct RTL Layout using 'order' property)
 */

/* Main Container */
.gk-offers {
    direction: rtl; /* Set the base direction for all content */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: #f5f5f5;
    border-radius: 20px;
    padding: 12px 24px;
    overflow: hidden;
    position: relative;
}

/* Columns & Layout Re-ordering using 'order' property */
.gk-offers__col {
    display: flex;
    align-items: center;
}

/* Title Area (should be first visually) */
.gk-offers__col--end {
    order: 1;
    justify-content: flex-start; /* Aligns its content to the start (right in RTL) */
    gap: 16px;
}

/* Products List (should be second visually) */
.gk-offers__col--middle {
    order: 2;
    flex-grow: 1;
    justify-content: center;
}

/* "View All" Button (should be last visually) */
.gk-offers__col--start {
    order: 3;
    justify-content: flex-end; /* Aligns its content to the end (left in RTL) */
}

/* Start Column: Button (now correctly on the left) */
.gk-offers__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #fff;
    color: #00a74a;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.gk-offers__button:hover { background-color: #f0f0f0; }

/* Middle Column: Products */
.gk-offers__products-list {
    display: flex;
    gap: 16px;
}
.gk-offers__product {
    position: relative;
}
.gk-offers__product-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    background-color: #fff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.gk-offers__product-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.gk-offers__product-badge {
    position: absolute;
    bottom: -5px;
    left: 50%; /* Centering is independent of LTR/RTL */
    transform: translateX(-50%);
    min-width: 36px;
    height: 36px;
    padding-inline: 5px;
    background-color: #ef3c52;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 2px solid #fff;
}

/* End Column: Title Area (now correctly on the right) */
.gk-offers__title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gk-offers__title {
    color: #333;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}
.gk-offers__discount-badge {
    background-color: #00a74a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.gk-offers__deco-img {
    width: 80px;
    height: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .gk-offers__products-list { display: none; } /* Hide products on tablets */
}
@media (max-width: 767px) {
    .gk-offers {
        flex-direction: column;
        padding: 16px;
        align-items: stretch;
    }
    .gk-offers__col { width: 100%; }
    /* The 'order' properties will correctly stack them on mobile */
    .gk-offers__col--end {
        justify-content: space-between;
        gap: 8px;
        margin-block-end: 16px;
    }
    .gk-offers__title { font-size: 18px; }
    .gk-offers__discount-badge { font-size: 12px; }
    .gk-offers__button { font-size: 14px; }
    .gk-offers__col--start { justify-content: center; }
}