/* 
   SHOPPI SEARCH PREMIUM REDESIGN: ATOMIC CSS 
   Force-applying premium styles to search cards.
*/

/* 1. RESET & CONTAINER */
.shoppi-search-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
    padding: 20px 0 !important;
    width: 100% !important;
}

@media (max-width: 1200px) { .shoppi-search-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 992px) { .shoppi-search-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 576px) { .shoppi-search-grid { grid-template-columns: 1fr !important; } }

/* 2. THE CARD (ULTRA-SPECIFIC) */
html body .shoppi-premium-card {
    background: #ffffff !important;
    border-radius: 28px !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 480px !important;
    overflow: hidden !important;
    position: relative !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    text-decoration: none !important;
    color: inherit !important;
}

html body .shoppi-premium-card:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.12) !important;
    border-color: rgba(247, 147, 30, 0.3) !important;
    z-index: 5 !important;
}

/* 3. IMAGE WRAPPER */
.spc-image-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 240px !important;
    padding-top: 0 !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.spc-image-wrapper img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    padding: 12px !important;
    position: static !important;
    transition: transform 0.4s ease !important;
}

.shoppi-premium-card:hover .spc-image-wrapper img {
    transform: scale(1.06) !important;
}

/* 4. CONTENT AREA */
.spc-content {
    padding: 22px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    background: #ffffff !important;
}

.spc-merchant {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 10px !important;
}
.spc-merchant i { color: #f7931e !important; margin-right: 5px !important; }

.spc-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0d1b3e !important;
    margin-bottom: 15px !important;
    line-height: 1.4 !important;
    height: 48px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.spc-price-box {
    margin-top: auto !important;
    margin-bottom: 20px !important;
}
.spc-price {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #f7931e !important;
}
.spc-old-price {
    font-size: 14px !important;
    color: #cbd5e1 !important;
    text-decoration: line-through !important;
    margin-left: 8px !important;
}

/* 5. ACTIONS */
.spc-actions {
    display: flex !important;
    gap: 10px !important;
}

.spc-btn-buy {
    flex-grow: 1 !important;
    background: linear-gradient(135deg, #f7931e 0%, #ff7849 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 18px !important;
    padding: 14px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(247, 147, 30, 0.2) !important;
    transition: all 0.3s !important;
}
.spc-btn-buy:hover {
    box-shadow: 0 8px 25px rgba(247, 147, 30, 0.4) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

.spc-btn-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #0d1b3e !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}
.spc-btn-icon:hover {
    border-color: #f7931e !important;
    color: #f7931e !important;
    background: #fffaf5 !important;
}

/* 6. BADGES & HEART */
.spc-heart {
    position: absolute !important;
    top: 15px !important; right: 15px !important;
    width: 40px !important; height: 40px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    color: #cbd5e1 !important;
    z-index: 10 !important;
    border: none !important;
}
.spc-heart.active { color: #ff4757 !important; }

.spc-discount {
    position: absolute !important;
    top: 15px !important; left: 15px !important;
    background: #ff4757 !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    z-index: 10 !important;
}
