/* Quantity Offer Styles */

.qty-offers-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Reduced spacing between cards */
}

.qty-offer-card {
    position: relative;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    /* Padding moved inside */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    direction: ltr !important;
    text-align: left !important;
}

.qty-offer-main {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.qty-offer-card:hover {
    border-color: hsla(var(--brand-h), var(--brand-s), var(--brand-l), 0.3);
    background: hsla(var(--brand-h), var(--brand-s), 98%, 0.5);
    transform: translateY(-1px);
}

.qty-offer-card.active {
    border-color: var(--brand-color);
    background: hsla(var(--brand-h), var(--brand-s), 97%, 0.8);
    box-shadow: 0 4px 12px hsla(var(--brand-h), var(--brand-s), var(--brand-l), 0.08);
}

.qty-offer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.qty-offer-label {
    font-weight: 800;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 2px;
}

.qty-offer-price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.qty-offer-current-price {
    font-weight: 800;
    font-size: 18px;
    color: var(--brand-color);
}

.qty-offer-sale-price {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 600;
}

.qty-offer-image {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Most Popular Badge - Styled as a small elegant pill */
.qty-offer-popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-color);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 0 0 8px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* RTL overrides removed to keep layout fixed LTR */

/* Variants Selection Area - Integrated Table Layout */
.qty-offer-variants-area {
    padding: 10px 14px;
    display: none;
    animation: slideDown 0.3s ease-out;
    border-top: 1px dashed #e5e7eb;
}

.qty-offer-card.active .qty-offer-variants-area {
    display: block;
}

.qty-variants-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.qty-header-label {
    flex: 1;
    font-size: 10px;
    font-weight: 800;
    color: #6b7280;
    text-transform: uppercase;
    text-align: center;
}

.qty-header-num {
    width: 24px;
    font-size: 10px;
    font-weight: 800;
    color: #6b7280;
    text-align: center;
}

.qty-variant-row {
    padding: 4px 0;
    direction: ltr !important;
}

.qty-variant-selectors {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-selector-group {
    flex: 1;
}

.qty-row-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
    font-weight: 900;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-offer-card.active .qty-row-number {
    color: var(--brand-color);
}

.qty-variant-selectors select {
    width: 100%;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
    color: #1f2937;
    outline: none;
    -webkit-appearance: none !important;
    appearance: none !important;
    /* Simple single chevron icon */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 16px !important;
    padding-right: 30px !important;
    transition: all 0.2s;
}

.qty-variant-selectors select:hover {
    border-color: #cbd5e1;
}

.qty-variant-selectors select:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 2px hsla(var(--brand-h), var(--brand-s), var(--brand-l), 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive fixes */
@media (max-width: 480px) {
    .qty-offer-current-price {
        font-size: 16px;
    }

    .qty-offer-main {
        padding: 10px;
        gap: 8px;
    }

    .qty-variants-header,
    .qty-variant-selectors {
        gap: 4px;
    }

    .qty-variant-selectors select {
        padding: 5px 6px;
        font-size: 11px;
        padding-right: 20px;
        background-position: right 4px center;
    }

    .qty-header-label {
        font-size: 9px;
    }
}