/* =============================================
   Deal Card Widget - Structural Framework Fix
   ============================================= */

/* ---------- Card Wrapper ---------- */
.deal-card-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

/* =============================================
   IMAGE SECTION (Fixed Position Context)
   ============================================= */
.deal-card-image-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #e8e8e8;
    display: block;
    box-sizing: border-box;
}
.deal-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback Container Fix */
.deal-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8e8, #d1d5db);
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
}
.deal-card-image-placeholder i {
    font-size: 40px !important; /* Visual fallback presentation */
    color: #9ca3af !important;
    line-height: 1;
    display: inline-block;
}

/* =============================================
   HOT DEAL BADGE (Absolute Top Left)
   ============================================= */
.deal-card-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    z-index: 5;
}
.deal-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FF5F2E;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px 6px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    line-height: 1.5;
}
.deal-badge-chip i {
    font-size: 18px !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.deal-badge-chip svg {
    width: 18px !important;
    height: 18px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   FAVOURITE ICON ENGINE (Absolute Top Right)
   ============================================= */
.deal-card-fav-container {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: inline-flex;
}
.deal-card-fav-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.deal-card-fav-icon-wrap i {
    color: #FF5F2E; 
    font-size: 14px !important;
    line-height: 1;
}
.deal-card-fav-icon-wrap svg {
    color: #FF5F2E;
    width: 14px !important;
    height: 14px !important;
}

/* Views Styles Mapping */
.deal-card-fav-icon-wrap.view-default i {
    background: transparent;
}
.deal-card-fav-icon-wrap.view-stacked {
    background-color: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.deal-card-fav-icon-wrap.view-framed {
    background-color: transparent;
    border: 2px solid #FF5F2E;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

/* Animations */
.deal-card-fav-icon-wrap.anim-grow:hover { transform: scale(1.15); }
.deal-card-fav-icon-wrap.anim-shrink:hover { transform: scale(0.85); }
.deal-card-fav-icon-wrap.anim-pulse:hover { animation: dcw-pulse 1s infinite alternate; }
@keyframes dcw-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.12); }
}

/* =============================================
   META ROW OVERLAY (Absolute Image Bottom Edge)
   ============================================= */
.deal-card-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px;
    flex-wrap: wrap;
    z-index: 5;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
    box-sizing: border-box;
}

.meta-chip.brand {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px;
    cursor: default;
    color: #0d6efd;
    background: #bfd9ff;
    line-height: 1.5;
    border-radius: 6px;
}
.meta-chip.category {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px;
    cursor: default;
    color: #6951dd;
    background: #dbc6ff;
    line-height: 1.5;
    border-radius: 6px;
}
.meta-chip.expiry {
    margin-left: auto;
    border-radius: 100px;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px 4px 6px;
    cursor: default;
    line-height: 1.5;
}
.meta-chip.expiry i {
    font-size: 16px !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.meta-chip.expiry svg {
    width: 16px !important;
    height: 16px !important;
    display: inline-flex;
    align-items: center;

}

.meta-chip.expiry.green  { color: #16a34a; background: #e3ffed; border-color: #16a34a; }
.meta-chip.expiry.orange { color: #ea580c; background: #fff1e9; border-color: #ea580c; }
.meta-chip.expiry.red    { color: #dc2626; background: #ffd8d8; border-color: #dc2626; }

/* =============================================
   CONTENT BODY FRAMEWORK
   ============================================= */
.deal-card-body {
    padding: 16px 16px 0;
    box-sizing: border-box;
}
.deal-card-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #111827;
    margin: 0 0 14px;
}
.deal-card-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 14px;
    line-height: 1.5;
}

/* =============================================
   PRICE & STORE GRID COMPONENT
   ============================================= */
.deal-card-price-box {
    border: 2px dashed #f97316;
    border-radius: 14px;
    padding: 14px;
    background: #fff8f5;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
    box-sizing: border-box;
}
.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}
.price-sale {
    font-size: 28px;
    font-weight: 700;
    color: #FF5F2E;
}
.price-actual {
    font-size: 22px;
    font-weight: 500;
    color: #000000;
    text-decoration: line-through;
}

.deal-type-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 4px;
    background: #27a729;
    color: #ffffff;
    text-transform: uppercase;
    margin-left: auto;
}

