/**
 * Amazing Offers Widget — WooCommerce-backed showcase
 * @since 1.9.258
 */

.gk-offers {
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--gk-surface, #fff);
    border-radius: var(--gk-radius-xl, 24px);
    padding: 20px 32px;
    box-shadow: var(--gk-shadow-sm, 0 4px 12px rgba(0,0,0,.05));
    border: 1px solid rgba(0,0,0,.04);
    position: relative;
    overflow: visible;
    isolation: isolate;
}

.gk-offers::before {
    content: '';
    position: absolute;
    z-index: -1;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--gk-primary, #ef4444);
    border-radius: 0 var(--gk-radius-xl, 24px) var(--gk-radius-xl, 24px) 0;
}

.gk-offers__col {
    display: flex;
    align-items: center;
    min-width: 0;
}

.gk-offers__col--end {
    order: 1;
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 18px;
    z-index: 2;
}

.gk-offers__col--middle {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
}

.gk-offers__col--start {
    order: 3;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.gk-offers__title-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.gk-offers__title {
    color: var(--gk-text, #111827);
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    line-height: 1.4;
    white-space: nowrap;
}

.gk-offers__discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gk-primary, #ef4444);
    color: #fff;
    padding: 6px 14px;
    border-radius: var(--gk-radius-sm, 8px);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
}

.gk-offers__deco-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    background: var(--gk-neutral-100, #f8f9fa);
    border-radius: 50%;
    overflow: hidden;
}

.gk-offers__deco-img {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
}

/* Desktop/tablet static layout. Swiper replaces this geometry only while active. */
.gk-offers__products-list:not(.swiper) {
    display: grid;
    grid-template-columns: repeat(var(--gk-offers-product-count, 5), minmax(0, 1fr));
    align-items: start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 6px 0;
}

.gk-offers__product {
    position: relative;
    min-width: 0;
    width: 100%;
}

.gk-offers__product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    position: relative;
}

.gk-offers__product-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    max-width: 100%;
    background: var(--gk-surface, #fff);
    border-radius: 50%;
    padding: 9px;
    border: 1px solid rgba(0,0,0,.07);
    box-shadow: var(--gk-shadow-sm, 0 2px 8px rgba(0,0,0,.04));
    transition: border-color .2s ease, transform .2s ease;
    overflow: visible;
}

.gk-offers__product-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.gk-offers__product-badge {
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    background: var(--gk-accent, #ef4444);
    color: #fff;
    border-radius: min(calc(var(--gk-radius, 8px) * 0.875), 24px);
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
    white-space: nowrap;
    border: 2px solid var(--gk-surface, #fff);
}

.gk-offers__product-title {
    display: -webkit-box;
    width: 100%;
    min-height: 2.8em;
    margin-top: 6px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--gk-text, #111827);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.gk-offers__product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    color: var(--gk-text, #111827);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    white-space: nowrap;
}

.gk-offers__product-price .amount,
.gk-offers__product-price ins,
.gk-offers__product-price del {
    white-space: nowrap;
}

.gk-offers__product-price ins {
    color: inherit;
    text-decoration: none;
}

.gk-offers__product-price del {
    opacity: .48;
    font-size: .86em;
}

.gk-offers__price-from {
    font-size: .88em;
    font-weight: 600;
    opacity: .68;
}

.gk-offers__stock-status {
    display: inline-flex;
    color: var(--gk-muted, #6b7280);
    font-size: 11px;
    line-height: 1.4;
}

.gk-offers__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 20px;
    background: transparent;
    color: var(--gk-primary, #ef4444);
    border: 1.5px solid currentColor;
    border-radius: var(--gk-radius-lg, 12px);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.5;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.gk-offers__button--disabled {
    opacity: .55;
    cursor: default;
}

.gk-offers__button-icon {
    display: flex;
    align-items: center;
}

/* The runtime class is driven by the same matchMedia decision that creates Swiper.
 * No second hard-coded CSS breakpoint can drift away from Elementor settings. */
.gk-offers.gk-offers--mobile {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 20px;
    overflow: hidden;
}

.gk-offers.gk-offers--mobile::before {
    width: 100%;
    height: 4px;
    right: 0;
    top: 0;
    bottom: auto;
    border-radius: var(--gk-radius-xl, 24px) var(--gk-radius-xl, 24px) 0 0;
}

.gk-offers.gk-offers--mobile .gk-offers__col {
    width: 100%;
}

.gk-offers.gk-offers--mobile .gk-offers__col--end {
    flex-direction: row;
    justify-content: space-between;
}

.gk-offers.gk-offers--mobile .gk-offers__deco-wrapper {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
}

.gk-offers.gk-offers--mobile .gk-offers__deco-img {
    width: 38px;
    height: 38px;
}

.gk-offers.gk-offers--mobile .gk-offers__title {
    white-space: normal;
}

.gk-offers.gk-offers--mobile .gk-offers__col--middle {
    overflow: hidden;
}

.gk-offers.gk-offers--mobile .gk-offers__products-list {
    width: 100%;
    max-width: 100%;
    padding: 6px 0 14px;
}

.gk-offers.gk-offers--mobile .gk-offers__product {
    min-width: 0;
}

.gk-offers.gk-offers--mobile .gk-offers__product-img-wrap {
    width: min(88px, 24vw);
    height: min(88px, 24vw);
}

.gk-offers.gk-offers--mobile .gk-offers__col--start {
    justify-content: stretch;
}

.gk-offers.gk-offers--mobile .gk-offers__button {
    width: 100%;
}

@media (max-width: 1180px) {
    .gk-offers:not(.gk-offers--mobile) {
        gap: 16px;
        padding-inline: 22px;
    }

    .gk-offers:not(.gk-offers--mobile) .gk-offers__deco-wrapper {
        display: none;
    }

    .gk-offers:not(.gk-offers--mobile) .gk-offers__product-img-wrap {
        width: 72px;
        height: 72px;
    }

    .gk-offers:not(.gk-offers--mobile) .gk-offers__button {
        padding-inline: 14px;
    }
}

@media (hover: hover) and (pointer: fine) {
    .gk-offers__product-item:hover .gk-offers__product-img-wrap {
        transform: translateY(-3px);
        border-color: var(--gk-primary, #ef4444);
    }

    a.gk-offers__button:hover {
        background: var(--gk-primary, #ef4444);
        border-color: var(--gk-primary, #ef4444);
        color: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gk-offers__product-img-wrap,
    .gk-offers__button {
        transition: none;
    }
}
