/**
 * Frontend Styles for Vitanour Offers Engine
 * Luxury Brand Green & Amber Palette (100% RTL & Responsive)
 */

:root {
    --voe-primary: #1D4D3A;
    --voe-primary-dark: #13392B;
    --voe-primary-light: #2E7D5B;
    --voe-accent: #2E7D5B;
    --voe-bg-card: #FFFFFF;
    --voe-bg-selected: #F0F7F3;
    --voe-border-card: #D5E2DB;
    --voe-border-selected: #1D4D3A;
    --voe-text-dark: #111827;
    --voe-text-muted: #4B5563;
    --voe-gold: #D97706;
    --voe-gold-dark: #B45309;
    --voe-savings-bg: #DCFCE7;
    --voe-savings-text: #166534;
    --voe-radius: 14px;
}

/* Container */
.voe-offers-container {
    margin: 20px 0 16px 0 !important;
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.voe-offers-container * {
    box-sizing: border-box !important;
}

/* Header */
.voe-offers-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.voe-header-icon {
    font-size: 16px;
}

.voe-header-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--voe-text-dark);
}

/* Grid */
.voe-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Offer Card */
.voe-offer-card {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--voe-bg-card);
    border: 1.5px solid var(--voe-border-card);
    border-radius: var(--voe-radius);
    padding: 12px 14px;
    gap: 12px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    user-select: none;
    -webkit-user-select: none;
}

.voe-offer-card:hover {
    border-color: var(--voe-primary-light);
    box-shadow: 0 4px 14px rgba(29, 77, 58, 0.08);
}

/* Selected State */
.voe-offer-card.is-selected {
    background: var(--voe-bg-selected);
    border-color: var(--voe-border-selected);
    border-width: 2px;
    padding: 11.5px 13.5px;
    box-shadow: 0 6px 18px rgba(29, 77, 58, 0.12);
}

/* Badges */
.voe-card-badge {
    position: absolute;
    top: -9px;
    left: 14px;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    line-height: 1.3;
    z-index: 2;
}

.voe-badge-popular {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #FFFFFF;
}

.voe-badge-savings {
    background: linear-gradient(135deg, #2E7D5B 0%, #1D4D3A 100%);
    color: #FFFFFF;
}

.voe-badge-custom {
    background: #111827;
    color: #FFFFFF;
}

/* Radio Indicator */
.voe-radio-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voe-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #CBD5E1;
    background: #FFFFFF;
    transition: all 0.2s;
    position: relative;
}

.voe-offer-card.is-selected .voe-radio-circle {
    border-color: var(--voe-primary);
    background: #FFFFFF;
}

.voe-offer-card.is-selected .voe-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--voe-primary);
}

/* Thumbnail */
.voe-thumb-wrap {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voe-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Info Block */
.voe-info-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.voe-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.voe-offer-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--voe-text-dark);
    line-height: 1.25;
}

.voe-offer-subtitle {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--voe-text-muted);
    line-height: 1.25;
}

.voe-custom-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--voe-primary);
    margin-top: 2px;
}

/* Pricing Block */
.voe-pricing-block {
    flex-shrink: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
}

.voe-prices-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.voe-final-price {
    font-size: 15px;
    font-weight: 900;
    color: var(--voe-primary);
    line-height: 1;
}

.voe-currency {
    font-size: 11.5px;
    font-weight: 700;
}

.voe-old-price {
    font-size: 11.5px;
    font-weight: 600;
    color: #9CA3AF;
    text-decoration: line-through;
    line-height: 1;
}

.voe-saving-pill {
    background: var(--voe-savings-bg);
    color: var(--voe-savings-text);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
    line-height: 1.2;
}

/* Responsive Adaptations */
@media (max-width: 380px) {
    .voe-offer-card {
        padding: 10px 10px;
        gap: 8px;
    }
    .voe-thumb-wrap {
        width: 38px;
        height: 38px;
    }
    .voe-offer-title {
        font-size: 12.5px;
    }
    .voe-offer-subtitle {
        font-size: 10.5px;
    }
    .voe-final-price {
        font-size: 13.5px;
    }
    .voe-saving-pill {
        font-size: 9.5px;
        padding: 1.5px 5px;
    }
}

/* ==========================================================================
   Desktop Sticky Cart Refined Styling & Isolation (.etheme-sticky-cart)
   ========================================================================== */

/* 1. Complete isolation - prevent any offers card container from showing in sticky cart */
.etheme-sticky-cart .voe-offers-container,
.etheme-sticky-cart .voe-sticky-ignore,
.etheme-sticky-cart .sales-booster-quantity-discounts-wrapper {
    display: none !important;
}

/* 2. On Mobile screens, hide XStore default sticky cart completely (handled by Snippet #9) */
@media (max-width: 768px) {
    .etheme-sticky-cart,
    .elementor-widget-woocommerce-product-etheme_sticky_cart {
        display: none !important;
    }
}

/* 3. Luxury Desktop Styling (min-width: 769px) */
@media (min-width: 769px) {
    .etheme-sticky-cart {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-top: 1.5px solid #E2E8F0 !important;
        box-shadow: 0 -4px 22px rgba(0, 0, 0, 0.07) !important;
        font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        direction: rtl !important;
        padding: 8px 0 !important;
        z-index: 9999 !important;
    }

    .etheme-sticky-cart .sticky_product_title {
        font-size: 14.5px !important;
        font-weight: 800 !important;
        color: #111827 !important;
        margin-right: 14px !important;
        line-height: 1.3 !important;
    }

    .etheme-sticky-cart img.attachment-woocommerce_thumbnail {
        width: 46px !important;
        height: 46px !important;
        border-radius: 8px !important;
        object-fit: contain !important;
        border: 1px solid #E2E8F0 !important;
        background: #F8FAFC !important;
        padding: 2px !important;
    }

    .etheme-sticky-cart p.price {
        margin: 0 16px 0 0 !important;
        display: inline-flex !important;
        align-items: baseline !important;
        gap: 6px !important;
    }

    .etheme-sticky-cart p.price ins .woocommerce-Price-amount,
    .etheme-sticky-cart p.price > .woocommerce-Price-amount {
        font-size: 17px !important;
        font-weight: 900 !important;
        color: var(--voe-primary) !important;
    }

    .etheme-sticky-cart p.price del .woocommerce-Price-amount {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #9CA3AF !important;
    }

    .etheme-sticky-cart form.cart {
        display: inline-flex !important;
        align-items: center !important;
        gap: 12px !important;
        margin: 0 !important;
    }

    .etheme-sticky-cart .quantity-wrapper {
        border-radius: 8px !important;
        border: 1.5px solid #CBD5E1 !important;
        overflow: hidden !important;
        height: 42px !important;
    }

    .etheme-sticky-cart .quantity-wrapper input.qty {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #111827 !important;
        height: 100% !important;
    }

    .etheme-sticky-cart button.single_add_to_cart_button,
    .etheme-sticky-cart .et_buy-now-btn,
    .etheme-sticky-cart .button {
        background: var(--voe-primary) !important;
        color: #FFFFFF !important;
        font-family: 'Cairo', sans-serif !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        height: 44px !important;
        padding: 0 24px !important;
        border: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        box-shadow: 0 3px 12px rgba(29, 77, 58, 0.22) !important;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
        cursor: pointer !important;
    }

    .etheme-sticky-cart button.single_add_to_cart_button:hover,
    .etheme-sticky-cart .et_buy-now-btn:hover,
    .etheme-sticky-cart .button:hover {
        background: var(--voe-primary-dark) !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 5px 16px rgba(29, 77, 58, 0.32) !important;
    }
}


