/* ================================================================
   Ecomm-Home-Style Product Card — Premium Modern Edition
   ================================================================ */

/* --- Box-sizing reset --- */
.eh-product-card,
.eh-product-card *,
.eh-product-card *:before,
.eh-product-card *:after {
    box-sizing: border-box;
}

/* Column wrapper must allow overflow for flame animation */
.col-6, .col-md-3, .col-md-4, .col-lg-3 {
    overflow: visible !important;
}

/* ========================
   CARD
======================== */
.eh-product-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    border: 1.5px solid #efefef !important;
    overflow: visible !important;
    height: 100% !important;
    transform: translateY(0) !important;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease, border-color 0.2s !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    will-change: transform, box-shadow;
}

.eh-product-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 24px 48px rgba(0,0,0,0.14) !important;
    border-color: #d1d5db !important;
}

/* ========================
   IMAGE BOX
======================== */
.eh-image-link {
    display: block !important;
    text-decoration: none !important;
    overflow: hidden !important;
}

.eh-image-box {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important;
    overflow: hidden !important;
    background: #f8f8f8 !important;
    border-radius: 0 !important;
}

.eh-image {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94) !important;
    border-radius: 0 !important;
}

.eh-product-card:hover .eh-image {
    transform: scale(1.1) !important;
}

/* ========================
   BADGES
======================== */
.eh-badges {
    position: absolute !important;
    top: 14px !important;
    left: 14px !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    overflow: visible !important;
    pointer-events: none !important;
}
.eh-badges span {
    pointer-events: auto !important;
}

/* ======= BADGE ANIMATIONS ======= */
@keyframes eh-float {
    0%,100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-5px) scale(1.06); }
}
@keyframes eh-shimmer {
    0%   { transform: translateX(-100%) skewX(-15deg); opacity: 0; }
    40%  { opacity: 0.4; }
    100% { transform: translateX(200%) skewX(-15deg); opacity: 0; }
}
@keyframes eh-glow-pulse {
    0%,100% { opacity: 0.85; filter: brightness(1); }
    50%      { opacity: 1;    filter: brightness(1.15); }
}
/* Flame particle rising up */
@keyframes eh-flame-1 {
    0%   { opacity:0;   transform: translateY(0px)   translateX(0px)  scale(0.3); }
    15%  { opacity:0.9; }
    100% { opacity:0;   transform: translateY(-36px)  translateX(-5px) scale(0.1); }
}
@keyframes eh-flame-2 {
    0%   { opacity:0;   transform: translateY(0px)   translateX(0px) scale(0.4); }
    20%  { opacity:0.8; }
    100% { opacity:0;   transform: translateY(-28px)  translateX(7px) scale(0.1); }
}
@keyframes eh-flame-3 {
    0%   { opacity:0;   transform: translateY(0px)   translateX(0px) scale(0.5); }
    25%  { opacity:1; }
    100% { opacity:0;   transform: translateY(-42px)  translateX(2px) scale(0.1); }
}

/* ======= BADGE WRAPPER ======= */
.eh-badges {
    overflow: visible !important;
}

/* ======= DISCOUNT BADGE - Smart clean shimmer ======= */
.eh-badge-discount {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #ff1744, #ff6d00) !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    padding: 5px 11px !important;
    border-radius: 5px !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
    min-width: 46px !important;
    overflow: hidden !important;
    z-index: 10 !important;
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.35) !important;
    will-change: transform !important;
    transition: transform 0.25s ease !important;
    animation: eh-glow-pulse 2.2s ease-in-out infinite !important;
}

/* Shimmer overlay — composited (transform only) */
.eh-badge-discount::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%) !important;
    border-radius: inherit !important;
    animation: eh-shimmer 2.4s linear infinite !important;
    will-change: transform !important;
    pointer-events: none !important;
    z-index: 2 !important;
}

.eh-badge-discount:hover {
    transform: translateY(-2px) scale(1.05) !important;
}