.discount-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    background: #ff0909;
    border-radius: 8px;
    padding: 10px 18px;
    width: 70%;
    max-width: 100%;
    height: 54px;
    box-sizing: border-box;
}

.store-logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
    min-height: 54px;
}
.store-logo-box img {
    height: 36px;
    max-width: 90px;
    object-fit: contain;
}
.store-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.store-logo-placeholder i { 
    font-size: 18px !important; 
    color: #9ca3af; 
}
.store-name-text {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-left: 6px;
}

/* =============================================
   STATUS ROW CHIPS (Splitted & Cleaned Layout)
   ============================================= */
.deal-card-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 14px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

/* Verified Specific Style Block */
.deal-card-badges-row .status-chip.verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px 4px 6px;
    border-radius: 100px;
    cursor: pointer;
    color: #15b122;
    background: #ffffff;
    border: 1.3px solid #15b122;
    text-decoration: none;
    line-height: 1.5;
    transition: opacity 0.2s;
}
.deal-card-badges-row .status-chip.verified i {
    font-size: 18px !important;
    line-height: 1;
}
.deal-card-badges-row .status-chip.verified svg {
    width: 18px !important;
    height: 18px !important;
}
.deal-card-badges-row .status-chip.verified:hover { 
    opacity: 0.82; 
}

/* Sale Specific Style Block */
.deal-card-badges-row .status-chip.sale {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px 4px 6px;
    border-radius: 100px;
    cursor: pointer;
    color: #ff0119;
    background: #ffffff;
    border: 1.3px solid #ff0119;
    text-decoration: none;
    line-height: 1.5;
    transition: opacity 0.2s;
}
.deal-card-badges-row .status-chip.sale i {
    font-size: 18px !important;
    line-height: 1;
}
.deal-card-badges-row .status-chip.sale svg {
    width: 18px !important;
    height: 18px !important;
}
.deal-card-badges-row .status-chip.sale:hover { 
    opacity: 0.82; 
}

/* Share Specific Style Block */
.deal-card-badges-row .status-chip.share {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    cursor: pointer;
    color: #000000;
    background: #FAFAFA;
    border: 1.5px solid #2d3849;
    text-decoration: none;
    line-height: 1.5;
    transition: opacity 0.2s;
    margin-left: auto; /* Aligns share button cleanly to the right */
}
.deal-card-badges-row .status-chip.share i {
    font-size: 18px !important;
    line-height: 1;
}
.deal-card-badges-row .status-chip.share svg {
    width: 18px !important;
    height: 18px !important;
}
.deal-card-badges-row .status-chip.share:hover { 
    opacity: 0.82; 
}

/* =============================================
   CTA FOOTER ACTIONS
   ============================================= */
.deal-card-cta {
    padding: 0 16px 16px;
    box-sizing: border-box;
}
.btn-get-deal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: #FF5F2E;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    box-sizing: border-box;
}
.btn-get-deal:hover { background: #ff7d57; }

.btn-coupon-wrapper {
    display: flex;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    box-sizing: border-box;
}
.btn-coupon-main {
    flex: 1;
    padding: 16px;
    background: #FF5F2E;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    border-radius: 14px 0 0 14px;
    z-index: 9999;
    margin-right: -18%;
}
.btn-coupon-main:hover { background: #ff7d57; }

.btn-coupon-reveal {
    padding: 16px 60px 16px 16px; /* Custom layout padding locked */
    background: #ffffff;
    color: #8e95a0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    text-align: center;
    border: 2px dashed #ff7d57;
    border-left: none;
    border-radius: 0 14px 14px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    position: relative;
    box-sizing: border-box;
}
.btn-coupon-reveal::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-10%);
    width: 1px;
    height: 60%;
    background: repeating-linear-gradient(
        to bottom,
        #ff7d57 0, #ff7d57 4px,
        transparent 4px, transparent 8px
    );
}
.btn-coupon-reveal:hover { background: #f3f4f6; }

.elementor-widget-deal-card .elementor-widget-container {
    overflow: visible;
}