/* Custom Product Card Styles - Shared */
:root {
    --main_color: #2563eb;
    --main_color_light: #eff6ff;
    --border_radius: 8px;
}

/* Grid Layout Helper */
.products-grid,
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
    margin-bottom: 40px;
}

@media (max-width: 480px) {

    .products-grid,
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

@media (min-width: 768px) {

    .products-grid,
    .wishlist-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
}

@media (min-width: 1024px) {

    .products-grid,
    .wishlist-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 24px;
    }
}

/* Card Styles */
.custom-product-card {
    background: #fff;
    border-radius: var(--border_radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.custom-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    border-color: var(--main_color);
}

.custom-image-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect */
    background: #fff;
    overflow: hidden;
    border-bottom: 1px solid #f8fafc;
}

.custom-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.4s ease;
}

.custom-product-card:hover .custom-product-image {
    transform: scale(1.08);
}

.custom-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.custom-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-badge.sale {
    background: #ef4444;
}

.custom-actions-hover {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
    z-index: 2;
}

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

.custom-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid #f1f5f9;
}

/* Wishlist specific styles */
.custom-wishlist-btn.active {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
}

.custom-action-btn:hover {
    background: var(--main_color);
    color: #fff;
    border-color: var(--main_color);
}

/* Ensure active wishlist hover stays red */
.custom-wishlist-btn.active:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.custom-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.custom-product-category {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.custom-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    /* Dark Blue instead of black/slate */
    margin-bottom: 8px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.custom-product-title a:hover {
    color: var(--main_color);
}

.custom-price-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #eff6ff;
}

.custom-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--main_color);
    /* Blue price */
}

.custom-price .old {
    font-size: 12px;
    text-decoration: line-through;
    color: #94a3b8;
    margin-left: 6px;
    font-weight: 400;
}

.custom-btn-add-cart {
    background: var(--main_color_light);
    color: var(--main_color);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-btn-add-cart i {
    color: inherit;
}

.custom-btn-add-cart:hover,
.custom-btn-add-cart.active {
    background: var(--main_color);
    color: #fff;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.custom-btn-add-cart:hover i,
.custom-btn-add-cart.active i {
    color: #fff !important;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .custom-actions-hover {
        display: none !important;
    }

    .custom-product-title {
        font-size: 13px;
        height: 36px;
        margin-bottom: 4px;
    }

    .custom-price {
        font-size: 15px;
    }

    .custom-btn-add-cart {
        padding: 6px 10px;
        font-size: 11px;
    }

    .custom-product-image {
        padding: 15px;
    }

    .custom-product-info {
        padding: 10px;
    }
}