.eh-badge-new {
    display: inline-flex !important;
    align-items: center !important;
    background: linear-gradient(135deg, #1e5e4f, #27ae60) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    line-height: 1.2 !important;
    box-shadow: 0 4px 12px rgba(30,94,79,0.35) !important;
    min-width: 48px !important;
    justify-content: center !important;
}

/* ========================
   HOVER ACTION BUTTONS
======================== */
.eh-hover-actions {
    position: absolute !important;
    top: 14px !important; right: 14px !important;
    z-index: 6 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    opacity: 0 !important;
    transform: translateX(20px) !important;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;
}

.eh-product-card:hover .eh-hover-actions {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.eh-action-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(8px) !important;
    color: #444 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    transition: all 0.25s ease !important;
    padding: 0 !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.14) !important;
}

.eh-action-btn:hover {
    background: #1e5e4f !important;
    color: #fff !important;
    transform: scale(1.12) !important;
    box-shadow: 0 6px 18px rgba(30,94,79,0.35) !important;
}

.eh-wishlist-btn.active {
    background: #fff0f0 !important;
    color: #e74c3c !important;
}

.eh-wishlist-btn.active:hover {
    background: #e74c3c !important;
    color: #fff !important;
}

/* ========================
   CART OVERLAY
======================== */
.eh-cart-overlay {
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    transform: translateY(100%) !important;
    opacity: 0 !important;
    transition: all 0.35s cubic-bezier(0.34,1.2,0.64,1) !important;
    z-index: 5 !important;
}

.eh-product-card:hover .eh-cart-overlay {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.eh-cart-btn {
    width: 100% !important;
    background: linear-gradient(135deg, #e94560, #c0392b) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 16px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 -4px 20px rgba(233,69,96,0.3) !important;
}

.eh-cart-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226) !important;
    letter-spacing: 3px !important;
    box-shadow: 0 -4px 24px rgba(233,69,96,0.5) !important;
}

.eh-cart-btn i {
    font-size: 14px !important;
}

/* ========================
   CONTENT
======================== */
.eh-content {
    padding: 18px 16px 16px 16px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
}

.eh-category {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #6c757d !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 7px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

.eh-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
    color: #1a1a2e !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.eh-title a {
    color: #1a1a2e !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.eh-title a:hover {
    color: #1e5e4f !important;
}

.eh-summary {
    font-size: 12px !important;
    color: #6c757d !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ========================
   RATING
======================== */
.eh-rating {
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    margin-bottom: 12px !important;
}

.eh-star-full {
    color: #ffc107 !important;
    font-size: 13px !important;
}

.eh-star-empty {
    color: #dee2e6 !important;
    font-size: 13px !important;
}

.eh-review-count {
    font-size: 12px !important;
    color: #adb5bd !important;
    margin-left: 5px !important;
    font-weight: 500 !important;
}

/* ========================
   PRICE
======================== */
.eh-price {
    display: flex !important;
    align-items: baseline !important;
    gap: 10px !important;
    margin-top: auto !important;
}

.eh-price-current {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #1a1a2e !important;
    letter-spacing: -0.3px !important;
}

.eh-price-original {
    font-size: 14px !important;
    color: #6c757d !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
}

/* ========================
   TOAST
======================== */
.eh-toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.eh-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 12px;
    background: #1f2937;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateX(120%);
    animation: ehSlideIn 0.4s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}

