/* Prem ki Mithaas — ₹1 Offer frontend styles. All rules scoped under .iro-offer-wrapper. */

.iro-offer-wrapper {
    margin: 14px 0;
    width: 100%;
    box-sizing: border-box;
}

.iro-offer-wrapper *,
.iro-offer-wrapper *::before,
.iro-offer-wrapper *::after {
    box-sizing: border-box;
}

.iro-offer-wrapper .iro-offer-card {
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 60%);
    border: 1px solid #ffd54f;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 10px rgba(255, 167, 38, 0.08);
}

.iro-offer-wrapper .iro-offer-header {
    margin: 0 0 10px 0;
}

.iro-offer-wrapper .iro-offer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.iro-offer-wrapper .iro-offer-title h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    color: #212121;
    line-height: 1.3;
    background: transparent;
    border: none;
    text-transform: none;
    letter-spacing: 0;
}

.iro-offer-wrapper .iro-tag {
    display: inline-flex;
    align-items: center;
    background: #ff9800;
    color: #ffffff;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 13px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    line-height: 1.3;
}

.iro-offer-wrapper .iro-offer-subtitle {
    margin: 4px 0 0 0;
    color: #616161;
    font-size: 12px;
    line-height: 1.4;
}

.iro-offer-wrapper .iro-offer-locked,
.iro-offer-wrapper .iro-offer-claimed {
    background: #fff3e0;
    color: #e65100;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.iro-offer-wrapper .iro-offer-claimed {
    background: #e8f5e9;
    color: #2e7d32;
}

.iro-offer-wrapper .iro-lock-icon,
.iro-offer-wrapper .iro-check-icon {
    font-size: 14px;
}

/* Carousel wrapper — flex with side arrows */

.iro-offer-wrapper .iro-carousel-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.iro-offer-wrapper .iro-nav {
    flex: 0 0 26px;
    width: 26px;
    height: 30px;
    align-self: center;
    border: 1px solid #ffb74d;
    background: #ffffff;
    color: #e65100;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, transform 0.1s;
    z-index: 2;
}

.iro-offer-wrapper .iro-nav:hover {
    background: #fff3e0;
}

.iro-offer-wrapper .iro-nav:active {
    transform: scale(0.95);
}

.iro-offer-wrapper .iro-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Horizontal scroll list — 1 item at a time */

.iro-offer-wrapper .iro-offer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
}

.iro-offer-wrapper .iro-offer-list::-webkit-scrollbar {
    display: none;
}

.iro-offer-wrapper .iro-offer-item {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    list-style: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 10px;
    margin: 0;
    transition: border-color 0.2s, background 0.2s;
}

.iro-offer-wrapper .iro-offer-list.iro-inactive .iro-offer-item {
    opacity: 0.55;
}

.iro-offer-wrapper .iro-offer-item.iro-added {
    border-color: #66bb6a;
    background: #f1f8e9;
}

.iro-offer-wrapper .iro-item-img {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.iro-offer-wrapper .iro-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

.iro-offer-wrapper .iro-item-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    text-align: left;
    align-items: flex-start;
}

.iro-offer-wrapper .iro-item-name {
    font-weight: 600;
    color: #212121;
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    word-break: break-word;
}

.iro-offer-wrapper .iro-item-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    flex-wrap: wrap;
}

.iro-offer-wrapper .iro-strike {
    color: #9e9e9e;
    text-decoration: line-through;
    font-size: 11px;
}

.iro-offer-wrapper .iro-strike .amount {
    color: inherit;
}

.iro-offer-wrapper .iro-now {
    color: #2e7d32;
    font-weight: 700;
    font-size: 13px;
}

.iro-offer-wrapper .iro-item-action {
    flex: 0 0 auto;
    margin-left: auto;
}

.iro-offer-wrapper .iro-btn {
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.3;
    white-space: nowrap;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

.iro-offer-wrapper .iro-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.iro-offer-wrapper .iro-btn-add {
    background: #ff9800;
    color: #ffffff;
}

.iro-offer-wrapper .iro-btn-add:hover:not(:disabled) {
    background: #f57c00;
}

.iro-offer-wrapper .iro-btn-remove {
    background: #ffffff;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.iro-offer-wrapper .iro-btn-remove:hover {
    background: #ffebee;
}

.iro-offer-wrapper .iro-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Pagination dots */

.iro-offer-wrapper .iro-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 0 0;
    padding: 0;
    list-style: none;
}

.iro-offer-wrapper .iro-dots .iro-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffe0b2;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: none;
}

.iro-offer-wrapper .iro-dots .iro-dot.is-active {
    background: #ff9800;
    transform: scale(1.4);
}

/* Mini-cart drawer adjustments */

.iro-minicart-slot {
    margin: 12px 0;
}

.iro-minicart-slot .iro-offer-wrapper {
    margin: 0;
    max-width: 100% !important;
}

.iro-minicart-slot .iro-offer-wrapper .iro-offer-card {
    padding: 10px 12px;
}

.iro-minicart-slot .iro-offer-wrapper .iro-offer-title h3 {
    font-size: 14px;
}

.iro-minicart-slot .iro-offer-wrapper .iro-tag {
    font-size: 11px;
    padding: 2px 7px;
}

.iro-minicart-slot .iro-offer-wrapper .iro-item-img {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

.iro-minicart-slot .iro-offer-wrapper .iro-item-name {
    font-size: 12px;
}

/* Checkout context */

@media (min-width: 768px) {
    .iro-offer-wrapper.iro-context-checkout {
        max-width: 100%;
    }
}

/* Table row position — when rendered inside review-order table tbody */

tr.iro-offer-row,
tr.iro-offer-row:hover {
    background: transparent !important;
    border: none !important;
}

tr.iro-offer-row td.iro-offer-cell {
    padding: 8px 0 !important;
    border: none !important;
    background: transparent !important;
    text-align: left !important;
}

tr.iro-offer-row .iro-offer-wrapper {
    margin: 0;
}

/* Responsive */

@media (max-width: 480px) {
    .iro-offer-wrapper .iro-offer-card {
        padding: 10px 12px;
    }
    .iro-offer-wrapper .iro-item-img {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }
    .iro-offer-wrapper .iro-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    .iro-offer-wrapper .iro-nav {
        flex-basis: 24px;
        width: 24px;
        height: 26px;
        font-size: 16px;
    }
}
