/**
 * Amazing Offers Widget Styles
 * Version: 8.0.3 (Correct RTL Layout using 'order' property)
 * Refactored to Canonical Tokens
 */

/* 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: var(--gk-neutral-100);
    border-radius: var(--gk-radius-xl);
    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: var(--gk-surface);
    color: var(--gk-accent);
    border-radius: var(--gk-radius-lg);
    text-decoration: none;
    font-weight: var(--gk-heading-weight);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.gk-offers__button:hover { background-color: var(--gk-neutral-100); }

/* 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: var(--gk-surface);
    border-radius: var(--gk-radius-round);
    padding: 8px;
    box-shadow: var(--gk-shadow-sm);
}
.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: var(--gk-primary);
    color: var(--gk-surface);
    border-radius: var(--gk-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: var(--gk-heading-weight);
    border: 2px solid var(--gk-surface);
}

/* End Column: Title Area (now correctly on the right) */
.gk-offers__title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gk-offers__title {
    color: var(--gk-text);
    font-size: 22px;
    font-weight: var(--gk-heading-weight);
    margin: 0;
    white-space: nowrap;
}
.gk-offers__discount-badge {
    background-color: var(--gk-accent);
    color: var(--gk-surface);
    padding: 4px 12px;
    border-radius: var(--gk-radius-lg);
    font-size: 14px;
    font-weight: var(--gk-heading-weight);
    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; }
}
