/* ==========================================================================
   PRODUCTS COMPONENT: PRODUCT CARD (.shop-card)
   CellphoneS Unified 1:1 Aspect Ratio & Clean Retail Style
   ========================================================================== */

.shop-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.shop-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.08);
}

/* Media / Image Container (Unified 1:1 Square Ratio) */
.shop-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-decoration: none;
    border-bottom: 1px solid #f8fafc;
}

.shop-card-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.35s ease;
}

.shop-card:hover .shop-card-img {
    transform: scale(1.05);
}

/* Badges on Card Media (CellphoneS Style) */
.shop-card-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    z-index: 3;
    pointer-events: none;
}

.shop-card-badges-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.shop-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 2.5px 7px;
    border-radius: 4px;
    line-height: 1.2;
    letter-spacing: 0.1px;
}

/* Left Badge: Red discount/featured */
.shop-badge-sale,
.shop-badge-featured {
    background: #e11b1e;
    color: #ffffff;
}

/* Right Badge: Soft blue genuine */
.shop-badge-genuine {
    background: #edf2f7;
    color: #2b6cb0;
    margin-left: auto;
}

/* Card Body Content (Only Name & Price - Identical Fixed Height) */
.shop-card-body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 8px;
}

.shop-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.shop-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}

.shop-card:hover .shop-card-title a {
    color: #e11b1e;
}

/* Price Row (CellphoneS Red) */
.shop-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.shop-card-price {
    font-size: 16px;
    font-weight: 800;
    color: #d70018;
    letter-spacing: -0.2px;
}

.shop-card-price-old {
    font-size: 12.5px;
    color: #718096;
    text-decoration: line-through;
    font-weight: 500;
}

/* Base styles for Mobile-Only elements (Hidden by default on Desktop/Tablet) */
.m-only {
    display: none;
}

/* Mobile Layout Overrides (0 - 767px) */
@media (max-width: 767px) {
    .shop-card {
        padding: 14px;
        border-radius: 20px;
        background: #ffffff;
        border: 1px solid #f1f5f9;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    }

    .shop-card-media {
        padding: 12px;
        border-radius: 16px;
        background: #f8fafc;
        border-bottom: none;
        margin-bottom: 12px;
    }

    .desktop-badges {
        display: none !important;
    }
    
    .m-only {
        display: flex;
    }
    
    hr.m-only {
        display: block;
    }
    
    .shop-card-mobile-cat-badge {
        justify-content: space-between;
        align-items: center;
        margin-bottom: 6px;
    }
    
    .m-cat-name {
        font-size: 11px;
        color: #0284c7;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .m-badge-hot {
        background: #e11b1e;
        color: #fff;
        font-size: 10px;
        padding: 2px 8px;
        border-radius: 999px;
        font-weight: 700;
    }
    
    .shop-card-title {
        font-size: 17px;
        line-height: 1.4;
        height: auto;
        max-height: 48px;
        margin-bottom: 12px;
    }
    
    .shop-card-price-row {
        margin-bottom: 0px;
    }
    
    .shop-card-price {
        font-size: 18px;
    }
    
    .hide-on-mobile {
        display: none !important;
    }
    
    .shop-card-body {
        padding: 0;
        gap: 0;
    }
}