.eh-toast.success { background: linear-gradient(135deg,#1e5e4f,#27ae60); }
.eh-toast.error   { background: linear-gradient(135deg,#c0392b,#e74c3c); }

@keyframes ehSlideIn { to { transform: translateX(0); } }
@keyframes ehFadeOut  { to { opacity: 0; transform: translateX(120%); } }
.eh-toast.hiding { animation: ehFadeOut 0.3s ease forwards; }

/* ========================
   SPINNER
======================== */
.eh-spin { animation: ehSpin 1s linear infinite; }
@keyframes ehSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ========================
   TABLET (768px - 1024px)
======================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .eh-content {
        padding: 14px 12px !important;
    }
    .eh-title {
        font-size: 14px !important;
    }
    .eh-price-current {
        font-size: 17px !important;
    }
    .eh-badge-discount {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
    .eh-action-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    .eh-cart-btn {
        padding: 12px 14px !important;
        font-size: 11px !important;
        letter-spacing: 2px !important;
    }
    /* Tablet: hide by default, show on tap */
    .eh-cart-overlay {
        display: none !important;
    }
    .eh-hover-actions {
        display: none !important;
    }
    .eh-product-card.eh-tapped .eh-hover-actions {
        display: flex !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    .eh-product-card.eh-tapped .eh-cart-overlay {
        display: block !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        position: absolute !important;
        background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%) !important;
    }
}

/* ========================
   MOBILE (max 767px)
======================== */
@media (max-width: 767px) {

    /* Card - mobile touch effect */
    .eh-product-card {
        border-radius: 0 !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
        border: 1px solid #efefef !important;
        transition: transform 0.18s ease, box-shadow 0.18s ease !important;
    }
    .eh-product-card:hover {
        transform: none !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08) !important;
    }
    /* Tap press effect */
    .eh-product-card:active {
        transform: scale(0.97) !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
    }
    /* Tapped state - lift + glow */
    .eh-product-card.eh-tapped {
        transform: translateY(-4px) !important;
        box-shadow: 0 12px 28px rgba(233,69,96,0.18) !important;
        border-color: #e94560 !important;
        z-index: 2 !important;
    }

    /* Image - subtle zoom on tap */
    .eh-image-box {
        padding-top: 100% !important;
    }
    .eh-image {
        transition: transform 0.4s ease !important;
    }
    .eh-product-card.eh-tapped .eh-image {
        transform: scale(1.06) !important;
    }
    .eh-product-card:hover .eh-image {
        transform: none !important;
    }

    /* Badges */
    .eh-badges {
        top: 8px !important;
        left: 8px !important;
        gap: 4px !important;
    }
    .eh-badge-discount {
        font-size: 11px !important;
        padding: 4px 8px !important;
        min-width: 40px !important;
    }
    .eh-badge-new {
        font-size: 9px !important;
        padding: 4px 7px !important;
        min-width: 36px !important;
    }

    /* Hide buttons by default */
    .eh-hover-actions {
        display: none !important;
    }
    .eh-cart-overlay {
        display: none !important;
    }

    /* Show buttons on tap with slide-in animation */
    .eh-product-card.eh-tapped .eh-hover-actions {
        display: flex !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        animation: ehSlideInRight 0.25s cubic-bezier(0.34,1.56,0.64,1) forwards !important;
    }
    .eh-product-card.eh-tapped .eh-cart-overlay {
        display: block !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        position: absolute !important;
        background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%) !important;
        animation: ehSlideInUp 0.25s cubic-bezier(0.34,1.56,0.64,1) forwards !important;
    }

    @keyframes ehSlideInRight {
        from { opacity: 0; transform: translateX(16px); }
        to   { opacity: 1; transform: translateX(0); }
    }
    @keyframes ehSlideInUp {
        from { opacity: 0; transform: translateY(100%); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Content area */
    .eh-content {
        padding: 10px 8px 10px 8px !important;
    }
    .eh-category {
        font-size: 9px !important;
        letter-spacing: 1px !important;
        margin-bottom: 4px !important;
    }
    .eh-title {
        font-size: 12px !important;
        line-height: 1.35 !important;
        margin-bottom: 6px !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }
    .eh-rating {
        margin-bottom: 6px !important;
    }
    .eh-star-full,
    .eh-star-empty {
        font-size: 11px !important;
    }
    .eh-review-count {
        font-size: 10px !important;
    }
    .eh-price {
        gap: 6px !important;
    }
    .eh-price-current {
        font-size: 15px !important;
        font-weight: 800 !important;
    }
    .eh-price-original {
        font-size: 11px !important;
    }

    /* Column padding tighter */
    [class*="col-6"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}
